WordPress Podpress Plugin – Update File Urls

Use at your own discretion! In short, if you ever wanted to move your media files in wordpress to another domain or something, you can use this code via functions.php to do the job.

prefix."postmeta as pod WHERE pod.meta_key = '_podPressMedia'";
$podpressmetadata = $wpdb->get_results($query_string, ARRAY_A);
if ( TRUE === is_array($podpressmetadata) AND FALSE === empty($podpressmetadata) ) {
for ($i=0; $i < count($podpressmetadata); $i++) {
$data_ar = unserialize($podpressmetadata[$i]['meta_value']);
if ( TRUE === is_array($data_ar) AND FALSE === empty($data_ar) ) {
for ($j=0; $j update( $wpdb->prefix.'postmeta', array('meta_value' => $podpressmetadata[$i]['meta_value']), array('meta_id' => $podpressmetadata[$i]['meta_id']), array('%s'), array('%d') );
}
}
}
}
register_activation_hook( __FILE__, array('podPress_Location_URL_update', 'update_urls') );
?>

WordPress Podpress Plugin – Exchanges the default download icon

Exchanges the default download icon of a certain media file type, not quite working but if you can get it to work let me know. Copy inside your functions.php file

<?php
/*
Plugin Name: podPress media file icon filter
Plugin URI:
Description: exchanges the default download icon of a certain media file type
Author: ntm
Version: 1.0
Author URI:
*/
add_filter('podpress_downloadlinks', 'customize_podpress_downloadlinks');
function customize_podpress_downloadlinks($podPressDownloadlinks) {
// If the current download links code is related to a mp3 file then it contains the phrase "podPress_downloadlinks_audio_mp3". Start the actions only in that case
if (FALSE !== stripos($podPressDownloadlinks, 'podPress_downloadlinks_audio_mp3')) {
$default_image_url = plugins_url('podpress').'/images/audio_mp3_button.png';
$custom_image_url = plugins_url('audio_mp3_button.png', __FILE__); // in case the new button file is in the same folder as this plugin
$podPressDownloadlinks = str_replace($default_image_url, $custom_image_url, $podPressDownloadlinks);
$podPressDownloadlinks .= "\n".''."\n";
}
return $podPressDownloadlinks;
}
?>