PowerPress Podcasting plugin by Blubrry - Version 6.0.1

Version Description

  • Released on 1/25/2015
  • Duration detection option now works for sites running PHP 5.2 (If you can, please upgrade your PHP, but we understand that some situations warrant running outdated software)
  • Tweaked CSS for subscribe sidebar widget font color to always be white.
  • Changed the new 6.0 logic that prevents players from being added until after the wp_head is called, we now ignore when having theme issues option is selected to fix custom theme logic that may happen before wp_head.
  • Added additional "Having Theme Issues" option, alternative logic to try to fix the situation where the player and/or links does not appear with some themes and plugins.
  • Even though PowerPress 6.0 requires WordPress 3.6+, code has been added to prevent error messages in the event plugin updated on older version of WordPress.
  • Fixed bug where malicious code could be injected into the edit existing category podcasting page. Thanks Netsparker for reporting the issue.
  • Fixed bug with Podcasting SEO settings where Episode Titles could not be disabled.
  • Fixed bug where Godaddy customers using PHP 5.4 were getting a blank screen for the PowerPress Settings page due to a bug in the stristr() function. Godaddy is aware of the problem and working on a fix. In the mean time we've replaced calls to stristr() with preg_match().
  • Podcast Republic now uses the podcast feed URL for subscriptions (rather than the iTunes URL).
Download this release

Release Info

Developer amandato
Plugin Icon 128x128 PowerPress Podcasting plugin by Blubrry
Version 6.0.1
Comparing to
See all releases

Code changes from version 6.0 to 6.0.1

class.powerpress-subscribe-widget.php CHANGED
@@ -69,7 +69,7 @@ body .pp-ssb-widget a.pp-ssb-btn:visited,
69
  body .pp-ssb-widget a.pp-ssb-btn:active,
70
  body .pp-ssb-widget a.pp-ssb-btn:hover {
71
  text-decoration: none !important;
72
- color: #FFFFFF;
73
  }
74
  .pp-ssb-widget-dark a,
75
  .pp-ssb-widget-modern a {
69
  body .pp-ssb-widget a.pp-ssb-btn:active,
70
  body .pp-ssb-widget a.pp-ssb-btn:hover {
71
  text-decoration: none !important;
72
+ color: #FFFFFF !important;
73
  }
74
  .pp-ssb-widget-dark a,
75
  .pp-ssb-widget-modern a {
getid3/getid3.lib.php CHANGED
@@ -519,15 +519,12 @@ class getid3_lib
519
  }
520
 
521
  public static function XML2array($XMLstring) {
522
- if (function_exists('simplexml_load_string')) {
523
- if (function_exists('get_object_vars')) {
524
- if (function_exists('libxml_disable_entity_loader')) { // (PHP 5 >= 5.2.11)
525
- // http://websec.io/2012/08/27/Preventing-XEE-in-PHP.html
526
- libxml_disable_entity_loader(true);
527
- }
528
- $XMLobject = simplexml_load_string($XMLstring);
529
- return self::SimpleXMLelement2array($XMLobject);
530
- }
531
  }
532
  return false;
533
  }
519
  }
520
 
521
  public static function XML2array($XMLstring) {
522
+ if ( function_exists( 'simplexml_load_string' ) && function_exists( 'libxml_disable_entity_loader' ) ) {
523
+ $loader = libxml_disable_entity_loader( true );
524
+ $XMLobject = simplexml_load_string( $XMLstring, 'SimpleXMLElement', LIBXML_NOENT );
525
+ $return = self::SimpleXMLelement2array( $XMLobject );
526
+ libxml_disable_entity_loader( $loader );
527
+ return $return;
 
 
 
528
  }
529
  return false;
530
  }
getid3/getid3.php CHANGED
@@ -119,11 +119,14 @@ class getID3
119
  public function __construct() {
120
 
121
  // Check for PHP version
 
 
122
  $required_php_version = '5.3.0';
123
  if (version_compare(PHP_VERSION, $required_php_version, '<')) {
124
  $this->startup_error .= 'getID3() requires PHP v'.$required_php_version.' or higher - you are running v'.PHP_VERSION;
125
  return false;
126
  }
 
127
 
128
  // Check memory
129
  $this->memory_limit = ini_get('memory_limit');
119
  public function __construct() {
120
 
121
  // Check for PHP version
122
+ /*
123
+ // not necessary if logic added to getid3.lib.php using the 5.2.11 libxml_disable_entity_loader() function
124
  $required_php_version = '5.3.0';
125
  if (version_compare(PHP_VERSION, $required_php_version, '<')) {
126
  $this->startup_error .= 'getID3() requires PHP v'.$required_php_version.' or higher - you are running v'.PHP_VERSION;
127
  return false;
128
  }
129
+ */
130
 
131
  // Check memory
132
  $this->memory_limit = ini_get('memory_limit');
mp3info.class.php CHANGED
@@ -632,6 +632,7 @@
632
  else
633
  $FileInfo['playtime_seconds'] = 0;
634
 
 
635
  /*
636
  if( isset($FileInfo['mpeg']['audio']) && $FileInfo['mpeg']['audio'] )
637
  {
632
  else
633
  $FileInfo['playtime_seconds'] = 0;
634
 
635
+ // No longer checking for the right sample rates and channel mode for flash, flash is now OBSOLETE
636
  /*
637
  if( isset($FileInfo['mpeg']['audio']) && $FileInfo['mpeg']['audio'] )
638
  {
powerpress-player.php CHANGED
@@ -699,7 +699,7 @@ function powerpressplayer_player_other($content, $media_url, $EpisodeData = arra
699
  $cover_image = powerpress_get_root_url() . 'play_video_default.jpg';
700
 
701
  $content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">';
702
- $firefox = (stristr($_SERVER['HTTP_USER_AGENT'], 'firefox') !== false );
703
 
704
  if( (!$cover_image && !$firefox ) || $autoplay ) // if we don't have a cover image or we're supposed to auto play the media anyway...
705
  {
@@ -1312,6 +1312,12 @@ MediaElement.js Video Player
1312
  */
1313
  function powerpressplayer_build_mediaelementvideo($media_url, $EpisodeData=array(), $embed = false )
1314
  {
 
 
 
 
 
 
1315
  $player_id = powerpressplayer_get_next_id();
1316
  $cover_image = '';
1317
  $player_width = '';
@@ -1429,6 +1435,12 @@ MediaElement.js Audio Player
1429
  */
1430
  function powerpressplayer_build_mediaelementaudio($media_url, $EpisodeData=array(), $embed = false )
1431
  {
 
 
 
 
 
 
1432
  $player_id = powerpressplayer_get_next_id();
1433
  $autoplay = false;
1434
  // Episode Settings
699
  $cover_image = powerpress_get_root_url() . 'play_video_default.jpg';
700
 
701
  $content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">';
702
+ $firefox = (stripos($_SERVER['HTTP_USER_AGENT'], 'firefox') !== false );
703
 
704
  if( (!$cover_image && !$firefox ) || $autoplay ) // if we don't have a cover image or we're supposed to auto play the media anyway...
705
  {
1312
  */
1313
  function powerpressplayer_build_mediaelementvideo($media_url, $EpisodeData=array(), $embed = false )
1314
  {
1315
+ if( !function_exists('wp_video_shortcode') )
1316
+ {
1317
+ // Return the HTML5 video shortcode instead
1318
+ return powerpressplayer_build_html5video($media_url, $EpisodeData, $embed);
1319
+ }
1320
+
1321
  $player_id = powerpressplayer_get_next_id();
1322
  $cover_image = '';
1323
  $player_width = '';
1435
  */
1436
  function powerpressplayer_build_mediaelementaudio($media_url, $EpisodeData=array(), $embed = false )
1437
  {
1438
+ if( !function_exists('wp_audio_shortcode') )
1439
+ {
1440
+ // Return the HTML5 audio shortcode instead
1441
+ return powerpressplayer_build_html5audio($media_url, $EpisodeData, $embed);
1442
+ }
1443
+
1444
  $player_id = powerpressplayer_get_next_id();
1445
  $autoplay = false;
1446
  // Episode Settings
powerpress-playlist.php CHANGED
@@ -6,7 +6,7 @@ function powerpress_get_term_by_ttid($ttid, $output = OBJECT, $filter = 'raw')
6
  {
7
  global $wpdb;
8
 
9
- $value = (int) $ttid;
10
  $field = 'tt.term_taxonomy_id';
11
 
12
  $term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE $field = %s LIMIT 1", $value) );
6
  {
7
  global $wpdb;
8
 
9
+ $value = intval($ttid);
10
  $field = 'tt.term_taxonomy_id';
11
 
12
  $term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE $field = %s LIMIT 1", $value) );
powerpress-subscribe.php CHANGED
@@ -13,11 +13,11 @@ function powerpresssubscribe_get_itunes_url($Settings)
13
  {
14
  if( !empty($Settings['itunes_url']) )
15
  {
16
- // Always add ?mt=2 to end of itunes.apple.com URLs, and and always remove uo=X if it's there
17
- return preg_replace("/^http:\/\//i", "https://", add_query_arg( array('uo' => false, 'mt' => '2'), trim($Settings['itunes_url']) ) );
18
  }
19
 
20
- if( !empty($Settings['feed_url']) )
21
  return preg_replace('/(^https?:\/\/)/i', 'itpc://', $Settings['feed_url']);
22
 
23
  return '';
@@ -190,8 +190,10 @@ function powerpressplayer_link_subscribe_pre($content, $media_url, $ExtraData =
190
  $itunes_url = preg_replace('/(^https?:\/\/)/i', 'itpc://', $feed_url);
191
 
192
  $player_links = '';
193
- $player_links .= "<a href=\"{$itunes_url}\" class=\"powerpress_link_subscribe powerpress_link_subscribe_itunes\" title=\"". __('Subscribe on iTunes', 'powerpress') ."\" rel=\"nofollow\">". __('iTunes','powerpress') ."</a>".PHP_EOL;
194
- $player_links .= ' '.POWERPRESS_LINK_SEPARATOR .' ';
 
 
195
  $player_links .= "<a href=\"{$feed_url}\" class=\"powerpress_link_subscribe powerpress_link_subscribe_rss\" title=\"". __('Subscribe via RSS', 'powerpress') ."\" rel=\"nofollow\">". __('RSS','powerpress') ."</a>".PHP_EOL;
196
  if( !empty($SubscribeSettings['subscribe_page_url']) )
197
  {
@@ -290,7 +292,7 @@ function powerpress_subscribe_shortcode( $attr ) {
290
 
291
  $Settings['itunes_url'] = powerpresssubscribe_get_itunes_url($Settings);
292
 
293
- if( !empty($attr['itunes_button']) )
294
  {
295
  $html .= '<div>';
296
  $html .= '';
@@ -301,7 +303,7 @@ function powerpress_subscribe_shortcode( $attr ) {
301
  return $html;
302
  }
303
 
304
- if( !empty($attr['itunes_banner']) )
305
  {
306
  $apple_id = powerpress_get_apple_id($Settings['itunes_url'], true);
307
  if( !empty($apple_id) && $apple_id > 0 )
@@ -366,11 +368,13 @@ function powerpress_do_subscribe_widget($settings)
366
  $html .= '<div class="pp-sub-bx">';
367
  $html .= '<img class="pp-sub-l" src="'. htmlspecialchars( $settings['image_url'] ) .'" alt="'. htmlspecialchars( $settings['title'] ) .'" />';
368
  $html .= '<div class="pp-sub-btns">';
369
- $html .= '<a href="'. htmlspecialchars( $settings['itunes_url'] ) .'" class="pp-sub-btn pp-sub-itunes"><span class="pp-sub-ic"></span>'. htmlspecialchars( __('on iTunes', 'powerpress') ) .'</a>';
 
 
370
  $html .= '<a href="'. htmlspecialchars( $settings['feed_url'] ) .'" class="pp-sub-btn pp-sub-rss"><span class="pp-sub-ic"></span>'. htmlspecialchars( __('via RSS', 'powerpress') ) .'</a>';
371
  $htmlX .= '<a href="" class="pp-sub-btn pp-sub-email"><span class="pp-sub-ic"></span>'. htmlspecialchars( __('via Email', 'powerpress') ) .'</a>';
372
  $html .= '<a href="'. htmlspecialchars( $settings['feed_url'] ) .'" class="pp-sub-btn pp-sub-bp"><span class="pp-sub-ic"></span>'. htmlspecialchars( __('BeyondPod for Android', 'powerpress') ) .'</a>';
373
- $html .= '<a href="'. htmlspecialchars( $settings['itunes_url'] ) .'" class="pp-sub-btn pp-sub-pr"><span class="pp-sub-ic"></span>'. htmlspecialchars( __('Podcast Republic for Android', 'powerpress') ) .'</a>';
374
  $html .= '</div>';
375
  $html .= '</div>';
376
  $html .= '<div class="pp-sub-m">';
@@ -407,7 +411,9 @@ function powerpress_do_subscribe_sidebar_widget($settings)
407
  $html = '';
408
 
409
  $html .= '<div class="pp-ssb-widget pp-ssb-widget-'. $settings['style'] .'">';
410
- $html .= '<a href="'. htmlspecialchars( $settings['itunes_url'] ) .'" class="pp-ssb-btn pp-ssb-itunes"><span class="pp-ssb-ic"></span>'. htmlspecialchars( __('on iTunes', 'powerpress') ) .'</a>';
 
 
411
  $html .= '<a href="'. htmlspecialchars( $settings['feed_url'] ) .'" class="pp-ssb-btn pp-ssb-rss"><span class="pp-ssb-ic"></span>'. htmlspecialchars( __('via RSS', 'powerpress') ) .'</a>';
412
  $htmlX .= '<a href="" class="pp-ssb-btn pp-ssb-email"><span class="pp-ssb-ic"></span>'. htmlspecialchars( __('via Email', 'powerpress') ) .'</a>';
413
  if( !empty($settings['subscribe_page_url']) )
13
  {
14
  if( !empty($Settings['itunes_url']) )
15
  {
16
+ // Make URL https://, always add ?mt=2 to end of itunes.apple.com URLs, include l1 to load iTunes store if installed, and always remove uo=X if it's there
17
+ return preg_replace("/^http:\/\//i", "https://", add_query_arg( array('uo' => false, 'mt' => '2', 'ls' => '1'), trim($Settings['itunes_url']) ) );
18
  }
19
 
20
+ if( !empty($Settings['feed_url']) && !empty($Settings['itpc']) )
21
  return preg_replace('/(^https?:\/\/)/i', 'itpc://', $Settings['feed_url']);
22
 
23
  return '';
190
  $itunes_url = preg_replace('/(^https?:\/\/)/i', 'itpc://', $feed_url);
191
 
192
  $player_links = '';
193
+ if( !empty($itunes_url) ) {
194
+ $player_links .= "<a href=\"{$itunes_url}\" class=\"powerpress_link_subscribe powerpress_link_subscribe_itunes\" title=\"". __('Subscribe on iTunes', 'powerpress') ."\" rel=\"nofollow\">". __('iTunes','powerpress') ."</a>".PHP_EOL;
195
+ $player_links .= ' '.POWERPRESS_LINK_SEPARATOR .' ';
196
+ }
197
  $player_links .= "<a href=\"{$feed_url}\" class=\"powerpress_link_subscribe powerpress_link_subscribe_rss\" title=\"". __('Subscribe via RSS', 'powerpress') ."\" rel=\"nofollow\">". __('RSS','powerpress') ."</a>".PHP_EOL;
198
  if( !empty($SubscribeSettings['subscribe_page_url']) )
199
  {
292
 
293
  $Settings['itunes_url'] = powerpresssubscribe_get_itunes_url($Settings);
294
 
295
+ if( !empty($attr['itunes_button']) && !empty($Settings['itunes_url']) )
296
  {
297
  $html .= '<div>';
298
  $html .= '';
303
  return $html;
304
  }
305
 
306
+ if( !empty($attr['itunes_banner']) && !empty($Settings['itunes_url']) )
307
  {
308
  $apple_id = powerpress_get_apple_id($Settings['itunes_url'], true);
309
  if( !empty($apple_id) && $apple_id > 0 )
368
  $html .= '<div class="pp-sub-bx">';
369
  $html .= '<img class="pp-sub-l" src="'. htmlspecialchars( $settings['image_url'] ) .'" alt="'. htmlspecialchars( $settings['title'] ) .'" />';
370
  $html .= '<div class="pp-sub-btns">';
371
+ if( !empty($settings['itunes_url']) ) {
372
+ $html .= '<a href="'. htmlspecialchars( $settings['itunes_url'] ) .'" class="pp-sub-btn pp-sub-itunes"><span class="pp-sub-ic"></span>'. htmlspecialchars( __('on iTunes', 'powerpress') ) .'</a>';
373
+ }
374
  $html .= '<a href="'. htmlspecialchars( $settings['feed_url'] ) .'" class="pp-sub-btn pp-sub-rss"><span class="pp-sub-ic"></span>'. htmlspecialchars( __('via RSS', 'powerpress') ) .'</a>';
375
  $htmlX .= '<a href="" class="pp-sub-btn pp-sub-email"><span class="pp-sub-ic"></span>'. htmlspecialchars( __('via Email', 'powerpress') ) .'</a>';
376
  $html .= '<a href="'. htmlspecialchars( $settings['feed_url'] ) .'" class="pp-sub-btn pp-sub-bp"><span class="pp-sub-ic"></span>'. htmlspecialchars( __('BeyondPod for Android', 'powerpress') ) .'</a>';
377
+ $html .= '<a href="'. htmlspecialchars( $settings['feed_url'] ) .'" class="pp-sub-btn pp-sub-pr"><span class="pp-sub-ic"></span>'. htmlspecialchars( __('Podcast Republic for Android', 'powerpress') ) .'</a>';
378
  $html .= '</div>';
379
  $html .= '</div>';
380
  $html .= '<div class="pp-sub-m">';
411
  $html = '';
412
 
413
  $html .= '<div class="pp-ssb-widget pp-ssb-widget-'. $settings['style'] .'">';
414
+ if( !empty($settings['itunes_url']) ) {
415
+ $html .= '<a href="'. htmlspecialchars( $settings['itunes_url'] ) .'" class="pp-ssb-btn pp-ssb-itunes"><span class="pp-ssb-ic"></span>'. htmlspecialchars( __('on iTunes', 'powerpress') ) .'</a>';
416
+ }
417
  $html .= '<a href="'. htmlspecialchars( $settings['feed_url'] ) .'" class="pp-ssb-btn pp-ssb-rss"><span class="pp-ssb-ic"></span>'. htmlspecialchars( __('via RSS', 'powerpress') ) .'</a>';
418
  $htmlX .= '<a href="" class="pp-ssb-btn pp-ssb-email"><span class="pp-ssb-ic"></span>'. htmlspecialchars( __('via Email', 'powerpress') ) .'</a>';
419
  if( !empty($settings['subscribe_page_url']) )
powerpress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="http://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> adds podcasting support to your blog. Features include: media player, 3rd party statistics, iTunes integration, Blubrry Services (Media Statistics and Hosting) integration and a lot more.
6
- Version: 6.0
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Change Log:
@@ -32,7 +32,7 @@ if( !function_exists('add_action') )
32
  die("access denied.");
33
 
34
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
35
- define('POWERPRESS_VERSION', '6.0' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
@@ -99,9 +99,6 @@ $powerpress_feed = NULL; // DO NOT CHANGE
99
 
100
  function powerpress_content($content)
101
  {
102
- if( empty($GLOBALS['powerpress_wp_head_completed']) )
103
- return $content;
104
-
105
  global $post, $g_powerpress_excerpt_post_id;
106
 
107
  if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
@@ -129,13 +126,29 @@ function powerpress_content($content)
129
  if( !empty($GeneralSettings['disable_appearance']) )
130
  return $content;
131
 
 
 
 
 
 
 
 
 
132
  if( !empty($GeneralSettings['player_aggressive']) )
133
  {
134
- if( strstr($content, '<!--powerpress_player-->') !== false )
135
- return $content; // The players were already added to the content
136
-
137
- if( $g_powerpress_excerpt_post_id > 0 )
138
- $g_powerpress_excerpt_post_id = 0; // Hack, set this to zero so it always goes past...
 
 
 
 
 
 
 
 
139
  }
140
 
141
  // Problem: If the_excerpt is used instead of the_content, both the_exerpt and the_content will be called here.
@@ -309,10 +322,10 @@ function powerpress_content($content)
309
  switch( $GeneralSettings['display_player'] )
310
  {
311
  case 1: { // Below posts
312
- return $content.$new_content.( !empty($GeneralSettings['player_aggressive']) ?'<!--powerpress_player-->':'');
313
  }; break;
314
  case 2: { // Above posts
315
- return ( !empty($GeneralSettings['player_aggressive']) ?'<!--powerpress_player-->':'').$new_content.$content;
316
  }; break;
317
  }
318
  return $content;
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="http://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> adds podcasting support to your blog. Features include: media player, 3rd party statistics, iTunes integration, Blubrry Services (Media Statistics and Hosting) integration and a lot more.
6
+ Version: 6.0.1
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Change Log:
32
  die("access denied.");
33
 
34
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
35
+ define('POWERPRESS_VERSION', '6.0.1' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
99
 
100
  function powerpress_content($content)
101
  {
 
 
 
102
  global $post, $g_powerpress_excerpt_post_id;
103
 
104
  if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
126
  if( !empty($GeneralSettings['disable_appearance']) )
127
  return $content;
128
 
129
+ // check for themes/plugins where we know we need to do this...
130
+ if( !empty($GLOBALS['fb_ver']) && version_compare($GLOBALS['fb_ver'], '1.0', '<=') ) {
131
+ $GeneralSettings['player_aggressive'] = 1;
132
+ }
133
+ if( defined('JETPACK__VERSION') && version_compare(JETPACK__VERSION, '2.0', '>=') ) {
134
+ $GeneralSettings['player_aggressive'] = 1;
135
+ }
136
+
137
  if( !empty($GeneralSettings['player_aggressive']) )
138
  {
139
+ if( $GeneralSettings['player_aggressive'] == 2 ) // If we do not have theme issues then lets keep this logic clean. and only display playes after the wp_head only
140
+ {
141
+ if( empty($GLOBALS['powerpress_wp_head_completed']) )
142
+ return $content;
143
+ }
144
+ else
145
+ {
146
+ if( strstr($content, '<!--powerpress_player-->') !== false )
147
+ return $content; // The players were already added to the content
148
+
149
+ if( $g_powerpress_excerpt_post_id > 0 )
150
+ $g_powerpress_excerpt_post_id = 0; // Hack, set this to zero so it always goes past...
151
+ }
152
  }
153
 
154
  // Problem: If the_excerpt is used instead of the_content, both the_exerpt and the_content will be called here.
322
  switch( $GeneralSettings['display_player'] )
323
  {
324
  case 1: { // Below posts
325
+ return $content.$new_content.( !empty($GeneralSettings['player_aggressive']) && $GeneralSettings['player_aggressive'] == 1 ?'<!--powerpress_player-->':'');
326
  }; break;
327
  case 2: { // Above posts
328
+ return ( !empty($GeneralSettings['player_aggressive']) && $GeneralSettings['player_aggressive'] == 1 ?'<!--powerpress_player-->':'').$new_content.$content;
329
  }; break;
330
  }
331
  return $content;
powerpressadmin-basic.php CHANGED
@@ -135,7 +135,7 @@ jQuery(document).ready(function($) {
135
 
136
 
137
  <input type="hidden" id="powerpress_advanced_mode" name="General[advanced_mode_2]" value="1" />
138
- <input type="hidden" id="save_tab_pos" name="tab" value="<?php echo (empty($_POST['tab'])?0:$_POST['tab']); ?>" />
139
 
140
  <div id="powerpress_admin_header">
141
  <h2><?php echo __('Blubrry PowerPress Settings', 'powerpress'); ?></h2>
@@ -755,11 +755,11 @@ function powerpressadmin_edit_blubrry_services($General, $action_url = false, $a
755
  // Check that the redirect is in the settings...
756
  $RedirectURL = 'http://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
757
  $Error = true;
758
- if( stristr($General['redirect1'], $RedirectURL ) )
759
  $Error = false;
760
- else if( stristr($General['redirect2'], $RedirectURL ) )
761
  $Error = false;
762
- else if( stristr($General['redirect3'], $RedirectURL ) )
763
  $Error = false;
764
  if( $Error )
765
  {
@@ -837,7 +837,7 @@ function powerpressadmin_edit_media_statistics($General)
837
  if( !isset($General['redirect3']) )
838
  $General['redirect3'] = '';
839
 
840
- $StatsIntegrationURL = false;
841
  if( !empty($General['blubrry_program_keyword']) )
842
  $StatsIntegrationURL = 'http://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
843
  ?>
@@ -855,7 +855,7 @@ function powerpressadmin_edit_media_statistics($General)
855
  <?php echo __('Redirect URL 1', 'powerpress'); ?>
856
  </th>
857
  <td>
858
- <input type="text" style="width: 60%;" name="<?php if( stristr($General['redirect1'], $StatsIntegrationURL) ) echo 'NULL[redirect1]'; else echo 'General[redirect1]'; ?>" value="<?php echo esc_attr($General['redirect1']); ?>" onChange="return CheckRedirect(this);" maxlength="250" <?php if( stristr($General['redirect1'], $StatsIntegrationURL) ) { echo ' readOnly="readOnly"'; $StatsIntegrationURL = false; } ?> />
859
  </td>
860
  </tr>
861
  </table>
@@ -874,7 +874,7 @@ function powerpressadmin_edit_media_statistics($General)
874
  <?php echo __('Redirect URL 2', 'powerpress'); ?>
875
  </th>
876
  <td>
877
- <input type="text" style="width: 60%;" name="<?php if( stristr($General['redirect2'], $StatsIntegrationURL) ) echo 'NULL[redirect2]'; else echo 'General[redirect2]'; ?>" value="<?php echo esc_attr($General['redirect2']); ?>" onblur="return CheckRedirect(this);" maxlength="250" <?php if( stristr($General['redirect2'], $StatsIntegrationURL) ) { echo ' readOnly="readOnly"'; $StatsIntegrationURL = false; } ?> />
878
  </td>
879
  </tr>
880
  </table>
@@ -892,7 +892,7 @@ function powerpressadmin_edit_media_statistics($General)
892
  <?php echo __('Redirect URL 3', 'powerpress'); ?>
893
  </th>
894
  <td>
895
- <input type="text" style="width: 60%;" name="<?php if( stristr($General['redirect3'], $StatsIntegrationURL) ) echo 'NULL[redirect3]'; else echo 'General[redirect3]'; ?>" value="<?php echo esc_attr($General['redirect3']); ?>" onblur="return CheckRedirect(this);" maxlength="250" <?php if( stristr($General['redirect3'], $StatsIntegrationURL) ) echo ' readOnly="readOnly"'; ?> />
896
  </td>
897
  </tr>
898
  </table>
@@ -934,7 +934,7 @@ function powerpressadmin_appearance($General=false, $Feed = false)
934
  $General['subscribe_label'] = '';
935
 
936
 
937
-
938
  $Players = array('podcast'=>__('Default Podcast (podcast)', 'powerpress') );
939
  if( isset($General['custom_feeds']) )
940
  {
@@ -945,6 +945,7 @@ function powerpressadmin_appearance($General=false, $Feed = false)
945
  $Players[$podcast_slug] = sprintf('%s (%s)', $podcast_title, $podcast_slug);
946
  }
947
  }
 
948
 
949
  ?>
950
 
@@ -1081,7 +1082,7 @@ function powerpressadmin_appearance($General=false, $Feed = false)
1081
  <td>
1082
  <select name="General[player_aggressive]" class="bpp_input_med">
1083
  <?php
1084
- $linkoptions = array(0=>__('No, everything is working', 'powerpress'), 1=>__('Yes, please try to fix', 'powerpress') );
1085
 
1086
  while( list($value,$desc) = each($linkoptions) )
1087
  echo "\t<option value=\"$value\"". ($General['player_aggressive']==$value?' selected':''). ">$desc</option>\n";
135
 
136
 
137
  <input type="hidden" id="powerpress_advanced_mode" name="General[advanced_mode_2]" value="1" />
138
+ <input type="hidden" id="save_tab_pos" name="tab" value="<?php echo (empty($_POST['tab'])?0: intval($_POST['tab']) ); ?>" />
139
 
140
  <div id="powerpress_admin_header">
141
  <h2><?php echo __('Blubrry PowerPress Settings', 'powerpress'); ?></h2>
755
  // Check that the redirect is in the settings...
756
  $RedirectURL = 'http://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
757
  $Error = true;
758
+ if( stripos($General['redirect1'], $RedirectURL ) !== false )
759
  $Error = false;
760
+ else if( stripos($General['redirect2'], $RedirectURL ) !== false )
761
  $Error = false;
762
+ else if( stripos($General['redirect3'], $RedirectURL ) !== false )
763
  $Error = false;
764
  if( $Error )
765
  {
837
  if( !isset($General['redirect3']) )
838
  $General['redirect3'] = '';
839
 
840
+ $StatsIntegrationURL = '';
841
  if( !empty($General['blubrry_program_keyword']) )
842
  $StatsIntegrationURL = 'http://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
843
  ?>
855
  <?php echo __('Redirect URL 1', 'powerpress'); ?>
856
  </th>
857
  <td>
858
+ <input type="text" style="width: 60%;" name="<?php if( stripos($General['redirect1'], $StatsIntegrationURL) !== false ) echo 'NULL[redirect1]'; else echo 'General[redirect1]'; ?>" value="<?php echo esc_attr($General['redirect1']); ?>" onChange="return CheckRedirect(this);" maxlength="250" <?php if( stripos($General['redirect1'], $StatsIntegrationURL) !== false ) { echo ' readOnly="readOnly"'; $StatsIntegrationURL = false; } ?> />
859
  </td>
860
  </tr>
861
  </table>
874
  <?php echo __('Redirect URL 2', 'powerpress'); ?>
875
  </th>
876
  <td>
877
+ <input type="text" style="width: 60%;" name="<?php if( stripos($General['redirect2'], $StatsIntegrationURL) !== false ) echo 'NULL[redirect2]'; else echo 'General[redirect2]'; ?>" value="<?php echo esc_attr($General['redirect2']); ?>" onblur="return CheckRedirect(this);" maxlength="250" <?php if( stripos($General['redirect2'], $StatsIntegrationURL) !== false ) { echo ' readOnly="readOnly"'; $StatsIntegrationURL = false; } ?> />
878
  </td>
879
  </tr>
880
  </table>
892
  <?php echo __('Redirect URL 3', 'powerpress'); ?>
893
  </th>
894
  <td>
895
+ <input type="text" style="width: 60%;" name="<?php if( stripos($General['redirect3'], $StatsIntegrationURL) !== false ) echo 'NULL[redirect3]'; else echo 'General[redirect3]'; ?>" value="<?php echo esc_attr($General['redirect3']); ?>" onblur="return CheckRedirect(this);" maxlength="250" <?php if( stripos($General['redirect3'], $StatsIntegrationURL) !== false ) echo ' readOnly="readOnly"'; ?> />
896
  </td>
897
  </tr>
898
  </table>
934
  $General['subscribe_label'] = '';
935
 
936
 
937
+ /*
938
  $Players = array('podcast'=>__('Default Podcast (podcast)', 'powerpress') );
939
  if( isset($General['custom_feeds']) )
940
  {
945
  $Players[$podcast_slug] = sprintf('%s (%s)', $podcast_title, $podcast_slug);
946
  }
947
  }
948
+ */
949
 
950
  ?>
951
 
1082
  <td>
1083
  <select name="General[player_aggressive]" class="bpp_input_med">
1084
  <?php
1085
+ $linkoptions = array(0=>__('No, everything is working', 'powerpress'), 1=>__('Yes, please try to fix', 'powerpress'), 2=>__('Yes, alternative fix', 'powerpress') );
1086
 
1087
  while( list($value,$desc) = each($linkoptions) )
1088
  echo "\t<option value=\"$value\"". ($General['player_aggressive']==$value?' selected':''). ">$desc</option>\n";
powerpressadmin-categoryfeeds.php CHANGED
@@ -115,10 +115,10 @@ function powerpress_admin_categoryfeeds()
115
  }; break;
116
  case 'name': {
117
 
118
- echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'.$feed_title.'</a></strong><br />';
119
  $actions = array();
120
  $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
121
- $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_categoryfeeds.php&amp;action=powerpress-delete-category-feed&amp;cat=$cat_ID", 'powerpress-delete-category-feed-' . $cat_ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for category feed '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), $feed_title )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
122
  $action_count = count($actions);
123
  $i = 0;
124
  echo '<div class="row-actions">';
115
  }; break;
116
  case 'name': {
117
 
118
+ echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'. esc_html($feed_title) .'</a></strong><br />';
119
  $actions = array();
120
  $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
121
+ $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_categoryfeeds.php&amp;action=powerpress-delete-category-feed&amp;cat=$cat_ID", 'powerpress-delete-category-feed-' . $cat_ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for category feed '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_html($feed_title) )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
122
  $action_count = count($actions);
123
  $i = 0;
124
  echo '<div class="row-actions">';
powerpressadmin-customfeeds.php CHANGED
@@ -78,12 +78,12 @@ function powerpress_admin_customfeeds()
78
  $count = 0;
79
  while( list($feed_slug, $feed_title) = each($Feeds ) )
80
  {
 
81
  $episode_total = powerpress_admin_episodes_per_feed($feed_slug);
82
  $columns = powerpress_admin_customfeeds_columns();
83
  $hidden = array();
84
  if( $feed_slug == 'podcast' )
85
  $feed_title = __('Podcast', 'powerpress');
86
- $feed_title = esc_html($feed_title);
87
  if( $count % 2 == 0 )
88
  echo '<tr valign="middle" class="alternate">';
89
  else
@@ -113,10 +113,10 @@ function powerpress_admin_customfeeds()
113
  }; break;
114
  case 'name': {
115
 
116
- echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'.$feed_title.'</a></strong>'. ( $feed_slug == 'podcast' ?' ('. __('default channel', 'powerpress') .')':'').'<br />';
117
  $actions = array();
118
  $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
119
- $actions['delete'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_customfeeds.php&amp;action=powerpress-delete-feed&amp;feed_slug=$feed_slug", 'powerpress-delete-feed-' . $feed_slug) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to delete feed '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), $feed_title )) . "') ) { return true;}return false;\">" . __('Delete', 'powerpress') . "</a>";
120
  if( !isset($General['custom_feeds'][ $feed_slug ]) )
121
  {
122
  unset($actions['delete']);
@@ -136,7 +136,7 @@ function powerpress_admin_customfeeds()
136
 
137
  case 'url': {
138
 
139
- echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">$short_url</a>";
140
  echo '<div class="row-actions">';
141
  echo '<span class="'.$action .'"><a href="http://www.feedvalidator.org/check.cgi?url='. urlencode($url) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
142
  echo '</div>';
78
  $count = 0;
79
  while( list($feed_slug, $feed_title) = each($Feeds ) )
80
  {
81
+ $feed_slug = esc_attr($feed_slug); // Precaution
82
  $episode_total = powerpress_admin_episodes_per_feed($feed_slug);
83
  $columns = powerpress_admin_customfeeds_columns();
84
  $hidden = array();
85
  if( $feed_slug == 'podcast' )
86
  $feed_title = __('Podcast', 'powerpress');
 
87
  if( $count % 2 == 0 )
88
  echo '<tr valign="middle" class="alternate">';
89
  else
113
  }; break;
114
  case 'name': {
115
 
116
+ echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'. esc_html($feed_title) .'</a></strong>'. ( $feed_slug == 'podcast' ?' ('. __('default channel', 'powerpress') .')':'').'<br />';
117
  $actions = array();
118
  $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
119
+ $actions['delete'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_customfeeds.php&amp;action=powerpress-delete-feed&amp;feed_slug=$feed_slug", 'powerpress-delete-feed-' . $feed_slug) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to delete feed '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_attr($feed_title) )) . "') ) { return true;}return false;\">" . __('Delete', 'powerpress') . "</a>";
120
  if( !isset($General['custom_feeds'][ $feed_slug ]) )
121
  {
122
  unset($actions['delete']);
136
 
137
  case 'url': {
138
 
139
+ echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">". esc_html($short_url) ."</a>";
140
  echo '<div class="row-actions">';
141
  echo '<span class="'.$action .'"><a href="http://www.feedvalidator.org/check.cgi?url='. urlencode($url) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
142
  echo '</div>';
powerpressadmin-diagnostics.php CHANGED
@@ -301,7 +301,7 @@
301
  $message .= " &nbsp; \t &nbsp; ". __('message 2:', 'powerpress') .' '. $powerpress_diags['system_info']['message2'] ."<br />\n";
302
  $message .= " &nbsp; \t &nbsp; ". __('message 3:', 'powerpress') .' '. $powerpress_diags['system_info']['message3'] ."<br />\n";
303
 
304
- if( isset($_GET['ap']) && $_GET['ap'] )
305
  {
306
  $current_plugins = get_option('active_plugins');
307
  $message .= "<br />\n";
@@ -330,7 +330,7 @@
330
  $headers = 'From: "'.$from_name.'" <'.$from_email.'>'."\n"
331
  .'Reply-To: "'.$from_name.'" <'.$from_email.'>'."\n"
332
  .'Return-Path: "'.$from_name.'" <'.$from_email.'>'."\n";
333
- if( isset($_GET['CC']) )
334
  $headers .= 'CC: "'.$from_name.'" <'.$from_email.'>'."\n";
335
  $headers .= "Content-Type: text/html\n";
336
 
301
  $message .= " &nbsp; \t &nbsp; ". __('message 2:', 'powerpress') .' '. $powerpress_diags['system_info']['message2'] ."<br />\n";
302
  $message .= " &nbsp; \t &nbsp; ". __('message 3:', 'powerpress') .' '. $powerpress_diags['system_info']['message3'] ."<br />\n";
303
 
304
+ if( !empty($_GET['ap']) )
305
  {
306
  $current_plugins = get_option('active_plugins');
307
  $message .= "<br />\n";
330
  $headers = 'From: "'.$from_name.'" <'.$from_email.'>'."\n"
331
  .'Reply-To: "'.$from_name.'" <'.$from_email.'>'."\n"
332
  .'Return-Path: "'.$from_name.'" <'.$from_email.'>'."\n";
333
+ if( !empty($_GET['CC']) )
334
  $headers .= 'CC: "'.$from_name.'" <'.$from_email.'>'."\n";
335
  $headers .= "Content-Type: text/html\n";
336
 
powerpressadmin-editfeed.php CHANGED
@@ -180,7 +180,7 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
180
  if( !isset($General['custom_feeds'][$feed_slug]) )
181
  $General['custom_feeds'][$feed_slug] = __('Podcast (default)', 'powerpress');
182
 
183
- $FeedTitle = sprintf( 'Podcast Settings for Channel: %s', $General['custom_feeds'][$feed_slug]);
184
  echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
185
  echo '<input type="hidden" name="action" value="powerpress-save-channel" />';
186
 
180
  if( !isset($General['custom_feeds'][$feed_slug]) )
181
  $General['custom_feeds'][$feed_slug] = __('Podcast (default)', 'powerpress');
182
 
183
+ $FeedTitle = sprintf( 'Podcast Settings for Channel: %s', htmlspecialchars($General['custom_feeds'][$feed_slug]) );
184
  echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
185
  echo '<input type="hidden" name="action" value="powerpress-save-channel" />';
186
 
powerpressadmin-find-replace.php CHANGED
@@ -33,6 +33,7 @@
33
  if( isset($_POST['FindReplace']) )
34
  {
35
  $FindReplace = $_POST['FindReplace'];
 
36
  if( $FindReplace['step'] == 2 || $FindReplace['step'] == 3 )
37
  {
38
  $success_count = 0;
@@ -56,9 +57,9 @@
56
  $g_FindReplaceResults[ $meta_id ] = $row;
57
  $g_FindReplaceResults[ $meta_id ]['old_url'] = $old_url;
58
  $g_FindReplaceResults[ $meta_id ]['find_readable'] = str_replace($FindReplace['find_string'],
59
- sprintf('<span class="find_string strong">%s</span>', $FindReplace['find_string']), $old_url);
60
  $g_FindReplaceResults[ $meta_id ]['replace_readable'] = str_replace($FindReplace['find_string'],
61
- sprintf('<span class="replace_string strong">%s</span>', $FindReplace['replace_string']), $old_url);
62
  $new_url = str_replace($FindReplace['find_string'],$FindReplace['replace_string'], $old_url);
63
  $g_FindReplaceResults[ $meta_id ]['new_url'] = $new_url;
64
 
@@ -152,6 +153,7 @@
152
  if( isset($_POST['FindReplace']) )
153
  {
154
  $FindReplace = $_POST['FindReplace'];
 
155
  }
156
  else
157
  {
@@ -169,6 +171,8 @@
169
  {
170
  $FindReplaceResults = powerpressadmin_find_replace_get_results();
171
  }
 
 
172
  ?>
173
 
174
  <script type="text/javascript"><!--
@@ -211,7 +215,7 @@ dt {
211
  </style>
212
 
213
  <input type="hidden" name="action" value="powerpress-find-replace" />
214
- <input type="hidden" name="FindReplace[step]" value="<?php echo $FindReplace['step']; ?>" id="replace_step" />
215
 
216
  <h2><?php echo __("Find and Replace Episode URLs", 'powerpress'); ?></h2>
217
 
@@ -245,7 +249,7 @@ dt {
245
  ?>
246
  <h2><?php echo ($FindReplace['step'] == 2 ? __('Preview Changes', 'powerpress') : __('Change Results', 'powerpress') ); ?></h2>
247
 
248
- <p><?php echo sprintf( __('Found %d results with "%s"', 'powerpress'), count($FindReplaceResults), "<span class=\"find_string strong\">{$FindReplace['find_string']}</span>" ); ?></p>
249
 
250
  <ol>
251
  <?php
@@ -274,7 +278,7 @@ dt {
274
  </dt>
275
  <dd>
276
  <?php echo __('Replace', 'powerpress') .': '. $row['replace_readable']; ?>
277
- (<a href="<?php echo $row['new_url']; ?>" target="_blank"><?php echo __('test link', 'powerpress'); ?></a>)
278
  </dd>
279
  </dl>
280
  </li>
33
  if( isset($_POST['FindReplace']) )
34
  {
35
  $FindReplace = $_POST['FindReplace'];
36
+ $FindReplace['step'] = intval( $FindReplace['step'] );
37
  if( $FindReplace['step'] == 2 || $FindReplace['step'] == 3 )
38
  {
39
  $success_count = 0;
57
  $g_FindReplaceResults[ $meta_id ] = $row;
58
  $g_FindReplaceResults[ $meta_id ]['old_url'] = $old_url;
59
  $g_FindReplaceResults[ $meta_id ]['find_readable'] = str_replace($FindReplace['find_string'],
60
+ sprintf('<span class="find_string strong">%s</span>', esc_attr($FindReplace['find_string'])), esc_attr($old_url) );
61
  $g_FindReplaceResults[ $meta_id ]['replace_readable'] = str_replace($FindReplace['find_string'],
62
+ sprintf('<span class="replace_string strong">%s</span>', esc_attr($FindReplace['replace_string']) ), esc_attr($old_url) );
63
  $new_url = str_replace($FindReplace['find_string'],$FindReplace['replace_string'], $old_url);
64
  $g_FindReplaceResults[ $meta_id ]['new_url'] = $new_url;
65
 
153
  if( isset($_POST['FindReplace']) )
154
  {
155
  $FindReplace = $_POST['FindReplace'];
156
+ $FindReplace['step'] = intval( $FindReplace['step'] );
157
  }
158
  else
159
  {
171
  {
172
  $FindReplaceResults = powerpressadmin_find_replace_get_results();
173
  }
174
+
175
+ //$FindReplace = powerpress_esc_html($FindReplace); // Prevent XSS
176
  ?>
177
 
178
  <script type="text/javascript"><!--
215
  </style>
216
 
217
  <input type="hidden" name="action" value="powerpress-find-replace" />
218
+ <input type="hidden" name="FindReplace[step]" value="<?php echo esc_attr($FindReplace['step']); ?>" id="replace_step" />
219
 
220
  <h2><?php echo __("Find and Replace Episode URLs", 'powerpress'); ?></h2>
221
 
249
  ?>
250
  <h2><?php echo ($FindReplace['step'] == 2 ? __('Preview Changes', 'powerpress') : __('Change Results', 'powerpress') ); ?></h2>
251
 
252
+ <p><?php echo sprintf( __('Found %d results with "%s"', 'powerpress'), count($FindReplaceResults), "<span class=\"find_string strong\">". esc_attr($FindReplace['find_string']). "</span>" ); ?></p>
253
 
254
  <ol>
255
  <?php
278
  </dt>
279
  <dd>
280
  <?php echo __('Replace', 'powerpress') .': '. $row['replace_readable']; ?>
281
+ (<a href="<?php echo esc_attr($row['new_url']); ?>" target="_blank"><?php echo __('test link', 'powerpress'); ?></a>)
282
  </dd>
283
  </dl>
284
  </li>
powerpressadmin-jquery.php CHANGED
@@ -13,7 +13,7 @@ function powerpress_add_blubrry_redirect($program_keyword)
13
  for( $x = 1; $x <= 3; $x++ )
14
  {
15
  $field = sprintf('redirect%d', $x);
16
- if( !empty($Settings[$field]) && !stristr($Settings[$field], 'podtrac.com') )
17
  $NewSettings[$field] = '';
18
  }
19
  $NewSettings['redirect1'] = $RedirectURL.'/';
@@ -209,7 +209,7 @@ function powerpress_admin_jquery_init()
209
 
210
  $results = powerpress_json_decode($json_data);
211
 
212
- $FeedSlug = $_GET['podcast-feed'];
213
  powerpress_admin_jquery_header( __('Select Media', 'powerpress'), true );
214
  ?>
215
  <script language="JavaScript" type="text/javascript"><!--
@@ -249,11 +249,11 @@ function DeleteMedia(File)
249
  $message = '';
250
  if( !empty($results['quota']['expires']['expired']) )
251
  {
252
- $message = '<p>'. sprintf( __('Media hosting service expired on %s.', 'powerpress'), $results['quota']['expires']['readable_date']) . '</p>';
253
  }
254
  else
255
  {
256
- $message = '<p>'. sprintf( __('Media hosting service will expire on %s.', 'powerpress'), $results['quota']['expires']['readable_date']) . '</p>';
257
  }
258
 
259
  $message .= '<p style="text-align: center;"><strong><a href="'. $results['quota']['expires']['renew_link'] .'" target="_blank" style="text-decoration: underline;">'. __('Renew Media Hosting Service', 'powerpress') . '</a></strong></p>';
@@ -796,9 +796,9 @@ while( list($value,$desc) = each($Programs) )
796
  powerpress_admin_jquery_footer();
797
  exit;
798
  }
799
-
800
- $File = (isset($_GET['File'])?$_GET['File']:false);
801
- $Message = (isset($_GET['Message'])?$_GET['Message']:false);
802
 
803
  powerpress_admin_jquery_header( __('Upload Complete', 'powerpress') );
804
  echo '<h2>'. __('Uploader', 'powerpress') .'</h2>';
@@ -815,7 +815,7 @@ while( list($value,$desc) = each($Programs) )
815
  <p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
816
  <?php
817
 
818
- if( $Message == '' )
819
  {
820
  ?>
821
  <script language="JavaScript" type="text/javascript"><!--
13
  for( $x = 1; $x <= 3; $x++ )
14
  {
15
  $field = sprintf('redirect%d', $x);
16
+ if( !empty($Settings[$field]) && stripos($Settings[$field], 'podtrac.com') === false )
17
  $NewSettings[$field] = '';
18
  }
19
  $NewSettings['redirect1'] = $RedirectURL.'/';
209
 
210
  $results = powerpress_json_decode($json_data);
211
 
212
+ $FeedSlug = sanitize_title($_GET['podcast-feed']);
213
  powerpress_admin_jquery_header( __('Select Media', 'powerpress'), true );
214
  ?>
215
  <script language="JavaScript" type="text/javascript"><!--
249
  $message = '';
250
  if( !empty($results['quota']['expires']['expired']) )
251
  {
252
+ $message = '<p>'. sprintf( __('Media hosting service expired on %s.', 'powerpress'), esc_attr($results['quota']['expires']['readable_date'])) . '</p>';
253
  }
254
  else
255
  {
256
+ $message = '<p>'. sprintf( __('Media hosting service will expire on %s.', 'powerpress'), esc_attr($results['quota']['expires']['readable_date'])) . '</p>';
257
  }
258
 
259
  $message .= '<p style="text-align: center;"><strong><a href="'. $results['quota']['expires']['renew_link'] .'" target="_blank" style="text-decoration: underline;">'. __('Renew Media Hosting Service', 'powerpress') . '</a></strong></p>';
796
  powerpress_admin_jquery_footer();
797
  exit;
798
  }
799
+ // sanitize_title esc_attr esc_html powerpress_esc_html
800
+ $File = (isset($_GET['File'])? htmlspecialchars($_GET['File']):false);
801
+ $Message = (isset($_GET['Message'])? htmlspecialchars($_GET['Message']):'');
802
 
803
  powerpress_admin_jquery_header( __('Upload Complete', 'powerpress') );
804
  echo '<h2>'. __('Uploader', 'powerpress') .'</h2>';
815
  <p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
816
  <?php
817
 
818
+ if( empty($Message) )
819
  {
820
  ?>
821
  <script language="JavaScript" type="text/javascript"><!--
powerpressadmin-metabox.php CHANGED
@@ -6,7 +6,7 @@ if( !empty($Powerpress) && !empty($Powerpress['metamarks']) )
6
 
7
  function powerpress_meta_box($object, $box)
8
  {
9
- $FeedSlug = str_replace('powerpress-', '', $box['id']);
10
 
11
  $DurationHH = '';
12
  $DurationMM = '';
@@ -564,7 +564,8 @@ function media_upload_powerpress_image() {
564
 
565
  if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
566
  // Upload File button was clicked
567
- $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
 
568
  unset($_FILES);
569
  if ( is_wp_error($id) ) {
570
  $errors['upload_error'] = $id;
@@ -608,7 +609,7 @@ if( win.powerpress_send_to_poster_image )
608
  */
609
  function powerpress_update_media_upload_tabs($tabs) {
610
 
611
- if( isset($_GET['type'] ) )
612
  {
613
  if( $_GET['type'] == 'powerpress_image' ) // We only want to allow uploads
614
  {
@@ -677,7 +678,7 @@ jQuery(document).ready( function() {
677
  }
678
 
679
  function powerpress_media_upload_use_flash($flash) {
680
- if( isset($_GET['type']) && $_GET['type'] == 'powerpress_image' )
681
  {
682
  return false;
683
  }
6
 
7
  function powerpress_meta_box($object, $box)
8
  {
9
+ $FeedSlug = esc_attr( str_replace('powerpress-', '', $box['id']) );
10
 
11
  $DurationHH = '';
12
  $DurationMM = '';
564
 
565
  if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
566
  // Upload File button was clicked
567
+ $post_id = intval( $_REQUEST['post_id'] ); // precautionary, make sure we're always working with an integer
568
+ $id = media_handle_upload('async-upload', $post_id);
569
  unset($_FILES);
570
  if ( is_wp_error($id) ) {
571
  $errors['upload_error'] = $id;
609
  */
610
  function powerpress_update_media_upload_tabs($tabs) {
611
 
612
+ if( !empty($_GET['type'] ) )
613
  {
614
  if( $_GET['type'] == 'powerpress_image' ) // We only want to allow uploads
615
  {
678
  }
679
 
680
  function powerpress_media_upload_use_flash($flash) {
681
+ if( !empty($_GET['type']) && $_GET['type'] == 'powerpress_image' )
682
  {
683
  return false;
684
  }
powerpressadmin-metamarks.php CHANGED
@@ -227,6 +227,7 @@ function powerpress_metamarks_deleterow(div)
227
 
228
  function powerpress_metamarks_editrow_html($feed_slug, $next_row, $data = null)
229
  {
 
230
  $MarkTypes = powerpress_metamarks_get_types();
231
  $html = '<div class="pp-metamarks-row" id="powerpress_metamarks_row_'. $feed_slug .'_'. $next_row .'">';
232
  if( !is_array($data) )
@@ -268,13 +269,13 @@ function powerpress_metamarks_deleterow(div)
268
  while( list($index,$MetaMark) = each($MetaRecords) )
269
  {
270
  echo "\t\t";
271
- echo '<rawvoice:metamark type="'. $MetaMark['type'] .'"';
272
  if( !empty($MetaMark['duration']) )
273
- echo ' duration="'. $MetaMark['duration'] .'"';
274
  if( !empty($MetaMark['position']) )
275
- echo ' position="'. $MetaMark['position'] .'"';
276
  if( !empty($MetaMark['link']) )
277
- echo ' link="'. $MetaMark['link'] .'"';
278
 
279
  $value = trim($MetaMark['value']);
280
  if( $value == '' ) {
227
 
228
  function powerpress_metamarks_editrow_html($feed_slug, $next_row, $data = null)
229
  {
230
+ $feed_slug = esc_attr($feed_slug);
231
  $MarkTypes = powerpress_metamarks_get_types();
232
  $html = '<div class="pp-metamarks-row" id="powerpress_metamarks_row_'. $feed_slug .'_'. $next_row .'">';
233
  if( !is_array($data) )
269
  while( list($index,$MetaMark) = each($MetaRecords) )
270
  {
271
  echo "\t\t";
272
+ echo '<rawvoice:metamark type="'. esc_attr($MetaMark['type']) .'"';
273
  if( !empty($MetaMark['duration']) )
274
+ echo ' duration="'. esc_attr($MetaMark['duration']) .'"';
275
  if( !empty($MetaMark['position']) )
276
+ echo ' position="'. esc_attr($MetaMark['position']) .'"';
277
  if( !empty($MetaMark['link']) )
278
+ echo ' link="'. esc_attr($MetaMark['link']) .'"';
279
 
280
  $value = trim($MetaMark['value']);
281
  if( $value == '' ) {
powerpressadmin-mt.php CHANGED
@@ -259,7 +259,7 @@ if( !function_exists('add_action') )
259
  $g_mt_import_log .= sprintf( __('Episode %s for blog post %s imported to feed %s.', 'powerpress'),
260
  '"<a href="'. $episode_url .'">'. htmlspecialchars($filename) .'</a>"',
261
  '<em>'. htmlspecialchars($post_title) .'</em>',
262
- '<em>'. $feed_slug .'</em>' );
263
  $g_mt_import_log .= "\n";
264
  }
265
 
@@ -337,7 +337,7 @@ if( !function_exists('add_action') )
337
  {
338
  if( $results['feeds_required'] > count($Settings['custom_feeds']) )
339
  {
340
- powerpress_page_message_add_error( sprintf(__('We found blog posts that have as many as %d media files. You may need to create %d more Custom Feed%s in order to import all of the media.', 'powerpress'), $results['feeds_required'], $results['feeds_required'] - count($Settings['custom_feeds']), (( ( $results['feeds_required'] - count($Settings['custom_feeds']) ) > 1 )?'s':'') ) );
341
  powerpress_page_message_print();
342
  }
343
  }
@@ -569,7 +569,7 @@ else
569
  echo '<td '.$class.'><strong>';
570
  if ( current_user_can( 'edit_post', $post_id ) )
571
  {
572
- ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $import_data['post_title'])); ?>"><?php echo $import_data['post_title'] ?></a><?php
573
  }
574
  else
575
  {
@@ -762,7 +762,7 @@ else
762
  reset($results);
763
  ?>
764
  <p><?php
765
- echo sprintf( __('There are %s media files that can be imported with a total of %d blog post podcast episodes.', 'powerpress'),
766
  $StrandedEpisodes,
767
  (count($results) -1) );
768
 
259
  $g_mt_import_log .= sprintf( __('Episode %s for blog post %s imported to feed %s.', 'powerpress'),
260
  '"<a href="'. $episode_url .'">'. htmlspecialchars($filename) .'</a>"',
261
  '<em>'. htmlspecialchars($post_title) .'</em>',
262
+ '<em>'. htmlspecialchars($feed_slug) .'</em>' );
263
  $g_mt_import_log .= "\n";
264
  }
265
 
337
  {
338
  if( $results['feeds_required'] > count($Settings['custom_feeds']) )
339
  {
340
+ powerpress_page_message_add_error( sprintf(__('We found blog posts that have as many as %d media files. You may need to create %d more Custom Feeds in order to import all of the media.', 'powerpress'), $results['feeds_required'], $results['feeds_required'] - count($Settings['custom_feeds']) ) );
341
  powerpress_page_message_print();
342
  }
343
  }
569
  echo '<td '.$class.'><strong>';
570
  if ( current_user_can( 'edit_post', $post_id ) )
571
  {
572
+ ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $import_data['post_title'])); ?>"><?php echo esc_attr($import_data['post_title']); ?></a><?php
573
  }
574
  else
575
  {
762
  reset($results);
763
  ?>
764
  <p><?php
765
+ echo sprintf( __('There are %d media files that can be imported with a total of %d blog post podcast episodes.', 'powerpress'),
766
  $StrandedEpisodes,
767
  (count($results) -1) );
768
 
powerpressadmin-ping-sites.php CHANGED
@@ -47,7 +47,7 @@
47
  <?php
48
  while( list($url,$name) = each($BlogSites) )
49
  {
50
- if( stristr($ping_sites, $url) )
51
  {
52
  ?>
53
  <p><input name="Ignore[]" type="checkbox" checked disabled value="1" /> <?php echo $name; ?></p>
@@ -71,7 +71,7 @@
71
  <?php
72
  while( list($url,$name) = each($PodcastSites) )
73
  {
74
- if( stristr($ping_sites, $url) )
75
  {
76
  ?>
77
  <p><input name="Ignore[]" type="checkbox" checked disabled value="1" /> <?php echo $name; ?></p>
47
  <?php
48
  while( list($url,$name) = each($BlogSites) )
49
  {
50
+ if( stripos($ping_sites, $url) !== false )
51
  {
52
  ?>
53
  <p><input name="Ignore[]" type="checkbox" checked disabled value="1" /> <?php echo $name; ?></p>
71
  <?php
72
  while( list($url,$name) = each($PodcastSites) )
73
  {
74
+ if( stripos($ping_sites, $url) !== false )
75
  {
76
  ?>
77
  <p><input name="Ignore[]" type="checkbox" checked disabled value="1" /> <?php echo $name; ?></p>
powerpressadmin-player.php CHANGED
@@ -27,8 +27,6 @@ function powerpress_admin_players_init()
27
  $SaveSettings = $_POST['Player'];
28
  if( isset($_POST['VideoPlayer']) )
29
  $SaveSettings += $_POST['VideoPlayer'];
30
- if( isset($_POST['MobilePlayer']) )
31
- $SaveSettings += $_POST['MobilePlayer'];
32
  powerpress_save_settings($SaveSettings, 'powerpress_general');
33
  powerpress_page_message_add_notice( __('Player activated successfully.', 'powerpress') );
34
 
27
  $SaveSettings = $_POST['Player'];
28
  if( isset($_POST['VideoPlayer']) )
29
  $SaveSettings += $_POST['VideoPlayer'];
 
 
30
  powerpress_save_settings($SaveSettings, 'powerpress_general');
31
  powerpress_page_message_add_notice( __('Player activated successfully.', 'powerpress') );
32
 
powerpressadmin-podpress-stats.php CHANGED
@@ -9,7 +9,7 @@ function powerpress_admin_podpress_stats()
9
  //var_dump($EpisodeTotal);
10
  $total = $EpisodeTotal[0]['media_count'];
11
  $limit = 20;
12
- $start = (!empty($_GET['start'])? $_GET['start']:0);
13
  while( $start >= $total && $start > 0 )
14
  $start -= $limit;
15
  if( $start < 0 )
9
  //var_dump($EpisodeTotal);
10
  $total = $EpisodeTotal[0]['media_count'];
11
  $limit = 20;
12
+ $start = (!empty($_GET['start'])? intval($_GET['start']):0);
13
  while( $start >= $total && $start > 0 )
14
  $start -= $limit;
15
  if( $start < 0 )
powerpressadmin-podpress.php CHANGED
@@ -47,7 +47,7 @@ if( !function_exists('add_action') )
47
  if( !empty($powerpress_settings['default_url']) )
48
  {
49
  $PodpressSettings['mediaWebPath'] = $powerpress_settings['default_url'];
50
- powerpress_page_message_add_notice( sprintf(__('Unable to detect PodPress media URL setting. Using the PowerPress setting "Default Media URL" (%s) instead.', 'powerpress'), $PodpressSettings['mediaWebPath']) );
51
  }
52
  else
53
  {
@@ -115,7 +115,7 @@ if( !function_exists('add_action') )
115
  {
116
  // display a warning here...
117
  if( $hide_errors == false )
118
- powerpress_page_message_add_error( sprintf( __('Error decoding PodPress data for post "%s"', 'powerpress'), $row['post_title']) );
119
  continue;
120
  }
121
 
47
  if( !empty($powerpress_settings['default_url']) )
48
  {
49
  $PodpressSettings['mediaWebPath'] = $powerpress_settings['default_url'];
50
+ powerpress_page_message_add_notice( sprintf(__('Unable to detect PodPress media URL setting. Using the PowerPress setting "Default Media URL" (%s) instead.', 'powerpress'), esc_attr($PodpressSettings['mediaWebPath']) ) );
51
  }
52
  else
53
  {
115
  {
116
  // display a warning here...
117
  if( $hide_errors == false )
118
+ powerpress_page_message_add_error( sprintf( __('Error decoding PodPress data for post "%s"', 'powerpress'), est_attr($row['post_title']) ) );
119
  continue;
120
  }
121
 
powerpressadmin-posttypefeeds.php CHANGED
@@ -118,10 +118,10 @@ function powerpress_admin_posttypefeeds()
118
  }; break;
119
  case 'name': {
120
 
121
- echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'.$feed_title.'</a></strong><br />';
122
  $actions = array();
123
  $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
124
- $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_posttypefeeds.php&amp;action=powerpress-delete-posttype-feed&amp;podcast_post_type={$post_type}&amp;feed_slug={$feed_slug}", 'powerpress-delete-posttype-feed-'.$post_type .'_'.$feed_slug) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for Post Type '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), $feed_title )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
125
  $action_count = count($actions);
126
  $i = 0;
127
  echo '<div class="row-actions">';
118
  }; break;
119
  case 'name': {
120
 
121
+ echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'.esc_attr($feed_title).'</a></strong><br />';
122
  $actions = array();
123
  $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
124
+ $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_posttypefeeds.php&amp;action=powerpress-delete-posttype-feed&amp;podcast_post_type={$post_type}&amp;feed_slug={$feed_slug}", 'powerpress-delete-posttype-feed-'.$post_type .'_'.$feed_slug) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for Post Type '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_attr($feed_title) )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
125
  $action_count = count($actions);
126
  $i = 0;
127
  echo '<div class="row-actions">';
powerpressadmin-search.php CHANGED
@@ -6,8 +6,6 @@ function powerpress_admin_search()
6
  $General = powerpress_get_settings('powerpress_general');
7
  if( empty($General['seo_feed_title']) )
8
  $General['seo_feed_title'] = '';
9
-
10
- $TagSettings = powerpress_default_settings($General, 'search');
11
 
12
  ?>
13
  <script language="javascript"><!--
@@ -21,6 +19,12 @@ jQuery(document).ready(function() {
21
  if( !empty($General['seo_feed_title']) && $General['seo_feed_title'] == 1 )
22
  echo " jQuery('#powerpress_example_post_title').hide();\n";
23
  ?>
 
 
 
 
 
 
24
  jQuery('#seo_append_show_title').change( function() {
25
  if( jQuery(this).prop('checked') )
26
  jQuery('#powerpress_example_show_title').show();
@@ -28,7 +32,8 @@ jQuery(document).ready(function() {
28
  jQuery('#powerpress_example_show_title').hide();
29
  });
30
  jQuery('.powerpress_seo_feed_title').change( function() {
31
- //alert(this.value);
 
32
  switch( this.value )
33
  {
34
  case '1':
@@ -52,7 +57,7 @@ jQuery(document).ready(function() {
52
  jQuery('#powerpress_example_post_episode_title').html( p_title_html + e_title_html);
53
  }; break;
54
  default: {
55
- alert(this.value);
56
  }
57
  }
58
  });
@@ -67,9 +72,7 @@ jQuery(document).ready(function() {
67
  <a href="http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/podcasting-seo-settings/"><?php echo __('Learn More', 'powerpress'); ?></a>
68
  </p>
69
 
70
- <?php
71
 
72
- ?>
73
  <table class="form-table">
74
  <tr valign="top">
75
  <th scope="row"><?php echo __('Episode Titles', 'powerpress'); ?></th>
@@ -81,11 +84,11 @@ jQuery(document).ready(function() {
81
  <?php echo __('Specify custom episode titles for podcast feeds.', 'powerpress'); ?></label>
82
  </p>
83
  <div style="margin-left: 40px;">
84
- <p><label style="display: block;"><input type="radio" class="powerpress_seo_feed_title" name="General[seo_feed_title]" value="1" <?php if( $General['seo_feed_title'] == 1 ) echo 'checked'; ?> />
85
  <?php echo __('Feed episode title replaces post title (default)', 'powerpress'); ?></label></p>
86
- <p><label style="display: block;"><input type="radio" class="powerpress_seo_feed_title" name="General[seo_feed_title]" value="2" <?php if( $General['seo_feed_title'] == 2 ) echo 'checked'; ?> />
87
  <?php echo __('Feed episode title prefixes post title', 'powerpress'); ?></label></p>
88
- <p><label style="display: block;"><input type="radio" class="powerpress_seo_feed_title" name="General[seo_feed_title]" value="3" <?php if( $General['seo_feed_title'] == 3 ) echo 'checked'; ?> />
89
  <?php echo __('Feed episode title appended to post title', 'powerpress'); ?></label></p>
90
  </div>
91
  <p>
6
  $General = powerpress_get_settings('powerpress_general');
7
  if( empty($General['seo_feed_title']) )
8
  $General['seo_feed_title'] = '';
 
 
9
 
10
  ?>
11
  <script language="javascript"><!--
19
  if( !empty($General['seo_feed_title']) && $General['seo_feed_title'] == 1 )
20
  echo " jQuery('#powerpress_example_post_title').hide();\n";
21
  ?>
22
+ jQuery('#seo_feed_title').change( function() {
23
+ if( this.checked )
24
+ jQuery('#powerpress_seo_feed_title_1').prop('checked', true);
25
+ else
26
+ jQuery('.powerpress_seo_feed_title').prop('checked', false);
27
+ });
28
  jQuery('#seo_append_show_title').change( function() {
29
  if( jQuery(this).prop('checked') )
30
  jQuery('#powerpress_example_show_title').show();
32
  jQuery('#powerpress_example_show_title').hide();
33
  });
34
  jQuery('.powerpress_seo_feed_title').change( function() {
35
+
36
+ jQuery('#seo_feed_title').prop('checked', true);
37
  switch( this.value )
38
  {
39
  case '1':
57
  jQuery('#powerpress_example_post_episode_title').html( p_title_html + e_title_html);
58
  }; break;
59
  default: {
60
+
61
  }
62
  }
63
  });
72
  <a href="http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/podcasting-seo-settings/"><?php echo __('Learn More', 'powerpress'); ?></a>
73
  </p>
74
 
 
75
 
 
76
  <table class="form-table">
77
  <tr valign="top">
78
  <th scope="row"><?php echo __('Episode Titles', 'powerpress'); ?></th>
84
  <?php echo __('Specify custom episode titles for podcast feeds.', 'powerpress'); ?></label>
85
  </p>
86
  <div style="margin-left: 40px;">
87
+ <p><label style="display: block;"><input type="radio" class="powerpress_seo_feed_title" id="powerpress_seo_feed_title_1" name="General[seo_feed_title]" value="1" <?php if( $General['seo_feed_title'] == 1 ) echo 'checked'; ?> />
88
  <?php echo __('Feed episode title replaces post title (default)', 'powerpress'); ?></label></p>
89
+ <p><label style="display: block;"><input type="radio" class="powerpress_seo_feed_title" id="powerpress_seo_feed_title_2" name="General[seo_feed_title]" value="2" <?php if( $General['seo_feed_title'] == 2 ) echo 'checked'; ?> />
90
  <?php echo __('Feed episode title prefixes post title', 'powerpress'); ?></label></p>
91
+ <p><label style="display: block;"><input type="radio" class="powerpress_seo_feed_title" id="powerpress_seo_feed_title_3" name="General[seo_feed_title]" value="3" <?php if( $General['seo_feed_title'] == 3 ) echo 'checked'; ?> />
92
  <?php echo __('Feed episode title appended to post title', 'powerpress'); ?></label></p>
93
  </div>
94
  <p>
powerpressadmin-tags.php CHANGED
@@ -166,7 +166,8 @@ function powerpressadmin_tag_option($tag, $value, $label, $default_desc )
166
  </p>
167
  <p>
168
  <?php if( $FeedSettings['itunes_image'] ) { ?>
169
- <a href="#" title="" onclick="document.getElementById('coverart_image').value='<?php echo $FeedSettings['itunes_image']; ?>';document.getElementById('tag_coverart_specify').checked=true;return false;"><?php echo __('Click here to use your current iTunes image.', 'powerpress'); ?></a>
 
170
 
171
  <?php } ?>
172
  </p>
166
  </p>
167
  <p>
168
  <?php if( $FeedSettings['itunes_image'] ) { ?>
169
+ <input type="hidden" name="NULL[current_coverart_image]" id="current_coverart_image" value="<?php echo htmlspecialchars($FeedSettings['itunes_image']); ?>" />
170
+ <a href="#" title="" onclick="document.getElementById('coverart_image').value=document.getElementById('current_coverart_image').value;document.getElementById('tag_coverart_specify').checked=true;return false;"><?php echo __('Click here to use your current iTunes image.', 'powerpress'); ?></a>
171
 
172
  <?php } ?>
173
  </p>
powerpressadmin-taxonomyfeeds.php CHANGED
@@ -125,10 +125,10 @@ function powerpress_admin_taxonomyfeeds()
125
  }; break;
126
  case 'name': {
127
 
128
- echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'.$feed_title.'</a></strong><br />';
129
  $actions = array();
130
  $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
131
- $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php&amp;action=powerpress-delete-taxonomy-feed&amp;ttid=$tt_id", 'powerpress-delete-taxonomy-feed-' . $tt_id) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for taxonomy '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), $feed_title )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
132
  $action_count = count($actions);
133
  $i = 0;
134
  echo '<div class="row-actions">';
125
  }; break;
126
  case 'name': {
127
 
128
+ echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'. esc_attr($feed_title).'</a></strong><br />';
129
  $actions = array();
130
  $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
131
+ $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php&amp;action=powerpress-delete-taxonomy-feed&amp;ttid=$tt_id", 'powerpress-delete-taxonomy-feed-' . $tt_id) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for taxonomy '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_attr($feed_title) )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
132
  $action_count = count($actions);
133
  $i = 0;
134
  echo '<div class="row-actions">';
powerpressadmin.php CHANGED
@@ -3,17 +3,27 @@
3
  if( !function_exists('add_action') )
4
  die("access denied.");
5
 
 
 
 
 
 
 
 
 
 
 
6
  function powerpress_page_message_add_error($msg, $classes='inline')
7
  {
8
  global $g_powerpress_page_message;
9
- $g_powerpress_page_message .= '<div class="error powerpress-error '.$classes.'">'. $msg . '</div>';
10
  }
11
 
12
  function powerpress_page_message_add_notice($msg, $classes='inline')
13
  {
14
  global $g_powerpress_page_message;
15
  // Always pre-pend, since jQuery will re-order with first as last.
16
- $g_powerpress_page_message = '<div class="updated fade powerpress-notice '.$classes.'">'. $msg . '</div>' . $g_powerpress_page_message;
17
  }
18
 
19
 
@@ -88,9 +98,9 @@ function powerpress_admin_init()
88
  powerpress_page_message_add_error( __('Another podcasting plugin has been detected, PowerPress is currently disabled.', 'powerpress') );
89
 
90
  global $wp_version;
91
- $VersionDiff = version_compare($wp_version, 3.0);
92
  if( $VersionDiff < 0 )
93
- powerpress_page_message_add_error( __('Blubrry PowerPress requires Wordpress version 3.0 or greater.', 'powerpress') );
94
 
95
  // Check for incompatible plugins:
96
  if( isset($GLOBALS['objWPOSFLV']) && is_object($GLOBALS['objWPOSFLV']) )
@@ -113,10 +123,10 @@ function powerpress_admin_init()
113
  // Save the posted value in the database
114
  $Feed = (isset($_POST['Feed'])?$_POST['Feed']:false);
115
  $General = (isset($_POST['General'])?$_POST['General']:false);
116
- $FeedSlug = (isset($_POST['feed_slug'])?$_POST['feed_slug']:false);
117
- $Category = (isset($_POST['cat'])?$_POST['cat']:false);
118
- $term_taxonomy_id = (isset($_POST['ttid'])?$_POST['ttid']:false);
119
- $podcast_post_type = (isset($_POST['podcast_post_type'])?$_POST['podcast_post_type']:false);
120
 
121
  // New iTunes image
122
  if( !empty($_POST['itunes_image_checkbox']) )
@@ -546,9 +556,6 @@ function powerpress_admin_init()
546
  $PowerPressSearchToggle = $_POST['PowerPressSearchToggle'];
547
  if( empty($PowerPressSearchToggle['seo_feed_title']) )
548
  $General['seo_feed_title'] = 0;
549
-
550
-
551
- // ADDITIONAL GENERAL SETTINGS SET HERE
552
  }
553
 
554
  if( !empty($_POST['action']) && $_POST['action'] == 'powerpress-save-tags' )
@@ -750,11 +757,11 @@ function powerpress_admin_init()
750
  } else */
751
  if( $key == '' )
752
  {
753
- powerpress_page_message_add_error( sprintf(__('Feed slug "%s" is not valid.', 'powerpress'), $_POST['feed_slug']) );
754
  }
755
  else if( in_array($key, $wp_rewrite->feeds) && !isset($Settings['custom_feeds'][ $key ]) ) // If it is a system feed or feed created by something else
756
  {
757
- powerpress_page_message_add_error( sprintf(__('Feed slug "%s" is not available.', 'powerpress'), $key) );
758
  }
759
  else
760
  {
@@ -764,7 +771,7 @@ function powerpress_admin_init()
764
  add_feed($key, 'powerpress_do_podcast_feed'); // Before we flush the rewrite rules we need to add the new custom feed...
765
  $wp_rewrite->flush_rules();
766
 
767
- powerpress_page_message_add_notice( sprintf(__('Podcast Feed "%s" added, please configure your new feed now.', 'powerpress'), $value) );
768
  $_GET['action'] = 'powerpress-editfeed';
769
  $_GET['feed_slug'] = $key;
770
  }
@@ -784,7 +791,7 @@ function powerpress_admin_init()
784
 
785
 
786
  $taxonomy_type = ( isset($_POST['taxonomy'])? $_POST['taxonomy'] : $_GET['taxonomy'] );
787
- $term_ID = ( isset($_POST['term'])? $_POST['term'] : $_GET['term'] );
788
 
789
 
790
  $term_object = get_term( $term_ID, $taxonomy_type, OBJECT, 'edit');
@@ -868,11 +875,11 @@ function powerpress_admin_init()
868
  } else */
869
  if( empty($feed_slug) )
870
  {
871
- powerpress_page_message_add_error( sprintf(__('Feed slug "%s" is not valid.', 'powerpress'), $_POST['feed_slug']) );
872
  }
873
  else if( empty($post_type) )
874
  {
875
- powerpress_page_message_add_error( sprintf(__('Post Type is invalid.', 'powerpress'), $post_type) );
876
  }
877
  // TODO:
878
  //else if( in_array($feed_slug, $wp_rewrite->feeds) && !isset($Settings['custom_feeds'][ $key ]) ) // If it is a system feed or feed created by something else
@@ -969,7 +976,7 @@ function powerpress_admin_init()
969
  }; break;
970
  case 'powerpress-addcategoryfeed': {
971
  check_admin_referer('powerpress-add-taxonomy-feed');
972
- $cat_ID = $_GET['cat'];
973
 
974
  $Settings = get_option('powerpress_general');
975
  $category = get_category($cat_ID);
@@ -1033,7 +1040,7 @@ function powerpress_admin_init()
1033
  }
1034
  }; break;
1035
  case 'powerpress-delete-category-feed': {
1036
- $cat_ID = $_GET['cat'];
1037
  check_admin_referer('powerpress-delete-category-feed-'.$cat_ID);
1038
 
1039
  $Settings = get_option('powerpress_general');
@@ -1048,7 +1055,7 @@ function powerpress_admin_init()
1048
  powerpress_page_message_add_notice( __('Removed podcast settings for category feed successfully.', 'powerpress') );
1049
  }; break;
1050
  case 'powerpress-delete-taxonomy-feed': {
1051
- $tt_ID = $_GET['ttid'];
1052
  check_admin_referer('powerpress-delete-taxonomy-feed-'.$tt_ID);
1053
 
1054
  $Settings = get_option('powerpress_taxonomy_podcasting');
@@ -1063,8 +1070,9 @@ function powerpress_admin_init()
1063
  }; break;
1064
  case 'powerpress-delete-posttype-feed': {
1065
 
1066
- $feed_slug = $_GET['feed_slug'];
1067
- $post_type = $_GET['podcast_post_type'];
 
1068
  check_admin_referer('powerpress-delete-posttype-feed-'.$post_type .'_'.$feed_slug);
1069
 
1070
  $Settings = get_option('powerpress_posttype_'.$post_type);
@@ -1244,6 +1252,7 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1244
  // Save general settings
1245
  if( $SettingsNew )
1246
  {
 
1247
  $Settings = get_option($field);
1248
  if( !is_array($Settings) )
1249
  $Settings = array();
@@ -1252,6 +1261,8 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1252
  if( $field == 'powerpress_general' && !isset($Settings['timestamp']) )
1253
  $Settings['timestamp'] = time();
1254
 
 
 
1255
  // Special case fields, if they are empty, we can delete them., this will keep the Settings array uncluttered
1256
  if( isset($Settings['feed_links']) && $Settings['feed_links'] == 0 ) // If set to default value, no need to save it in the database
1257
  unset($Settings['feed_links']);
@@ -1299,6 +1310,8 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1299
  unset($Settings['taxonomy_podcasting']);
1300
  if( isset($Settings['playlist_player']) && empty($Settings['playlist_player']) )
1301
  unset($Settings['playlist_player']);
 
 
1302
  }
1303
  else // Feed or player settings...
1304
  {
@@ -1495,6 +1508,8 @@ function powerpress_admin_menu()
1495
  continue;
1496
 
1497
  $FeedCustom = get_option('powerpress_feed_'.$feed_slug);
 
 
1498
 
1499
  reset($post_types);
1500
  while( list($null,$post_type) = each($post_types) )
@@ -1504,7 +1519,7 @@ function powerpress_admin_menu()
1504
  continue;
1505
 
1506
  if( empty($FeedSlugPostTypesArray[ $feed_slug ][ $post_type ]) )
1507
- add_meta_box('powerpress-'.$feed_slug, __('Podcast Episode for Custom Channel', 'powerpress') .': '.$feed_title, 'powerpress_meta_box', $post_type, 'normal');
1508
  }
1509
  }
1510
  reset($Powerpress['custom_feeds']);
@@ -2940,7 +2955,8 @@ function powerpress_admin_page_customfeeds()
2940
  powerpress_admin_page_header('powerpress/powerpressadmin_customfeeds.php');
2941
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
2942
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
2943
- powerpress_admin_editfeed('channel', $_GET['feed_slug']);
 
2944
  powerpress_admin_page_footer();
2945
  }; break;
2946
  default: {
@@ -2962,7 +2978,7 @@ function powerpress_admin_page_categoryfeeds()
2962
  powerpress_admin_page_header('powerpress/powerpressadmin_categoryfeeds.php');
2963
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
2964
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
2965
- powerpress_admin_editfeed('category', $_GET['cat']);
2966
  powerpress_admin_page_footer();
2967
  }; break;
2968
  default: {
@@ -2986,7 +3002,7 @@ function powerpress_admin_page_taxonomyfeeds()
2986
  powerpress_admin_page_header('powerpress/powerpressadmin_taxonomyfeeds.php');
2987
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
2988
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
2989
- powerpress_admin_editfeed('ttid', $_GET['ttid']);
2990
  powerpress_admin_page_footer();
2991
  }
2992
  }; break;
@@ -3012,7 +3028,9 @@ function powerpress_admin_page_posttypefeeds()
3012
  powerpress_admin_page_header('powerpress/powerpressadmin_posttypefeeds.php');
3013
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
3014
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
3015
- powerpress_admin_editfeed('post_type', $_GET['podcast_post_type'], $_GET['feed_slug']);
 
 
3016
  powerpress_admin_page_footer();
3017
 
3018
  }
@@ -4270,4 +4288,3 @@ require_once( POWERPRESS_ABSPATH .'/powerpressadmin-jquery.php');
4270
  // Only include the dashboard when appropriate.
4271
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-dashboard.php');
4272
 
4273
- ?>
3
  if( !function_exists('add_action') )
4
  die("access denied.");
5
 
6
+ function powerpress_esc_html($escape)
7
+ {
8
+ if( is_array($escape) )
9
+ {
10
+ while( list($index,$value) = each($escape) )
11
+ $escape[ $index ] = powerpress_esc_html($value);
12
+ }
13
+ return esc_html($escape);
14
+ }
15
+
16
  function powerpress_page_message_add_error($msg, $classes='inline')
17
  {
18
  global $g_powerpress_page_message;
19
+ $g_powerpress_page_message .= '<div class="error powerpress-error '.$classes.'">'. esc_html($msg) . '</div>';
20
  }
21
 
22
  function powerpress_page_message_add_notice($msg, $classes='inline')
23
  {
24
  global $g_powerpress_page_message;
25
  // Always pre-pend, since jQuery will re-order with first as last.
26
+ $g_powerpress_page_message = '<div class="updated fade powerpress-notice '.$classes.'">'. esc_html($msg) . '</div>' . $g_powerpress_page_message;
27
  }
28
 
29
 
98
  powerpress_page_message_add_error( __('Another podcasting plugin has been detected, PowerPress is currently disabled.', 'powerpress') );
99
 
100
  global $wp_version;
101
+ $VersionDiff = version_compare($wp_version, 3.6);
102
  if( $VersionDiff < 0 )
103
+ powerpress_page_message_add_error( __('Blubrry PowerPress requires Wordpress version 3.6 or greater.', 'powerpress') );
104
 
105
  // Check for incompatible plugins:
106
  if( isset($GLOBALS['objWPOSFLV']) && is_object($GLOBALS['objWPOSFLV']) )
123
  // Save the posted value in the database
124
  $Feed = (isset($_POST['Feed'])?$_POST['Feed']:false);
125
  $General = (isset($_POST['General'])?$_POST['General']:false);
126
+ $FeedSlug = (isset($_POST['feed_slug'])?esc_attr($_POST['feed_slug']):false);
127
+ $Category = (isset($_POST['cat'])?intval($_POST['cat']):false);
128
+ $term_taxonomy_id = (isset($_POST['ttid'])?intval($_POST['ttid']):false);
129
+ $podcast_post_type = (isset($_POST['podcast_post_type'])?esc_attr($_POST['podcast_post_type']):false);
130
 
131
  // New iTunes image
132
  if( !empty($_POST['itunes_image_checkbox']) )
556
  $PowerPressSearchToggle = $_POST['PowerPressSearchToggle'];
557
  if( empty($PowerPressSearchToggle['seo_feed_title']) )
558
  $General['seo_feed_title'] = 0;
 
 
 
559
  }
560
 
561
  if( !empty($_POST['action']) && $_POST['action'] == 'powerpress-save-tags' )
757
  } else */
758
  if( $key == '' )
759
  {
760
+ powerpress_page_message_add_error( sprintf(__('Feed slug "%s" is not valid.', 'powerpress'), esc_html($_POST['feed_slug']) ) );
761
  }
762
  else if( in_array($key, $wp_rewrite->feeds) && !isset($Settings['custom_feeds'][ $key ]) ) // If it is a system feed or feed created by something else
763
  {
764
+ powerpress_page_message_add_error( sprintf(__('Feed slug "%s" is not available.', 'powerpress'), esc_html($key) ) );
765
  }
766
  else
767
  {
771
  add_feed($key, 'powerpress_do_podcast_feed'); // Before we flush the rewrite rules we need to add the new custom feed...
772
  $wp_rewrite->flush_rules();
773
 
774
+ powerpress_page_message_add_notice( sprintf(__('Podcast Feed "%s" added, please configure your new feed now.', 'powerpress'), esc_html($value) ) );
775
  $_GET['action'] = 'powerpress-editfeed';
776
  $_GET['feed_slug'] = $key;
777
  }
791
 
792
 
793
  $taxonomy_type = ( isset($_POST['taxonomy'])? $_POST['taxonomy'] : $_GET['taxonomy'] );
794
+ $term_ID = intval( isset($_POST['term'])? $_POST['term'] : $_GET['term'] );
795
 
796
 
797
  $term_object = get_term( $term_ID, $taxonomy_type, OBJECT, 'edit');
875
  } else */
876
  if( empty($feed_slug) )
877
  {
878
+ powerpress_page_message_add_error( sprintf(__('Feed slug "%s" is not valid.', 'powerpress'), esc_html($_POST['feed_slug']) ) );
879
  }
880
  else if( empty($post_type) )
881
  {
882
+ powerpress_page_message_add_error( __('Post Type is invalid.', 'powerpress') );
883
  }
884
  // TODO:
885
  //else if( in_array($feed_slug, $wp_rewrite->feeds) && !isset($Settings['custom_feeds'][ $key ]) ) // If it is a system feed or feed created by something else
976
  }; break;
977
  case 'powerpress-addcategoryfeed': {
978
  check_admin_referer('powerpress-add-taxonomy-feed');
979
+ $cat_ID = intval($_GET['cat']);
980
 
981
  $Settings = get_option('powerpress_general');
982
  $category = get_category($cat_ID);
1040
  }
1041
  }; break;
1042
  case 'powerpress-delete-category-feed': {
1043
+ $cat_ID = intval($_GET['cat']);
1044
  check_admin_referer('powerpress-delete-category-feed-'.$cat_ID);
1045
 
1046
  $Settings = get_option('powerpress_general');
1055
  powerpress_page_message_add_notice( __('Removed podcast settings for category feed successfully.', 'powerpress') );
1056
  }; break;
1057
  case 'powerpress-delete-taxonomy-feed': {
1058
+ $tt_ID = intval($_GET['ttid']);
1059
  check_admin_referer('powerpress-delete-taxonomy-feed-'.$tt_ID);
1060
 
1061
  $Settings = get_option('powerpress_taxonomy_podcasting');
1070
  }; break;
1071
  case 'powerpress-delete-posttype-feed': {
1072
 
1073
+ // check admin referer prevents xss
1074
+ $feed_slug = esc_attr($_GET['feed_slug']);
1075
+ $post_type = esc_attr($_GET['podcast_post_type']);
1076
  check_admin_referer('powerpress-delete-posttype-feed-'.$post_type .'_'.$feed_slug);
1077
 
1078
  $Settings = get_option('powerpress_posttype_'.$post_type);
1252
  // Save general settings
1253
  if( $SettingsNew )
1254
  {
1255
+
1256
  $Settings = get_option($field);
1257
  if( !is_array($Settings) )
1258
  $Settings = array();
1261
  if( $field == 'powerpress_general' && !isset($Settings['timestamp']) )
1262
  $Settings['timestamp'] = time();
1263
 
1264
+
1265
+
1266
  // Special case fields, if they are empty, we can delete them., this will keep the Settings array uncluttered
1267
  if( isset($Settings['feed_links']) && $Settings['feed_links'] == 0 ) // If set to default value, no need to save it in the database
1268
  unset($Settings['feed_links']);
1310
  unset($Settings['taxonomy_podcasting']);
1311
  if( isset($Settings['playlist_player']) && empty($Settings['playlist_player']) )
1312
  unset($Settings['playlist_player']);
1313
+ if( isset($Settings['seo_feed_title']) && empty($Settings['seo_feed_title']) )
1314
+ unset($Settings['seo_feed_title']);
1315
  }
1316
  else // Feed or player settings...
1317
  {
1508
  continue;
1509
 
1510
  $FeedCustom = get_option('powerpress_feed_'.$feed_slug);
1511
+ $feed_slug = esc_attr($feed_slug);
1512
+
1513
 
1514
  reset($post_types);
1515
  while( list($null,$post_type) = each($post_types) )
1519
  continue;
1520
 
1521
  if( empty($FeedSlugPostTypesArray[ $feed_slug ][ $post_type ]) )
1522
+ add_meta_box('powerpress-'.$feed_slug, __('Podcast Episode for Custom Channel', 'powerpress') .': '. esc_attr($feed_title), 'powerpress_meta_box', $post_type, 'normal');
1523
  }
1524
  }
1525
  reset($Powerpress['custom_feeds']);
2955
  powerpress_admin_page_header('powerpress/powerpressadmin_customfeeds.php');
2956
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
2957
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
2958
+ $feed_slug = esc_attr($_GET['feed_slug']);
2959
+ powerpress_admin_editfeed('channel', $feed_slug);
2960
  powerpress_admin_page_footer();
2961
  }; break;
2962
  default: {
2978
  powerpress_admin_page_header('powerpress/powerpressadmin_categoryfeeds.php');
2979
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
2980
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
2981
+ powerpress_admin_editfeed('category', intval($_GET['cat']) );
2982
  powerpress_admin_page_footer();
2983
  }; break;
2984
  default: {
3002
  powerpress_admin_page_header('powerpress/powerpressadmin_taxonomyfeeds.php');
3003
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
3004
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
3005
+ powerpress_admin_editfeed('ttid', intval($_GET['ttid']));
3006
  powerpress_admin_page_footer();
3007
  }
3008
  }; break;
3028
  powerpress_admin_page_header('powerpress/powerpressadmin_posttypefeeds.php');
3029
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
3030
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
3031
+ $post_type = esc_attr( $_GET['podcast_post_type'] );
3032
+ $feed_slug = esc_attr( $_GET['feed_slug'] );
3033
+ powerpress_admin_editfeed('post_type', $post_type, $feed_slug);
3034
  powerpress_admin_page_footer();
3035
 
3036
  }
4288
  // Only include the dashboard when appropriate.
4289
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-dashboard.php');
4290
 
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Blubrry PowerPress Podcasting plugin ===
2
  Contributors: amandato, blubrry
3
  Tags: podcasting, podcast, podcaster, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, webm, mp4, m4v, wordpressmu, mu, wordpress mu, multisite, multi site, mediacaster, post, plugin, posts, simple, social, dashboard, TSG, Buzzsprout, MTR, WP-boxCast, CastMyBlog, simple podcasting, seriously simple podcasting, seriously-simple-podcasting, podlove, podcast.de
4
- Requires at least: 3.0
5
  Tested up to: 4.1
6
- Stable tag: 6.0
7
  Donate link: http://create.blubrry.com/
8
  License: GPLv2 or later
9
 
@@ -191,6 +191,18 @@ To install Blubrry PowerPress manually, follow these steps:
191
  * We are looking for beta testers! If you would like to beta test future versions of PowerPress, please [contact us](http://www.blubrry.com/contact.php) with your name and email.
192
 
193
 
 
 
 
 
 
 
 
 
 
 
 
 
194
 
195
  = 6.0 =
196
  * Released on 12/19/2014
@@ -216,7 +228,7 @@ To install Blubrry PowerPress manually, follow these steps:
216
  * Updated the getid3 library to latest version, PowerPress now includes ogg duration detection support for "Speex" or "vorbis".
217
  * We are no longer detecting if the sample rate is optimal, we're no longer worried about Flash playback.
218
  * Removed Flow Player, Simple Flash, AudioPlay and Flash Mp3 Maxi players. These flash players are no longer supported.
219
- * New MediaElement.js Audio player max width setting added. Player will now display full with otherwise. Player is now responsive, the width will shrink or stretch for the screen.
220
  * Improved MediaElement.js Video player width and height settings. Player will now display full width, or as styled by the theme's CSS if width and height are blank. Player is now responsive, the width will shrink or stretch for the screen, the height can be set with a blank width to allow for the player to fit different screens.
221
  * We are now warning users not to use Flash based players in the player selection screens.
222
  * Added option to set stats redirect at the channel/post type level. Requires a define `CHANNEL_STATS_REDIRECT` and/or `POST_TYPE_STATS_REDIRECT` in the wp-config.php file.
@@ -240,7 +252,7 @@ To install Blubrry PowerPress manually, follow these steps:
240
  * Brazilian Portuguese translation for v6.0+ by [Leo Lopes from Radiofobia](http://radiofobia.com.br/).
241
 
242
 
243
- == 5.0.10 ==
244
  * Released on 12/16/2014
245
  * Update your copy of PowerPress to version 5.0.9 immediately
246
  * Due to concerns of possible security exploits, the FlowPlayer flash based player has been removed from PowerPress as of version 5.0.10. PowerPress users are strongly encouraged to update their copy of PowerPress immediately.
1
  === Blubrry PowerPress Podcasting plugin ===
2
  Contributors: amandato, blubrry
3
  Tags: podcasting, podcast, podcaster, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, webm, mp4, m4v, wordpressmu, mu, wordpress mu, multisite, multi site, mediacaster, post, plugin, posts, simple, social, dashboard, TSG, Buzzsprout, MTR, WP-boxCast, CastMyBlog, simple podcasting, seriously simple podcasting, seriously-simple-podcasting, podlove, podcast.de
4
+ Requires at least: 3.6
5
  Tested up to: 4.1
6
+ Stable tag: 6.0.1
7
  Donate link: http://create.blubrry.com/
8
  License: GPLv2 or later
9
 
191
  * We are looking for beta testers! If you would like to beta test future versions of PowerPress, please [contact us](http://www.blubrry.com/contact.php) with your name and email.
192
 
193
 
194
+ = 6.0.1 =
195
+ * Released on 1/25/2015
196
+ * Duration detection option now works for sites running PHP 5.2 (If you can, please upgrade your PHP, but we understand that some situations warrant running outdated software)
197
+ * Tweaked CSS for subscribe sidebar widget font color to always be white.
198
+ * Changed the new 6.0 logic that prevents players from being added until after the wp_head is called, we now ignore when having theme issues option is selected to fix custom theme logic that may happen before wp_head.
199
+ * Added additional "Having Theme Issues" option, alternative logic to try to fix the situation where the player and/or links does not appear with some themes and plugins.
200
+ * Even though PowerPress 6.0 requires WordPress 3.6+, code has been added to prevent error messages in the event plugin updated on older version of WordPress.
201
+ * Fixed bug where malicious code could be injected into the edit existing category podcasting page. Thanks [Netsparker](https://www.netsparker.com) for reporting the issue.
202
+ * Fixed bug with Podcasting SEO settings where Episode Titles could not be disabled.
203
+ * Fixed bug where Godaddy customers using PHP 5.4 were getting a blank screen for the PowerPress Settings page due to a bug in the stristr() function. Godaddy is aware of the problem and working on a fix. In the mean time we've replaced calls to stristr() with preg_match().
204
+ * Podcast Republic now uses the podcast feed URL for subscriptions (rather than the iTunes URL).
205
+
206
 
207
  = 6.0 =
208
  * Released on 12/19/2014
228
  * Updated the getid3 library to latest version, PowerPress now includes ogg duration detection support for "Speex" or "vorbis".
229
  * We are no longer detecting if the sample rate is optimal, we're no longer worried about Flash playback.
230
  * Removed Flow Player, Simple Flash, AudioPlay and Flash Mp3 Maxi players. These flash players are no longer supported.
231
+ * New MediaElement.js Audio player max width setting added. Player will now display full width otherwise. Player is now responsive, the width will shrink or stretch for the screen.
232
  * Improved MediaElement.js Video player width and height settings. Player will now display full width, or as styled by the theme's CSS if width and height are blank. Player is now responsive, the width will shrink or stretch for the screen, the height can be set with a blank width to allow for the player to fit different screens.
233
  * We are now warning users not to use Flash based players in the player selection screens.
234
  * Added option to set stats redirect at the channel/post type level. Requires a define `CHANNEL_STATS_REDIRECT` and/or `POST_TYPE_STATS_REDIRECT` in the wp-config.php file.
252
  * Brazilian Portuguese translation for v6.0+ by [Leo Lopes from Radiofobia](http://radiofobia.com.br/).
253
 
254
 
255
+ = 5.0.10 =
256
  * Released on 12/16/2014
257
  * Update your copy of PowerPress to version 5.0.9 immediately
258
  * Due to concerns of possible security exploits, the FlowPlayer flash based player has been removed from PowerPress as of version 5.0.10. PowerPress users are strongly encouraged to update their copy of PowerPress immediately.