PowerPress Podcasting plugin by Blubrry - Version 6.1

Version Description

  • Released on 10/30/2015
  • Added Google Play Music podcast directory support.
  • Added Donate Link option under Feed settings tab.
  • Removed the enqueuing of mediaelement.js scripts and styles for the player and links in theme pages. PowerPress's player.min.js will only be included on pages with the player or player links. (Thanks wadehammes for bringing to our attention).
  • Updated iTunes subtitle and summary values to treat utf8mb4 data as utf8.
  • Added better logic for checking for UTF8 values for iTunes attributes.
  • Added the text domain setting in the powerpress.php file for translate.wordpress.org use.
  • Enhanced iTunes summary bug where some iTunes summaries were getting cut to 255 characters fixed.
  • Code updated to support PHP7.
Download this release

Release Info

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

Code changes from version 6.0.5 to 6.1

mp3info.class.php CHANGED
@@ -24,7 +24,7 @@
24
  var $m_data = '';
25
 
26
  // Constructor
27
- function Mp3Info()
28
  {
29
  // Empty for now
30
  $this->m_UserAgent = 'Blubrry PowerPress/'.POWERPRESS_VERSION;
24
  var $m_data = '';
25
 
26
  // Constructor
27
+ function __construct()
28
  {
29
  // Empty for now
30
  $this->m_UserAgent = 'Blubrry PowerPress/'.POWERPRESS_VERSION;
powerpress-player.php CHANGED
@@ -54,7 +54,7 @@ function powerpressplayer_init($GeneralSettings)
54
  add_shortcode('display_podcast', 'powerpress_shortcode_handler');
55
  }
56
 
57
-
58
  // include what's needed for each plaer
59
  if( defined('POWERPRESS_JS_DEBUG') )
60
  wp_enqueue_script( 'powerpress-player', powerpress_get_root_url() .'player.js');
@@ -81,6 +81,7 @@ function powerpressplayer_init($GeneralSettings)
81
  wp_enqueue_style('wp-mediaelement');
82
  wp_enqueue_script('wp-mediaelement');
83
  }
 
84
  }
85
 
86
 
@@ -128,6 +129,7 @@ function powerpress_shortcode_handler( $attributes, $content = null )
128
  $url = powerpress_add_redirect_url($url);
129
  $content_type = '';
130
  // Handle the URL differently...
 
131
  $return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($url, 'p'), array('image'=>$image, 'type'=>$content_type,'width'=>$width, 'height'=>$height) );
132
  }
133
  else if( $channel )
@@ -151,7 +153,8 @@ function powerpress_shortcode_handler( $attributes, $content = null )
151
  }
152
  else
153
  {
154
- // If the shortcode speciies a channel, than we definnitely wnat to include the player even if $EpisodeData['no_player'] is true...
 
155
  if( !isset($EpisodeData['no_player']) )
156
  $return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('id'=>$post->ID,'feed'=>$channel, 'channel'=>$channel, 'image'=>$image, 'type'=>$EpisodeData['type'],'width'=>$width, 'height'=>$height) );
157
  if( empty($EpisodeData['no_links']) ) {
@@ -227,10 +230,12 @@ function powerpress_shortcode_handler( $attributes, $content = null )
227
 
228
  if( !isset($EpisodeData['no_player']) )
229
  {
 
230
  $return .= apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
231
  }
232
  if( !isset($EpisodeData['no_links']) )
233
  {
 
234
  $return .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
235
  $return .= apply_filters('powerpress_player_subscribe_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
236
  }
@@ -246,6 +251,17 @@ if( !defined('PODCASTING_VERSION') )
246
  add_shortcode('podcast', 'powerpress_shortcode_handler');
247
  }
248
 
 
 
 
 
 
 
 
 
 
 
 
249
  /*
250
  // Everything in $ExtraData except post_id
251
  */
@@ -1154,11 +1170,7 @@ function powerpress_do_pinw($pinw, $process_podpress)
1154
  <meta name="robots" content="noindex" />
1155
  <?php
1156
 
1157
- if( defined('POWERPRESS_JS_DEBUG') )
1158
- wp_enqueue_script( 'powerpress-player', powerpress_get_root_url() .'player.js');
1159
- else
1160
- wp_enqueue_script( 'powerpress-player', powerpress_get_root_url() .'player.min.js');
1161
-
1162
 
1163
  $include_mejs = false;
1164
  if( empty($GeneralSettings['player']) || empty($GeneralSettings['video_player']) )
@@ -1487,11 +1499,8 @@ function powerpressplayer_build_mediaelementaudio($media_url, $EpisodeData=array
1487
  'preload' => 'none'
1488
  );
1489
 
1490
-
1491
  $content .= wp_audio_shortcode( $attr );
1492
  $content .= '</div>'.PHP_EOL;
1493
-
1494
-
1495
  return $content;
1496
  }
1497
 
54
  add_shortcode('display_podcast', 'powerpress_shortcode_handler');
55
  }
56
 
57
+ /*
58
  // include what's needed for each plaer
59
  if( defined('POWERPRESS_JS_DEBUG') )
60
  wp_enqueue_script( 'powerpress-player', powerpress_get_root_url() .'player.js');
81
  wp_enqueue_style('wp-mediaelement');
82
  wp_enqueue_script('wp-mediaelement');
83
  }
84
+ */
85
  }
86
 
87
 
129
  $url = powerpress_add_redirect_url($url);
130
  $content_type = '';
131
  // Handle the URL differently...
132
+ do_action('wp_powerpress_player_scripts');
133
  $return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($url, 'p'), array('image'=>$image, 'type'=>$content_type,'width'=>$width, 'height'=>$height) );
134
  }
135
  else if( $channel )
153
  }
154
  else
155
  {
156
+ do_action('wp_powerpress_player_scripts');
157
+ // If the shortcode specifies a channel, than we definitely want to include the player even if $EpisodeData['no_player'] is true...
158
  if( !isset($EpisodeData['no_player']) )
159
  $return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('id'=>$post->ID,'feed'=>$channel, 'channel'=>$channel, 'image'=>$image, 'type'=>$EpisodeData['type'],'width'=>$width, 'height'=>$height) );
160
  if( empty($EpisodeData['no_links']) ) {
230
 
231
  if( !isset($EpisodeData['no_player']) )
232
  {
233
+ do_action('wp_powerpress_player_scripts');
234
  $return .= apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
235
  }
236
  if( !isset($EpisodeData['no_links']) )
237
  {
238
+ do_action('wp_powerpress_player_scripts');
239
  $return .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
240
  $return .= apply_filters('powerpress_player_subscribe_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
241
  }
251
  add_shortcode('podcast', 'powerpress_shortcode_handler');
252
  }
253
 
254
+ function wp_powerpress_player_scripts()
255
+ {
256
+ // include what's needed for each plaer
257
+ if( defined('POWERPRESS_JS_DEBUG') )
258
+ wp_enqueue_script( 'powerpress-player', powerpress_get_root_url() .'player.js');
259
+ else
260
+ wp_enqueue_script( 'powerpress-player', powerpress_get_root_url() .'player.min.js');
261
+ }
262
+ add_action( 'wp_powerpress_player_scripts', 'wp_powerpress_player_scripts' );
263
+
264
+
265
  /*
266
  // Everything in $ExtraData except post_id
267
  */
1170
  <meta name="robots" content="noindex" />
1171
  <?php
1172
 
1173
+ do_action('wp_powerpress_player_scripts');
 
 
 
 
1174
 
1175
  $include_mejs = false;
1176
  if( empty($GeneralSettings['player']) || empty($GeneralSettings['video_player']) )
1499
  'preload' => 'none'
1500
  );
1501
 
 
1502
  $content .= wp_audio_shortcode( $attr );
1503
  $content .= '</div>'.PHP_EOL;
 
 
1504
  return $content;
1505
  }
1506
 
powerpress.php CHANGED
@@ -3,9 +3,12 @@
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.5
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
 
 
 
9
  Change Log:
10
  Please see readme.txt for detailed change log.
11
 
@@ -32,7 +35,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.5' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
@@ -282,6 +285,11 @@ function powerpress_content($content)
282
  }
283
  else
284
  {
 
 
 
 
 
285
  if( $GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0 ) // Play in new window only or disabled
286
  {
287
  $AddDefaultPlayer = empty($EpisodeData['no_player']);
@@ -456,6 +464,10 @@ function powerpress_rss2_ns()
456
  {
457
  echo 'xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"'.PHP_EOL;
458
  }
 
 
 
 
459
  }
460
 
461
  add_action('rss2_ns', 'powerpress_rss2_ns');
@@ -705,16 +717,47 @@ function powerpress_rss2_head()
705
  }
706
  }
707
  // End Handle iTunes categories
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
708
 
709
  // RawVoice RSS Tags
710
  if( !defined('POWERPRESS_RAWVOICE_RSS') || POWERPRESS_RAWVOICE_RSS != false )
711
  {
712
  if( !empty($Feed['parental_rating']) )
713
- echo "\t\t<rawvoice:rating>". $Feed['parental_rating'] ."</rawvoice:rating>".PHP_EOL;
714
  if( !empty($Feed['location']) )
715
- echo "\t\t<rawvoice:location>". htmlspecialchars($Feed['location']) ."</rawvoice:location>".PHP_EOL;
716
  if( !empty($Feed['frequency']) )
717
- echo "\t\t<rawvoice:frequency>". htmlspecialchars($Feed['frequency']) ."</rawvoice:frequency>".PHP_EOL;
 
 
718
  }
719
  }
720
 
@@ -873,6 +916,22 @@ function powerpress_rss2_item()
873
  echo "\t\t<itunes:order>". $EpisodeData['order'] ."</itunes:order>".PHP_EOL;
874
  }
875
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
876
  // RawVoice RSS Tags
877
  if( empty($powerpress_feed['feed_maximizer_on']) )
878
  {
@@ -1993,6 +2052,11 @@ function get_the_powerpress_content()
1993
  }
1994
  else
1995
  {
 
 
 
 
 
1996
  if( $GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0 ) // Play in new window only or disabled
1997
  {
1998
  $AddDefaultPlayer = empty($EpisodeData['no_player']);
@@ -2284,6 +2348,30 @@ function powerpress_itunes_categories($PrefixSubCategories = false)
2284
  return $temp;
2285
  }
2286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2287
  function powerpress_get_root_url()
2288
  {
2289
  /*
@@ -2301,10 +2389,26 @@ function powerpress_get_root_url()
2301
 
2302
  function powerpress_format_itunes_value($value, $tag)
2303
  {
2304
- if( !defined('POWERPRESS_DISABLE_ITUNES_UTF8') ) // If not defined or it is false
2305
  {
2306
- if( !defined('DB_CHARSET') || DB_CHARSET != 'utf8' ) // Check if the string is UTF-8
2307
- $value = utf8_encode($value); // If it is not, convert to UTF-8 then decode it...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2308
  }
2309
 
2310
  // Code added to solve issue with KimiliFlashEmbed plugin and also remove the shortcode for the WP Audio Player
@@ -2341,7 +2445,7 @@ function powerpress_trim_itunes_value($value, $tag = 'summary')
2341
  $remove_new_lines = true;
2342
  // 255 character limit
2343
  if( $length > 255 )
2344
- $trim_at = 255;
2345
  };
2346
  }
2347
 
@@ -2366,7 +2470,10 @@ function powerpress_trim_itunes_value($value, $tag = 'summary')
2366
  }
2367
 
2368
  if( $clean_break == false && $tag = 'subtitle' ) // Subtitle we want to add a ... at the end
2369
- $value = (function_exists('mb_substr')?mb_substr($value, 0, 252):substr($value, 0, 252) ). '...';
 
 
 
2370
  }
2371
 
2372
  if( $remove_new_lines )
@@ -2911,6 +3018,11 @@ function get_the_powerpress_all_players($slug = false, $no_link=false)
2911
  $return .= powerpress_premium_content_message(get_the_ID(), $feed_slug, $EpisodeData);
2912
  continue;
2913
  }
 
 
 
 
 
2914
 
2915
  if( !isset($EpisodeData['no_player']) && $AddDefaultPlayer )
2916
  {
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.1
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
+ Requires at least: 3.7
10
+ Tested up to: 4.3.1
11
+ Text Domain: powerpress
12
  Change Log:
13
  Please see readme.txt for detailed change log.
14
 
35
  die("access denied.");
36
 
37
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
38
+ define('POWERPRESS_VERSION', '6.1' );
39
 
40
  // Translation support:
41
  if ( !defined('POWERPRESS_ABSPATH') )
285
  }
286
  else
287
  {
288
+ if( !isset($EpisodeData['no_links']) || ($GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0) )
289
+ {
290
+ do_action('wp_powerpress_player_scripts');
291
+ }
292
+
293
  if( $GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0 ) // Play in new window only or disabled
294
  {
295
  $AddDefaultPlayer = empty($EpisodeData['no_player']);
464
  {
465
  echo 'xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"'.PHP_EOL;
466
  }
467
+ if( !defined('POWERPRESS_GOOGLEPLAY_RSS') || POWERPRESS_GOOGLEPLAY_RSS != false )
468
+ {
469
+ echo 'xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"'.PHP_EOL;
470
+ }
471
  }
472
 
473
  add_action('rss2_ns', 'powerpress_rss2_ns');
717
  }
718
  }
719
  // End Handle iTunes categories
720
+ if( !empty($Feed['googleplay_email']) )
721
+ {
722
+ echo "\t".'<googleplay:email>' . esc_html($Feed['googleplay_email']) . '</googleplay:email>'.PHP_EOL;
723
+ }
724
+
725
+ if( !empty($Feed['googleplay_description']) )
726
+ {
727
+ echo "\t".'<googleplay:description>' . esc_html($Feed['googleplay_description']) . '</googleplay:description>'.PHP_EOL;
728
+ }
729
+
730
+ if( !empty($Feed['googleplay_explicit']) )
731
+ {
732
+ echo "\t".'<googleplay:explicit>Yes</googleplay:explicit>'.PHP_EOL;
733
+ }
734
+
735
+ // google_play_cat // google_play_explicit
736
+ if( !empty($Feed['googleplay_cat']) )
737
+ {
738
+ $play_cats = powerpress_googleplay_categories();
739
+ if( !empty($play_cats[ $Feed['googleplay_cat'] ]) )
740
+ {
741
+ echo "\t".'<googleplay:category text="'. esc_html($play_cats[ $Feed['googleplay_cat'] ]) .'" />'.PHP_EOL;
742
+ }
743
+ }
744
+
745
+ if( !empty($Feed['googleplay_image']) )
746
+ {
747
+ echo "\t".'<googleplay:image href="' . esc_html( str_replace(' ', '+', $Feed['googleplay_image']), 'double') . '" />'.PHP_EOL;
748
+ }
749
 
750
  // RawVoice RSS Tags
751
  if( !defined('POWERPRESS_RAWVOICE_RSS') || POWERPRESS_RAWVOICE_RSS != false )
752
  {
753
  if( !empty($Feed['parental_rating']) )
754
+ echo "\t<rawvoice:rating>". $Feed['parental_rating'] ."</rawvoice:rating>".PHP_EOL;
755
  if( !empty($Feed['location']) )
756
+ echo "\t<rawvoice:location>". htmlspecialchars($Feed['location']) ."</rawvoice:location>".PHP_EOL;
757
  if( !empty($Feed['frequency']) )
758
+ echo "\t<rawvoice:frequency>". htmlspecialchars($Feed['frequency']) ."</rawvoice:frequency>".PHP_EOL;
759
+ if( !empty($Feed['donate_link']) && !empty($Feed['donate_url']) )
760
+ echo "\t<rawvoice:donate href=\"". htmlspecialchars( $Feed['donate_url'] ) ."\">". htmlspecialchars( (empty($Feed['donate_label'])?'':$Feed['donate_label']) ) ."</rawvoice:donate>".PHP_EOL;
761
  }
762
  }
763
 
916
  echo "\t\t<itunes:order>". $EpisodeData['order'] ."</itunes:order>".PHP_EOL;
917
  }
918
 
919
+ // Google Play tags:
920
+ if( !empty( $EpisodeData['gp_desc'] ) )
921
+ {
922
+ echo "\t\t<googleplay:description>". powerpress_format_itunes_value($EpisodeData['gp_desc'], 'summary') ."</googleplay:description>".PHP_EOL;
923
+ }
924
+
925
+ if( !empty( $EpisodeData['gp_explicit'] ) )
926
+ {
927
+ echo "\t\t<googleplay:explicit>yes</googleplay:explicit>".PHP_EOL;
928
+ }
929
+
930
+ if( !empty( $EpisodeData['gp_block'] ) )
931
+ {
932
+ echo "\t\t<googleplay:block>yes</googleplay:block>".PHP_EOL;
933
+ }
934
+
935
  // RawVoice RSS Tags
936
  if( empty($powerpress_feed['feed_maximizer_on']) )
937
  {
2052
  }
2053
  else
2054
  {
2055
+ if( !isset($EpisodeData['no_links']) || ($GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0) )
2056
+ {
2057
+ do_action('wp_powerpress_player_scripts');
2058
+ }
2059
+
2060
  if( $GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0 ) // Play in new window only or disabled
2061
  {
2062
  $AddDefaultPlayer = empty($EpisodeData['no_player']);
2348
  return $temp;
2349
  }
2350
 
2351
+
2352
+ function powerpress_googleplay_categories()
2353
+ {
2354
+ $temp = array();
2355
+ $temp['01-00'] = 'Arts';
2356
+ $temp['02-00'] = 'Business';
2357
+ $temp['03-00'] = 'Comedy';
2358
+ $temp['04-00'] = 'Education';
2359
+ $temp['05-00'] = 'Games & Hobbies';
2360
+ $temp['06-00'] = 'Government & Organizations';
2361
+ $temp['07-00'] = 'Health';
2362
+ $temp['08-00'] = 'Kids & Family';
2363
+ $temp['09-00'] = 'Music';
2364
+ $temp['10-00'] = 'News & Politics';
2365
+ $temp['11-00'] = 'Religion & Spirituality';
2366
+ $temp['12-00'] = 'Science & Medicine';
2367
+ $temp['13-00'] = 'Society & Culture';
2368
+ $temp['14-00'] = 'Sports & Recreation';
2369
+ $temp['15-00'] = 'Technology';
2370
+ $temp['16-00'] = 'TV & Film';
2371
+
2372
+ return $temp;
2373
+ }
2374
+
2375
  function powerpress_get_root_url()
2376
  {
2377
  /*
2389
 
2390
  function powerpress_format_itunes_value($value, $tag)
2391
  {
2392
+ if( !defined('POWERPRESS_DISABLE_ITUNES_UTF8') || POWERPRESS_DISABLE_ITUNES_UTF8 == false ) // If not defined or it is false
2393
  {
2394
+ global $wpdb;
2395
+ switch( $wpdb->charset )
2396
+ {
2397
+ case 'utf8': break;
2398
+ case 'utf8mb3': break;
2399
+ case 'utf8mb4': break;
2400
+ default: {
2401
+ //if( defined('DB_CHARSET') && DB_CHARSET == 'utf8' ) {
2402
+ // break; }
2403
+ //if( defined('DB_CHARSET') && DB_CHARSET == 'utf8mb4' ) {
2404
+ // break; }
2405
+
2406
+ // preg_match fails when it encounters invalid UTF8 in $string
2407
+ if ( 1 !== @preg_match( '/^./us', $value ) ) {
2408
+ $value = utf8_encode($value); // If it is not, convert to UTF-8 then decode it...
2409
+ }
2410
+ }
2411
+ }
2412
  }
2413
 
2414
  // Code added to solve issue with KimiliFlashEmbed plugin and also remove the shortcode for the WP Audio Player
2445
  $remove_new_lines = true;
2446
  // 255 character limit
2447
  if( $length > 255 )
2448
+ $trim_at = 252; // Allow 3 dots to be added after the trim
2449
  };
2450
  }
2451
 
2470
  }
2471
 
2472
  if( $clean_break == false && $tag = 'subtitle' ) // Subtitle we want to add a ... at the end
2473
+ {
2474
+ if( $trim_at )
2475
+ $value = (function_exists('mb_substr')?mb_substr($value, 0, $trim_at):substr($value, 0, $trim_at) ). '...';
2476
+ }
2477
  }
2478
 
2479
  if( $remove_new_lines )
3018
  $return .= powerpress_premium_content_message(get_the_ID(), $feed_slug, $EpisodeData);
3019
  continue;
3020
  }
3021
+
3022
+ if( !isset($EpisodeData['no_links']) || (!isset($EpisodeData['no_player']) && $AddDefaultPlayer) )
3023
+ {
3024
+ do_action('wp_powerpress_player_scripts');
3025
+ }
3026
 
3027
  if( !isset($EpisodeData['no_player']) && $AddDefaultPlayer )
3028
  {
powerpressadmin-basic.php CHANGED
@@ -152,7 +152,8 @@ jQuery(document).ready(function($) {
152
  <li><a href="#tab3"><span><?php echo htmlspecialchars(__('Media Appearance', 'powerpress')); ?></span></a></li>
153
  <li><a href="#tab4"><span><?php echo htmlspecialchars(__('Feeds', 'powerpress')); ?></span></a></li>
154
  <li><a href="#tab5"><span><?php echo htmlspecialchars(__('iTunes', 'powerpress')); ?></span></a></li>
155
- <li><a href="#tab6"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
 
156
  </ul>
157
 
158
  <div id="tab0" class="powerpress_tab">
@@ -190,6 +191,7 @@ jQuery(document).ready(function($) {
190
  <?php
191
  powerpressadmin_edit_feed_general($FeedSettings, $General);
192
  powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs);
 
193
  powerpressadmin_edit_tv($FeedSettings);
194
  ?>
195
  </div>
@@ -200,8 +202,12 @@ jQuery(document).ready(function($) {
200
  powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
201
  ?>
202
  </div>
203
-
204
  <div id="tab6" class="powerpress_tab">
 
 
 
 
 
205
  <?php
206
  powerpressadmin_edit_artwork($FeedSettings, $General);
207
  ?>
@@ -231,7 +237,7 @@ function powerpressadmin_advanced_options($General)
231
  <div>
232
  <input type="checkbox" name="NULL[player_options]" value="1" checked disabled />
233
  <strong><?php echo __('Audio Player Options', 'powerpress'); ?></strong> -
234
- <?php echo __('Select from 7 different web based audio players.', 'powerpress'); ?>
235
  <span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_player.php'); ?>"><?php echo __('configure audio player', 'powerpress'); ?></a>)</span>
236
 
237
 
@@ -239,7 +245,7 @@ function powerpressadmin_advanced_options($General)
239
  <div>
240
  <input type="checkbox" name="NULL[video_player_options]" value="1" checked disabled />
241
  <strong><?php echo __('Video Player Options', 'powerpress'); ?></strong> -
242
- <?php echo __('Select from 4 different web based video players.', 'powerpress'); ?>
243
  <span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_videoplayer.php'); ?>"><?php echo __('configure video player', 'powerpress'); ?></a>)</span>
244
 
245
  </div>
@@ -322,24 +328,23 @@ function powerpressadmin_advanced_options($General)
322
 
323
  <div style="margin-left: 10px;">
324
  <h3 style="margin-bottom: 5px;"><?php echo __('Looking for Support, Consulting or Custom Development?', 'powerpress'); ?></h3>
325
- <p style="margin: 0 0 0 50px; font-size: 115%;">
326
  <?php echo __('Blubrry offers a variety of options, free and paid, to assist you with your podcasting and Internet media needs. Whether you need your theme customized for podcasting or you want consulting on what video format is best for your audience, we have the staff and knowledge to assist.', 'powerpress'); ?>
327
  </p>
328
- <p style="margin: 5px 0 0 50px; font-size: 115%;">
329
  <strong><?php echo '<a href="http://create.blubrry.com/support/" target="_blank">'. __('Learn More about Blubrry Support Options', 'powerpress') .'</a>'; ?></strong>
330
  </p>
331
  </div>
332
 
333
  <div style="margin-left: 10px;">
334
  <h3 style="margin-bottom: 5px;"><?php echo __('Want your own iOS and Android podcast apps?', 'powerpress'); ?></h3>
335
- <p style="margin: 0 0 0 50px; font-size: 115%;">
336
  <?php echo __('Blubrry has partnered with Reactor by AppPresser to provide iOS and Android apps for PowerPress powered podcasts. With Reactor, you are able to build, design and retain control of your app to highlight your podcast content, and provide access to value-add content from your website.', 'powerpress'); ?>
337
  </p>
338
- <p style="margin: 5px 0 0 50px; font-size: 115%;">
339
  <strong><?php echo '<a href="http://create.blubrry.com/resources/partners/reactor-ios-android-podcast-apps-powerpress/" target="_blank">'. __('Learn More about Reactor iOS and Android podcast apps for PowerPress', 'powerpress') .'</a>'; ?></strong>
340
  </p>
341
  </div>
342
-
343
  <?php
344
  if( isset($General['timestamp']) && $General['timestamp'] > 0 && $General['timestamp'] < ( time()- (60*60*24*14) ) ) // Lets wait 14 days before we annoy them asking for support
345
  {
@@ -452,10 +457,15 @@ function powerpressadmin_edit_entry_options($General)
452
  (<?php echo __('Leave unchecked to use the first 250 characters of your blog post', 'powerpress'); ?>)</p>
453
  <p style="margin-top: 15px;"><input id="episode_box_summary" class="episode_box_option" name="General[episode_box_summary]" type="checkbox" value="1"<?php if( !empty($General['episode_box_summary']) ) echo ' checked'; ?> /> <?php echo __('iTunes Summary Field', 'powerpress'); ?>
454
  (<?php echo __('Leave unchecked to use your blog post', 'powerpress'); ?>)</p>
 
 
 
455
  <p style="margin-top: 15px;"><input id="episode_box_author" class="episode_box_option" name="General[episode_box_author]" type="checkbox" value="1"<?php if( !empty($General['episode_box_author']) ) echo ' checked'; ?> /> <?php echo __('iTunes Author Field', 'powerpress'); ?>
456
  (<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
 
457
  <p style="margin-top: 15px;"><input id="episode_box_explicit" class="episode_box_option" name="General[episode_box_explicit]" type="checkbox" value="1"<?php if( !empty($General['episode_box_explicit']) ) echo ' checked'; ?> /> <?php echo __('iTunes Explicit Field', 'powerpress'); ?>
458
  (<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
 
459
 
460
  <p style="margin-top: 15px;"><label><input id="episode_box_itunes_image" class="episode_box_option" name="General[episode_box_itunes_image]" type="checkbox" value="1"<?php if( !empty($General['episode_box_itunes_image']) ) echo ' checked'; ?> /> <?php echo __('iTunes Episode Image Field', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?>
461
  (<?php echo __('Leave unchecked to use the image embedded into your media files.', 'powerpress'); ?>)</p>
@@ -464,28 +474,33 @@ function powerpressadmin_edit_entry_options($General)
464
  (<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
465
 
466
  <p style="margin-top: 15px;"><label><input id="episode_box_order" class="episode_box_option" name="General[episode_box_order]" type="checkbox" value="1"<?php if( !empty($General['episode_box_order']) ) echo ' checked'; ?> <?php if( !empty($General['episode_box_feature_in_itunes']) ) echo ' disabled'; ?> /> <?php echo __('iTunes Order', 'powerpress'); ?></label>
467
- (<?php echo __('Override the default ordering of episodes on the iTunes podcast directory', 'powerpress'); ?>)</p>
468
- <em><strong><?php echo __('If conflicting values are present the iTunes directory will use the default ordering.', 'powerpress'); ?></strong></em><br />
469
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
470
 
471
- <p style="margin-top: 15px;"><label><input id="episode_box_feature_in_itunes" class="episode_box_option" name="General[episode_box_feature_in_itunes]" type="checkbox" value="1"<?php if( !empty($General['episode_box_feature_in_itunes']) ) echo ' checked'; ?> /> <?php echo __('Feature Episode in iTunes', 'powerpress'); ?></label>
472
- (<?php echo __('Display selected episode at top of your iTunes Directory listing', 'powerpress'); ?>)</p>
473
  <em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
474
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
475
 
476
- <?php if( defined('POWERPRESS_NOT_SUPPORTED') ) { ?>
477
- <fieldset style="border: 1px dashed #333333; margin: 10px 0 10px -20px;">
478
- <legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php echo __('Features Not Supported by PowerPress', 'powerpress'); ?></legend>
 
 
 
 
 
479
  <p style="margin: 5px 10px 0 20px;">
480
  <strong style="color: #CC0000;"><?php echo __('USE THE FOLLOWING SETTINGS AT YOUR OWN RISK.', 'powerpress'); ?></strong>
481
  </p>
482
- <p style="margin: 10px 10px 10px 20px;"><input id="episode_box_block" class="episode_box_option" name="General[episode_box_block]" type="checkbox" value="1"<?php if( !empty($General['episode_box_block']) ) echo ' checked'; ?> /> <?php echo __('iTunes Block', 'powerpress'); ?>
483
- (<?php echo __('Prevent episodes from appearing in iTunes. Feature only applies to iTunes, episodes will still appear in other directories and applications', 'powerpress'); ?>)</p>
484
-
485
 
486
- </fieldset>
487
- <?php } ?>
488
- <em><?php echo __('NOTE: An invalid entry into any of the iTunes fields may cause problems with your iTunes listing. It is highly recommended that you validate your feed using feedvalidator.org everytime you modify any of the iTunes fields listed above.', 'powerpress'); ?></em><br />
 
489
  </div>
490
 
491
  </td>
@@ -698,6 +713,136 @@ while( list($value,$desc) = each($options) )
698
  }
699
 
700
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
701
  function powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs = array() )
702
  {
703
  // Set default settings (if not set)
@@ -1256,7 +1401,7 @@ function powerpress_admin_appearance_common($Feed, $FeedAttribs = array())
1256
  if( !empty($FeedAttribs['feed_slug']) )
1257
  $feed_slug = $FeedAttribs['feed_slug'];
1258
 
1259
- if( $FeedAttribs['type'] == 'ttid' )
1260
  {
1261
  //echo "<br /><br />";
1262
  return;
@@ -1404,6 +1549,37 @@ function powerpressadmin_welcome($GeneralSettings)
1404
  <?php
1405
  } // End powerpressadmin_welcome()
1406
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1407
  function powerpressadmin_edit_tv($FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
1408
  {
1409
  if( !isset($FeedSettings['parental_rating']) )
@@ -1470,7 +1646,7 @@ function powerpressadmin_edit_artwork($FeedSettings, $General)
1470
  <span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
1471
  </th>
1472
  <td>
1473
- <input type="text" id="itunes_image" name="Feed[itunes_image]" style="width: 60%;" value="<?php echo esc_attr( !empty($FeedSettings['itunes_image'])? $FeedSettings['itunes_image']:''); ?>" maxlength="250" />
1474
  <a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
1475
 
1476
  <p><?php echo __('iTunes image must be at least 1400 x 1400 pixels in .jpg or .png format. iTunes image must not exceed 3000 x 3000 pixels and must use RGB color space.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?>: http://example.com/images/itunes.jpg
@@ -1507,22 +1683,48 @@ function powerpressadmin_edit_artwork($FeedSettings, $General)
1507
  <table class="form-table">
1508
  <tr valign="top">
1509
  <th scope="row">
1510
- <?php echo __('iTunes Episode Image', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></th>
1511
  <td>
1512
 
1513
- <p><label><input type="checkbox" name="Feed[episode_itunes_image]" value="1" <?php if( !empty($FeedSettings['episode_itunes_image']) ) echo 'checked '; ?>/> <?php echo __('Use iTunes image above', 'powerpress'); ?></label></p>
1514
  <p><?php echo __('Use the program iTunes image above as your iTunes episode image.', 'powerpress'); ?></p>
1515
  <p class="description"><?php echo __('NOTE: You must still save artwork into your media files to guarantee your artwork is displayed during playback.', 'powerpress'); ?></p>
1516
  </td>
1517
  </tr>
1518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1519
  <tr valign="top">
1520
  <th scope="row">
1521
  <?php echo __('RSS2 Image', 'powerpress'); ?> <br />
1522
  <span style="font-size: 85%; margin-left: 5px;"><?php echo __('Recommendation: Use iTunes image', 'powerpress'); ?></span>
1523
  </th>
1524
  <td>
1525
- <input type="text" id="rss2_image" name="Feed[rss2_image]" style="width: 60%;" value="<?php echo esc_attr( !empty($FeedSettings['rss2_image'])? $FeedSettings['rss2_image']:''); ?>" maxlength="250" />
1526
  <a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
1527
 
1528
  <p><?php echo __('Place the URL to the RSS image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> http://mysite.com/images/rss.jpg</p>
152
  <li><a href="#tab3"><span><?php echo htmlspecialchars(__('Media Appearance', 'powerpress')); ?></span></a></li>
153
  <li><a href="#tab4"><span><?php echo htmlspecialchars(__('Feeds', 'powerpress')); ?></span></a></li>
154
  <li><a href="#tab5"><span><?php echo htmlspecialchars(__('iTunes', 'powerpress')); ?></span></a></li>
155
+ <li><a href="#tab6" style="position: relative;"><span style="margin-right: 25px;"><?php echo htmlspecialchars(__('Google Play', 'powerpress')); ?></span> <span style="position: absolute; top: 0; right: 2px;"><?php echo powerpressadmin_new(); ?></a></span></li>
156
+ <li><a href="#tab7"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
157
  </ul>
158
 
159
  <div id="tab0" class="powerpress_tab">
191
  <?php
192
  powerpressadmin_edit_feed_general($FeedSettings, $General);
193
  powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs);
194
+ powerpressadmin_edit_funding($FeedSettings);
195
  powerpressadmin_edit_tv($FeedSettings);
196
  ?>
197
  </div>
202
  powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
203
  ?>
204
  </div>
 
205
  <div id="tab6" class="powerpress_tab">
206
+ <?php
207
+ powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs);
208
+ ?>
209
+ </div>
210
+ <div id="tab7" class="powerpress_tab">
211
  <?php
212
  powerpressadmin_edit_artwork($FeedSettings, $General);
213
  ?>
237
  <div>
238
  <input type="checkbox" name="NULL[player_options]" value="1" checked disabled />
239
  <strong><?php echo __('Audio Player Options', 'powerpress'); ?></strong> -
240
+ <?php echo __('Select from 3 different web based audio players.', 'powerpress'); ?>
241
  <span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_player.php'); ?>"><?php echo __('configure audio player', 'powerpress'); ?></a>)</span>
242
 
243
 
245
  <div>
246
  <input type="checkbox" name="NULL[video_player_options]" value="1" checked disabled />
247
  <strong><?php echo __('Video Player Options', 'powerpress'); ?></strong> -
248
+ <?php echo __('Select from 3 different web based video players.', 'powerpress'); ?>
249
  <span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_videoplayer.php'); ?>"><?php echo __('configure video player', 'powerpress'); ?></a>)</span>
250
 
251
  </div>
328
 
329
  <div style="margin-left: 10px;">
330
  <h3 style="margin-bottom: 5px;"><?php echo __('Looking for Support, Consulting or Custom Development?', 'powerpress'); ?></h3>
331
+ <p style="margin: 0 0 0 50px;">
332
  <?php echo __('Blubrry offers a variety of options, free and paid, to assist you with your podcasting and Internet media needs. Whether you need your theme customized for podcasting or you want consulting on what video format is best for your audience, we have the staff and knowledge to assist.', 'powerpress'); ?>
333
  </p>
334
+ <p style="margin: 5px 0 0 50px;">
335
  <strong><?php echo '<a href="http://create.blubrry.com/support/" target="_blank">'. __('Learn More about Blubrry Support Options', 'powerpress') .'</a>'; ?></strong>
336
  </p>
337
  </div>
338
 
339
  <div style="margin-left: 10px;">
340
  <h3 style="margin-bottom: 5px;"><?php echo __('Want your own iOS and Android podcast apps?', 'powerpress'); ?></h3>
341
+ <p style="margin: 0 0 0 50px;">
342
  <?php echo __('Blubrry has partnered with Reactor by AppPresser to provide iOS and Android apps for PowerPress powered podcasts. With Reactor, you are able to build, design and retain control of your app to highlight your podcast content, and provide access to value-add content from your website.', 'powerpress'); ?>
343
  </p>
344
+ <p style="margin: 5px 0 0 50px;">
345
  <strong><?php echo '<a href="http://create.blubrry.com/resources/partners/reactor-ios-android-podcast-apps-powerpress/" target="_blank">'. __('Learn More about Reactor iOS and Android podcast apps for PowerPress', 'powerpress') .'</a>'; ?></strong>
346
  </p>
347
  </div>
 
348
  <?php
349
  if( isset($General['timestamp']) && $General['timestamp'] > 0 && $General['timestamp'] < ( time()- (60*60*24*14) ) ) // Lets wait 14 days before we annoy them asking for support
350
  {
457
  (<?php echo __('Leave unchecked to use the first 250 characters of your blog post', 'powerpress'); ?>)</p>
458
  <p style="margin-top: 15px;"><input id="episode_box_summary" class="episode_box_option" name="General[episode_box_summary]" type="checkbox" value="1"<?php if( !empty($General['episode_box_summary']) ) echo ' checked'; ?> /> <?php echo __('iTunes Summary Field', 'powerpress'); ?>
459
  (<?php echo __('Leave unchecked to use your blog post', 'powerpress'); ?>)</p>
460
+
461
+
462
+
463
  <p style="margin-top: 15px;"><input id="episode_box_author" class="episode_box_option" name="General[episode_box_author]" type="checkbox" value="1"<?php if( !empty($General['episode_box_author']) ) echo ' checked'; ?> /> <?php echo __('iTunes Author Field', 'powerpress'); ?>
464
  (<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
465
+
466
  <p style="margin-top: 15px;"><input id="episode_box_explicit" class="episode_box_option" name="General[episode_box_explicit]" type="checkbox" value="1"<?php if( !empty($General['episode_box_explicit']) ) echo ' checked'; ?> /> <?php echo __('iTunes Explicit Field', 'powerpress'); ?>
467
  (<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
468
+
469
 
470
  <p style="margin-top: 15px;"><label><input id="episode_box_itunes_image" class="episode_box_option" name="General[episode_box_itunes_image]" type="checkbox" value="1"<?php if( !empty($General['episode_box_itunes_image']) ) echo ' checked'; ?> /> <?php echo __('iTunes Episode Image Field', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?>
471
  (<?php echo __('Leave unchecked to use the image embedded into your media files.', 'powerpress'); ?>)</p>
474
  (<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
475
 
476
  <p style="margin-top: 15px;"><label><input id="episode_box_order" class="episode_box_option" name="General[episode_box_order]" type="checkbox" value="1"<?php if( !empty($General['episode_box_order']) ) echo ' checked'; ?> <?php if( !empty($General['episode_box_feature_in_itunes']) ) echo ' disabled'; ?> /> <?php echo __('iTunes Order', 'powerpress'); ?></label>
477
+ (<?php echo __('Override the default ordering of episodes on the iTunes and Google Play Music podcast directories', 'powerpress'); ?>)</p>
478
+ <em><strong><?php echo __('If conflicting values are present the directories will use the default ordering.', 'powerpress'); ?></strong></em><br />
479
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
480
 
481
+ <p style="margin-top: 15px;"><label><input id="episode_box_feature_in_itunes" class="episode_box_option" name="General[episode_box_feature_in_itunes]" type="checkbox" value="1"<?php if( !empty($General['episode_box_feature_in_itunes']) ) echo ' checked'; ?> /> <?php echo __('Feature Episode in iTunes and Google Play Music', 'powerpress'); ?></label>
482
+ (<?php echo __('Display selected episode at top of your iTunes and Google Play Music directory listings', 'powerpress'); ?>)</p>
483
  <em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
484
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
485
 
486
+
487
+ <p style="margin-top: 15px;"><input id="episode_box_gp_desc" class="episode_box_option" name="General[episode_box_gp_desc]" type="checkbox" value="1"<?php if( !empty($General['episode_box_gp_desc']) ) echo ' checked'; ?> /> <?php echo __('Google Play Description Field', 'powerpress'); ?>
488
+ (<?php echo __('Leave unchecked to use your blog post', 'powerpress'); ?>)</p>
489
+ <p style="margin-top: 15px;"><input id="episode_box_gp_explicit" class="episode_box_option" name="General[episode_box_gp_explicit]" type="checkbox" value="1"<?php if( !empty($General['episode_box_gp_explicit']) ) echo ' checked'; ?> /> <?php echo __('Google Play Explicit Field', 'powerpress'); ?>
490
+ (<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
491
+
492
+ <fieldset style="border: 1px dashed #333333; margin: 10px 0 10px -20px;">
493
+ <legend style="margin: 0 20px; padding: 0 5px 5px 5px; font-weight: bold;"><?php echo __('Warning', 'powerpress'); ?></legend>
494
  <p style="margin: 5px 10px 0 20px;">
495
  <strong style="color: #CC0000;"><?php echo __('USE THE FOLLOWING SETTINGS AT YOUR OWN RISK.', 'powerpress'); ?></strong>
496
  </p>
497
+ <p style="margin: 15px 0 0 20px;"><label><input id="episode_box_block" class="episode_box_option" name="General[episode_box_block]" type="checkbox" value="1"<?php if( !empty($General['episode_box_block']) ) echo ' checked'; ?> /> <?php echo __('iTunes Block', 'powerpress'); ?> (<?php echo htmlspecialchars('<itunes:block>yes</itunes:block>'); ?>)</label></p>
498
+ <div style="margin: 0 10px 10px 20px;"><em><strong><?php echo __('Prevent episodes from appearing in iTunes and other diretories that support the iTunes:block tag. Episodes may still appear in other directories and applications.', 'powerpress'); ?></strong></em></div>
 
499
 
500
+ <p style="margin: 15px 0 0 20px;"><label><input id="episode_box_gp_block" class="episode_box_option" name="General[episode_box_gp_block]" type="checkbox" value="1"<?php if( !empty($General['episode_box_gp_block']) ) echo ' checked'; ?> /> <?php echo __('Google Play Block', 'powerpress'); ?> (<?php echo htmlspecialchars('<googleplay:block>yes</itunes:googleplay>'); ?>)</label></p>
501
+ <div style="margin: 0 10px 10px 20px;"><em><strong><?php echo __('Prevent episodes from appearing in Google Play Music. Episodes may still appear in other directories and applications.', 'powerpress'); ?></strong></em></div>
502
+ </fieldset>
503
+
504
  </div>
505
 
506
  </td>
713
  }
714
 
715
 
716
+ function powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs = array() )
717
+ {
718
+ $feed_slug = $FeedAttribs['feed_slug'];
719
+ $cat_ID = $FeedAttribs['category_id'];
720
+
721
+ // Set default settings (if not set)
722
+ if( empty($FeedSettings['googleplay_url']) )
723
+ $FeedSettings['googleplay_url'] = '';
724
+ if( empty($FeedSettings['googleplay_email']) )
725
+ $FeedSettings['googleplay_email'] = '';
726
+ if( empty($FeedSettings['googleplay_author']) )
727
+ $FeedSettings['googleplay_author'] = '';
728
+ if( empty($FeedSettings['googleplay_description']) )
729
+ $FeedSettings['googleplay_description'] = '';
730
+ if( empty($FeedSettings['googleplay_explicit']) )
731
+ $FeedSettings['googleplay_explicit'] = '';
732
+ if( empty($FeedSettings['googleplay_cat']) )
733
+ $FeedSettings['googleplay_cat'] = '';
734
+
735
+ ?>
736
+ <h3><?php echo __('Google Play Settings', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></h3>
737
+ <table class="form-table">
738
+ <tr valign="top">
739
+ <th scope="row"><?php echo __('Google Play Listing URL', 'powerpress'); ?></th>
740
+ <td>
741
+ <input type="text" style="width: 80%;" name="Feed[googleplay_url]" value="<?php echo esc_attr($FeedSettings['googleplay_url']); ?>" maxlength="250" />
742
+ <p><?php echo __('Your listing URL will be issued to you from Google Play Music.', 'powerpress'); ?></p>
743
+ <!-- <p><?php echo sprintf(__('e.g. %s', 'powerpress'), 'http://itunes.apple.com/podcast/title-of-podcast/id<strong>000000000</strong>'); ?></p> -->
744
+
745
+ <p><?php echo sprintf( __('Click the following link to %s.', 'powerpress'), '<a href="https://play.google.com/music/podcasts/publish" target="_blank">'. __('Publish a Podcast on Google Play Music', 'powerpress') .'</a>'); ?>
746
+ </p>
747
+ <p>
748
+ <?php echo __('Recommended feed to submit to Google Play Music: ', 'powerpress'); ?>
749
+ <?php
750
+
751
+ switch( $FeedAttribs['type'] )
752
+ {
753
+ case 'ttid':
754
+ case 'category': {
755
+ echo get_category_feed_link($cat_ID);
756
+ }; break;
757
+ case 'channel': {
758
+ echo get_feed_link($feed_slug);
759
+ }; break;
760
+ case 'post_type': {
761
+ $url = get_post_type_archive_feed_link($FeedAttribs['post_type'], $feed_slug);
762
+ echo $url;
763
+ }; break;
764
+ case 'general':
765
+ default: {
766
+ echo get_feed_link('podcast');
767
+ }
768
+ }
769
+
770
+ ?>
771
+ </p>
772
+ </td>
773
+ </tr>
774
+ <tr valign="top">
775
+ <th scope="row">
776
+ <?php echo __('Google Play Email', 'powerpress'); ?>
777
+ <span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
778
+ </th>
779
+ <td>
780
+ <input type="text" name="Feed[googleplay_email]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['googleplay_email']); ?>" maxlength="250" />
781
+ <div>(<?php echo __('Google will email this address when your podcast is accepted into the Google Play Music Podcast Directory.', 'powerpress'); ?>)</div>
782
+ </td>
783
+ </tr>
784
+ <tr valign="top">
785
+ <th scope="row">
786
+ <?php echo __('Google Play Author', 'powerpress'); ?>
787
+ </th>
788
+ <td>
789
+ <input type="text" name="Feed[googleplay_author]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['googleplay_author']); ?>" maxlength="250" />
790
+ <div>(<?php echo __('iTunes Author will be used if left blank', 'powerpress'); ?>)</div>
791
+ </td>
792
+ </tr>
793
+ <tr valign="top">
794
+ <th scope="row">
795
+ <?php echo __('Google Play Description', 'powerpress'); ?>
796
+ </th>
797
+ <td>
798
+ <p style="margin-top: 5px;"><?php echo __('Your description cannot exceed 4,000 characters in length.', 'powerpress'); ?></p>
799
+ <textarea name="Feed[googleplay_description]" rows="5" style="width:80%;" ><?php echo esc_textarea($FeedSettings['googleplay_description']); ?></textarea>
800
+ <div>(<?php echo __('iTunes Summary will be used if left blank', 'powerpress'); ?>)</div>
801
+ </td>
802
+ </tr>
803
+ <tr valign="top">
804
+ <th scope="row">
805
+ <?php echo __('Google Play Explicit', 'powerpress'); ?>
806
+ </th>
807
+ <td>
808
+ <select name="Feed[googleplay_explicit]" class="bpp_input_med">
809
+ <?php
810
+ $explicit = array(0=> __('No - display nothing', 'powerpress'), 1=>__('Yes - explicit content', 'powerpress') );
811
+
812
+ while( list($value,$desc) = each($explicit) )
813
+ echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_explicit']==$value?' selected':''). ">$desc</option>\n";
814
+
815
+ ?>
816
+ </select>
817
+ </td>
818
+ </tr>
819
+ <tr valign="top">
820
+ <th scope="row">
821
+ <?php echo __('Google Play Category', 'powerpress'); ?>
822
+ <span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
823
+ </th>
824
+ <td>
825
+ <select name="Feed[googleplay_cat]" class="bpp_input_med">
826
+ <?php
827
+
828
+ $MoreCategories = false;
829
+
830
+
831
+ $Categories = powerpress_googleplay_categories();
832
+
833
+ echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
834
+ while( list($value,$desc) = each($Categories) )
835
+ echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_cat']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
836
+
837
+ ?>
838
+ </select>
839
+ </td>
840
+ </tr>
841
+
842
+ </table>
843
+ <?php
844
+ }
845
+
846
  function powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs = array() )
847
  {
848
  // Set default settings (if not set)
1401
  if( !empty($FeedAttribs['feed_slug']) )
1402
  $feed_slug = $FeedAttribs['feed_slug'];
1403
 
1404
+ if( !empty($FeedAttribs['feed_slug']) && $FeedAttribs['type'] == 'ttid' )
1405
  {
1406
  //echo "<br /><br />";
1407
  return;
1549
  <?php
1550
  } // End powerpressadmin_welcome()
1551
 
1552
+ function powerpressadmin_edit_funding($FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
1553
+ {
1554
+ if( !isset($FeedSettings['donate_link']) )
1555
+ $FeedSettings['donate_link'] = 0;
1556
+ if( !isset($FeedSettings['donate_url']) )
1557
+ $FeedSettings['donate_url'] = '';
1558
+ if( !isset($FeedSettings['donate_label']) )
1559
+ $FeedSettings['donate_label'] = '';
1560
+ ?>
1561
+ <!-- Donate link and label -->
1562
+ <table class="form-table">
1563
+ <tr valign="top">
1564
+ <th scope="row">
1565
+ <?php echo __('Donate Link', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></th>
1566
+ <td>
1567
+ <p style="padding-top: 8px;"><label for="donate_link"><input type="checkbox" id="donate_link" name="Feed[donate_link]" value="1" <?php if( $FeedSettings['donate_link'] == 1 ) echo 'checked '; ?>/>
1568
+ <?php echo __('Syndicate a donate link with your podcast. Create your own croudfunding page with PayPal donate buttons, or link to a service such as Patreon.', 'powerpress'); ?></label></p>
1569
+ <ul>
1570
+ <li><label for="donate_url" style="width: 100px; display:inline-block; text-align: right;">Donate URL:</label> <input type="text" id="donate_url" value="<?php echo esc_attr($FeedSettings['donate_url']); ?>" name="Feed[donate_url]" style="width:50%; max-width: 300px;" />
1571
+ </li>
1572
+ <li><label for="donate_label" style="width: 100px; display:inline-block; text-align: right;">Donate label:</label> <input type="text" id="donate_label" value="<?php echo esc_attr($FeedSettings['donate_label']); ?>" name="Feed[donate_label]" style="width: 50%; max-width: 300px;" />
1573
+ <?php echo __('(optional)', 'powerpress'); ?>
1574
+ </li>
1575
+ </ul>
1576
+ <p><a href="http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/syndicating-a-donate-link-in-your-podcast/" target="_blank"><?php echo __('Learn more about syndicating donate links for podcasting', 'powerpress'); ?></a></p>
1577
+ </td>
1578
+ </tr>
1579
+ </table>
1580
+ <?php
1581
+ }
1582
+
1583
  function powerpressadmin_edit_tv($FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
1584
  {
1585
  if( !isset($FeedSettings['parental_rating']) )
1646
  <span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
1647
  </th>
1648
  <td>
1649
+ <input type="text" id="itunes_image" name="Feed[itunes_image]" style="width: 60%; margin-top: 10px;" value="<?php echo esc_attr( !empty($FeedSettings['itunes_image'])? $FeedSettings['itunes_image']:''); ?>" maxlength="250" />
1650
  <a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
1651
 
1652
  <p><?php echo __('iTunes image must be at least 1400 x 1400 pixels in .jpg or .png format. iTunes image must not exceed 3000 x 3000 pixels and must use RGB color space.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?>: http://example.com/images/itunes.jpg
1683
  <table class="form-table">
1684
  <tr valign="top">
1685
  <th scope="row">
1686
+ <?php echo __('iTunes Episode Image', 'powerpress'); ?></th>
1687
  <td>
1688
 
1689
+ <p style="padding-top: 10px;"><label><input type="checkbox" name="Feed[episode_itunes_image]" value="1" <?php if( !empty($FeedSettings['episode_itunes_image']) ) echo 'checked '; ?>/> <?php echo __('Use iTunes image above', 'powerpress'); ?></label></p>
1690
  <p><?php echo __('Use the program iTunes image above as your iTunes episode image.', 'powerpress'); ?></p>
1691
  <p class="description"><?php echo __('NOTE: You must still save artwork into your media files to guarantee your artwork is displayed during playback.', 'powerpress'); ?></p>
1692
  </td>
1693
  </tr>
1694
 
1695
+ <table class="form-table">
1696
+ <tr valign="top">
1697
+ <th scope="row">
1698
+ <?php echo __('Google Play Image', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
1699
+ </th>
1700
+ <td>
1701
+ <input type="text" id="googleplay_image" name="Feed[googleplay_image]" style="width: 60%; margin-top: 10px;" value="<?php echo esc_attr( !empty($FeedSettings['googleplay_image'])? $FeedSettings['googleplay_image']:''); ?>" maxlength="250" />
1702
+ <a href="#" onclick="javascript: window.open( document.getElementById('googleplay_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
1703
+
1704
+ <p><?php echo __('Google Play image must be at least 1200 x 1200 pixels in .jpg or .png format to be eligible for featuring. Image must not exceed 7000 x 7000 pixels.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?>: http://example.com/images/googleplay.jpg
1705
+ </p>
1706
+
1707
+ <p><strong><?php echo __('Leave this setting blank to use the iTunes image (recommended).', 'powerpress'); ?></strong></p>
1708
+
1709
+ <?php if( $SupportUploads ) { ?>
1710
+
1711
+ <p><label class="powerpress-normal-font"><input name="googleplay_image_checkbox" type="checkbox" onchange="powerpress_show_field('googleplay_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?></label> &nbsp;
1712
+ <span style="font-size:85%;">(<?php echo __('Using this option should update your image on Google Play Music within 24 hours', 'powerpress'); ?>)</span>
1713
+ </p>
1714
+ <div style="display:none" id="googleplay_image_upload">
1715
+ <label for="googleplay_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" id="googleplay_image_file" name="googleplay_image_file" /><br />
1716
+ </div>
1717
+ <?php } ?>
1718
+ </td>
1719
+ </tr>
1720
+
1721
  <tr valign="top">
1722
  <th scope="row">
1723
  <?php echo __('RSS2 Image', 'powerpress'); ?> <br />
1724
  <span style="font-size: 85%; margin-left: 5px;"><?php echo __('Recommendation: Use iTunes image', 'powerpress'); ?></span>
1725
  </th>
1726
  <td>
1727
+ <input type="text" id="rss2_image" name="Feed[rss2_image]" style="width: 60%; margin-top: 10px;" value="<?php echo esc_attr( !empty($FeedSettings['rss2_image'])? $FeedSettings['rss2_image']:''); ?>" maxlength="250" />
1728
  <a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
1729
 
1730
  <p><?php echo __('Place the URL to the RSS image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> http://mysite.com/images/rss.jpg</p>
powerpressadmin-dashboard.php CHANGED
@@ -22,12 +22,15 @@ function powerpress_get_news($feed_url, $limit=10)
22
  $md5 = md5( $this->feed );
23
  delete_transient( 'feed_' . $md5 );
24
  delete_transient( 'feed_mod_' . $md5 );
 
 
25
  $rss = fetch_feed( $this->feed );
26
  $rss_items = $rss->get_items( 0, $rss->get_item_quantity( $num ) );
 
 
27
  }
28
 
29
  return $rss_items;
30
-
31
  }
32
 
33
 
22
  $md5 = md5( $this->feed );
23
  delete_transient( 'feed_' . $md5 );
24
  delete_transient( 'feed_mod_' . $md5 );
25
+ $rss->__destruct();
26
+ unset($rss);
27
  $rss = fetch_feed( $this->feed );
28
  $rss_items = $rss->get_items( 0, $rss->get_item_quantity( $num ) );
29
+ $rss->__destruct();
30
+ unset($rss);
31
  }
32
 
33
  return $rss_items;
 
34
  }
35
 
36
 
powerpressadmin-editfeed.php CHANGED
@@ -259,6 +259,7 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
259
  <ul class="powerpress_settings_tabs">
260
  <li><a href="#feed_tab_feed"><span><?php echo htmlspecialchars(__('Feed Settings', 'powerpress')); ?></span></a></li>
261
  <li><a href="#feed_tab_itunes"><span><?php echo htmlspecialchars(__('iTunes Settings', 'powerpress')); ?></span></a></li>
 
262
  <li><a href="#feed_tab_artwork"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
263
  <?php if( in_array($FeedAttribs['type'], array('category', 'ttid', 'post_type', 'channel') ) ) { ?>
264
  <li><a href="#feed_tab_appearance"><span><?php echo htmlspecialchars(__('Media Appearance', 'powerpress')); ?></span></a></li>
@@ -273,6 +274,7 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
273
  <?php
274
  powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs );
275
  if( !empty($General['advanced_mode_2']) ) {
 
276
  powerpressadmin_edit_tv($FeedSettings, $feed_slug);
277
  }
278
  ?>
@@ -286,6 +288,12 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
286
  ?>
287
  </div>
288
 
 
 
 
 
 
 
289
  <div id="feed_tab_artwork" class="powerpress_tab">
290
  <?php
291
  powerpressadmin_edit_artwork($FeedSettings, $General);
@@ -847,7 +855,7 @@ function powerpress_default_premium_label(event)
847
  </p>
848
 
849
  <div id="premium_label_custom" style="margin-left: 20px; display: <?php echo ($FeedSettings['premium_label']!=''?'block':'none'); ?>;">
850
- <textarea name="Feed[premium_label]" id="premium_label" style="width: 80%; height: 65px; margin-bottom: 0; padding-bottom: 0;"><?php echo htmlspecialchars($FeedSettings['premium_label']); ?></textarea>
851
  <div style="width: 80%; font-size: 85%; text-align: right;">
852
  <a href="#" onclick="powerpress_premium_label_append_signin_link();return false;"><?php echo __('Add sign in link to message', 'powerpress'); ?></a>
853
  </div>
@@ -1008,7 +1016,7 @@ function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs
1008
  <td>
1009
  <p style="margin-top: 5px;"><?php echo __('Your summary may not contain HTML and cannot exceed 4,000 characters in length.', 'powerpress'); ?></p>
1010
 
1011
- <textarea name="Feed[itunes_summary]" rows="5" style="width:80%;" ><?php echo $FeedSettings['itunes_summary']; ?></textarea>
1012
  </td>
1013
  </tr>
1014
 
259
  <ul class="powerpress_settings_tabs">
260
  <li><a href="#feed_tab_feed"><span><?php echo htmlspecialchars(__('Feed Settings', 'powerpress')); ?></span></a></li>
261
  <li><a href="#feed_tab_itunes"><span><?php echo htmlspecialchars(__('iTunes Settings', 'powerpress')); ?></span></a></li>
262
+ <li><a href="#feed_tab_googleplay"><span><?php echo htmlspecialchars(__('Google Play', 'powerpress')); ?></span></a></li>
263
  <li><a href="#feed_tab_artwork"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
264
  <?php if( in_array($FeedAttribs['type'], array('category', 'ttid', 'post_type', 'channel') ) ) { ?>
265
  <li><a href="#feed_tab_appearance"><span><?php echo htmlspecialchars(__('Media Appearance', 'powerpress')); ?></span></a></li>
274
  <?php
275
  powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs );
276
  if( !empty($General['advanced_mode_2']) ) {
277
+ powerpressadmin_edit_funding($FeedSettings, $feed_slug);
278
  powerpressadmin_edit_tv($FeedSettings, $feed_slug);
279
  }
280
  ?>
288
  ?>
289
  </div>
290
 
291
+ <div id="feed_tab_googleplay" class="powerpress_tab">
292
+ <?php
293
+ powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs);
294
+ ?>
295
+ </div>
296
+
297
  <div id="feed_tab_artwork" class="powerpress_tab">
298
  <?php
299
  powerpressadmin_edit_artwork($FeedSettings, $General);
855
  </p>
856
 
857
  <div id="premium_label_custom" style="margin-left: 20px; display: <?php echo ($FeedSettings['premium_label']!=''?'block':'none'); ?>;">
858
+ <textarea name="Feed[premium_label]" id="premium_label" style="width: 80%; height: 65px; margin-bottom: 0; padding-bottom: 0;"><?php echo esc_textarea($FeedSettings['premium_label']); ?></textarea>
859
  <div style="width: 80%; font-size: 85%; text-align: right;">
860
  <a href="#" onclick="powerpress_premium_label_append_signin_link();return false;"><?php echo __('Add sign in link to message', 'powerpress'); ?></a>
861
  </div>
1016
  <td>
1017
  <p style="margin-top: 5px;"><?php echo __('Your summary may not contain HTML and cannot exceed 4,000 characters in length.', 'powerpress'); ?></p>
1018
 
1019
+ <textarea name="Feed[itunes_summary]" rows="5" style="width:80%;" ><?php echo esc_textarea($FeedSettings['itunes_summary']); ?></textarea>
1020
  </td>
1021
  </tr>
1022
 
powerpressadmin-find-replace.php CHANGED
@@ -11,7 +11,7 @@
11
  $query = "SELECT meta_id, post_id, meta_key, meta_value FROM {$wpdb->postmeta} WHERE meta_key LIKE \"%enclosure\"";
12
  $results_data = $wpdb->get_results($query, ARRAY_A);
13
 
14
- while( list( $index, $row) = each($results_data) ) // = mysql_fetch_assoc($results) )
15
  {
16
  list($url) = @explode("\n", $row['meta_value'], 2 );
17
  $url = trim($url);
11
  $query = "SELECT meta_id, post_id, meta_key, meta_value FROM {$wpdb->postmeta} WHERE meta_key LIKE \"%enclosure\"";
12
  $results_data = $wpdb->get_results($query, ARRAY_A);
13
 
14
+ while( list( $index, $row) = each($results_data) )
15
  {
16
  list($url) = @explode("\n", $row['meta_value'], 2 );
17
  $url = trim($url);
powerpressadmin-metabox.php CHANGED
@@ -19,6 +19,9 @@ function powerpress_meta_box($object, $box)
19
  $iTunesKeywords = '';
20
  $iTunesSubtitle = '';
21
  $iTunesSummary = '';
 
 
 
22
  $iTunesAuthor = '';
23
  $iTunesExplicit = '';
24
  $iTunesCC = false;
@@ -90,6 +93,12 @@ function powerpress_meta_box($object, $box)
90
  $iTunesSubtitle = $ExtraData['subtitle'];
91
  if( isset($ExtraData['summary']) )
92
  $iTunesSummary = $ExtraData['summary'];
 
 
 
 
 
 
93
  if( isset($ExtraData['author']) )
94
  $iTunesAuthor = $ExtraData['author'];
95
  if( isset($ExtraData['no_player']) )
@@ -201,7 +210,7 @@ function powerpress_meta_box($object, $box)
201
 
202
  <div class="powerpress-hosting-buttons">
203
  <a class="powerpress-hosting-button powerpress-button thickbox" href="<?php echo admin_url('admin.php'); ?>?action=powerpress-jquery-media&podcast-feed=<?php echo $FeedSlug; ?>&KeepThis=true&TB_iframe=true&modal=false" title="<?php echo esc_attr(__('Blubrry Podcast Hosting', 'powerpress')); ?>" class="thickbox">
204
- <img src="<?php echo powerpress_get_root_url(); ?>/images/button_icon_blubrry.png" class="powerpress-button-icon" alt="" />
205
  <?php echo __('Link to Media hosted on Blubrry.com', 'powerpress'); ?></a>
206
  <!-- <a href="<?php echo admin_url('admin.php'); ?>?action=powerpress-jquery-media&podcast-feed=<?php echo $FeedSlug; ?>&KeepThis=true&TB_iframe=true&modal=false" title="<?php echo __('Upload Media File to your Blubrry.com account', 'powerpress'); ?>" class="thickbox"><?php echo __('Upload Media File', 'powerpress'); ?></a> -->
207
  <?php if( empty($GeneralSettings['blubrry_hosting']) || $GeneralSettings['blubrry_hosting']==='false' ) { ?>
@@ -354,7 +363,7 @@ function powerpress_meta_box($object, $box)
354
  <div class="powerpress_row">
355
  <label for="Powerpress[<?php echo $FeedSlug; ?>][embed]"><?php echo __('Media Embed', 'powerpress'); ?></label>
356
  <div class="powerpress_row_content">
357
- <textarea class="powerpress-embed" id="powerpress_embed_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][embed]" style="width: 90%; height: 80px; font-size: 90%;" onfocus="this.select();"><?php echo htmlspecialchars($Embed); ?></textarea>
358
  </div>
359
  </div>
360
  <?php
@@ -401,7 +410,7 @@ function powerpress_meta_box($object, $box)
401
  <div class="powerpress_row">
402
  <label for="Powerpress[<?php echo $FeedSlug; ?>][summary]"><?php echo __('iTunes Summary', 'powerpress'); ?></label>
403
  <div class="powerpress_row_content">
404
- <textarea id="powerpress_summary_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][summary]" style="width: 90%; height: 80px; font-size: 90%;"><?php echo htmlspecialchars($iTunesSummary); ?></textarea>
405
  </div>
406
  <div class="powerpress_row_content">
407
  <em><?php echo __('Your summary may not contain HTML and cannot exceed 4,000 characters in length. Leave blank to use your blog post.', 'powerpress'); ?></em>
@@ -410,6 +419,24 @@ function powerpress_meta_box($object, $box)
410
  <?php
411
  }
412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
413
  if( !empty($GeneralSettings['episode_box_author']) || !empty($GeneralSettings['seo_itunes']) || $iTunesAuthor )
414
  {
415
  ?>
@@ -449,6 +476,27 @@ while( list($value,$desc) = each($explicit_array) )
449
  <?php
450
  }
451
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
452
  if( !empty($GeneralSettings['episode_box_closed_captioned']) || $iTunesCC )
453
  {
454
  ?>
@@ -520,6 +568,26 @@ unset($block_array);
520
  <?php
521
  }
522
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
523
  if( !empty($GeneralSettings['episode_box_itunes_image']) || !empty($ExtraData['itunes_image']) )
524
  {
525
  if( empty($ExtraData['itunes_image']) )
19
  $iTunesKeywords = '';
20
  $iTunesSubtitle = '';
21
  $iTunesSummary = '';
22
+ $GooglePlayDesc = '';
23
+ $GooglePlayExplicit = '';
24
+ $GooglePlayBlock = '';
25
  $iTunesAuthor = '';
26
  $iTunesExplicit = '';
27
  $iTunesCC = false;
93
  $iTunesSubtitle = $ExtraData['subtitle'];
94
  if( isset($ExtraData['summary']) )
95
  $iTunesSummary = $ExtraData['summary'];
96
+ if( isset($ExtraData['gp_desc']) )
97
+ $GooglePlayDesc = $ExtraData['gp_desc'];
98
+ if( isset($ExtraData['gp_explicit']) )
99
+ $GooglePlayExplicit = $ExtraData['gp_explicit'];
100
+ if( isset($ExtraData['gp_block']) )
101
+ $GooglePlayBlock = $ExtraData['gp_block'];
102
  if( isset($ExtraData['author']) )
103
  $iTunesAuthor = $ExtraData['author'];
104
  if( isset($ExtraData['no_player']) )
210
 
211
  <div class="powerpress-hosting-buttons">
212
  <a class="powerpress-hosting-button powerpress-button thickbox" href="<?php echo admin_url('admin.php'); ?>?action=powerpress-jquery-media&podcast-feed=<?php echo $FeedSlug; ?>&KeepThis=true&TB_iframe=true&modal=false" title="<?php echo esc_attr(__('Blubrry Podcast Hosting', 'powerpress')); ?>" class="thickbox">
213
+ <img src="<?php echo powerpress_get_root_url(); ?>images/button_icon_blubrry.png" class="powerpress-button-icon" alt="" />
214
  <?php echo __('Link to Media hosted on Blubrry.com', 'powerpress'); ?></a>
215
  <!-- <a href="<?php echo admin_url('admin.php'); ?>?action=powerpress-jquery-media&podcast-feed=<?php echo $FeedSlug; ?>&KeepThis=true&TB_iframe=true&modal=false" title="<?php echo __('Upload Media File to your Blubrry.com account', 'powerpress'); ?>" class="thickbox"><?php echo __('Upload Media File', 'powerpress'); ?></a> -->
216
  <?php if( empty($GeneralSettings['blubrry_hosting']) || $GeneralSettings['blubrry_hosting']==='false' ) { ?>
363
  <div class="powerpress_row">
364
  <label for="Powerpress[<?php echo $FeedSlug; ?>][embed]"><?php echo __('Media Embed', 'powerpress'); ?></label>
365
  <div class="powerpress_row_content">
366
+ <textarea class="powerpress-embed" id="powerpress_embed_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][embed]" style="width: 90%; height: 80px; font-size: 90%;" onfocus="this.select();"><?php echo esc_textarea($Embed); ?></textarea>
367
  </div>
368
  </div>
369
  <?php
410
  <div class="powerpress_row">
411
  <label for="Powerpress[<?php echo $FeedSlug; ?>][summary]"><?php echo __('iTunes Summary', 'powerpress'); ?></label>
412
  <div class="powerpress_row_content">
413
+ <textarea id="powerpress_summary_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][summary]" style="width: 90%; height: 80px; font-size: 90%;"><?php echo esc_textarea($iTunesSummary); ?></textarea>
414
  </div>
415
  <div class="powerpress_row_content">
416
  <em><?php echo __('Your summary may not contain HTML and cannot exceed 4,000 characters in length. Leave blank to use your blog post.', 'powerpress'); ?></em>
419
  <?php
420
  }
421
 
422
+ if( !empty($GeneralSettings['episode_box_gp_desc']) || !empty($GeneralSettings['seo_itunes']) || $GooglePlayDesc )
423
+ {
424
+ ?>
425
+ <div class="powerpress_row">
426
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][gp_desc]"><?php echo __('Google Play Description', 'powerpress'); ?></label>
427
+ <div class="powerpress_row_content">
428
+ <textarea id="powerpress_gp_desc_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][gp_desc]" style="width: 90%; height: 80px; font-size: 90%;"><?php echo esc_textarea($GooglePlayDesc); ?></textarea>
429
+ </div>
430
+ <div class="powerpress_row_content">
431
+ <em><?php echo __('Your summary cannot exceed 4,000 characters in length. Leave blank to use your blog post.', 'powerpress'); ?></em>
432
+ <?php if( !empty($GeneralSettings['seo_itunes']) ) { ?>
433
+ <em><?php echo __('SEO: This content may be indexed by google in Google Play Music Search. (unconfirmed)', 'powerpress'); ?></em>
434
+ <?php } ?>
435
+ </div>
436
+ </div>
437
+ <?php
438
+ }
439
+
440
  if( !empty($GeneralSettings['episode_box_author']) || !empty($GeneralSettings['seo_itunes']) || $iTunesAuthor )
441
  {
442
  ?>
476
  <?php
477
  }
478
 
479
+ if( !empty($GeneralSettings['episode_box_gp_explicit']) || $GooglePlayExplicit )
480
+ {
481
+ ?>
482
+ <div class="powerpress_row">
483
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][gp_explicit]"><?php echo __('Google Play Explicit', 'powerpress'); ?></label>
484
+ <div class="powerpress_row_content">
485
+ <select id="powerpress_explicit_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][gp_explicit]" style="width: 220px;">
486
+ <?php
487
+ $explicit_array = array(''=>__('Use feed\'s explicit setting', 'powerpress'), 0=>__('no - display nothing', 'powerpress'), 1=>__('yes - explicit content', 'powerpress') );
488
+
489
+ while( list($value,$desc) = each($explicit_array) )
490
+ echo "\t<option value=\"$value\"". ($GooglePlayExplicit==$value?' selected':''). ">$desc</option>\n";
491
+
492
+ ?>
493
+ </select>
494
+ </div>
495
+ </div>
496
+ <?php
497
+ }
498
+
499
+
500
  if( !empty($GeneralSettings['episode_box_closed_captioned']) || $iTunesCC )
501
  {
502
  ?>
568
  <?php
569
  }
570
 
571
+ if( !empty($GeneralSettings['episode_box_gp_block']) || $GooglePlayBlock )
572
+ {
573
+ ?>
574
+ <div class="powerpress_row">
575
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][gp_block]"><?php echo __('Google Play Block', 'powerpress'); ?></label>
576
+ <div class="powerpress_row_content">
577
+ <select id="powerpress_block_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][gp_block]" style="width: 220px;">
578
+ <?php
579
+ $block_array = array(''=>__('No', 'powerpress'), 1=>__('Yes, Block episode from Google Play Music', 'powerpress') );
580
+
581
+ while( list($value,$desc) = each($block_array) )
582
+ echo "\t<option value=\"$value\"". ($GooglePlayBlock==$value?' selected':''). ">$desc</option>\n";
583
+ unset($block_array);
584
+ ?>
585
+ </select>
586
+ </div>
587
+ </div>
588
+ <?php
589
+ }
590
+
591
  if( !empty($GeneralSettings['episode_box_itunes_image']) || !empty($ExtraData['itunes_image']) )
592
  {
593
  if( empty($ExtraData['itunes_image']) )
powerpressadmin-player-page.php CHANGED
@@ -328,7 +328,6 @@ table.html5formats tr > td:first-child {
328
  <?php powerpressplayer_mediaelement_info(); ?>
329
  </li>
330
 
331
-
332
  <li><label><input type="radio" name="Player[player]" id="player_html5audio" value="html5audio" <?php if( $General['player'] == 'html5audio' ) echo 'checked'; ?> /> <?php echo __('HTML5 Audio Player', 'powerpress'); ?> </label>
333
  <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_html5audio" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
334
  </li>
@@ -436,8 +435,8 @@ function update_audio_player()
436
  if( myWidth < 10 || myWidth > 900 )
437
  myWidth = 290;
438
 
439
- var out = '<object type="application/x-shockwave-flash" data="<?php echo powerpress_get_root_url();?>/audio-player.swf" width="'+myWidth+'" height="24">'+"\n";
440
- out += ' <param name="movie" value="<?php echo powerpress_get_root_url();?>/audio-player.swf" />'+"\n";
441
  out += ' <param name="FlashVars" value="playerID=1&amp;soundFile=<?php echo $Audio['audio-player']; ?>';
442
 
443
  var x = 0;
328
  <?php powerpressplayer_mediaelement_info(); ?>
329
  </li>
330
 
 
331
  <li><label><input type="radio" name="Player[player]" id="player_html5audio" value="html5audio" <?php if( $General['player'] == 'html5audio' ) echo 'checked'; ?> /> <?php echo __('HTML5 Audio Player', 'powerpress'); ?> </label>
332
  <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_html5audio" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
333
  </li>
435
  if( myWidth < 10 || myWidth > 900 )
436
  myWidth = 290;
437
 
438
+ var out = '<object type="application/x-shockwave-flash" data="<?php echo powerpress_get_root_url();?>audio-player.swf" width="'+myWidth+'" height="24">'+"\n";
439
+ out += ' <param name="movie" value="<?php echo powerpress_get_root_url();?>audio-player.swf" />'+"\n";
440
  out += ' <param name="FlashVars" value="playerID=1&amp;soundFile=<?php echo $Audio['audio-player']; ?>';
441
 
442
  var x = 0;
powerpressadmin-search.php CHANGED
@@ -129,23 +129,26 @@ jQuery(document).ready(function() {
129
  </td>
130
  </tr>
131
  <tr valign="top">
132
- <th scope="row"><?php echo __('iTunes SEO Guidance', 'powerpress'); ?></th>
133
  <td>
134
  <p>
135
  <input name="General[seo_itunes]" type="hidden" value="0" />
136
  <input name="General[seo_itunes]" type="checkbox" value="1" <?php if( !empty($General['seo_itunes']) ) echo 'checked '; ?> />
137
- <?php echo __('Enable and highlight features that help with iTunes SEO.', 'powerpress'); ?>
138
  </p>
139
  <p>
140
  <ul>
141
  <li>
142
  <ul>
143
  <li>
144
- <?php echo __('Highlight fields for iTunes SEO', 'powerpress'); ?>
145
  </li>
146
  <li>
147
  <?php echo __('Enables iTunes Subtitle field', 'powerpress'); ?>
148
  </li>
 
 
 
149
  <li>
150
  <?php echo __('Enables iTunes Author field', 'powerpress'); ?>
151
  </li>
129
  </td>
130
  </tr>
131
  <tr valign="top">
132
+ <th scope="row"><?php echo __('Podcast Directory SEO Guidance', 'powerpress'); ?></th>
133
  <td>
134
  <p>
135
  <input name="General[seo_itunes]" type="hidden" value="0" />
136
  <input name="General[seo_itunes]" type="checkbox" value="1" <?php if( !empty($General['seo_itunes']) ) echo 'checked '; ?> />
137
+ <?php echo __('Enable and highlight features that help with Podcast Directory Search Engine Optimization.', 'powerpress'); ?>
138
  </p>
139
  <p>
140
  <ul>
141
  <li>
142
  <ul>
143
  <li>
144
+ <?php echo __('Highlight fields for Podcasting SEO', 'powerpress'); ?>
145
  </li>
146
  <li>
147
  <?php echo __('Enables iTunes Subtitle field', 'powerpress'); ?>
148
  </li>
149
+ <li>
150
+ <?php echo __('Enables Google Play Music Description field', 'powerpress'); ?>
151
+ </li>
152
  <li>
153
  <?php echo __('Enables iTunes Author field', 'powerpress'); ?>
154
  </li>
powerpressadmin.php CHANGED
@@ -260,6 +260,89 @@ function powerpress_admin_init()
260
  }
261
  }
262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  // New mp3 coverart image
264
  if( !empty($_POST['coverart_image_checkbox']) )
265
  {
@@ -461,12 +544,16 @@ function powerpress_admin_init()
461
  $General['episode_box_subtitle'] = 0;
462
  if( !isset($General['episode_box_summary'] ) )
463
  $General['episode_box_summary'] = 0;
 
 
 
 
464
  if( !isset($General['episode_box_author'] ) )
465
  $General['episode_box_author'] = 0;
466
  if( !isset($General['episode_box_explicit'] ) )
467
  $General['episode_box_explicit'] = 0;
468
  if( !isset($General['episode_box_closed_captioned'] ) )
469
- $General['episode_box_closed_captioned'] = 0;
470
  if( !isset($General['episode_box_itunes_image'] ) )
471
  $General['episode_box_itunes_image'] = 0;
472
 
@@ -478,6 +565,13 @@ function powerpress_admin_init()
478
  else
479
  $General['episode_box_order'] = 0;
480
 
 
 
 
 
 
 
 
481
  if( !isset($General['allow_feed_comments'] ) )
482
  $General['allow_feed_comments'] = 0;
483
 
@@ -668,6 +762,8 @@ function powerpress_admin_init()
668
  $Feed['itunes_complete'] = false;
669
  if( !isset($Feed['maximize_feed']) )
670
  $Feed['maximize_feed'] = false;
 
 
671
  if( !isset($Feed['episode_itunes_image']) )
672
  $Feed['episode_itunes_image'] = false;
673
 
@@ -1308,16 +1404,26 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1308
  unset($Settings['episode_box_subtitle']);
1309
  if( isset($Settings['episode_box_summary'] ) && $Settings['episode_box_summary'] == 0 )
1310
  unset($Settings['episode_box_summary']);
 
 
 
 
 
 
1311
  if( isset($Settings['episode_box_closed_captioned'] ) && $Settings['episode_box_closed_captioned'] == 0 )
1312
  unset($Settings['episode_box_closed_captioned']);
1313
  if( isset($Settings['episode_box_author'] ) && $Settings['episode_box_author'] == 0 )
1314
  unset($Settings['episode_box_author']);
1315
  if( isset($Settings['episode_box_explicit'] ) && $Settings['episode_box_explicit'] == 0 )
1316
  unset($Settings['episode_box_explicit']);
 
 
1317
  if( isset($Settings['episode_box_itunes_image'] ) && $Settings['episode_box_itunes_image'] == 0 )
1318
  unset($Settings['episode_box_itunes_image']);
1319
  if( isset($Settings['episode_box_order'] ) && $Settings['episode_box_order'] == 0 )
1320
  unset($Settings['episode_box_order']);
 
 
1321
  if( isset($Settings['episode_box_feature_in_itunes'] ) && $Settings['episode_box_feature_in_itunes'] == 0 )
1322
  unset($Settings['episode_box_feature_in_itunes']);
1323
  if( isset($Settings['videojs_css_class']) && empty($Settings['videojs_css_class']) )
@@ -1343,6 +1449,12 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1343
  unset($Settings['itunes_complete']);
1344
  if( isset($Settings['maximize_feed'] ) && $Settings['maximize_feed'] == 0 )
1345
  unset($Settings['maximize_feed']);
 
 
 
 
 
 
1346
  if( isset($Settings['allow_feed_comments'] ) && $Settings['allow_feed_comments'] == 0 )
1347
  unset($Settings['allow_feed_comments']);
1348
  if( empty($Settings['episode_itunes_image']) )
@@ -1791,6 +1903,9 @@ function powerpress_edit_post($post_ID, $post)
1791
  // iTunes Summary
1792
  if( isset($Powerpress['summary']) && trim($Powerpress['summary']) != '' )
1793
  $ToSerialize['summary'] = stripslashes($Powerpress['summary']);
 
 
 
1794
  // iTunes keywords (Deprecated by Apple)
1795
  if( isset($Powerpress['keywords']) && trim($Powerpress['keywords']) != '' )
1796
  $ToSerialize['keywords'] = stripslashes($Powerpress['keywords']);
@@ -1800,22 +1915,27 @@ function powerpress_edit_post($post_ID, $post)
1800
  // iTunes Explicit
1801
  if( isset($Powerpress['explicit']) && trim($Powerpress['explicit']) != '' )
1802
  $ToSerialize['explicit'] = $Powerpress['explicit'];
 
 
 
1803
  // iTunes CC
1804
  if( isset($Powerpress['cc']) && trim($Powerpress['cc']) != '' )
1805
  $ToSerialize['cc'] = $Powerpress['cc'];
1806
  // iTunes Episode image
1807
  if( isset($Powerpress['itunes_image']) && trim($Powerpress['itunes_image']) != '' )
1808
  $ToSerialize['itunes_image'] = $Powerpress['itunes_image'];
1809
-
1810
  // order
1811
  if( isset($Powerpress['order']) && trim($Powerpress['order']) != '' )
1812
  $ToSerialize['order'] = $Powerpress['order'];
1813
  // always
1814
  if( isset($Powerpress['always']) && trim($Powerpress['always']) != '' )
1815
  $ToSerialize['always'] = $Powerpress['always'];
1816
- // iTunes Block (FUTURE USE)
1817
  if( isset($Powerpress['block']) && $Powerpress['block'] == '1' )
1818
  $ToSerialize['block'] = 1;
 
 
 
1819
  // Player Embed
1820
  if( isset($Powerpress['embed']) && trim($Powerpress['embed']) != '' )
1821
  $ToSerialize['embed'] = stripslashes($Powerpress['embed']); // we have to strip slahes if they are present befure we serialize the data
@@ -2130,8 +2250,14 @@ jQuery(document).ready(function($) {
2130
  }
2131
  jQuery(this).closest("form").submit();
2132
  });
 
 
 
 
 
2133
  });
2134
 
 
2135
  //-->
2136
  </script>
2137
  <link rel="stylesheet" href="<?php echo powerpress_get_root_url(); ?>css/admin.css" type="text/css" media="screen" />
@@ -4236,7 +4362,7 @@ function powerpressadmin_community_news($items=3)
4236
  echo ' &nbsp; ';
4237
  echo '<a href="http://www.powerpresspodcast.com/feed/podcast/"><img src="'.get_bloginfo('wpurl').'/wp-includes/images/rss.png" alt="'. __('Podcast', 'powerpress') .'" /> '. __('Podcast', 'powerpress') .'</a>';
4238
  echo ' &nbsp; ';
4239
- echo '<a href="https://itunes.apple.com/us/podcast/blubrry-powerpress-community/id430248099/"><img src="'.powerpress_get_root_url().'/images/itunes_modern.png" alt="'. __('iTunes', 'powerpress') .'" /> '. __('iTunes', 'powerpress') .'</a>';
4240
  //echo ' &nbsp; &nbsp; ';
4241
 
4242
  echo '</div>';
@@ -4279,6 +4405,7 @@ function powerpress_admin_plugin_action_links( $links, $file )
4279
  }
4280
  add_filter( 'plugin_action_links', 'powerpress_admin_plugin_action_links', 10, 2 );
4281
 
 
4282
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-jquery.php');
4283
  // Only include the dashboard when appropriate.
4284
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-dashboard.php');
260
  }
261
  }
262
 
263
+ // New Google Play image
264
+ if( !empty($_POST['googleplay_image_checkbox']) )
265
+ {
266
+ $filename = str_replace(" ", "_", basename($_FILES['googleplay_image_file']['name']) );
267
+ $temp = $_FILES['googleplay_image_file']['tmp_name'];
268
+
269
+ if( file_exists($upload_path . $filename ) )
270
+ {
271
+ $filenameParts = pathinfo($filename);
272
+ if( !empty($filenameParts['extension']) ) {
273
+ do {
274
+ $filename_no_ext = substr($filenameParts['basename'], 0, (strlen($filenameParts['extension'])+1) * -1 );
275
+ $filename = sprintf('%s-%03d.%s', $filename_no_ext, rand(0, 999), $filenameParts['extension'] );
276
+ } while( file_exists($upload_path . $filename ) );
277
+ }
278
+ }
279
+
280
+ // Check the image...
281
+ if( file_exists($temp) )
282
+ {
283
+ $ImageData = @getimagesize($temp);
284
+
285
+ $rgb = true; // We assume it is RGB
286
+ if( defined('POWERPRESS_IMAGICK') && POWERPRESS_IMAGICK )
287
+ {
288
+ if( $ImageData[2] == IMAGETYPE_PNG && extension_loaded('imagick') )
289
+ {
290
+ $image = new Imagick( $temp );
291
+ if( $image->getImageColorspace() != imagick::COLORSPACE_RGB )
292
+ {
293
+ $rgb = false;
294
+ }
295
+ }
296
+ }
297
+
298
+ if( empty($ImageData['channels']) )
299
+ $ImageData['channels'] = 3; // Assume it's ok if we cannot detect it.
300
+
301
+ if( $ImageData )
302
+ {
303
+ if( $rgb && ( $ImageData[2] == IMAGETYPE_JPEG || $ImageData[2] == IMAGETYPE_PNG ) && $ImageData[0] == $ImageData[1] && $ImageData[0] >= 1200 && $ImageData[0] <= 7000 && $ImageData['channels'] == 3 ) // Just check that it is an image, the correct image type and that the image is square
304
+ {
305
+ if( !move_uploaded_file($temp, $upload_path . $filename) )
306
+ {
307
+ powerpress_page_message_add_error( __('Error saving Google Play Music image', 'powerpress') .': ' . htmlspecialchars($_FILES['googleplay_image_file']['name']) .' - '. __('An error occurred saving the Google Play Music image on the server.', 'powerprss'). ' '. sprintf(__('Local folder: %s; File name: %s', 'powerpress'), $upload_path, $filename) );
308
+ }
309
+ else
310
+ {
311
+ $Feed['googleplay_image'] = $upload_url . $filename;
312
+ if( $ImageData[0] < 1200 || $ImageData[1] < 1200 )
313
+ {
314
+ powerpress_page_message_add_error( __('Google Play Music image warning', 'powerpress') .': '. htmlspecialchars($_FILES['googleplay_image_file']['name']) . __(' is', 'powerpress') .' '. $ImageData[0] .' x '.$ImageData[0] .' - '. __('Image must be square 1200 x 1200 pixels or larger to be eligible for featuring.', 'powerprss') );
315
+ }
316
+ }
317
+ }
318
+ else if( $ImageData['channels'] != 3 || $rgb == false )
319
+ {
320
+ powerpress_page_message_add_error( __('Invalid Google Play Music image', 'powerpress') .': ' . htmlspecialchars($_FILES['googleplay_image_file']['name']) .' - '. __('Image must be in RGB color space (CMYK is not supported).', 'powerprss') );
321
+ }
322
+ else if( $ImageData[0] != $ImageData[1] )
323
+ {
324
+ powerpress_page_message_add_error( __('Invalid Google Play Music image', 'powerpress') .': ' . htmlspecialchars($_FILES['googleplay_image_file']['name']) .' - '. __('Image must be square, 1200 x 1200 is the required minimum size to be eligible for featuring.', 'powerprss') );
325
+ }
326
+ else if( $ImageData[0] != $ImageData[1] || $ImageData[0] < 600 )
327
+ {
328
+ powerpress_page_message_add_error( __('Invalid Google Play Music image', 'powerpress') .': ' . htmlspecialchars($_FILES['googleplay_image_file']['name']) .' - '. __('Image is too small, 1200 x 1200 is the required minimum size to be eligible for featuring.', 'powerprss') );
329
+ }
330
+ else if( $ImageData[0] != $ImageData[1] || $ImageData[0] > 7000 )
331
+ {
332
+ powerpress_page_message_add_error( __('Invalid Google Play Music image', 'powerpress') .': ' . htmlspecialchars($_FILES['googleplay_image_file']['name']) .' - '. __('Image is too large, 7000 x 7000 is the maximum size allowed.', 'powerprss') );
333
+ }
334
+ else
335
+ {
336
+ powerpress_page_message_add_error( __('Invalid Google Play Music image', 'powerpress') .': ' . htmlspecialchars($_FILES['googleplay_image_file']['name']) );
337
+ }
338
+ }
339
+ else
340
+ {
341
+ powerpress_page_message_add_error( __('Invalid Google Play Music image', 'powerpress') .': ' . htmlspecialchars($_FILES['googleplay_image_file']['name']) );
342
+ }
343
+ }
344
+ }
345
+
346
  // New mp3 coverart image
347
  if( !empty($_POST['coverart_image_checkbox']) )
348
  {
544
  $General['episode_box_subtitle'] = 0;
545
  if( !isset($General['episode_box_summary'] ) )
546
  $General['episode_box_summary'] = 0;
547
+ if( !isset($General['episode_box_gp_desc'] ) )
548
+ $General['episode_box_gp_desc'] = 0;
549
+ if( !isset($General['episode_box_gp_explicit'] ) )
550
+ $General['episode_box_gp_explicit'] = 0;
551
  if( !isset($General['episode_box_author'] ) )
552
  $General['episode_box_author'] = 0;
553
  if( !isset($General['episode_box_explicit'] ) )
554
  $General['episode_box_explicit'] = 0;
555
  if( !isset($General['episode_box_closed_captioned'] ) )
556
+ $General['episode_box_closed_captioned'] = 0;
557
  if( !isset($General['episode_box_itunes_image'] ) )
558
  $General['episode_box_itunes_image'] = 0;
559
 
565
  else
566
  $General['episode_box_order'] = 0;
567
 
568
+ if( !isset($General['episode_box_block'] ) )
569
+ $General['episode_box_block'] = 0;
570
+ if( !isset($General['episode_box_gp_block'] ) )
571
+ $General['episode_box_gp_block'] = 0;
572
+ if( !isset($General['episode_box_gp_explicit'] ) )
573
+ $General['episode_box_gp_explicit'] = 0;
574
+
575
  if( !isset($General['allow_feed_comments'] ) )
576
  $General['allow_feed_comments'] = 0;
577
 
762
  $Feed['itunes_complete'] = false;
763
  if( !isset($Feed['maximize_feed']) )
764
  $Feed['maximize_feed'] = false;
765
+ if( !isset($Feed['donate_link']) )
766
+ $Feed['donate_link'] = false;
767
  if( !isset($Feed['episode_itunes_image']) )
768
  $Feed['episode_itunes_image'] = false;
769
 
1404
  unset($Settings['episode_box_subtitle']);
1405
  if( isset($Settings['episode_box_summary'] ) && $Settings['episode_box_summary'] == 0 )
1406
  unset($Settings['episode_box_summary']);
1407
+ if( isset($Settings['episode_box_gp_desc'] ) && $Settings['episode_box_gp_desc'] == 0 )
1408
+ unset($Settings['episode_box_gp_desc']);
1409
+ if( isset($Settings['episode_box_gp_block'] ) && $Settings['episode_box_gp_block'] == 0 )
1410
+ unset($Settings['episode_box_gp_block']);
1411
+ if( isset($Settings['episode_box_gp_explicit'] ) && $Settings['episode_box_gp_explicit'] == 0 )
1412
+ unset($Settings['episode_box_gp_explicit']);
1413
  if( isset($Settings['episode_box_closed_captioned'] ) && $Settings['episode_box_closed_captioned'] == 0 )
1414
  unset($Settings['episode_box_closed_captioned']);
1415
  if( isset($Settings['episode_box_author'] ) && $Settings['episode_box_author'] == 0 )
1416
  unset($Settings['episode_box_author']);
1417
  if( isset($Settings['episode_box_explicit'] ) && $Settings['episode_box_explicit'] == 0 )
1418
  unset($Settings['episode_box_explicit']);
1419
+ if( isset($Settings['episode_box_block'] ) && $Settings['episode_box_block'] == 0 )
1420
+ unset($Settings['episode_box_block']);
1421
  if( isset($Settings['episode_box_itunes_image'] ) && $Settings['episode_box_itunes_image'] == 0 )
1422
  unset($Settings['episode_box_itunes_image']);
1423
  if( isset($Settings['episode_box_order'] ) && $Settings['episode_box_order'] == 0 )
1424
  unset($Settings['episode_box_order']);
1425
+ if( isset($Settings['episode_box_gp_explicit'] ) && $Settings['episode_box_gp_explicit'] == 0 )
1426
+ unset($Settings['episode_box_gp_explicit']);
1427
  if( isset($Settings['episode_box_feature_in_itunes'] ) && $Settings['episode_box_feature_in_itunes'] == 0 )
1428
  unset($Settings['episode_box_feature_in_itunes']);
1429
  if( isset($Settings['videojs_css_class']) && empty($Settings['videojs_css_class']) )
1449
  unset($Settings['itunes_complete']);
1450
  if( isset($Settings['maximize_feed'] ) && $Settings['maximize_feed'] == 0 )
1451
  unset($Settings['maximize_feed']);
1452
+ if( isset($Settings['donate_link'] ) && $Settings['donate_link'] == 0 )
1453
+ unset($Settings['donate_link']);
1454
+ if( empty($Settings['donate_url']) )
1455
+ unset($Settings['donate_url']);
1456
+ if( empty($Settings['donate_label']) )
1457
+ unset($Settings['donate_label']);
1458
  if( isset($Settings['allow_feed_comments'] ) && $Settings['allow_feed_comments'] == 0 )
1459
  unset($Settings['allow_feed_comments']);
1460
  if( empty($Settings['episode_itunes_image']) )
1903
  // iTunes Summary
1904
  if( isset($Powerpress['summary']) && trim($Powerpress['summary']) != '' )
1905
  $ToSerialize['summary'] = stripslashes($Powerpress['summary']);
1906
+ // Google Play Description
1907
+ if( isset($Powerpress['gp_desc']) && trim($Powerpress['gp_desc']) != '' )
1908
+ $ToSerialize['gp_desc'] = stripslashes($Powerpress['gp_desc']);
1909
  // iTunes keywords (Deprecated by Apple)
1910
  if( isset($Powerpress['keywords']) && trim($Powerpress['keywords']) != '' )
1911
  $ToSerialize['keywords'] = stripslashes($Powerpress['keywords']);
1915
  // iTunes Explicit
1916
  if( isset($Powerpress['explicit']) && trim($Powerpress['explicit']) != '' )
1917
  $ToSerialize['explicit'] = $Powerpress['explicit'];
1918
+ // Google Play Explicit
1919
+ if( isset($Powerpress['gp_explicit']) && trim($Powerpress['gp_explicit']) == '1' )
1920
+ $ToSerialize['gp_explicit'] = $Powerpress['gp_explicit'];
1921
  // iTunes CC
1922
  if( isset($Powerpress['cc']) && trim($Powerpress['cc']) != '' )
1923
  $ToSerialize['cc'] = $Powerpress['cc'];
1924
  // iTunes Episode image
1925
  if( isset($Powerpress['itunes_image']) && trim($Powerpress['itunes_image']) != '' )
1926
  $ToSerialize['itunes_image'] = $Powerpress['itunes_image'];
 
1927
  // order
1928
  if( isset($Powerpress['order']) && trim($Powerpress['order']) != '' )
1929
  $ToSerialize['order'] = $Powerpress['order'];
1930
  // always
1931
  if( isset($Powerpress['always']) && trim($Powerpress['always']) != '' )
1932
  $ToSerialize['always'] = $Powerpress['always'];
1933
+ // iTunes Block
1934
  if( isset($Powerpress['block']) && $Powerpress['block'] == '1' )
1935
  $ToSerialize['block'] = 1;
1936
+ // Google Play Block
1937
+ if( isset($Powerpress['gp_block']) && $Powerpress['gp_block'] == '1' )
1938
+ $ToSerialize['gp_block'] = 1;
1939
  // Player Embed
1940
  if( isset($Powerpress['embed']) && trim($Powerpress['embed']) != '' )
1941
  $ToSerialize['embed'] = stripslashes($Powerpress['embed']); // we have to strip slahes if they are present befure we serialize the data
2250
  }
2251
  jQuery(this).closest("form").submit();
2252
  });
2253
+ jQuery('.goto-artwork-tab').click( function(event) {
2254
+ event.preventDefault();
2255
+ // TODO:
2256
+
2257
+ });
2258
  });
2259
 
2260
+
2261
  //-->
2262
  </script>
2263
  <link rel="stylesheet" href="<?php echo powerpress_get_root_url(); ?>css/admin.css" type="text/css" media="screen" />
4362
  echo ' &nbsp; ';
4363
  echo '<a href="http://www.powerpresspodcast.com/feed/podcast/"><img src="'.get_bloginfo('wpurl').'/wp-includes/images/rss.png" alt="'. __('Podcast', 'powerpress') .'" /> '. __('Podcast', 'powerpress') .'</a>';
4364
  echo ' &nbsp; ';
4365
+ echo '<a href="https://itunes.apple.com/us/podcast/blubrry-powerpress-community/id430248099/"><img src="'.powerpress_get_root_url().'images/itunes_modern.png" alt="'. __('iTunes', 'powerpress') .'" /> '. __('iTunes', 'powerpress') .'</a>';
4366
  //echo ' &nbsp; &nbsp; ';
4367
 
4368
  echo '</div>';
4405
  }
4406
  add_filter( 'plugin_action_links', 'powerpress_admin_plugin_action_links', 10, 2 );
4407
 
4408
+
4409
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-jquery.php');
4410
  // Only include the dashboard when appropriate.
4411
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-dashboard.php');
readme.txt CHANGED
@@ -1,25 +1,27 @@
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.3
6
- Stable tag: 6.0.5
7
  Donate link: https://www.patreon.com/blubrry?ty=h
8
  License: GPLv2 or later
9
 
10
 
11
- Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, Web audio/video media players and more.
12
 
13
  == Description ==
14
 
15
- Blubrry PowerPress brings the essential features for podcasting to WordPress. Developed by podcasters for podcasters, PowerPress offers full iTunes support, Web audio/video media players, exclusive subscribe tools, podcasting SEO features and more.
 
 
 
16
 
17
  = PowerPress Key Features =
18
  - Full iTunes support: Adds iTunes compliant podcast feeds to your WordPress blog.
19
  - Integrated HTML5 Media Players: Audio/video Web players with embed support from sites such as YouTube.
20
  - Subscribe tools: Create subscribe page with our exclusive subscribe shortcode embed and subscribe sidebar widget optimized for responsive websites, high-resolution screens and Apple Retina displays.
21
  - Podcasting SEO: Improve discovery of your podcast on search engines such as Google, and with the iTunes podcast directory.
22
- - Advanced and Simple modes: Simplify settings using only the defaults, or harness all the potential of podcasting with Advanced Mode.
23
  - Media modifiers: Easily add, modify and remove podcasts from blog posts and pages.
24
  - Migration tools: Quickly migrate from PodPress, Blogger or Movable Type without losing episodes.
25
  - Multi-podcast support: Create separate podcasts by category (Category Podcasting) or by media format (Podcast Channels).
@@ -32,6 +34,9 @@ Blubrry PowerPress brings the essential features for podcasting to WordPress. De
32
  = Become a PowerPress Patron! =
33
  Help support your favorite podcasting plugin via Patreon. [Visit Blubrry's Patreon page](https://www.patreon.com/blubrry?ty=h)
34
 
 
 
 
35
  = Includes Full iTunes Support! =
36
  Blubrry PowerPress fully supports iTunes, which set the standard and is required for podcasting. PowerPress comes with the following iTunes specific features:
37
 
@@ -189,22 +194,35 @@ To install Blubrry PowerPress manually, follow these steps:
189
 
190
 
191
  == Screenshots ==
192
- 1. Add podcast episode, found within the edit post screen
193
- 2. Select from 5 audio mp3 players for your web site
194
- 3. Example of the Flow Player Classic in a blog post
195
- 4. Example of the 1 Pixel Out Audio Player in a blog post
196
- 5. Cross section of Blubrry PowerPress iTunes settings page
 
197
 
198
 
199
  == Changelog ==
200
 
201
  = Next Major Release Announcements =
202
- * PowerPress 7.0 is coming in 2-4 weeks!!!
203
  * 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.
204
 
205
  = Become a PowerPress Patron! =
206
  Help support your favorite podcasting plugin via Patreon. [Visit Blubrry's Patreon page](https://www.patreon.com/blubrry?ty=h)
207
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  = 6.0.5 =
209
  * Released on 9/8/2015
210
  * Changed the Play in New Window logic to support WordPress MultiSite `switch_to_blog()` function calls (Thanks Avi for the patch!)
1
  === Blubrry PowerPress Podcasting plugin ===
2
  Contributors: amandato, blubrry
3
+ Tags: podcasting, podcast, podcaster, itunes, google play music, google play, 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, clammr
4
  Requires at least: 3.6
5
+ Tested up to: 4.3.1
6
+ Stable tag: 6.1
7
  Donate link: https://www.patreon.com/blubrry?ty=h
8
  License: GPLv2 or later
9
 
10
 
11
+ PowerPress brings the essential features for podcasting to WordPress including full iTunes and Google Play support, Web audio/video players and more.
12
 
13
  == Description ==
14
 
15
+ Blubrry PowerPress brings the essential features for podcasting to WordPress. Developed by podcasters for podcasters, PowerPress offers full iTunes and Google Play support, Web audio/video media players, exclusive subscribe tools, podcasting SEO features and more.
16
+
17
+ = Simple Mode =
18
+ PowerPress's Simple Mode will walk you through setting up your podcast in 3 easy steps. Overwhelmed at any time, simply switch to Simple Mode to configure only the essential features to podcast.
19
 
20
  = PowerPress Key Features =
21
  - Full iTunes support: Adds iTunes compliant podcast feeds to your WordPress blog.
22
  - Integrated HTML5 Media Players: Audio/video Web players with embed support from sites such as YouTube.
23
  - Subscribe tools: Create subscribe page with our exclusive subscribe shortcode embed and subscribe sidebar widget optimized for responsive websites, high-resolution screens and Apple Retina displays.
24
  - Podcasting SEO: Improve discovery of your podcast on search engines such as Google, and with the iTunes podcast directory.
 
25
  - Media modifiers: Easily add, modify and remove podcasts from blog posts and pages.
26
  - Migration tools: Quickly migrate from PodPress, Blogger or Movable Type without losing episodes.
27
  - Multi-podcast support: Create separate podcasts by category (Category Podcasting) or by media format (Podcast Channels).
34
  = Become a PowerPress Patron! =
35
  Help support your favorite podcasting plugin via Patreon. [Visit Blubrry's Patreon page](https://www.patreon.com/blubrry?ty=h)
36
 
37
+ = Includes Full Google Play Music Support! =
38
+ Blubrry PowerPress 6.1+ fully supports Google Play Music podcast directory. Upgrade to PowerPress 6.1 then submit your podcast to [Google Play Music](http://g.co/podcastportal).
39
+
40
  = Includes Full iTunes Support! =
41
  Blubrry PowerPress fully supports iTunes, which set the standard and is required for podcasting. PowerPress comes with the following iTunes specific features:
42
 
194
 
195
 
196
  == Screenshots ==
197
+ 1. PowerPress's Simple Mode will walk you through setting up your podcast in 3 easy steps.
198
+ 2. Just like blogging, podcasting utilizes blog posting features with the addition of a podcast episode box. Yes, podcasting is that simple!
199
+ 3. PowerPress comes with a built-in subscribe sidebar widget to help your audience subscribe to your podcast.
200
+ 4. PowerPress comes with an editable subscribe page builder with a subscribe embed tool to help your web visitors subscribe.
201
+ 5. PowerPress's Advanced Mode settings let you dig in as deep as you want to with every possible setting for podcasting at your fingertips.
202
+ 6. PowerPress incorporates the built-in WordPress media players into your blog posts and pages.
203
 
204
 
205
  == Changelog ==
206
 
207
  = Next Major Release Announcements =
208
+ * PowerPress 7.0 delayed due to Google Play Music update. We are now scheduling PowerPress 7.0 release by Christmas.
209
  * 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.
210
 
211
  = Become a PowerPress Patron! =
212
  Help support your favorite podcasting plugin via Patreon. [Visit Blubrry's Patreon page](https://www.patreon.com/blubrry?ty=h)
213
 
214
+ = 6.1 =
215
+ * Released on 10/30/2015
216
+ * Added Google Play Music podcast directory support.
217
+ * Added Donate Link option under Feed settings tab.
218
+ * Removed the enqueuing of mediaelement.js scripts and styles for the player and links in theme pages. PowerPress's player.min.js will only be included on pages with the player or player links. (Thanks wadehammes for bringing to our attention).
219
+ * Updated iTunes subtitle and summary values to treat utf8mb4 data as utf8.
220
+ * Added better logic for checking for UTF8 values for iTunes attributes.
221
+ * Added the text domain setting in the powerpress.php file for [translate.wordpress.org](http://translate.wordpress.org) use.
222
+ * Enhanced iTunes summary bug where some iTunes summaries were getting cut to 255 characters fixed.
223
+ * Code updated to support PHP7.
224
+
225
+
226
  = 6.0.5 =
227
  * Released on 9/8/2015
228
  * Changed the Play in New Window logic to support WordPress MultiSite `switch_to_blog()` function calls (Thanks Avi for the patch!)