PowerPress Podcasting plugin by Blubrry - Version 7.3

Version Description

  • Released on 07/10/2018
  • Spotify and Google Podcasts subscribe links added to Destinations.
  • PowerPress users using Blubrry Podcast Hosting may now submit shows to Spotify!
  • Added PodcastMirror setting, a modern alternative to FeedBurner. Learn more about PodcastMirror at podcastmirror.com
  • Converted loop logic from each() to foreach() for PHP 7.3+ / 8.0+ compatibility.
  • Improved logic for playlist player to appear better when certain settings are not set.
  • Moved the enqueue script ('jquery-ui-tabs') logic so it only loads in the powerpress admin pages. (Thanks @keenanpayne for the code change!)
  • Added define option POWERPRESS_POSTTYPE_MIXING, when set to true podcast channels for the default podcast feed will mix all post types of type post with the default podcast feed. (Thanks @eos-rose for bringing to our attention)
  • Fixed bug with translation and javascript alert messages. (Thanks Enrico for reporting the bug!)
Download this release

Release Info

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

Code changes from version 7.2 to 7.3

class.powerpress-subscribe-widget.php CHANGED
@@ -102,7 +102,11 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
102
  background-color: #2CB6A8;
103
  }
104
  .pp-ssb-widget-modern a.pp-ssb-gp {
105
- background-color: #F15832;
 
 
 
 
106
  }
107
  .pp-ssb-widget-modern a.pp-ssb-android {
108
  background-color: #6AB344;
@@ -117,7 +121,7 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
117
  display: inline-block;
118
  vertical-align: middle;
119
  margin-right: 2px;
120
- background-image: url(<?php echo powerpress_get_root_url(); ?>images/spriteStandard.png);
121
  background-repeat: no-repeat;
122
  background-size: 294px;
123
  }
@@ -139,10 +143,12 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
139
  .pp-ssb-tunein .pp-ssb-ic {
140
  background-position: -245px -98px;
141
  }
 
 
 
142
  .pp-ssb-gp .pp-ssb-ic {
143
- background-position: -196px -98px;
144
  }
145
-
146
  .pp-ssb-more .pp-ssb-ic {
147
  background-position: -49px -49px;
148
  }
@@ -152,7 +158,7 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
152
  only screen and (-o-min-device-pixel-ratio: 200/100),
153
  only screen and (min-device-pixel-ratio: 2.0) {
154
  .pp-sub-ic {
155
- background-image: url(<?php echo powerpress_get_root_url(); ?>images/spriteRetina.png);
156
  }
157
  }
158
  </style>
@@ -194,7 +200,7 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
194
  if( !empty($GeneralSettings['posttype_podcasting']) || $instance['subscribe_type'] == 'post_type' ) // If post type podcasting enabled
195
  $types['post_type'] = __('Post Type Podcasting','powerpress');
196
 
197
- while( list($type, $label) = each($types) ) {
198
  echo '<option value="' . $type . '"'
199
  . selected( $instance['subscribe_type'], $type, false )
200
  . '>' . $label . "</option>\n";
@@ -213,7 +219,7 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
213
  <option value=""><?php echo __('Select Post Type', 'powerpress'); ?></option>
214
  <?php
215
  $post_types = powerpress_admin_get_post_types(false);
216
- while( list($index, $label) = each($post_types) ) {
217
  echo '<option value="' . $label . '"'
218
  . selected( $instance['subscribe_post_type'], $label, false )
219
  . '>' . $label . "</option>\n";
102
  background-color: #2CB6A8;
103
  }
104
  .pp-ssb-widget-modern a.pp-ssb-gp {
105
+ background-color: #db3236;
106
+ }
107
+ .pp-ssb-widget-modern a.pp-ssb-spotify {
108
+ background-color: #84bd00;
109
+ background-color: #1db954;
110
  }
111
  .pp-ssb-widget-modern a.pp-ssb-android {
112
  background-color: #6AB344;
121
  display: inline-block;
122
  vertical-align: middle;
123
  margin-right: 2px;
124
+ background-image: url(<?php echo powerpress_get_root_url(); ?>images/spriteStandard2.png);
125
  background-repeat: no-repeat;
126
  background-size: 294px;
127
  }
143
  .pp-ssb-tunein .pp-ssb-ic {
144
  background-position: -245px -98px;
145
  }
146
+ .pp-ssb-spotify .pp-ssb-ic {
147
+ background-position: -147px 0;
148
+ }
149
  .pp-ssb-gp .pp-ssb-ic {
150
+ background-position: -196px 0;
151
  }
 
152
  .pp-ssb-more .pp-ssb-ic {
153
  background-position: -49px -49px;
154
  }
158
  only screen and (-o-min-device-pixel-ratio: 200/100),
159
  only screen and (min-device-pixel-ratio: 2.0) {
160
  .pp-sub-ic {
161
+ background-image: url(<?php echo powerpress_get_root_url(); ?>images/spriteRetina2.png);
162
  }
163
  }
164
  </style>
200
  if( !empty($GeneralSettings['posttype_podcasting']) || $instance['subscribe_type'] == 'post_type' ) // If post type podcasting enabled
201
  $types['post_type'] = __('Post Type Podcasting','powerpress');
202
 
203
+ foreach( $types as $type => $label ) {
204
  echo '<option value="' . $type . '"'
205
  . selected( $instance['subscribe_type'], $type, false )
206
  . '>' . $label . "</option>\n";
219
  <option value=""><?php echo __('Select Post Type', 'powerpress'); ?></option>
220
  <?php
221
  $post_types = powerpress_admin_get_post_types(false);
222
+ foreach( $post_types as $index => $label ) {
223
  echo '<option value="' . $label . '"'
224
  . selected( $instance['subscribe_post_type'], $label, false )
225
  . '>' . $label . "</option>\n";
css/admin.css CHANGED
@@ -213,6 +213,22 @@ padding-bottom: 15px;
213
  /* float: left; */
214
  display: inline-block;
215
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  #powerpress_admin_header .powerpress-mode {
217
  margin-left: 14px;
218
  display: inline-block;
213
  /* float: left; */
214
  display: inline-block;
215
  }
216
+ #powerpress_admin_header h2,
217
+ #powerpress_admin_header h3,
218
+ #powerpress_admin_header h4 {
219
+ line-height: 1.1;
220
+ margin: 10px 0 0 0;
221
+ padding: 0;
222
+ font-weight: bold;
223
+ }
224
+ #powerpress_admin_header p {
225
+ line-height: 1.1;
226
+ margin: 5px 0 10px 0;
227
+ padding: 0;
228
+ }
229
+ #powerpress_admin_header .powerpress-admin-heading {
230
+ font-weight: bold;
231
+ }
232
  #powerpress_admin_header .powerpress-mode {
233
  margin-left: 14px;
234
  display: inline-block;
css/subscribe.css CHANGED
@@ -141,7 +141,13 @@ body .pp-sub-widget a:hover {
141
  background-color: #2CB6A8;
142
  }
143
  .pp-sub-widget-modern a.pp-sub-gp {
144
- background-color: #F15832;
 
 
 
 
 
 
145
  }
146
  .pp-sub-widget-modern a.pp-sub-android {
147
  background-color: #6AB344;
@@ -161,7 +167,7 @@ body .pp-sub-widget a:hover {
161
  margin-right: 2px;
162
  }
163
  .pp-sub-ic {
164
- background-image: url(../images/spriteStandard.png);
165
  background-repeat: no-repeat;
166
  background-size: 294px;
167
  }
@@ -190,7 +196,10 @@ body .pp-sub-widget a:hover {
190
  background-position: -245px -98px;
191
  }
192
  .pp-sub-gp .pp-sub-ic {
193
- background-position: -196px -98px;
 
 
 
194
  }
195
 
196
  /* Retina-specific stuff here */
@@ -199,6 +208,6 @@ body .pp-sub-widget a:hover {
199
  only screen and (-o-min-device-pixel-ratio: 200/100),
200
  only screen and (min-device-pixel-ratio: 2.0) {
201
  .pp-sub-ic {
202
- background-image: url(../images/spriteRetina.png);
203
  }
204
  }
141
  background-color: #2CB6A8;
142
  }
143
  .pp-sub-widget-modern a.pp-sub-gp {
144
+ background-color: #F15832; /* google yellow */
145
+ background-color: #3cba54; /* google green */
146
+ background-color: #4885ed; /* google blue */
147
+ background-color: #db3236; /* google red */
148
+ }
149
+ .pp-sub-widget-modern a.pp-sub-spotify {
150
+ background-color: #1db954;
151
  }
152
  .pp-sub-widget-modern a.pp-sub-android {
153
  background-color: #6AB344;
167
  margin-right: 2px;
168
  }
169
  .pp-sub-ic {
170
+ background-image: url(../images/spriteStandard2.png);
171
  background-repeat: no-repeat;
172
  background-size: 294px;
173
  }
196
  background-position: -245px -98px;
197
  }
198
  .pp-sub-gp .pp-sub-ic {
199
+ background-position: -196px 0;
200
+ }
201
+ .pp-sub-spotify .pp-sub-ic {
202
+ background-position: -147px 0;
203
  }
204
 
205
  /* Retina-specific stuff here */
208
  only screen and (-o-min-device-pixel-ratio: 200/100),
209
  only screen and (min-device-pixel-ratio: 2.0) {
210
  .pp-sub-ic {
211
+ background-image: url(../images/spriteRetina2.png);
212
  }
213
  }
images/spriteRetina.png CHANGED
Binary file
images/spriteRetina2.png ADDED
Binary file
images/spriteStandard.png CHANGED
Binary file
images/spriteStandard2.png ADDED
Binary file
mp3info.class.php CHANGED
@@ -657,7 +657,7 @@
657
  }
658
 
659
  $errors = '';
660
- while( list($null,$error) = each($FileInfo['error']) )
661
  {
662
  if( strstr($error, 'error parsing') )
663
  continue;
@@ -673,7 +673,7 @@
673
  if( false && isset($FileInfo['warning']) )
674
  {
675
  $errors = '';
676
- while( list($null,$warning) = each($FileInfo['warning']) )
677
  $this->AddWarning($warning );
678
  }
679
 
@@ -749,7 +749,7 @@
749
  {
750
  $plugin_folder = $matches[1];
751
  $current_plugins = get_option('active_plugins');
752
- while( list($null,$plugin_local_path) = each($current_plugins) )
753
  {
754
  if( substr($plugin_local_path, 0, strpos($plugin_local_path, '/') ) != $plugin_folder )
755
  continue;
657
  }
658
 
659
  $errors = '';
660
+ foreach( $FileInfo['error'] as $null => $error )
661
  {
662
  if( strstr($error, 'error parsing') )
663
  continue;
673
  if( false && isset($FileInfo['warning']) )
674
  {
675
  $errors = '';
676
+ foreach( $FileInfo['warning'] as $null => $warning )
677
  $this->AddWarning($warning );
678
  }
679
 
749
  {
750
  $plugin_folder = $matches[1];
751
  $current_plugins = get_option('active_plugins');
752
+ foreach( $current_plugins as $null => $plugin_local_path )
753
  {
754
  if( substr($plugin_local_path, 0, strpos($plugin_local_path, '/') ) != $plugin_folder )
755
  continue;
powerpress-player.php CHANGED
@@ -189,7 +189,7 @@ function powerpress_shortcode_handler( $attributes, $content = null )
189
  };
190
  }
191
 
192
- while( list($feed_slug, $postTypeSettings) = each($PostTypeSettingsArray) )
193
  {
194
  if( !empty( $postTypeSettings['title']) )
195
  $GeneralSettings['custom_feeds'][ $feed_slug ] = $postTypeSettings['title'];
@@ -199,7 +199,7 @@ function powerpress_shortcode_handler( $attributes, $content = null )
199
  }
200
  }
201
 
202
- while( list($feed_slug,$feed_title) = each($GeneralSettings['custom_feeds']) )
203
  {
204
  if( isset($GeneralSettings['disable_player']) && isset($GeneralSettings['disable_player'][$feed_slug]) )
205
  continue;
@@ -1251,7 +1251,7 @@ function powerpressplayer_build_mediaelementvideo($media_url, $EpisodeData=array
1251
  $shortcode = wp_video_shortcode( $attr );
1252
  } else {
1253
  $shortcode_value = '[video ';
1254
- while( list($tag_name,$tag_value) = each($attr) ) {
1255
  $shortcode_value .= ' '.$tag_name.'="'. esc_attr($tag_value) .'"';
1256
  }
1257
  $shortcode_value .= ']';
@@ -1578,7 +1578,7 @@ function powerpressplayer_build_1pxoutplayer($media_url, $EpisodeData = array())
1578
  }
1579
 
1580
  $flashvars ='';
1581
- while( list($key,$value) = each($PlayerSettings) )
1582
  {
1583
  $flashvars .= '&amp;'. $key .'='. preg_replace('/\#/','',$value);
1584
  }
189
  };
190
  }
191
 
192
+ foreach( $PostTypeSettingsArray as $feed_slug => $postTypeSettings )
193
  {
194
  if( !empty( $postTypeSettings['title']) )
195
  $GeneralSettings['custom_feeds'][ $feed_slug ] = $postTypeSettings['title'];
199
  }
200
  }
201
 
202
+ foreach( $GeneralSettings['custom_feeds'] as $feed_slug => $feed_title )
203
  {
204
  if( isset($GeneralSettings['disable_player']) && isset($GeneralSettings['disable_player'][$feed_slug]) )
205
  continue;
1251
  $shortcode = wp_video_shortcode( $attr );
1252
  } else {
1253
  $shortcode_value = '[video ';
1254
+ foreach( $attr as $tag_name => $tag_value ) {
1255
  $shortcode_value .= ' '.$tag_name.'="'. esc_attr($tag_value) .'"';
1256
  }
1257
  $shortcode_value .= ']';
1578
  }
1579
 
1580
  $flashvars ='';
1581
+ foreach( $PlayerSettings as $key => $value )
1582
  {
1583
  $flashvars .= '&amp;'. $key .'='. preg_replace('/\#/','',$value);
1584
  }
powerpress-playlist.php CHANGED
@@ -57,7 +57,7 @@ function powerpress_get_program_title_by_taxonomy($term_id, $taxonomy = 'categor
57
  {
58
  $Feeds = $General['custom_cat_feeds'];
59
  // Walk through the categories...
60
- while( list($null, $cat_id) = each($Feeds) )
61
  {
62
  $FeedSettings = get_option('powerpress_cat_feed_'.$cat_id);
63
  if( !empty($FeedSettings['title']) )
@@ -70,7 +70,7 @@ function powerpress_get_program_title_by_taxonomy($term_id, $taxonomy = 'categor
70
  if( !empty($PowerPressTaxonomies) )
71
  {
72
  $query_in = '';
73
- while( list($tt_id, $null) = each($PowerPressTaxonomies) )
74
  {
75
  if( !empty($query_in) )
76
  $query_in .= ',';
@@ -81,7 +81,7 @@ function powerpress_get_program_title_by_taxonomy($term_id, $taxonomy = 'categor
81
  {
82
  $terms = $wpdb->get_results("SELECT term_taxonomy_id, term_id, taxonomy FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id IN ($query_in)", ARRAY_A);
83
 
84
- while( list($index,$term_info) = each($terms) )
85
  {
86
  // TODO: We need to get term by the term_id and taxonomy
87
  $FeedSettings = powerpress_get_settings('powerpress_taxonomy_'.$term_info['term_taxonomy_id']);
@@ -165,7 +165,7 @@ function powerpress_playlist_episodes($args)
165
  // First santity check make sure we are only working with numbers....
166
  if( preg_match('/^[0-9,\s]*$/', $args['ids']) ) {
167
  $ids = explode(',', preg_replace('/(\s)/', '', $args['ids']) );
168
- while( list($index,$id) = each($ids) ) {
169
  if( empty($id) )
170
  continue;
171
  if( !empty($for_query) )
@@ -191,7 +191,7 @@ function powerpress_playlist_episodes($args)
191
  $results_data = $wpdb->get_results($query, ARRAY_A);
192
  if( $results_data )
193
  {
194
- while( list($null,$row) = each($results_data) )
195
  {
196
  if( empty($row['meta_value']) )
197
  continue;
@@ -223,7 +223,7 @@ function powerpress_underscore_playlist_templates() {
223
  <# } #>
224
  <# if ( data.meta.link ) { #>
225
  <span class="wp-playlist-item-meta wp-playlist-item-title"><a href="{{ data.meta.link }}" rel="nofollow">{{ data.title }}</a></span>
226
- <# } else { #>
227
  <span class="wp-playlist-item-meta wp-playlist-item-title">{{ data.title }}</span>
228
  <# } #>
229
  <# if ( data.meta.date ) { #><span class="wp-playlist-item-meta wp-playlist-item-artist">{{ data.meta.date }}</span><# } #>
@@ -234,7 +234,9 @@ function powerpress_underscore_playlist_templates() {
234
  <div class="wp-playlist-item">
235
  <a class="wp-playlist-caption" href="{{ data.src }}">
236
  <!-- <span class="wp-playlist-item-title">&#8220;{{{ data.title }}}&#8221;</span> -->
 
237
  <span class="wp-playlist-item-title">{{ data.title }}</span>
 
238
  <# if ( data.meta.date ) { #>
239
  <span class="wp-playlist-item-artist"> &mdash; {{ data.meta.date }}</span>
240
  <# } #>
@@ -312,7 +314,7 @@ function powerpress_playlist_shortcode( $attr ) {
312
  'term_taxonomy_id'=>'', // Used for PowerPress Playlist (specify term_taxonomy_id)
313
  'program_titles_by_taxonomy'=>'', // e.g. category
314
  'date' => true, // Display the date
315
- 'title' => true, // Dislay the title of program
316
  'links'=>true, // Link to episode page
317
  'slug' => '', // Used for PowerPress Playlist
318
  'feed' => '', // Used for PowerPress Playlist
@@ -335,6 +337,7 @@ function powerpress_playlist_shortcode( $attr ) {
335
  $images = filter_var( $images, FILTER_VALIDATE_BOOLEAN );
336
  $links = filter_var( $links, FILTER_VALIDATE_BOOLEAN );
337
  $itunes_subtitle = filter_var( $itunes_subtitle, FILTER_VALIDATE_BOOLEAN );
 
338
  $date = filter_var( $date, FILTER_VALIDATE_BOOLEAN );
339
 
340
  if( empty($slug) && !empty($feed) )
@@ -420,6 +423,10 @@ function powerpress_playlist_shortcode( $attr ) {
420
  'description' => $episode['post_title']
421
  );
422
 
 
 
 
 
423
  //$image = false;
424
  $episode_image = $image;
425
  if( $images && !empty($episode['enclosure']['image']) )
@@ -444,7 +451,8 @@ function powerpress_playlist_shortcode( $attr ) {
444
  $track['meta']['program_title'] = powerpress_get_program_title_by_taxonomy($ObjectTerms[0]->term_id, $program_titles_by_taxonomy);
445
  }
446
  }
447
- $track['meta']['title'] = $episode['post_title'];
 
448
  if( !empty($itunes_subtitle) && !empty($episode['enclosure']['subtitle']) )
449
  $track['meta']['itunes_subtitle'] = $episode['enclosure']['subtitle'];
450
  $track['meta']['genre'] = 'Podcast';
57
  {
58
  $Feeds = $General['custom_cat_feeds'];
59
  // Walk through the categories...
60
+ foreach( $Feeds as $null=> $cat_id )
61
  {
62
  $FeedSettings = get_option('powerpress_cat_feed_'.$cat_id);
63
  if( !empty($FeedSettings['title']) )
70
  if( !empty($PowerPressTaxonomies) )
71
  {
72
  $query_in = '';
73
+ foreach( $PowerPressTaxonomies as $tt_id=> $null )
74
  {
75
  if( !empty($query_in) )
76
  $query_in .= ',';
81
  {
82
  $terms = $wpdb->get_results("SELECT term_taxonomy_id, term_id, taxonomy FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id IN ($query_in)", ARRAY_A);
83
 
84
+ foreach( $terms as $index=> $term_info )
85
  {
86
  // TODO: We need to get term by the term_id and taxonomy
87
  $FeedSettings = powerpress_get_settings('powerpress_taxonomy_'.$term_info['term_taxonomy_id']);
165
  // First santity check make sure we are only working with numbers....
166
  if( preg_match('/^[0-9,\s]*$/', $args['ids']) ) {
167
  $ids = explode(',', preg_replace('/(\s)/', '', $args['ids']) );
168
+ foreach( $ids as $index=> $id ) {
169
  if( empty($id) )
170
  continue;
171
  if( !empty($for_query) )
191
  $results_data = $wpdb->get_results($query, ARRAY_A);
192
  if( $results_data )
193
  {
194
+ foreach( $results_data as $null=> $row )
195
  {
196
  if( empty($row['meta_value']) )
197
  continue;
223
  <# } #>
224
  <# if ( data.meta.link ) { #>
225
  <span class="wp-playlist-item-meta wp-playlist-item-title"><a href="{{ data.meta.link }}" rel="nofollow">{{ data.title }}</a></span>
226
+ <# } else if ( data.title ) { #>
227
  <span class="wp-playlist-item-meta wp-playlist-item-title">{{ data.title }}</span>
228
  <# } #>
229
  <# if ( data.meta.date ) { #><span class="wp-playlist-item-meta wp-playlist-item-artist">{{ data.meta.date }}</span><# } #>
234
  <div class="wp-playlist-item">
235
  <a class="wp-playlist-caption" href="{{ data.src }}">
236
  <!-- <span class="wp-playlist-item-title">&#8220;{{{ data.title }}}&#8221;</span> -->
237
+ <# if ( data.title ) { #>
238
  <span class="wp-playlist-item-title">{{ data.title }}</span>
239
+ <# } #>
240
  <# if ( data.meta.date ) { #>
241
  <span class="wp-playlist-item-artist"> &mdash; {{ data.meta.date }}</span>
242
  <# } #>
314
  'term_taxonomy_id'=>'', // Used for PowerPress Playlist (specify term_taxonomy_id)
315
  'program_titles_by_taxonomy'=>'', // e.g. category
316
  'date' => true, // Display the date
317
+ 'title' => true, // Dislay the title of episode
318
  'links'=>true, // Link to episode page
319
  'slug' => '', // Used for PowerPress Playlist
320
  'feed' => '', // Used for PowerPress Playlist
337
  $images = filter_var( $images, FILTER_VALIDATE_BOOLEAN );
338
  $links = filter_var( $links, FILTER_VALIDATE_BOOLEAN );
339
  $itunes_subtitle = filter_var( $itunes_subtitle, FILTER_VALIDATE_BOOLEAN );
340
+ $episode_title = filter_var( $title, FILTER_VALIDATE_BOOLEAN );
341
  $date = filter_var( $date, FILTER_VALIDATE_BOOLEAN );
342
 
343
  if( empty($slug) && !empty($feed) )
423
  'description' => $episode['post_title']
424
  );
425
 
426
+ if( empty($episode_title) ) {
427
+ $track['title'] = '';
428
+ }
429
+
430
  //$image = false;
431
  $episode_image = $image;
432
  if( $images && !empty($episode['enclosure']['image']) )
451
  $track['meta']['program_title'] = powerpress_get_program_title_by_taxonomy($ObjectTerms[0]->term_id, $program_titles_by_taxonomy);
452
  }
453
  }
454
+ if( !empty($episode_title) )
455
+ $track['meta']['title'] = $episode['post_title'];
456
  if( !empty($itunes_subtitle) && !empty($episode['enclosure']['subtitle']) )
457
  $track['meta']['itunes_subtitle'] = $episode['enclosure']['subtitle'];
458
  $track['meta']['genre'] = 'Podcast';
powerpress-subscribe.php CHANGED
@@ -85,8 +85,11 @@ function powerpresssubscribe_get_settings($ExtraData, $detect_category=true)
85
  if( !$category_id && is_single() )
86
  {
87
  $categories = wp_get_post_categories( get_the_ID() );
88
- if( count($categories) == 1 )
89
- list($null,$category_id) = each($categories);
 
 
 
90
  if( !empty($category_id) )
91
  {
92
  $Settings = get_option('powerpress_cat_feed_'.$category_id );
@@ -129,6 +132,7 @@ function powerpresssubscribe_get_settings($ExtraData, $detect_category=true)
129
  $Settings['subscribe_feature_gp'] = (!empty($GeneralSettings['subscribe_feature_gp']) );
130
  $Settings['subscribe_feature_stitcher'] = (!empty($GeneralSettings['subscribe_feature_stitcher']) );
131
  $Settings['subscribe_feature_tunein'] = (!empty($GeneralSettings['subscribe_feature_tunein']) );
 
132
  return $Settings;
133
  }
134
 
@@ -189,6 +193,7 @@ function powerpresssubscribe_get_settings($ExtraData, $detect_category=true)
189
  $Settings['subscribe_feature_gp'] = (!empty($GeneralSettings['subscribe_feature_gp']) );
190
  $Settings['subscribe_feature_stitcher'] = (!empty($GeneralSettings['subscribe_feature_stitcher']) );
191
  $Settings['subscribe_feature_tunein'] = (!empty($GeneralSettings['subscribe_feature_tunein']) );
 
192
  return $Settings;
193
  }
194
  }; break;
@@ -222,11 +227,13 @@ function powerpresssubscribe_get_settings($ExtraData, $detect_category=true)
222
  $Settings['subscribe_feature_gp'] = (!empty($GeneralSettings['subscribe_feature_gp']) );
223
  $Settings['subscribe_feature_stitcher'] = (!empty($GeneralSettings['subscribe_feature_stitcher']) );
224
  $Settings['subscribe_feature_tunein'] = (!empty($GeneralSettings['subscribe_feature_tunein']) );
 
225
  if( !empty($FeedSettings['premium']) ) {
226
  $Settings['subscribe_feature_email'] = false;
227
  $Settings['subscribe_feature_gp'] = false;
228
  $Settings['subscribe_feature_stitcher'] = false;
229
  $Settings['subscribe_feature_tunein'] = false;
 
230
  }
231
 
232
  return $Settings;
@@ -279,10 +286,10 @@ function powerpressplayer_link_subscribe_pre($content, $media_url, $ExtraData =
279
  }
280
  }
281
 
282
- if( !empty($SubscribeSettings['subscribe_feature_gp']) && !empty($SubscribeSettings['googleplay_url']) )
283
  {
284
- $SubscribeSettings['googleplay_url'] = trim($SubscribeSettings['googleplay_url']);
285
- $links_array[] = "<a href=\"". esc_attr($SubscribeSettings['googleplay_url'] ) ."\" class=\"powerpress_link_subscribe powerpress_link_subscribe_googleplay\" title=\"". __('Subscribe on Google Play', 'powerpress') ."\" rel=\"nofollow\">". __('Google Play','powerpress') ."</a>".PHP_EOL_WEB;
286
  }
287
 
288
  if( !empty($SubscribeSettings['subscribe_feature_stitcher']) && !empty($SubscribeSettings['stitcher_url']) )
@@ -296,7 +303,13 @@ function powerpressplayer_link_subscribe_pre($content, $media_url, $ExtraData =
296
  $SubscribeSettings['tunein_url'] = trim($SubscribeSettings['tunein_url']);
297
  $links_array[] = "<a href=\"". esc_attr($SubscribeSettings['tunein_url'] ) ."\" class=\"powerpress_link_subscribe powerpress_link_subscribe_tunein\" title=\"". __('Subscribe on TuneIn', 'powerpress') ."\" rel=\"nofollow\">". __('TuneIn','powerpress') ."</a>".PHP_EOL_WEB;
298
  }
299
-
 
 
 
 
 
 
300
  if( !empty($SubscribeSettings['subscribe_feature_rss']) ) {
301
  $links_array[] = "<a href=\"". htmlspecialchars($feed_url) ."\" class=\"powerpress_link_subscribe powerpress_link_subscribe_rss\" title=\"". __('Subscribe via RSS', 'powerpress') ."\" rel=\"nofollow\">". __('RSS','powerpress') ."</a>".PHP_EOL_WEB;
302
  }
@@ -574,10 +587,9 @@ function powerpress_do_subscribe_widget($settings)
574
  }
575
  }
576
 
577
- if( !empty($settings['googleplay_url']) )
578
- {
579
- $html .= '<a href="'. esc_url( $settings['googleplay_url'] ) .'" class="pp-sub-btn pp-sub-gp" title="'. esc_attr( __('Subscribe on Google Play', 'powerpress') ) .'"><span class="pp-sub-ic"></span>'. esc_html( __('on Google Play', 'powerpress') ) .'</a>';
580
- }
581
 
582
  if( !empty($settings['stitcher_url']) )
583
  {
@@ -589,6 +601,11 @@ function powerpress_do_subscribe_widget($settings)
589
  $html .= '<a href="'. esc_url( $settings['tunein_url'] ) .'" class="pp-sub-btn pp-sub-tunein" title="'. esc_attr( __('Subscribe on TuneIn', 'powerpress') ) .'"><span class="pp-sub-ic"></span>'. esc_html( __('on TuneIn', 'powerpress') ) .'</a>';
590
  }
591
 
 
 
 
 
 
592
  //$html .= var_dump($settings, true);
593
 
594
  if( !empty($settings['subscribe_feature_rss']) ) {
@@ -639,11 +656,11 @@ function powerpress_do_subscribe_sidebar_widget($settings)
639
  }
640
  }
641
 
642
- if( !empty($settings['subscribe_feature_gp']) && !empty($settings['googleplay_url']) ) {
643
- $settings['googleplay_url'] = trim($settings['googleplay_url']);
644
- $html .= '<a href="'. esc_url( $settings['googleplay_url'] ) .'" class="pp-ssb-btn pp-ssb-gp" title="'. esc_attr( __('Subscribe on Google Play', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('on Google Play', 'powerpress') ) .'</a>';
645
  }
646
-
647
  if( !empty($settings['subscribe_feature_stitcher']) && !empty($settings['stitcher_url']) ) {
648
  $settings['stitcher_url'] = trim($settings['stitcher_url']);
649
  $html .= '<a href="'. esc_url( $settings['stitcher_url'] ) .'" class="pp-ssb-btn pp-ssb-stitcher" title="'. esc_attr( __('Subscribe on Stitcher', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('on Stitcher', 'powerpress') ) .'</a>';
@@ -654,6 +671,11 @@ function powerpress_do_subscribe_sidebar_widget($settings)
654
  $html .= '<a href="'. esc_url( $settings['tunein_url'] ) .'" class="pp-ssb-btn pp-ssb-tunein" title="'. esc_attr( __('Subscribe on TuneIn', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('on TuneIn', 'powerpress') ) .'</a>';
655
  }
656
 
 
 
 
 
 
657
  if( !empty($settings['subscribe_feature_rss']) ) {
658
  $html .= '<a href="'. esc_url( $settings['feed_url'] ) .'" class="pp-ssb-btn pp-ssb-rss" title="'. esc_attr( __('Subscribe via RSS', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('via RSS', 'powerpress') ) .'</a>';
659
  }
85
  if( !$category_id && is_single() )
86
  {
87
  $categories = wp_get_post_categories( get_the_ID() );
88
+ if( count($categories) == 1 ) {
89
+ foreach( $categories as $null=> $category_id ) {
90
+ break;
91
+ }
92
+ }
93
  if( !empty($category_id) )
94
  {
95
  $Settings = get_option('powerpress_cat_feed_'.$category_id );
132
  $Settings['subscribe_feature_gp'] = (!empty($GeneralSettings['subscribe_feature_gp']) );
133
  $Settings['subscribe_feature_stitcher'] = (!empty($GeneralSettings['subscribe_feature_stitcher']) );
134
  $Settings['subscribe_feature_tunein'] = (!empty($GeneralSettings['subscribe_feature_tunein']) );
135
+ $Settings['subscribe_feature_spotify'] = (!empty($GeneralSettings['subscribe_feature_spotify']) );
136
  return $Settings;
137
  }
138
 
193
  $Settings['subscribe_feature_gp'] = (!empty($GeneralSettings['subscribe_feature_gp']) );
194
  $Settings['subscribe_feature_stitcher'] = (!empty($GeneralSettings['subscribe_feature_stitcher']) );
195
  $Settings['subscribe_feature_tunein'] = (!empty($GeneralSettings['subscribe_feature_tunein']) );
196
+ $Settings['subscribe_feature_spotify'] = (!empty($GeneralSettings['subscribe_feature_spotify']) );
197
  return $Settings;
198
  }
199
  }; break;
227
  $Settings['subscribe_feature_gp'] = (!empty($GeneralSettings['subscribe_feature_gp']) );
228
  $Settings['subscribe_feature_stitcher'] = (!empty($GeneralSettings['subscribe_feature_stitcher']) );
229
  $Settings['subscribe_feature_tunein'] = (!empty($GeneralSettings['subscribe_feature_tunein']) );
230
+ $Settings['subscribe_feature_spotify'] = (!empty($GeneralSettings['subscribe_feature_spotify']) );
231
  if( !empty($FeedSettings['premium']) ) {
232
  $Settings['subscribe_feature_email'] = false;
233
  $Settings['subscribe_feature_gp'] = false;
234
  $Settings['subscribe_feature_stitcher'] = false;
235
  $Settings['subscribe_feature_tunein'] = false;
236
+ $Settings['subscribe_feature_spotify'] = false;
237
  }
238
 
239
  return $Settings;
286
  }
287
  }
288
 
289
+ if( !empty($SubscribeSettings['subscribe_feature_gp']) )
290
  {
291
+ $SubscribeSettings['googleplay_url'] = 'https://www.google.com/podcasts?feed='. base64_encode($feed_url);
292
+ $links_array[] = "<a href=\"". esc_attr($SubscribeSettings['googleplay_url'] ) ."\" class=\"powerpress_link_subscribe powerpress_link_subscribe_googleplay\" title=\"". __('Subscribe on Google Podcasts', 'powerpress') ."\" rel=\"nofollow\">". __('Google Podcasts','powerpress') ."</a>".PHP_EOL_WEB;
293
  }
294
 
295
  if( !empty($SubscribeSettings['subscribe_feature_stitcher']) && !empty($SubscribeSettings['stitcher_url']) )
303
  $SubscribeSettings['tunein_url'] = trim($SubscribeSettings['tunein_url']);
304
  $links_array[] = "<a href=\"". esc_attr($SubscribeSettings['tunein_url'] ) ."\" class=\"powerpress_link_subscribe powerpress_link_subscribe_tunein\" title=\"". __('Subscribe on TuneIn', 'powerpress') ."\" rel=\"nofollow\">". __('TuneIn','powerpress') ."</a>".PHP_EOL_WEB;
305
  }
306
+
307
+ if( !empty($SubscribeSettings['subscribe_feature_spotify']) && !empty($SubscribeSettings['spotify_url']) )
308
+ {
309
+ $SubscribeSettings['spotify_url'] = trim($SubscribeSettings['spotify_url']);
310
+ $links_array[] = "<a href=\"". esc_attr($SubscribeSettings['spotify_url'] ) ."\" class=\"powerpress_link_subscribe powerpress_link_subscribe_spotify\" title=\"". __('Subscribe on Spotify', 'powerpress') ."\" rel=\"nofollow\">". __('Spotify','powerpress') ."</a>".PHP_EOL_WEB;
311
+ }
312
+
313
  if( !empty($SubscribeSettings['subscribe_feature_rss']) ) {
314
  $links_array[] = "<a href=\"". htmlspecialchars($feed_url) ."\" class=\"powerpress_link_subscribe powerpress_link_subscribe_rss\" title=\"". __('Subscribe via RSS', 'powerpress') ."\" rel=\"nofollow\">". __('RSS','powerpress') ."</a>".PHP_EOL_WEB;
315
  }
587
  }
588
  }
589
 
590
+ // Google Podcasts
591
+ $html .= '<a href="'. esc_url( 'https://www.google.com/podcasts?feed='. base64_encode($settings['feed_url']) ) .'" class="pp-sub-btn pp-sub-gp" title="'. esc_attr( __('Subscribe on Google Podcasts', 'powerpress') ) .'"><span class="pp-sub-ic"></span>'. esc_html( __('on Google Podcasts', 'powerpress') ) .'</a>';
592
+
 
593
 
594
  if( !empty($settings['stitcher_url']) )
595
  {
601
  $html .= '<a href="'. esc_url( $settings['tunein_url'] ) .'" class="pp-sub-btn pp-sub-tunein" title="'. esc_attr( __('Subscribe on TuneIn', 'powerpress') ) .'"><span class="pp-sub-ic"></span>'. esc_html( __('on TuneIn', 'powerpress') ) .'</a>';
602
  }
603
 
604
+ if( !empty($settings['spotify_url']) )
605
+ {
606
+ $html .= '<a href="'. esc_url( $settings['spotify_url'] ) .'" class="pp-sub-btn pp-sub-spotify" title="'. esc_attr( __('Subscribe on Spotify', 'powerpress') ) .'"><span class="pp-sub-ic"></span>'. esc_html( __('on Spotify', 'powerpress') ) .'</a>';
607
+ }
608
+
609
  //$html .= var_dump($settings, true);
610
 
611
  if( !empty($settings['subscribe_feature_rss']) ) {
656
  }
657
  }
658
 
659
+ if( !empty($settings['subscribe_feature_gp']) ) {
660
+ $gp_url = 'https://www.google.com/podcasts?feed='.base64_encode($settings['feed_url']);
661
+ $html .= '<a href="'. esc_url( $gp_url ) .'" class="pp-ssb-btn pp-ssb-gp" title="'. esc_attr( __('Subscribe on Google Podcasts', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('on Google Podcasts', 'powerpress') ) .'</a>';
662
  }
663
+
664
  if( !empty($settings['subscribe_feature_stitcher']) && !empty($settings['stitcher_url']) ) {
665
  $settings['stitcher_url'] = trim($settings['stitcher_url']);
666
  $html .= '<a href="'. esc_url( $settings['stitcher_url'] ) .'" class="pp-ssb-btn pp-ssb-stitcher" title="'. esc_attr( __('Subscribe on Stitcher', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('on Stitcher', 'powerpress') ) .'</a>';
671
  $html .= '<a href="'. esc_url( $settings['tunein_url'] ) .'" class="pp-ssb-btn pp-ssb-tunein" title="'. esc_attr( __('Subscribe on TuneIn', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('on TuneIn', 'powerpress') ) .'</a>';
672
  }
673
 
674
+ if( !empty($settings['subscribe_feature_spotify']) && !empty($settings['spotify_url']) ) {
675
+ $settings['spotify_url'] = trim($settings['spotify_url']);
676
+ $html .= '<a href="'. esc_url( $settings['spotify_url'] ) .'" class="pp-ssb-btn pp-ssb-spotify" title="'. esc_attr( __('Subscribe on Spotify', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('on Spotify', 'powerpress') ) .'</a>';
677
+ }
678
+
679
  if( !empty($settings['subscribe_feature_rss']) ) {
680
  $html .= '<a href="'. esc_url( $settings['feed_url'] ) .'" class="pp-ssb-btn pp-ssb-rss" title="'. esc_attr( __('Subscribe via RSS', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('via RSS', 'powerpress') ) .'</a>';
681
  }
powerpress.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
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> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports iTunes, Google Play, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
6
- Version: 7.2
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Requires at least: 3.6
@@ -32,7 +32,7 @@ if( !function_exists('add_action') )
32
  die("access denied.");
33
 
34
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
35
- define('POWERPRESS_VERSION', '7.2' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
@@ -189,7 +189,7 @@ function powerpress_content($content)
189
  $Temp = $GeneralSettings['custom_feeds'];
190
  $GeneralSettings['custom_feeds'] = array();
191
  $GeneralSettings['custom_feeds']['podcast'] = 'Default Podcast Feed';
192
- while( list($feed_slug, $feed_title) = each($Temp) )
193
  {
194
  if( $feed_slug == 'podcast' )
195
  continue;
@@ -219,7 +219,7 @@ function powerpress_content($content)
219
  }; break;
220
  }
221
 
222
- while( list($feed_slug, $postTypeSettings) = each($PostTypeSettingsArray) )
223
  {
224
  if( !empty( $postTypeSettings['title']) )
225
  $GeneralSettings['custom_feeds'][ $feed_slug ] = $postTypeSettings['title'];
@@ -258,7 +258,7 @@ function powerpress_content($content)
258
  {
259
  if( isset($matches[3]) )
260
  {
261
- while( list($key,$row) = each($matches[3]) )
262
  {
263
  $attributes = shortcode_parse_atts($row);
264
  if( isset($attributes['url']) )
@@ -281,7 +281,7 @@ function powerpress_content($content)
281
 
282
  // LOOP HERE TO DISPLAY EACH MEDIA TYPE
283
  $new_content = '';
284
- while( list($feed_slug,$feed_title) = each($GeneralSettings['custom_feeds']) )
285
  {
286
  // Get the enclosure data
287
  $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
@@ -418,7 +418,7 @@ function powerpress_pinw(pinw_url){window.open(pinw_url, 'PowerPressPlayer','too
418
  if( !empty($Powerpress['feed_links']) )
419
  {
420
  // Loop through podcast feeds and display them here
421
- while( list($feed_slug, $title) = each($Powerpress['custom_feeds']) )
422
  {
423
  $href = get_feed_link($feed_slug);
424
  if ( isset($title) && isset($href) )
@@ -746,7 +746,7 @@ function powerpress_rss2_head()
746
  if( !empty($Feed['donate_link']) && !empty($Feed['donate_url']) )
747
  echo "\t<rawvoice:donate href=\"". htmlspecialchars( $Feed['donate_url'] ) ."\">". htmlspecialchars( (empty($Feed['donate_label'])?'':$Feed['donate_label']) ) ."</rawvoice:donate>".PHP_EOL;
748
 
749
- if( !empty($Feed['itunes_url']) || !empty($Feed['googleplay_url']) || !empty($Feed['blubrry_url']) || !empty($Feed['stitcher_url']) || !empty($Feed['tunein_url']) ) {
750
  echo "\t<rawvoice:subscribe feed=\"";
751
  self_link();
752
  echo '"';
@@ -763,14 +763,14 @@ function powerpress_rss2_head()
763
 
764
  if( !empty($Feed['itunes_url']) )
765
  echo " itunes=\"". htmlspecialchars( $Feed['itunes_url'] ) .'"';
766
- if( !empty($Feed['googleplay_url']) )
767
- echo " googleplay=\"". htmlspecialchars( $Feed['googleplay_url'] ) .'"';
768
  if( !empty($Feed['blubrry_url']) )
769
  echo " blubrry=\"". htmlspecialchars( $Feed['blubrry_url'] ) .'"';
770
  if( !empty($Feed['stitcher_url']) )
771
  echo " stitcher=\"". htmlspecialchars( $Feed['stitcher_url'] ) .'"';
772
  if( !empty($Feed['tunein_url']) )
773
  echo " tunein=\"". htmlspecialchars( $Feed['tunein_url'] ) .'"';
 
 
774
  echo "></rawvoice:subscribe>".PHP_EOL;
775
  }
776
  }
@@ -1365,9 +1365,9 @@ function powerpress_template_redirect()
1365
  if( is_array($powerpress_feed) && trim($powerpress_feed['feed_redirect_url']) != '' && !preg_match("/feedburner|feedsqueezer|feedvalidator/i", $_SERVER['HTTP_USER_AGENT'] ) && $redirect_value != 'no' )
1366
  {
1367
  if (function_exists('status_header'))
1368
- status_header( 302 );
1369
  header("Location: " . trim($powerpress_feed['feed_redirect_url']));
1370
- header("HTTP/1.1 302 Temporary Redirect");
1371
  exit();
1372
  }
1373
  }
@@ -1386,7 +1386,7 @@ function powerpress_rewrite_rules_array($array)
1386
  $podcast_feeds = array_merge($settings['custom_feeds'], $podcast_feeds );
1387
 
1388
  $merged_slugs = '';
1389
- while( list($feed_slug, $feed_title) = each($podcast_feeds) )
1390
  {
1391
  if( $merged_slugs != '' )
1392
  $merged_slugs .= '|';
@@ -1402,7 +1402,7 @@ function powerpress_rewrite_rules_array($array)
1402
 
1403
  global $wpdb;
1404
  reset($podcast_feeds);
1405
- while( list($feed_slug, $feed_title) = each($podcast_feeds) )
1406
  {
1407
  $page_name_id = $wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE post_name = '".$feed_slug."'");
1408
  if( $page_name_id )
@@ -1424,7 +1424,7 @@ function powerpress_rewrite_rules_array($array)
1424
  {
1425
  reset($podcast_feeds);
1426
  $remaining_slugs = '';
1427
- while( list($feed_slug, $feed_title) = each($podcast_feeds) )
1428
  {
1429
  if( $remaining_slugs != '' )
1430
  $remaining_slugs .= '|';
@@ -1449,7 +1449,7 @@ function powerpress_pre_transient_rewrite_rules($return_rules)
1449
 
1450
  if( $GeneralSettings && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) )
1451
  {
1452
- while( list($feed_slug,$null) = each($GeneralSettings['custom_feeds']) )
1453
  {
1454
  if( !in_array($feed_slug, $wp_rewrite->feeds) )
1455
  $wp_rewrite->feeds[] = $feed_slug;
@@ -1499,7 +1499,7 @@ function powerpress_init()
1499
 
1500
  if( $GeneralSettings && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) )
1501
  {
1502
- while( list($feed_slug,$feed_title) = each($GeneralSettings['custom_feeds']) )
1503
  {
1504
  if( $feed_slug != 'podcast' )
1505
  add_feed($feed_slug, 'powerpress_do_podcast_feed');
@@ -1528,12 +1528,12 @@ function powerpress_init()
1528
  {
1529
  $FeedSlugPostTypesArray = array();
1530
  }
1531
- while( list($feed_slug, $FeedSlugPostTypes) = each($FeedSlugPostTypesArray) )
1532
  {
1533
  if ( !in_array($feed_slug, $wp_rewrite->feeds) ) // we need to add this feed name
1534
  {
1535
  add_feed($feed_slug, 'powerpress_do_podcast_feed');
1536
- while( list($post_type_slug, $title) = each($FeedSlugPostTypes) )
1537
  {
1538
  add_rewrite_rule( '/'. $post_type_slug .'/feed/'. $feed_slug .'/?$', 'index.php?post_type='. $post_type_slug .'&feed='.$feed_slug, 'top' ); // capture the post type feeds
1539
  add_rewrite_rule( '/'. $post_type_slug .'/feed/'. $feed_slug .'/?$', 'index.php?post_type='. $post_type_slug .'&feed='.$feed_slug, 'bottom' ); // capture the post type feeds
@@ -1601,9 +1601,9 @@ function powerpress_request($qv)
1601
 
1602
  if( $podcast_feed_slug )
1603
  {
1604
- if( $qv['feed'] == 'podcast' )
1605
  $qv['post_type'] = 'post';
1606
- else {
1607
  $qv['post_type'] = get_post_types( array('public'=> true, 'capability_type'=>'post') );
1608
  if( !empty($qv['post_type']['attachment']) )
1609
  unset($qv['post_type']['attachment']);
@@ -2166,7 +2166,7 @@ function get_the_powerpress_content()
2166
  $GeneralSettings['custom_feeds'] = array();
2167
  $GeneralSettings['custom_feeds']['podcast'] = 'Default Podcast Feed';
2168
 
2169
- while( list($feed_slug, $feed_title) = each($Temp) )
2170
  {
2171
  if( $feed_slug == 'podcast' )
2172
  continue;
@@ -2196,7 +2196,7 @@ function get_the_powerpress_content()
2196
  }; break;
2197
  }
2198
 
2199
- while( list($feed_slug, $postTypeSettings) = each($PostTypeSettingsArray) )
2200
  {
2201
  if( !empty( $postTypeSettings['title']) )
2202
  $GeneralSettings['custom_feeds'][ $feed_slug ] = $postTypeSettings['title'];
@@ -2220,7 +2220,7 @@ function get_the_powerpress_content()
2220
 
2221
  // LOOP HERE TO DISPLAY EACH MEDIA TYPE
2222
  $new_content = '';
2223
- while( list($feed_slug,$feed_title) = each($GeneralSettings['custom_feeds']) )
2224
  {
2225
  // Get the enclosure data
2226
  $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
@@ -2492,7 +2492,7 @@ function powerpress_itunes_categories($PrefixSubCategories = false)
2492
 
2493
  if( $PrefixSubCategories )
2494
  {
2495
- while( list($key,$val) = each($temp) )
2496
  {
2497
  $parts = explode('-', $key);
2498
  $cat = $parts[0];
@@ -2782,7 +2782,9 @@ function powerpress_add_redirect_url($MediaURL, $EpisodeData = false) // $channe
2782
  } else if( is_single() ) {
2783
  $categories = wp_get_post_categories( get_the_ID() );
2784
  if( count($categories) == 1 ) { // See if only one category is associated with this post
2785
- list($null,$cat_id) = each($categories);
 
 
2786
  $FeedCatSettings = get_option('powerpress_cat_feed_'.$cat_id );
2787
  if( $FeedCatSettings && !empty($FeedCatSettings['redirect']) ) {
2788
  $Redirects['redirect0'] = $FeedCatSettings['redirect'];
@@ -2852,7 +2854,7 @@ function powerpress_add_redirect_url($MediaURL, $EpisodeData = false) // $channe
2852
  $ttid_found = 0;
2853
  $TaxonomySettings = false;
2854
 
2855
- while( list($index,$termObj) = each($terms) )
2856
  {
2857
  // Skip the default taxonomies
2858
  if( $termObj->taxonomy == 'category' || $termObj->taxonomy == 'link_category' || $termObj->taxonomy == 'post_tag' || $termObj->taxonomy == 'nav_menu' )
@@ -2992,7 +2994,7 @@ function powerpress_merge_empty_feed_settings($CustomFeedSettings, $FeedSettings
2992
  if( !$CustomFeedSettings )
2993
  return $FeedSettings; // If the $CustomFeedSettings is false
2994
 
2995
- while( list($key,$value) = each($CustomFeedSettings) )
2996
  {
2997
  if( $value !== '' || !isset($FeedSettings[$key]) )
2998
  $FeedSettings[$key] = $value;
@@ -3158,7 +3160,7 @@ function powerpress_get_enclosure_data($post_id, $feed_slug = 'podcast', $raw_da
3158
  $ExtraData = @unserialize($Serialized);
3159
  if( $ExtraData && is_array($ExtraData) )
3160
  {
3161
- while( list($key,$value) = each($ExtraData) ) {
3162
 
3163
  // Make sure specific fields are not overwritten...
3164
  switch( $key ) {
@@ -3341,7 +3343,7 @@ function get_the_powerpress_all_players($slug = false, $no_link=false)
3341
  {
3342
  if( isset($GeneralSettings['custom_feeds']['podcast']) )
3343
  $ChannelSlugs = array(); // Reset the array so it is added from the list in specified order
3344
- while( list($feed_slug,$null) = each($GeneralSettings['custom_feeds']) )
3345
  $ChannelSlugs[] = $feed_slug;
3346
  }
3347
  else if( is_array($slug) )
@@ -3358,7 +3360,7 @@ function get_the_powerpress_all_players($slug = false, $no_link=false)
3358
  {
3359
  the_post();
3360
 
3361
- while( list($null,$feed_slug) = each($ChannelSlugs) )
3362
  {
3363
  // Do we follow the global settings to disable a player?
3364
  if( isset($GeneralSettings['disable_player']) && isset($GeneralSettings['disable_player'][$feed_slug]) && $slug == false )
@@ -3501,7 +3503,7 @@ function powerpress_in_wp_head()
3501
  $trace = $e->getTrace();
3502
 
3503
  if( !empty($trace) ) {
3504
- while( list($index,$call) = each($trace) ) {
3505
  if( isset($call['function']) ) {
3506
  // Which calls should we not add the player and links...
3507
  switch( $call['function'] ) {
@@ -3522,8 +3524,8 @@ function powerpress_in_custom_post_widget()
3522
  $trace = $e->getTrace();
3523
 
3524
  if( !empty($trace) ) {
3525
- //var_dump($trace);
3526
- while( list($index,$call) = each($trace) ) {
3527
  if( isset($call['function']) ) {
3528
  // Which calls should we not add the player and links...
3529
  switch( $call['function'] ) {
2
  /*
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> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
6
+ Version: 7.3
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Requires at least: 3.6
32
  die("access denied.");
33
 
34
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
35
+ define('POWERPRESS_VERSION', '7.3' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
189
  $Temp = $GeneralSettings['custom_feeds'];
190
  $GeneralSettings['custom_feeds'] = array();
191
  $GeneralSettings['custom_feeds']['podcast'] = 'Default Podcast Feed';
192
+ foreach( $Temp as $feed_slug=> $feed_title )
193
  {
194
  if( $feed_slug == 'podcast' )
195
  continue;
219
  }; break;
220
  }
221
 
222
+ foreach( $PostTypeSettingsArray as $feed_slug=> $postTypeSettings )
223
  {
224
  if( !empty( $postTypeSettings['title']) )
225
  $GeneralSettings['custom_feeds'][ $feed_slug ] = $postTypeSettings['title'];
258
  {
259
  if( isset($matches[3]) )
260
  {
261
+ foreach( $matches[3] as $key=> $row )
262
  {
263
  $attributes = shortcode_parse_atts($row);
264
  if( isset($attributes['url']) )
281
 
282
  // LOOP HERE TO DISPLAY EACH MEDIA TYPE
283
  $new_content = '';
284
+ foreach( $GeneralSettings['custom_feeds'] as $feed_slug=> $feed_title )
285
  {
286
  // Get the enclosure data
287
  $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
418
  if( !empty($Powerpress['feed_links']) )
419
  {
420
  // Loop through podcast feeds and display them here
421
+ foreach( $Powerpress['custom_feeds'] as $feed_slug=> $title )
422
  {
423
  $href = get_feed_link($feed_slug);
424
  if ( isset($title) && isset($href) )
746
  if( !empty($Feed['donate_link']) && !empty($Feed['donate_url']) )
747
  echo "\t<rawvoice:donate href=\"". htmlspecialchars( $Feed['donate_url'] ) ."\">". htmlspecialchars( (empty($Feed['donate_label'])?'':$Feed['donate_label']) ) ."</rawvoice:donate>".PHP_EOL;
748
 
749
+ if( !empty($Feed['itunes_url']) || !empty($Feed['blubrry_url']) || !empty($Feed['stitcher_url']) || !empty($Feed['tunein_url']) || !empty($Feed['spotify_url']) ) {
750
  echo "\t<rawvoice:subscribe feed=\"";
751
  self_link();
752
  echo '"';
763
 
764
  if( !empty($Feed['itunes_url']) )
765
  echo " itunes=\"". htmlspecialchars( $Feed['itunes_url'] ) .'"';
 
 
766
  if( !empty($Feed['blubrry_url']) )
767
  echo " blubrry=\"". htmlspecialchars( $Feed['blubrry_url'] ) .'"';
768
  if( !empty($Feed['stitcher_url']) )
769
  echo " stitcher=\"". htmlspecialchars( $Feed['stitcher_url'] ) .'"';
770
  if( !empty($Feed['tunein_url']) )
771
  echo " tunein=\"". htmlspecialchars( $Feed['tunein_url'] ) .'"';
772
+ if( !empty($Feed['spotify_url']) )
773
+ echo " spotify=\"". htmlspecialchars( $Feed['spotify_url'] ) .'"';
774
  echo "></rawvoice:subscribe>".PHP_EOL;
775
  }
776
  }
1365
  if( is_array($powerpress_feed) && trim($powerpress_feed['feed_redirect_url']) != '' && !preg_match("/feedburner|feedsqueezer|feedvalidator/i", $_SERVER['HTTP_USER_AGENT'] ) && $redirect_value != 'no' )
1366
  {
1367
  if (function_exists('status_header'))
1368
+ status_header( 301 );
1369
  header("Location: " . trim($powerpress_feed['feed_redirect_url']));
1370
+ header("HTTP/1.1 301 Moved Permanently");
1371
  exit();
1372
  }
1373
  }
1386
  $podcast_feeds = array_merge($settings['custom_feeds'], $podcast_feeds );
1387
 
1388
  $merged_slugs = '';
1389
+ foreach( $podcast_feeds as $feed_slug=> $feed_title )
1390
  {
1391
  if( $merged_slugs != '' )
1392
  $merged_slugs .= '|';
1402
 
1403
  global $wpdb;
1404
  reset($podcast_feeds);
1405
+ foreach( $podcast_feeds as $feed_slug=> $feed_title )
1406
  {
1407
  $page_name_id = $wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE post_name = '".$feed_slug."'");
1408
  if( $page_name_id )
1424
  {
1425
  reset($podcast_feeds);
1426
  $remaining_slugs = '';
1427
+ foreach( $podcast_feeds as $feed_slug=> $feed_title )
1428
  {
1429
  if( $remaining_slugs != '' )
1430
  $remaining_slugs .= '|';
1449
 
1450
  if( $GeneralSettings && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) )
1451
  {
1452
+ foreach( $GeneralSettings['custom_feeds'] as $feed_slug=> $null )
1453
  {
1454
  if( !in_array($feed_slug, $wp_rewrite->feeds) )
1455
  $wp_rewrite->feeds[] = $feed_slug;
1499
 
1500
  if( $GeneralSettings && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) )
1501
  {
1502
+ foreach( $GeneralSettings['custom_feeds'] as $feed_slug=> $feed_title )
1503
  {
1504
  if( $feed_slug != 'podcast' )
1505
  add_feed($feed_slug, 'powerpress_do_podcast_feed');
1528
  {
1529
  $FeedSlugPostTypesArray = array();
1530
  }
1531
+ foreach( $FeedSlugPostTypesArray as $feed_slug=> $FeedSlugPostTypes )
1532
  {
1533
  if ( !in_array($feed_slug, $wp_rewrite->feeds) ) // we need to add this feed name
1534
  {
1535
  add_feed($feed_slug, 'powerpress_do_podcast_feed');
1536
+ foreach( $FeedSlugPostTypes as $post_type_slug=> $title )
1537
  {
1538
  add_rewrite_rule( '/'. $post_type_slug .'/feed/'. $feed_slug .'/?$', 'index.php?post_type='. $post_type_slug .'&feed='.$feed_slug, 'top' ); // capture the post type feeds
1539
  add_rewrite_rule( '/'. $post_type_slug .'/feed/'. $feed_slug .'/?$', 'index.php?post_type='. $post_type_slug .'&feed='.$feed_slug, 'bottom' ); // capture the post type feeds
1601
 
1602
  if( $podcast_feed_slug )
1603
  {
1604
+ if( !defined('POWERPRESS_POSTTYPE_MIXING') && $qv['feed'] == 'podcast' ) {
1605
  $qv['post_type'] = 'post';
1606
+ } else {
1607
  $qv['post_type'] = get_post_types( array('public'=> true, 'capability_type'=>'post') );
1608
  if( !empty($qv['post_type']['attachment']) )
1609
  unset($qv['post_type']['attachment']);
2166
  $GeneralSettings['custom_feeds'] = array();
2167
  $GeneralSettings['custom_feeds']['podcast'] = 'Default Podcast Feed';
2168
 
2169
+ foreach( $Temp as $feed_slug=> $feed_title )
2170
  {
2171
  if( $feed_slug == 'podcast' )
2172
  continue;
2196
  }; break;
2197
  }
2198
 
2199
+ foreach( $PostTypeSettingsArray as $feed_slug=> $postTypeSettings )
2200
  {
2201
  if( !empty( $postTypeSettings['title']) )
2202
  $GeneralSettings['custom_feeds'][ $feed_slug ] = $postTypeSettings['title'];
2220
 
2221
  // LOOP HERE TO DISPLAY EACH MEDIA TYPE
2222
  $new_content = '';
2223
+ foreach( $GeneralSettings['custom_feeds'] as $feed_slug=> $feed_title )
2224
  {
2225
  // Get the enclosure data
2226
  $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
2492
 
2493
  if( $PrefixSubCategories )
2494
  {
2495
+ foreach( $temp as $key=> $val )
2496
  {
2497
  $parts = explode('-', $key);
2498
  $cat = $parts[0];
2782
  } else if( is_single() ) {
2783
  $categories = wp_get_post_categories( get_the_ID() );
2784
  if( count($categories) == 1 ) { // See if only one category is associated with this post
2785
+ foreach( $categories as $null=> $cat_id ) {
2786
+ break;
2787
+ }
2788
  $FeedCatSettings = get_option('powerpress_cat_feed_'.$cat_id );
2789
  if( $FeedCatSettings && !empty($FeedCatSettings['redirect']) ) {
2790
  $Redirects['redirect0'] = $FeedCatSettings['redirect'];
2854
  $ttid_found = 0;
2855
  $TaxonomySettings = false;
2856
 
2857
+ foreach( $terms as $index=> $termObj )
2858
  {
2859
  // Skip the default taxonomies
2860
  if( $termObj->taxonomy == 'category' || $termObj->taxonomy == 'link_category' || $termObj->taxonomy == 'post_tag' || $termObj->taxonomy == 'nav_menu' )
2994
  if( !$CustomFeedSettings )
2995
  return $FeedSettings; // If the $CustomFeedSettings is false
2996
 
2997
+ foreach( $CustomFeedSettings as $key=> $value )
2998
  {
2999
  if( $value !== '' || !isset($FeedSettings[$key]) )
3000
  $FeedSettings[$key] = $value;
3160
  $ExtraData = @unserialize($Serialized);
3161
  if( $ExtraData && is_array($ExtraData) )
3162
  {
3163
+ foreach( $ExtraData as $key=> $value ) {
3164
 
3165
  // Make sure specific fields are not overwritten...
3166
  switch( $key ) {
3343
  {
3344
  if( isset($GeneralSettings['custom_feeds']['podcast']) )
3345
  $ChannelSlugs = array(); // Reset the array so it is added from the list in specified order
3346
+ foreach( $GeneralSettings['custom_feeds'] as $feed_slug=> $null )
3347
  $ChannelSlugs[] = $feed_slug;
3348
  }
3349
  else if( is_array($slug) )
3360
  {
3361
  the_post();
3362
 
3363
+ foreach( $ChannelSlugs as $null=> $feed_slug )
3364
  {
3365
  // Do we follow the global settings to disable a player?
3366
  if( isset($GeneralSettings['disable_player']) && isset($GeneralSettings['disable_player'][$feed_slug]) && $slug == false )
3503
  $trace = $e->getTrace();
3504
 
3505
  if( !empty($trace) ) {
3506
+ foreach( $trace as $index=> $call ) {
3507
  if( isset($call['function']) ) {
3508
  // Which calls should we not add the player and links...
3509
  switch( $call['function'] ) {
3524
  $trace = $e->getTrace();
3525
 
3526
  if( !empty($trace) ) {
3527
+
3528
+ foreach( $trace as $index=> $call ) {
3529
  if( isset($call['function']) ) {
3530
  // Which calls should we not add the player and links...
3531
  switch( $call['function'] ) {
powerpressadmin-basic.php CHANGED
@@ -151,8 +151,8 @@ jQuery(document).ready(function($) {
151
  <li><a href="#tab2"><span><?php echo htmlspecialchars(__('Services & Stats', 'powerpress')); ?></span></a></li>
152
  <li><a href="#tab3"><span><?php echo htmlspecialchars(__('Website', '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(__('Google Play', 'powerpress')); ?></span></a></li>
156
  <li><a href="#tab7"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
157
  <li><a href="#tab-dest"><span><?php echo htmlspecialchars(__('Destinations', 'powerpress')); ?></span></a></li>
158
  </ul>
@@ -262,17 +262,17 @@ jQuery(document).ready( function() {
262
  <div style="margin-left: 50px;" >
263
  <div>
264
  <input type="checkbox" name="NULL[import_podcast]" value="1" checked disabled />
265
- <strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_import_feed.php'); ?>"><?php echo __('Import Podcast', 'powerpress'); ?></a></strong> <?php echo powerpressadmin_new(); ?> -
266
  <?php echo __('Import podcast feed from SoundCloud, LibSyn, PodBean or other podcast service.', 'powerpress'); ?>
267
  </div>
268
  <div>
269
  <input type="checkbox" name="NULL[migrate_media]" value="1" checked disabled />
270
- <strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_migrate.php'); ?>"><?php echo __('Migrate Media', 'powerpress'); ?></a></strong> <?php echo powerpressadmin_new(); ?> -
271
  <?php echo __('Migrate media files to Blubrry Podcast Media Hosting with only a few clicks.', 'powerpress'); ?>
272
  </div>
273
  <div>
274
  <input type="checkbox" name="NULL[podcasting_seo]" value="1" checked disabled />
275
- <strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_search.php'); ?>"><?php echo __('Podcasting SEO', 'powerpress'); ?></a></strong> <?php echo powerpressadmin_new(); ?> -
276
  <?php echo __('Select from 3 different web based audio players.', 'powerpress'); ?>
277
  </div>
278
 
@@ -509,7 +509,7 @@ function powerpressadmin_edit_entry_options($General)
509
  (<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
510
 
511
  <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>
512
- (<?php echo __('Override the default ordering of episodes on the iTunes and Google Play Music podcast directories', 'powerpress'); ?>)</p>
513
  <em><strong><?php echo __('If conflicting values are present the directories will use the default ordering.', 'powerpress'); ?></strong></em><br />
514
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
515
 
@@ -519,11 +519,11 @@ function powerpressadmin_edit_entry_options($General)
519
  $linkoptions = array('false'=>__('Hide Field', 'powerpress'),
520
  1=>__('Show Field', 'powerpress') );
521
 
522
- while( list($value,$desc) = each($linkoptions) )
523
  echo "\t<option value=\"$value\"". ( !empty($General['episode_box_itunes_title']) && $General['episode_box_itunes_title'] == $value ?' selected':''). ">$desc</option>\n";
524
 
525
  ?>
526
- </select> <?php echo __('iTunes Episode Title Field', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
527
  <em><strong><?php echo __('Specify iTunes episode title separate from podcast feed title.', 'powerpress'); ?></strong></em>
528
  <?php } // end episode_box_itunes_title ?>
529
 
@@ -533,16 +533,16 @@ while( list($value,$desc) = each($linkoptions) )
533
  $linkoptions = array('false'=>__('Hide Field', 'powerpress'),
534
  1=>__('Show Field', 'powerpress') );
535
 
536
- while( list($value,$desc) = each($linkoptions) )
537
  echo "\t<option value=\"$value\"". ( !empty($General['episode_box_itunes_nst']) && $General['episode_box_itunes_nst'] == $value ?' selected':''). ">$desc</option>\n";
538
 
539
  ?>
540
- </select> <?php echo __('iTunes Episode Number, Season and Type Fields', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
541
  <em><strong><?php echo __('Enter specifics about episode including episode number, season number and type (full, trailer, or bonus).', 'powerpress'); ?></strong></em>
542
  <?php } // end episode_box_itunes_title ?>
543
 
544
- <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>
545
- (<?php echo __('Display selected episode at top of your iTunes and Google Play Music directory listings', 'powerpress'); ?>)</p>
546
  <em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
547
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
548
 
@@ -623,7 +623,7 @@ SelectEmbedField(<?php echo $General['episode_box_embed']; ?>);
623
  <?php
624
  $options = array(0=>__('Auto detect file size', 'powerpress'), 1=>__('User specify', 'powerpress') );
625
 
626
- while( list($value,$desc) = each($options) )
627
  echo "\t<option value=\"$value\"". ($General['set_size']==$value?' selected':''). ">$desc</option>\n";
628
 
629
  ?>
@@ -639,7 +639,7 @@ while( list($value,$desc) = each($options) )
639
  <?php
640
  $options = array(0=>__('Auto detect duration', 'powerpress'), 1=>__('User specify', 'powerpress'), -1=>__('Not specified (not recommended)', 'powerpress') );
641
 
642
- while( list($value,$desc) = each($options) )
643
  echo "\t<option value=\"$value\"". ($General['set_duration']==$value?' selected':''). ">$desc</option>\n";
644
 
645
  ?>
@@ -658,7 +658,7 @@ while( list($value,$desc) = each($options) )
658
  <?php
659
  $options = array(0=>__('Disabled (default)', 'powerpress'), 1=>__('First media link found in post content', 'powerpress'), 2=>__('Last media link found in post content', 'powerpress') );
660
 
661
- while( list($value,$desc) = each($options) )
662
  echo "\t<option value=\"$value\"". ($General['auto_enclose']==$value?' selected':''). ">$desc</option>\n";
663
 
664
  ?>
@@ -676,7 +676,7 @@ while( list($value,$desc) = each($options) )
676
  <?php
677
  $options = array(0=>__('No (default)', 'powerpress'), 1=>__('Yes', 'powerpress') );
678
  $current_value = (!empty($General['hide_warnings'])?$General['hide_warnings']:0);
679
- while( list($value,$desc) = each($options) )
680
  echo "\t<option value=\"$value\"". ($current_value==$value?' selected':''). ">$desc</option>\n";
681
 
682
  ?>
@@ -705,7 +705,7 @@ while( list($value,$desc) = each($options) )
705
  $options = array(0=>__('Default WordPress Behavior', 'powerpress'), 1=>__('Match Feed Name to Page/Category', 'powerpress') );
706
  $current_value = (!empty($General['permalink_feeds_only'])?$General['permalink_feeds_only']:0);
707
 
708
- while( list($value,$desc) = each($options) )
709
  echo "\t<option value=\"$value\"". ($current_value==$value?' selected':''). ">$desc</option>\n";
710
 
711
  ?>
@@ -743,7 +743,7 @@ function powerpressadmin_edit_podpress_options($General)
743
  <?php
744
  $options = array(0=>__('Ignore', 'powerpress'), 1=>__('Include in Posts and Feeds', 'powerpress') );
745
 
746
- while( list($value,$desc) = each($options) )
747
  echo "\t<option value=\"$value\"". ($General['process_podpress']==$value?' selected':''). ">$desc</option>\n";
748
 
749
  ?>
@@ -760,7 +760,7 @@ while( list($value,$desc) = each($options) )
760
  <?php
761
  $options = array(0=>__('Hide', 'powerpress'), 1=>__('Display', 'powerpress') );
762
 
763
- while( list($value,$desc) = each($options) )
764
  echo "\t<option value=\"$value\"". ($General['podpress_stats']==$value?' selected':''). ">$desc</option>\n";
765
 
766
  ?>
@@ -818,7 +818,7 @@ function powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs =
818
  }
819
 
820
  ?>
821
- <h3><?php echo __('Google Play Settings', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></h3>
822
  <table class="form-table">
823
  <tr valign="top">
824
  <th scope="row">
@@ -864,7 +864,7 @@ function powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs =
864
  <?php
865
  $explicit = array(0=> __('No - display nothing', 'powerpress'), 1=>__('Yes - explicit content', 'powerpress') );
866
 
867
- while( list($value,$desc) = each($explicit) )
868
  echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_explicit']==$value?' selected':''). ">$desc</option>\n";
869
 
870
  ?>
@@ -886,7 +886,7 @@ $MoreCategories = false;
886
  $Categories = powerpress_googleplay_categories();
887
 
888
  echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
889
- while( list($value,$desc) = each($Categories) )
890
  echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_cat']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
891
 
892
  ?>
@@ -1161,7 +1161,7 @@ function powerpressadmin_appearance($General=false, $Feed = false)
1161
  $Players = array('podcast'=>__('Default Podcast (podcast)', 'powerpress') );
1162
  if( isset($General['custom_feeds']) )
1163
  {
1164
- while( list($podcast_slug, $podcast_title) = each($General['custom_feeds']) )
1165
  {
1166
  if( $podcast_slug == 'podcast' )
1167
  continue;
@@ -1281,7 +1281,7 @@ function powerpressadmin_appearance($General=false, $Feed = false)
1281
 
1282
  <tr valign="top">
1283
  <th scope="row">
1284
- <?php echo __('Subscribe Links', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></th>
1285
  <td>
1286
  <p style="padding-top: 8px;"><label><input type="checkbox" name="General[subscribe_links]" value="1" <?php if( $General['subscribe_links'] == 1 ) echo 'checked '; ?>/>
1287
  <?php echo __('Display subscribe links below player and media links.', 'powerpress'); ?></label></p>
@@ -1298,7 +1298,7 @@ function powerpressadmin_appearance($General=false, $Feed = false)
1298
  <p><a href="<?php echo 'https://linkmaker.itunes.apple.com/?q='.urlencode( get_bloginfo('name') ); ?>&amp;media=podcasts" target="_blank"><?php echo __('Find your iTunes Subscription URL', 'powerpress'); ?></a></p>
1299
  </div>
1300
 
1301
- <p><input type="checkbox" name="NULL[subscribe_feature_android]" value="1" checked disabled /> <label><?php echo __('Subscribe on Android', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
1302
  <div style="margin-left: 24px;">
1303
  <p><?php echo __('Link to your one click Subscribe on Android URL.', 'powerpress'); ?></p>
1304
  <p><a href="http://subscribeonandroid.com/podcasters/" target="_blank"><?php echo __('Learn more about Subscribe on Android', 'powerpress'); ?></a></p>
@@ -1309,7 +1309,7 @@ function powerpressadmin_appearance($General=false, $Feed = false)
1309
  <p><?php echo __('Link to your podcast RSS feed.', 'powerpress'); ?></p>
1310
  </div>
1311
 
1312
- <p><input type="checkbox" id="subscribe_feature_email" name="General[subscribe_feature_email]" value="1" <?php if( !empty($General['subscribe_feature_email']) ) echo 'checked '; ?>/> <label for="subscribe_feature_email"><?php echo __('Subscribe By Email', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
1313
  <div style="margin-left: 24px;">
1314
  <p><?php echo __('Link to your one click Subscribe by Email URL.', 'powerpress'); ?></p>
1315
  <p>
@@ -1320,11 +1320,14 @@ function powerpressadmin_appearance($General=false, $Feed = false)
1320
  </p>
1321
  </div>
1322
 
1323
- <p><input type="hidden" name="General[subscribe_feature_gp]" value="0" /><input type="checkbox" id="subscribe_feature_gp" name="General[subscribe_feature_gp]" value="1" <?php if( !empty($General['subscribe_feature_gp']) ) echo 'checked '; ?>/> <label for="subscribe_feature_gp"><?php echo __('Subscribe on Google Play', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
 
1324
 
1325
- <p><input type="hidden" name="General[subscribe_feature_stitcher]" value="0" /><input type="checkbox" id="subscribe_feature_stitcher" name="General[subscribe_feature_stitcher]" value="1" <?php if( !empty($General['subscribe_feature_stitcher']) ) echo 'checked '; ?>/> <label for="subscribe_feature_stitcher"><?php echo __('Subscribe on Stitcher', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
1326
 
1327
- <p><input type="hidden" name="General[subscribe_feature_tunein]" value="0" /><input type="checkbox" id="subscribe_feature_tunein" name="General[subscribe_feature_tunein]" value="1" <?php if( !empty($General['subscribe_feature_tunein']) ) echo 'checked '; ?>/> <label for="subscribe_feature_tunein"><?php echo __('Subscribe on TuneIn', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
 
 
1328
 
1329
  </td>
1330
  </tr>
@@ -1349,7 +1352,7 @@ $linkoptions = array(0=>__('No, everything is working', 'powerpress'),
1349
  3=>__('Yes, excluding excerpts', 'powerpress'),
1350
  4=>__('Yes, wp_head check', 'powerpress') );
1351
 
1352
- while( list($value,$desc) = each($linkoptions) )
1353
  echo "\t<option value=\"$value\"". ($General['player_aggressive']==$value?' selected':''). ">$desc</option>\n";
1354
 
1355
  ?>
@@ -1450,7 +1453,7 @@ function powerpressadmin_edit_funding($FeedSettings = false, $feed_slug='podcast
1450
  <table class="form-table">
1451
  <tr valign="top">
1452
  <th scope="row">
1453
- <?php echo __('Donate Link', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></th>
1454
  <td>
1455
  <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 '; ?>/>
1456
  <?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>
@@ -1502,7 +1505,7 @@ function powerpressadmin_edit_tv($FeedSettings = false, $feed_slug='podcast', $c
1502
  );
1503
 
1504
 
1505
- while( list($rating,$title) = each($Ratings) )
1506
  {
1507
  $tip = $RatingsTips[ $rating ];
1508
  ?>
@@ -1582,7 +1585,7 @@ function powerpressadmin_edit_artwork($FeedSettings, $General)
1582
  <table class="form-table">
1583
  <tr valign="top">
1584
  <th scope="row">
1585
- <?php echo __('Google Play Image', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
1586
  </th>
1587
  <td>
1588
  <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="255" />
151
  <li><a href="#tab2"><span><?php echo htmlspecialchars(__('Services & Stats', 'powerpress')); ?></span></a></li>
152
  <li><a href="#tab3"><span><?php echo htmlspecialchars(__('Website', '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(__('Apple', 'powerpress')); ?></span></a></li>
155
+ <li><a href="#tab6"><span><?php echo htmlspecialchars(__('Google', 'powerpress')); ?></span></a></li>
156
  <li><a href="#tab7"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
157
  <li><a href="#tab-dest"><span><?php echo htmlspecialchars(__('Destinations', 'powerpress')); ?></span></a></li>
158
  </ul>
262
  <div style="margin-left: 50px;" >
263
  <div>
264
  <input type="checkbox" name="NULL[import_podcast]" value="1" checked disabled />
265
+ <strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_import_feed.php'); ?>"><?php echo __('Import Podcast', 'powerpress'); ?></a></strong> -
266
  <?php echo __('Import podcast feed from SoundCloud, LibSyn, PodBean or other podcast service.', 'powerpress'); ?>
267
  </div>
268
  <div>
269
  <input type="checkbox" name="NULL[migrate_media]" value="1" checked disabled />
270
+ <strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_migrate.php'); ?>"><?php echo __('Migrate Media', 'powerpress'); ?></a></strong> -
271
  <?php echo __('Migrate media files to Blubrry Podcast Media Hosting with only a few clicks.', 'powerpress'); ?>
272
  </div>
273
  <div>
274
  <input type="checkbox" name="NULL[podcasting_seo]" value="1" checked disabled />
275
+ <strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_search.php'); ?>"><?php echo __('Podcasting SEO', 'powerpress'); ?></a></strong> -
276
  <?php echo __('Select from 3 different web based audio players.', 'powerpress'); ?>
277
  </div>
278
 
509
  (<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
510
 
511
  <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>
512
+ (<?php echo __('Override the default ordering of episodes on the Apple and Google Podcast directories', 'powerpress'); ?>)</p>
513
  <em><strong><?php echo __('If conflicting values are present the directories will use the default ordering.', 'powerpress'); ?></strong></em><br />
514
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
515
 
519
  $linkoptions = array('false'=>__('Hide Field', 'powerpress'),
520
  1=>__('Show Field', 'powerpress') );
521
 
522
+ foreach( $linkoptions as $value => $desc )
523
  echo "\t<option value=\"$value\"". ( !empty($General['episode_box_itunes_title']) && $General['episode_box_itunes_title'] == $value ?' selected':''). ">$desc</option>\n";
524
 
525
  ?>
526
+ </select> <?php echo __('iTunes Episode Title Field', 'powerpress'); ?></label> </p>
527
  <em><strong><?php echo __('Specify iTunes episode title separate from podcast feed title.', 'powerpress'); ?></strong></em>
528
  <?php } // end episode_box_itunes_title ?>
529
 
533
  $linkoptions = array('false'=>__('Hide Field', 'powerpress'),
534
  1=>__('Show Field', 'powerpress') );
535
 
536
+ foreach( $linkoptions as $value => $desc )
537
  echo "\t<option value=\"$value\"". ( !empty($General['episode_box_itunes_nst']) && $General['episode_box_itunes_nst'] == $value ?' selected':''). ">$desc</option>\n";
538
 
539
  ?>
540
+ </select> <?php echo __('iTunes Episode Number, Season and Type Fields', 'powerpress'); ?></label> </p>
541
  <em><strong><?php echo __('Enter specifics about episode including episode number, season number and type (full, trailer, or bonus).', 'powerpress'); ?></strong></em>
542
  <?php } // end episode_box_itunes_title ?>
543
 
544
+ <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 Apple and Google Podcasts', 'powerpress'); ?></label>
545
+ (<?php echo __('Display selected episode at top of your Apple and Google Podcasts listings', 'powerpress'); ?>)</p>
546
  <em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
547
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
548
 
623
  <?php
624
  $options = array(0=>__('Auto detect file size', 'powerpress'), 1=>__('User specify', 'powerpress') );
625
 
626
+ foreach( $options as $value => $desc )
627
  echo "\t<option value=\"$value\"". ($General['set_size']==$value?' selected':''). ">$desc</option>\n";
628
 
629
  ?>
639
  <?php
640
  $options = array(0=>__('Auto detect duration', 'powerpress'), 1=>__('User specify', 'powerpress'), -1=>__('Not specified (not recommended)', 'powerpress') );
641
 
642
+ foreach( $options as $value => $desc )
643
  echo "\t<option value=\"$value\"". ($General['set_duration']==$value?' selected':''). ">$desc</option>\n";
644
 
645
  ?>
658
  <?php
659
  $options = array(0=>__('Disabled (default)', 'powerpress'), 1=>__('First media link found in post content', 'powerpress'), 2=>__('Last media link found in post content', 'powerpress') );
660
 
661
+ foreach( $options as $value => $desc )
662
  echo "\t<option value=\"$value\"". ($General['auto_enclose']==$value?' selected':''). ">$desc</option>\n";
663
 
664
  ?>
676
  <?php
677
  $options = array(0=>__('No (default)', 'powerpress'), 1=>__('Yes', 'powerpress') );
678
  $current_value = (!empty($General['hide_warnings'])?$General['hide_warnings']:0);
679
+ foreach( $options as $value => $desc )
680
  echo "\t<option value=\"$value\"". ($current_value==$value?' selected':''). ">$desc</option>\n";
681
 
682
  ?>
705
  $options = array(0=>__('Default WordPress Behavior', 'powerpress'), 1=>__('Match Feed Name to Page/Category', 'powerpress') );
706
  $current_value = (!empty($General['permalink_feeds_only'])?$General['permalink_feeds_only']:0);
707
 
708
+ foreach( $options as $value => $desc )
709
  echo "\t<option value=\"$value\"". ($current_value==$value?' selected':''). ">$desc</option>\n";
710
 
711
  ?>
743
  <?php
744
  $options = array(0=>__('Ignore', 'powerpress'), 1=>__('Include in Posts and Feeds', 'powerpress') );
745
 
746
+ foreach( $options as $value => $desc )
747
  echo "\t<option value=\"$value\"". ($General['process_podpress']==$value?' selected':''). ">$desc</option>\n";
748
 
749
  ?>
760
  <?php
761
  $options = array(0=>__('Hide', 'powerpress'), 1=>__('Display', 'powerpress') );
762
 
763
+ foreach( $options as $value => $desc )
764
  echo "\t<option value=\"$value\"". ($General['podpress_stats']==$value?' selected':''). ">$desc</option>\n";
765
 
766
  ?>
818
  }
819
 
820
  ?>
821
+ <h3><?php echo __('Google Play Settings', 'powerpress'); ?> </h3>
822
  <table class="form-table">
823
  <tr valign="top">
824
  <th scope="row">
864
  <?php
865
  $explicit = array(0=> __('No - display nothing', 'powerpress'), 1=>__('Yes - explicit content', 'powerpress') );
866
 
867
+ foreach( $explicit as $value => $desc )
868
  echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_explicit']==$value?' selected':''). ">$desc</option>\n";
869
 
870
  ?>
886
  $Categories = powerpress_googleplay_categories();
887
 
888
  echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
889
+ foreach( $Categories as $value => $desc )
890
  echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_cat']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
891
 
892
  ?>
1161
  $Players = array('podcast'=>__('Default Podcast (podcast)', 'powerpress') );
1162
  if( isset($General['custom_feeds']) )
1163
  {
1164
+ foreach( $General['custom_feeds'] as $podcast_slug => $podcast_title )
1165
  {
1166
  if( $podcast_slug == 'podcast' )
1167
  continue;
1281
 
1282
  <tr valign="top">
1283
  <th scope="row">
1284
+ <?php echo __('Subscribe Links', 'powerpress'); ?> </th>
1285
  <td>
1286
  <p style="padding-top: 8px;"><label><input type="checkbox" name="General[subscribe_links]" value="1" <?php if( $General['subscribe_links'] == 1 ) echo 'checked '; ?>/>
1287
  <?php echo __('Display subscribe links below player and media links.', 'powerpress'); ?></label></p>
1298
  <p><a href="<?php echo 'https://linkmaker.itunes.apple.com/?q='.urlencode( get_bloginfo('name') ); ?>&amp;media=podcasts" target="_blank"><?php echo __('Find your iTunes Subscription URL', 'powerpress'); ?></a></p>
1299
  </div>
1300
 
1301
+ <p><input type="checkbox" name="NULL[subscribe_feature_android]" value="1" checked disabled /> <label><?php echo __('Subscribe on Android', 'powerpress'); ?></label></p>
1302
  <div style="margin-left: 24px;">
1303
  <p><?php echo __('Link to your one click Subscribe on Android URL.', 'powerpress'); ?></p>
1304
  <p><a href="http://subscribeonandroid.com/podcasters/" target="_blank"><?php echo __('Learn more about Subscribe on Android', 'powerpress'); ?></a></p>
1309
  <p><?php echo __('Link to your podcast RSS feed.', 'powerpress'); ?></p>
1310
  </div>
1311
 
1312
+ <p><input type="checkbox" id="subscribe_feature_email" name="General[subscribe_feature_email]" value="1" <?php if( !empty($General['subscribe_feature_email']) ) echo 'checked '; ?>/> <label for="subscribe_feature_email"><?php echo __('Subscribe By Email', 'powerpress'); ?></label> </p>
1313
  <div style="margin-left: 24px;">
1314
  <p><?php echo __('Link to your one click Subscribe by Email URL.', 'powerpress'); ?></p>
1315
  <p>
1320
  </p>
1321
  </div>
1322
 
1323
+ <p><input type="hidden" name="General[subscribe_feature_gp]" value="0" /><input type="checkbox" id="subscribe_feature_gp" name="General[subscribe_feature_gp]" value="1" <?php if( !empty($General['subscribe_feature_gp']) ) echo 'checked '; ?>/> <label for="subscribe_feature_gp"><?php echo __('Subscribe on Google Podcasts', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
1324
+ <p><?php echo __('Note: Subscribe on Android includes Google Podcasts.', 'powerpress'); ?>
1325
 
1326
+ <p><input type="hidden" name="General[subscribe_feature_stitcher]" value="0" /><input type="checkbox" id="subscribe_feature_stitcher" name="General[subscribe_feature_stitcher]" value="1" <?php if( !empty($General['subscribe_feature_stitcher']) ) echo 'checked '; ?>/> <label for="subscribe_feature_stitcher"><?php echo __('Subscribe on Stitcher', 'powerpress'); ?></label></p>
1327
 
1328
+ <p><input type="hidden" name="General[subscribe_feature_tunein]" value="0" /><input type="checkbox" id="subscribe_feature_tunein" name="General[subscribe_feature_tunein]" value="1" <?php if( !empty($General['subscribe_feature_tunein']) ) echo 'checked '; ?>/> <label for="subscribe_feature_tunein"><?php echo __('Subscribe on TuneIn', 'powerpress'); ?></label></p>
1329
+
1330
+ <p><input type="hidden" name="General[subscribe_feature_spotify]" value="0" /><input type="checkbox" id="subscribe_feature_spotify" name="General[subscribe_feature_spotify]" value="1" <?php if( !empty($General['subscribe_feature_spotify']) ) echo 'checked '; ?>/> <label for="subscribe_feature_spotify"><?php echo __('Subscribe on Spotify', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
1331
 
1332
  </td>
1333
  </tr>
1352
  3=>__('Yes, excluding excerpts', 'powerpress'),
1353
  4=>__('Yes, wp_head check', 'powerpress') );
1354
 
1355
+ foreach( $linkoptions as $value => $desc )
1356
  echo "\t<option value=\"$value\"". ($General['player_aggressive']==$value?' selected':''). ">$desc</option>\n";
1357
 
1358
  ?>
1453
  <table class="form-table">
1454
  <tr valign="top">
1455
  <th scope="row">
1456
+ <?php echo __('Donate Link', 'powerpress'); ?> </th>
1457
  <td>
1458
  <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 '; ?>/>
1459
  <?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>
1505
  );
1506
 
1507
 
1508
+ foreach( $Ratings as $rating => $title )
1509
  {
1510
  $tip = $RatingsTips[ $rating ];
1511
  ?>
1585
  <table class="form-table">
1586
  <tr valign="top">
1587
  <th scope="row">
1588
+ <?php echo __('Google Play Image', 'powerpress'); ?>
1589
  </th>
1590
  <td>
1591
  <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="255" />
powerpressadmin-categoryfeeds.php CHANGED
@@ -67,7 +67,7 @@ function powerpress_admin_categoryfeeds()
67
  $Feeds = $General['custom_cat_feeds'];
68
 
69
  $count = 0;
70
- while( list($null, $cat_ID) = each($Feeds) )
71
  {
72
  if( empty($cat_ID) )
73
  continue;
67
  $Feeds = $General['custom_cat_feeds'];
68
 
69
  $count = 0;
70
+ foreach( $Feeds as $null => $cat_ID )
71
  {
72
  if( empty($cat_ID) )
73
  continue;
powerpressadmin-customfeeds.php CHANGED
@@ -72,7 +72,7 @@ function powerpress_admin_customfeeds()
72
  asort($Feeds, SORT_STRING); // Sort feeds
73
 
74
  $count = 0;
75
- while( list($feed_slug, $feed_title) = each($Feeds ) )
76
  {
77
  $feed_slug = esc_attr($feed_slug); // Precaution
78
  $episode_total = powerpress_admin_episodes_per_feed($feed_slug);
72
  asort($Feeds, SORT_STRING); // Sort feeds
73
 
74
  $count = 0;
75
+ foreach( $Feeds as $feed_slug => $feed_title )
76
  {
77
  $feed_slug = esc_attr($feed_slug); // Precaution
78
  $episode_total = powerpress_admin_episodes_per_feed($feed_slug);
powerpressadmin-dashboard.php CHANGED
@@ -160,7 +160,7 @@ function powerpress_dashboard_stats_content()
160
  {
161
  $success = false;
162
  $api_url_array = powerpress_get_api_array();
163
- while( list($index,$api_url) = each($api_url_array) )
164
  {
165
  $req_url = sprintf('%s/stats/%s/summary.html?nobody=1', rtrim($api_url, '/'), $Keyword);
166
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
160
  {
161
  $success = false;
162
  $api_url_array = powerpress_get_api_array();
163
+ foreach( $api_url_array as $index=> $api_url )
164
  {
165
  $req_url = sprintf('%s/stats/%s/summary.html?nobody=1', rtrim($api_url, '/'), $Keyword);
166
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
powerpressadmin-defaults.php CHANGED
@@ -117,7 +117,7 @@ jQuery(document).ready(function($) {
117
  if( $Step > 1 ) { // Only display if we have episdoes in the feed!
118
  // TODO: Need to include the settings_tab_destinations.php but only the iTunes option to keep things simple
119
  }
120
- // iTunes settings (in simple mode of course)
121
  powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
122
 
123
  powerpressadmin_edit_artwork($FeedSettings, $General);
117
  if( $Step > 1 ) { // Only display if we have episdoes in the feed!
118
  // TODO: Need to include the settings_tab_destinations.php but only the iTunes option to keep things simple
119
  }
120
+ // Apple settings (in simple mode of course)
121
  powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
122
 
123
  powerpressadmin_edit_artwork($FeedSettings, $General);
powerpressadmin-diagnostics.php CHANGED
@@ -291,7 +291,7 @@
291
  $current_plugins = get_option('active_plugins');
292
  $message .= "<br />\n";
293
  $message .= '<strong>'.__('Active Plugins', 'powerpress') ."</strong><br />\n";
294
- while( list($null,$plugin_path) = each($current_plugins) )
295
  {
296
  $plugin_data = get_plugin_data( rtrim(WP_PLUGIN_DIR, '/\\'). '/'. rtrim($plugin_path, '\\/'), false, false ); //Do not apply markup/translate as it'll be cached.
297
 
291
  $current_plugins = get_option('active_plugins');
292
  $message .= "<br />\n";
293
  $message .= '<strong>'.__('Active Plugins', 'powerpress') ."</strong><br />\n";
294
+ foreach( $current_plugins as $null=> $plugin_path )
295
  {
296
  $plugin_data = get_plugin_data( rtrim(WP_PLUGIN_DIR, '/\\'). '/'. rtrim($plugin_path, '\\/'), false, false ); //Do not apply markup/translate as it'll be cached.
297
 
powerpressadmin-editfeed.php CHANGED
@@ -133,7 +133,7 @@ function powerpress_admin_capabilities()
133
  $capnames = apply_filters( 'powerpress_admin_capabilities', array_unique($capnames) );
134
 
135
  $remove_keys = array('level_0', 'level_1', 'level_2', 'level_3', 'level_4', 'level_5', 'level_6', 'level_7', 'level_8', 'level_9', 'level_10');
136
- while( list($null,$key) = each($remove_keys) )
137
  unset($capnames[ $key ]);
138
  asort($capnames);
139
  return $capnames;
@@ -252,8 +252,8 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
252
  <div id="powerpress_settings_page" class="powerpress_tabbed_content">
253
  <ul class="powerpress_settings_tabs">
254
  <li><a href="#feed_tab_feed"><span><?php echo htmlspecialchars(__('Feed', 'powerpress')); ?></span></a></li>
255
- <li><a href="#feed_tab_itunes"><span><?php echo htmlspecialchars(__('iTunes', 'powerpress')); ?></span></a></li>
256
- <li><a href="#feed_tab_googleplay"><span><?php echo htmlspecialchars(__('Google Play', 'powerpress')); ?></span></a></li>
257
  <li><a href="#feed_tab_artwork"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
258
  <?php if( in_array($FeedAttribs['type'], array('category', 'ttid', 'post_type', 'channel') ) ) { ?>
259
  <li><a href="#feed_tab_appearance"><span><?php echo htmlspecialchars(__('Website', 'powerpress')); ?></span></a></li>
@@ -391,7 +391,7 @@ function powerpressadmin_edit_feed_general($FeedSettings, $General)
391
  else if( isset($General['custom_feeds'])&& is_array($General['custom_feeds']) )
392
  $Feeds += $General['custom_feeds'];
393
 
394
- while( list($feed_slug, $feed_title) = each($Feeds) )
395
  {
396
  if( empty($feed_title) )
397
  $feed_title = $feed_slug;
@@ -421,7 +421,7 @@ function powerpressadmin_edit_feed_general($FeedSettings, $General)
421
  <th scope="row">
422
  <?php echo __('Feed Discovery', 'powerpress'); ?></th>
423
  <td>
424
- <p style="margin-top: 10px;"><label><input type="checkbox" name="General[feed_links]" value="1" <?php if( !empty($General['feed_links']) && $General['feed_links'] == 1 ) echo 'checked '; ?>/> <?php echo __('Exclude podcast feed links in HTML headers.', 'powerpress'); ?></label></p>
425
  <p><?php echo __('Adds "feed discovery" links to your web site\'s headers allowing web browsers and feed readers to auto-detect your podcast feeds.', 'powerpress'); ?></p>
426
  </td>
427
  </tr>
@@ -570,22 +570,16 @@ if( $FeedAttribs['type'] != 'general' ) // All types exept general settings
570
  <?php } ?>
571
  </td>
572
  </tr>
 
573
 
574
  <tr valign="top">
575
  <th scope="row">
576
- <?php echo __('FeedBurner Feed URL', 'powerpress'); ?><br />
577
- <span style="font-size: 85%; margin-left: 5px;"><?php echo __('Recommendation: leave blank', 'powerpress'); ?></span>
578
  </th>
579
  <td>
580
  <input type="text" name="Feed[feed_redirect_url]" style="width: 60%;" value="<?php echo esc_attr(!empty($FeedSettings['feed_redirect_url'])? $FeedSettings['feed_redirect_url']:''); ?>" maxlength="100" /> (<?php echo __('leave blank to use built-in feed', 'powerpress'); ?>)
581
-
582
- <p style="margin-top: 0px; margin-bottomd: 0;" class="description"><?php echo powerpressadmin_notice( __('NOTE: FeedBurner is not required for podcasting.', 'powerpress') ); ?> <br />
583
- <?php echo powerpressadmin_notice( __('No support is available from blubrry if you are using Feedburner or other feed hosted services.', 'powerpress') ); ?><br />
584
- <a href="http://create.blubrry.com/manual/syndicating-your-podcast-rss-feeds/feedburner-for-podcasting/" target="_blank"><?php echo __('Learn more about FeedBurner and Podcasitng', 'powerpress'); ?></a>
585
- </p>
586
- <p><?php echo __('Use this option to redirect this feed to a hosted feed service such as FeedBurner.', 'powerpress'); ?></p>
587
-
588
- <p><?php echo __('We recommend that you disable FeedBurner SmartCast when using FeedBurner with PowerPress.', 'powerpress'); ?></p>
589
  <?php
590
  $link = $feed_link;
591
  if( strstr($link, '?') )
@@ -597,8 +591,6 @@ else
597
  </td>
598
  </tr>
599
 
600
- <?php } // End not general settings ?>
601
-
602
  <tr valign="top">
603
  <th scope="row">
604
  <?php echo __('Show the most recent', 'powerpress'); ?>
@@ -615,7 +607,7 @@ else
615
  ?>
616
  <tr valign="top">
617
  <th scope="row">
618
- <?php echo __('Feed Episode Maximizer', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
619
  </th>
620
  <td>
621
  <p><input type="checkbox" name="Feed[maximize_feed]" value="1" <?php if( !empty($FeedSettings['maximize_feed']) ) echo 'checked'; ?> />
@@ -637,7 +629,7 @@ else
637
  $Languages = powerpress_languages();
638
 
639
  echo '<option value="">'. __('Blog Default Language', 'powerpress') .'</option>';
640
- while( list($value,$desc) = each($Languages) )
641
  echo "\t<option value=\"$value\"". ($FeedSettings['rss_language']==$value?' selected':''). ">". esc_attr($desc)."</option>\n";
642
  ?>
643
  </select>
@@ -778,7 +770,7 @@ function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs
778
 
779
  ?>
780
 
781
- <h3><?php echo __('iTunes Settings', 'powerpress'); ?></h3>
782
  <table class="form-table">
783
  <tr valign="top">
784
  <th scope="row">
@@ -861,7 +853,7 @@ $Categories = powerpress_itunes_categories(true);
861
 
862
  echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
863
 
864
- while( list($value,$desc) = each($Categories) )
865
  echo "\t<option value=\"$value\"". ($FeedSettings['itunes_cat_1']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
866
 
867
  reset($Categories);
@@ -892,7 +884,7 @@ reset($Categories);
892
 
893
 
894
  echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
895
- while( list($value,$desc) = each($Categories) )
896
  echo "\t<option value=\"$value\"". ($FeedSettings['itunes_cat_2']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
897
 
898
  reset($Categories);
@@ -917,7 +909,7 @@ reset($Categories);
917
  <?php
918
 
919
  echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
920
- while( list($value,$desc) = each($Categories) )
921
  echo "\t<option value=\"$value\"". ($FeedSettings['itunes_cat_3']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
922
 
923
  reset($Categories);
@@ -946,7 +938,7 @@ reset($Categories);
946
  <?php
947
  $explicit = array(0=> __('No option selected', 'powerpress'), 1=>__('Yes - explicit content', 'powerpress'), 2=>__('Clean - no explicit content', 'powerpress'));
948
 
949
- while( list($value,$desc) = each($explicit) )
950
  echo "\t<option value=\"$value\"". ($FeedSettings['itunes_explicit']==$value?' selected':''). (($FeedSettings['itunes_explicit']!=0&&$value==0)?'disabled':''). ">$desc</option>\n";
951
 
952
  ?>
@@ -991,14 +983,13 @@ while( list($value,$desc) = each($explicit) )
991
  <tr valign="top">
992
  <th scope="row">
993
  <?php echo __('iTunes Type', 'powerpress'); ?>
994
- <?php echo powerpressadmin_new(); ?>
995
  </th>
996
  <td>
997
  <select name="Feed[itunes_type]" class="bpp_input_med">
998
  <?php
999
  $types = array(''=> __('No option selected', 'powerpress'), 'episodic'=>__('Episodic (default)', 'powerpress'), 'serial'=>__('Serial', 'powerpress'));
1000
 
1001
- while( list($value,$desc) = each($types) )
1002
  echo "\t<option value=\"$value\"". ($FeedSettings['itunes_type']==$value?' selected':''). ">$desc</option>\n";
1003
 
1004
  ?>
133
  $capnames = apply_filters( 'powerpress_admin_capabilities', array_unique($capnames) );
134
 
135
  $remove_keys = array('level_0', 'level_1', 'level_2', 'level_3', 'level_4', 'level_5', 'level_6', 'level_7', 'level_8', 'level_9', 'level_10');
136
+ foreach( $remove_keys as $null=> $key )
137
  unset($capnames[ $key ]);
138
  asort($capnames);
139
  return $capnames;
252
  <div id="powerpress_settings_page" class="powerpress_tabbed_content">
253
  <ul class="powerpress_settings_tabs">
254
  <li><a href="#feed_tab_feed"><span><?php echo htmlspecialchars(__('Feed', 'powerpress')); ?></span></a></li>
255
+ <li><a href="#feed_tab_itunes"><span><?php echo htmlspecialchars(__('Apple', 'powerpress')); ?></span></a></li>
256
+ <li><a href="#feed_tab_googleplay"><span><?php echo htmlspecialchars(__('Google', 'powerpress')); ?></span></a></li>
257
  <li><a href="#feed_tab_artwork"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
258
  <?php if( in_array($FeedAttribs['type'], array('category', 'ttid', 'post_type', 'channel') ) ) { ?>
259
  <li><a href="#feed_tab_appearance"><span><?php echo htmlspecialchars(__('Website', 'powerpress')); ?></span></a></li>
391
  else if( isset($General['custom_feeds'])&& is_array($General['custom_feeds']) )
392
  $Feeds += $General['custom_feeds'];
393
 
394
+ foreach( $Feeds as $feed_slug=> $feed_title )
395
  {
396
  if( empty($feed_title) )
397
  $feed_title = $feed_slug;
421
  <th scope="row">
422
  <?php echo __('Feed Discovery', 'powerpress'); ?></th>
423
  <td>
424
+ <p style="margin-top: 10px;"><label><input type="checkbox" name="General[feed_links]" value="1" <?php if( !empty($General['feed_links']) && $General['feed_links'] == 1 ) echo 'checked '; ?>/> <?php echo __('Include podcast feed links in HTML headers.', 'powerpress'); ?></label></p>
425
  <p><?php echo __('Adds "feed discovery" links to your web site\'s headers allowing web browsers and feed readers to auto-detect your podcast feeds.', 'powerpress'); ?></p>
426
  </td>
427
  </tr>
570
  <?php } ?>
571
  </td>
572
  </tr>
573
+ <?php } // End not general settings ?>
574
 
575
  <tr valign="top">
576
  <th scope="row">
577
+ <?php echo __('PodcastMirror Feed URL', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?><br />
578
+ <span style="font-size: 85%; margin-left: 5px;"><a href="https://podcastmirror.com" target="_blank"><?php echo __('learn more', 'powerpress'); ?></a></span>
579
  </th>
580
  <td>
581
  <input type="text" name="Feed[feed_redirect_url]" style="width: 60%;" value="<?php echo esc_attr(!empty($FeedSettings['feed_redirect_url'])? $FeedSettings['feed_redirect_url']:''); ?>" maxlength="100" /> (<?php echo __('leave blank to use built-in feed', 'powerpress'); ?>)
582
+ <p><?php echo __('Use this option to mirror your podcast feed to provide fast, scalable subscriptions to your show. Service is FeedBurner compatible.', 'powerpress'); ?></p>
 
 
 
 
 
 
 
583
  <?php
584
  $link = $feed_link;
585
  if( strstr($link, '?') )
591
  </td>
592
  </tr>
593
 
 
 
594
  <tr valign="top">
595
  <th scope="row">
596
  <?php echo __('Show the most recent', 'powerpress'); ?>
607
  ?>
608
  <tr valign="top">
609
  <th scope="row">
610
+ <?php echo __('Feed Episode Maximizer', 'powerpress'); ?>
611
  </th>
612
  <td>
613
  <p><input type="checkbox" name="Feed[maximize_feed]" value="1" <?php if( !empty($FeedSettings['maximize_feed']) ) echo 'checked'; ?> />
629
  $Languages = powerpress_languages();
630
 
631
  echo '<option value="">'. __('Blog Default Language', 'powerpress') .'</option>';
632
+ foreach( $Languages as $value=> $desc )
633
  echo "\t<option value=\"$value\"". ($FeedSettings['rss_language']==$value?' selected':''). ">". esc_attr($desc)."</option>\n";
634
  ?>
635
  </select>
770
 
771
  ?>
772
 
773
+ <h3><?php echo __('Apple Settings', 'powerpress'); ?></h3>
774
  <table class="form-table">
775
  <tr valign="top">
776
  <th scope="row">
853
 
854
  echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
855
 
856
+ foreach( $Categories as $value=> $desc )
857
  echo "\t<option value=\"$value\"". ($FeedSettings['itunes_cat_1']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
858
 
859
  reset($Categories);
884
 
885
 
886
  echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
887
+ foreach( $Categories as $value=> $desc )
888
  echo "\t<option value=\"$value\"". ($FeedSettings['itunes_cat_2']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
889
 
890
  reset($Categories);
909
  <?php
910
 
911
  echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
912
+ foreach( $Categories as $value=> $desc )
913
  echo "\t<option value=\"$value\"". ($FeedSettings['itunes_cat_3']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
914
 
915
  reset($Categories);
938
  <?php
939
  $explicit = array(0=> __('No option selected', 'powerpress'), 1=>__('Yes - explicit content', 'powerpress'), 2=>__('Clean - no explicit content', 'powerpress'));
940
 
941
+ foreach( $explicit as $value=> $desc )
942
  echo "\t<option value=\"$value\"". ($FeedSettings['itunes_explicit']==$value?' selected':''). (($FeedSettings['itunes_explicit']!=0&&$value==0)?'disabled':''). ">$desc</option>\n";
943
 
944
  ?>
983
  <tr valign="top">
984
  <th scope="row">
985
  <?php echo __('iTunes Type', 'powerpress'); ?>
 
986
  </th>
987
  <td>
988
  <select name="Feed[itunes_type]" class="bpp_input_med">
989
  <?php
990
  $types = array(''=> __('No option selected', 'powerpress'), 'episodic'=>__('Episodic (default)', 'powerpress'), 'serial'=>__('Serial', 'powerpress'));
991
 
992
+ foreach( $types as $value=> $desc )
993
  echo "\t<option value=\"$value\"". ($FeedSettings['itunes_type']==$value?' selected':''). ">$desc</option>\n";
994
 
995
  ?>
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) )
15
  {
16
  list($url) = @explode("\n", $row['meta_value'], 2 );
17
  $url = trim($url);
@@ -45,7 +45,7 @@
45
 
46
  $FoundArray = powerpressadmin_find_replace_get_enclosures($FindReplace['find_string']);
47
 
48
- while( list($meta_id, $row) = each($FoundArray) )
49
  {
50
  // powerpress_get_post_meta
51
  $meta_value = get_post_meta($row['post_id'], $row['meta_key'], true);
@@ -257,7 +257,7 @@ dt {
257
 
258
  <ol>
259
  <?php
260
- while( list($meta_id, $row) = each($FindReplaceResults) )
261
  {
262
  $post_view_link = '<a href="' . get_permalink($row['post_id']) . '" target="_blank">' . get_the_title($row['post_id']) . '</a>';
263
  $post_edit_link = '<a href="' . get_edit_post_link($row['post_id']) . '" target="_blank">' . __('Edit Post', 'powerpress') . '</a>';
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
+ foreach( $results_data as $index=> $row )
15
  {
16
  list($url) = @explode("\n", $row['meta_value'], 2 );
17
  $url = trim($url);
45
 
46
  $FoundArray = powerpressadmin_find_replace_get_enclosures($FindReplace['find_string']);
47
 
48
+ foreach( $FoundArray as $meta_id=> $row )
49
  {
50
  // powerpress_get_post_meta
51
  $meta_value = get_post_meta($row['post_id'], $row['meta_key'], true);
257
 
258
  <ol>
259
  <?php
260
+ foreach( $FindReplaceResults as $meta_id=> $row )
261
  {
262
  $post_view_link = '<a href="' . get_permalink($row['post_id']) . '" target="_blank">' . get_the_title($row['post_id']) . '</a>';
263
  $post_edit_link = '<a href="' . get_edit_post_link($row['post_id']) . '" target="_blank">' . __('Edit Post', 'powerpress') . '</a>';
powerpressadmin-jquery.php CHANGED
@@ -186,7 +186,7 @@ function powerpress_admin_jquery_init()
186
  {
187
  $json_data = false;
188
  $api_url_array = powerpress_get_api_array();
189
- while( list($index,$api_url) = each($api_url_array) )
190
  {
191
  $req_url = sprintf('%s/media/%s/%s?format=json', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'], $DeleteFile );
192
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
@@ -209,7 +209,7 @@ function powerpress_admin_jquery_init()
209
 
210
  $json_data = false;
211
  $api_url_array = powerpress_get_api_array();
212
- while( list($index,$api_url) = each($api_url_array) )
213
  {
214
  $req_url = sprintf('%s/media/%s/index.json?quota=true&published=true', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'] );
215
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
@@ -318,7 +318,7 @@ function DeleteMedia(File)
318
  else if( is_array($results) )
319
  {
320
  $PublishedList = false;
321
- while( list($index,$data) = each($results) )
322
  {
323
  if( $index === 'quota' )
324
  {
@@ -486,7 +486,7 @@ function DeleteMedia(File)
486
  $auth = base64_encode( $SaveSettings['blubrry_username'] . ':' . $Password );
487
  $json_data = false;
488
  $api_url_array = powerpress_get_api_array();
489
- while( list($index,$api_url) = each($api_url_array) )
490
  {
491
  $req_url = sprintf('%s/service/index.json', rtrim($api_url, '/') );
492
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'?'. POWERPRESS_BLUBRRY_API_QSA:'');
@@ -524,7 +524,7 @@ function DeleteMedia(File)
524
  else
525
  {
526
  // Get all the programs for this user...
527
- while( list($null,$row) = each($results) )
528
  {
529
  $Programs[ $row['program_keyword'] ] = $row['program_title'];
530
  if( $row['hosting'] === true || $row['hosting'] == 'true' )
@@ -556,7 +556,10 @@ function DeleteMedia(File)
556
  }
557
  else if( count($Programs) == 1 )
558
  {
559
- list($keyword, $title) = each($Programs);
 
 
 
560
  $SaveSettings['blubrry_program_keyword'] = $keyword;
561
  $SaveSettings['blubrry_hosting'] = $ProgramHosting[ $keyword ];
562
  if( !is_bool($SaveSettings['blubrry_hosting']) )
@@ -698,7 +701,7 @@ jQuery(document).ready(function($) {
698
  <select id="blubrry_program_keyword" name="Settings[blubrry_program_keyword]">
699
  <option value=""><?php echo __('Select Program', 'powerpress'); ?></option>
700
  <?php
701
- while( list($value,$desc) = each($Programs) )
702
  echo "\t<option value=\"$value\"". ($Settings['blubrry_program_keyword']==$value?' selected':''). ">$desc</option>\n";
703
  ?>
704
  </select>
@@ -750,7 +753,7 @@ while( list($value,$desc) = each($Programs) )
750
  {
751
  $json_data = false;
752
  $api_url_array = powerpress_get_api_array();
753
- while( list($index,$api_url) = each($api_url_array) )
754
  {
755
  $req_url = sprintf('%s/media/%s/upload_session.json', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'] );
756
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'?'. POWERPRESS_BLUBRRY_API_QSA:'');
186
  {
187
  $json_data = false;
188
  $api_url_array = powerpress_get_api_array();
189
+ foreach( $api_url_array as $index => $api_url )
190
  {
191
  $req_url = sprintf('%s/media/%s/%s?format=json', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'], $DeleteFile );
192
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
209
 
210
  $json_data = false;
211
  $api_url_array = powerpress_get_api_array();
212
+ foreach( $api_url_array as $index => $api_url )
213
  {
214
  $req_url = sprintf('%s/media/%s/index.json?quota=true&published=true', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'] );
215
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
318
  else if( is_array($results) )
319
  {
320
  $PublishedList = false;
321
+ foreach( $results as $index => $data )
322
  {
323
  if( $index === 'quota' )
324
  {
486
  $auth = base64_encode( $SaveSettings['blubrry_username'] . ':' . $Password );
487
  $json_data = false;
488
  $api_url_array = powerpress_get_api_array();
489
+ foreach( $api_url_array as $index => $api_url )
490
  {
491
  $req_url = sprintf('%s/service/index.json', rtrim($api_url, '/') );
492
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'?'. POWERPRESS_BLUBRRY_API_QSA:'');
524
  else
525
  {
526
  // Get all the programs for this user...
527
+ foreach( $results as $null => $row )
528
  {
529
  $Programs[ $row['program_keyword'] ] = $row['program_title'];
530
  if( $row['hosting'] === true || $row['hosting'] == 'true' )
556
  }
557
  else if( count($Programs) == 1 )
558
  {
559
+ foreach( $Programs as $keyword => $title ) {
560
+ break;
561
+ }
562
+
563
  $SaveSettings['blubrry_program_keyword'] = $keyword;
564
  $SaveSettings['blubrry_hosting'] = $ProgramHosting[ $keyword ];
565
  if( !is_bool($SaveSettings['blubrry_hosting']) )
701
  <select id="blubrry_program_keyword" name="Settings[blubrry_program_keyword]">
702
  <option value=""><?php echo __('Select Program', 'powerpress'); ?></option>
703
  <?php
704
+ foreach( $Programs as $value => $desc )
705
  echo "\t<option value=\"$value\"". ($Settings['blubrry_program_keyword']==$value?' selected':''). ">$desc</option>\n";
706
  ?>
707
  </select>
753
  {
754
  $json_data = false;
755
  $api_url_array = powerpress_get_api_array();
756
+ foreach( $api_url_array as $index => $api_url )
757
  {
758
  $req_url = sprintf('%s/media/%s/upload_session.json', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'] );
759
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'?'. POWERPRESS_BLUBRRY_API_QSA:'');
powerpressadmin-metabox.php CHANGED
@@ -404,7 +404,7 @@ function powerpress_meta_box($object, $box)
404
  <?php
405
  $type_array = array(''=>__('Full (default)', 'powerpress'), 'full'=>__('Full', 'powerpress'),'trailer'=>__('Trailer', 'powerpress'), 'bonus'=>__('Bonus', 'powerpress') );
406
 
407
- while( list($value,$desc) = each($type_array) )
408
  echo "\t<option value=\"$value\"". ($ExtraData['episode_type']==$value?' selected':''). ">$desc</option>\n";
409
  unset($cc_array);
410
  ?>
@@ -525,7 +525,7 @@ unset($cc_array);
525
  <?php
526
  $explicit_array = array(''=>__('Use feed\'s explicit setting', 'powerpress'), 0=>__('no - display nothing', 'powerpress'), 1=>__('yes - explicit content', 'powerpress'), 2=>__('clean - no explicit content', 'powerpress') );
527
 
528
- while( list($value,$desc) = each($explicit_array) )
529
  echo "\t<option value=\"$value\"". ($iTunesExplicit==$value?' selected':''). ">$desc</option>\n";
530
 
531
  ?>
@@ -545,7 +545,7 @@ while( list($value,$desc) = each($explicit_array) )
545
  <?php
546
  $explicit_array = array(''=>__('Use feed\'s explicit setting', 'powerpress'), 0=>__('no - display nothing', 'powerpress'), 1=>__('yes - explicit content', 'powerpress') );
547
 
548
- while( list($value,$desc) = each($explicit_array) )
549
  echo "\t<option value=\"$value\"". ($GooglePlayExplicit==$value?' selected':''). ">$desc</option>\n";
550
 
551
  ?>
@@ -566,7 +566,7 @@ while( list($value,$desc) = each($explicit_array) )
566
  <?php
567
  $cc_array = array(''=>__('No Closed Captioning', 'powerpress'), 1=>__('Yes, Closed Captioned media', 'powerpress') );
568
 
569
- while( list($value,$desc) = each($cc_array) )
570
  echo "\t<option value=\"$value\"". ($iTunesCC==$value?' selected':''). ">$desc</option>\n";
571
  unset($cc_array);
572
  ?>
@@ -617,7 +617,7 @@ unset($cc_array);
617
  <?php
618
  $block_array = array(''=>__('No', 'powerpress'), 1=>__('Yes, Block episode from iTunes', 'powerpress') );
619
 
620
- while( list($value,$desc) = each($block_array) )
621
  echo "\t<option value=\"$value\"". ($iTunesBlock==$value?' selected':''). ">$desc</option>\n";
622
  unset($block_array);
623
  ?>
@@ -635,9 +635,9 @@ unset($block_array);
635
  <div class="powerpress_row_content">
636
  <select id="powerpress_block_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][gp_block]" style="width: 220px;">
637
  <?php
638
- $block_array = array(''=>__('No', 'powerpress'), 1=>__('Yes, Block episode from Google Play Music', 'powerpress') );
639
 
640
- while( list($value,$desc) = each($block_array) )
641
  echo "\t<option value=\"$value\"". ($GooglePlayBlock==$value?' selected':''). ">$desc</option>\n";
642
  unset($block_array);
643
  ?>
@@ -670,8 +670,9 @@ unset($block_array);
670
  $cur_cat_id = intval(!empty($ExtraData['category'])?$ExtraData['category']:0);
671
  if( count($GeneralSettings['custom_cat_feeds']) == 1 ) // Lets auto select the category
672
  {
673
-
674
- list($null, $cur_cat_id) = each($GeneralSettings['custom_cat_feeds']);
 
675
  reset($GeneralSettings['custom_cat_feeds']);
676
  }
677
 
@@ -683,7 +684,7 @@ unset($block_array);
683
  echo '<option value="0"';
684
  echo '>' . esc_html( __('Select category', 'powerpress') ) . '</option>' . "\n";
685
 
686
- while( list($null, $cat_id) = each($GeneralSettings['custom_cat_feeds']) ) {
687
  $catObj = get_category( $cat_id );
688
  if( empty($catObj->name ) )
689
  continue; // Do not allow empty categories forward
404
  <?php
405
  $type_array = array(''=>__('Full (default)', 'powerpress'), 'full'=>__('Full', 'powerpress'),'trailer'=>__('Trailer', 'powerpress'), 'bonus'=>__('Bonus', 'powerpress') );
406
 
407
+ foreach( $type_array as $value => $desc )
408
  echo "\t<option value=\"$value\"". ($ExtraData['episode_type']==$value?' selected':''). ">$desc</option>\n";
409
  unset($cc_array);
410
  ?>
525
  <?php
526
  $explicit_array = array(''=>__('Use feed\'s explicit setting', 'powerpress'), 0=>__('no - display nothing', 'powerpress'), 1=>__('yes - explicit content', 'powerpress'), 2=>__('clean - no explicit content', 'powerpress') );
527
 
528
+ foreach( $explicit_array as $value => $desc )
529
  echo "\t<option value=\"$value\"". ($iTunesExplicit==$value?' selected':''). ">$desc</option>\n";
530
 
531
  ?>
545
  <?php
546
  $explicit_array = array(''=>__('Use feed\'s explicit setting', 'powerpress'), 0=>__('no - display nothing', 'powerpress'), 1=>__('yes - explicit content', 'powerpress') );
547
 
548
+ foreach( $explicit_array as $value => $desc )
549
  echo "\t<option value=\"$value\"". ($GooglePlayExplicit==$value?' selected':''). ">$desc</option>\n";
550
 
551
  ?>
566
  <?php
567
  $cc_array = array(''=>__('No Closed Captioning', 'powerpress'), 1=>__('Yes, Closed Captioned media', 'powerpress') );
568
 
569
+ foreach( $cc_array as $value => $desc )
570
  echo "\t<option value=\"$value\"". ($iTunesCC==$value?' selected':''). ">$desc</option>\n";
571
  unset($cc_array);
572
  ?>
617
  <?php
618
  $block_array = array(''=>__('No', 'powerpress'), 1=>__('Yes, Block episode from iTunes', 'powerpress') );
619
 
620
+ foreach( $block_array as $value => $desc )
621
  echo "\t<option value=\"$value\"". ($iTunesBlock==$value?' selected':''). ">$desc</option>\n";
622
  unset($block_array);
623
  ?>
635
  <div class="powerpress_row_content">
636
  <select id="powerpress_block_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][gp_block]" style="width: 220px;">
637
  <?php
638
+ $block_array = array(''=>__('No', 'powerpress'), 1=>__('Yes, Block episode from Google Podcasts', 'powerpress') );
639
 
640
+ foreach( $block_array as $value => $desc )
641
  echo "\t<option value=\"$value\"". ($GooglePlayBlock==$value?' selected':''). ">$desc</option>\n";
642
  unset($block_array);
643
  ?>
670
  $cur_cat_id = intval(!empty($ExtraData['category'])?$ExtraData['category']:0);
671
  if( count($GeneralSettings['custom_cat_feeds']) == 1 ) // Lets auto select the category
672
  {
673
+ foreach( $GeneralSettings['custom_cat_feeds'] as $null => $cur_cat_id ) {
674
+ break;
675
+ }
676
  reset($GeneralSettings['custom_cat_feeds']);
677
  }
678
 
684
  echo '<option value="0"';
685
  echo '>' . esc_html( __('Select category', 'powerpress') ) . '</option>' . "\n";
686
 
687
+ foreach( $GeneralSettings['custom_cat_feeds'] as $null => $cat_id ) {
688
  $catObj = get_category( $cat_id );
689
  if( empty($catObj->name ) )
690
  continue; // Do not allow empty categories forward
powerpressadmin-metamarks.php CHANGED
@@ -7,7 +7,7 @@
7
  $Episodes = ( !empty($_POST['Powerpress']) ? $_POST['Powerpress'] : false);
8
  if( $Episodes )
9
  {
10
- while( list($feed_slug,$Powerpress) = each($Episodes) )
11
  {
12
  $field = '_'.$feed_slug.':metamarks';
13
 
@@ -25,14 +25,14 @@
25
  {
26
  $MetaMarkData = $MetaMarks[ $feed_slug ];
27
  // Loop through, and convert position and duration to seconds, if specified with 00:00:00
28
- while( list($index,$row) = each($MetaMarkData) )
29
  {
30
  $MetaMarkData[ $index ]['position'] = powerpress_raw_duration( $row['position'] );
31
  $MetaMarkData[ $index ]['duration'] = powerpress_raw_duration( $row['duration'] );
32
  }
33
  reset($MetaMarkData);
34
 
35
- while( list($index,$row) = each($MetaMarkData) )
36
  {
37
  if( empty($MetaMarkData[ $index ]['type']) && empty($MetaMarkData[ $index ]['position']) && empty($MetaMarkData[ $index ]['duration']) && empty($MetaMarkData[ $index ]['link']) && empty($MetaMarkData[ $index ]['value']) )
38
  {
@@ -87,7 +87,7 @@
87
 
88
  $html .= '<div class="powerpress_metamarks_block" id="powerpress_metamarks_block_' . $feed_slug .'">';
89
  $index = 0;
90
- while( list($key,$row) = each($MetaRecords) )
91
  {
92
  $html .= powerpress_metamarks_editrow_html($feed_slug, $index, $row);
93
  $index++;
@@ -266,7 +266,7 @@ function powerpress_metamarks_deleterow(div)
266
  function powerpress_metamarks_print_rss2($episode_data)
267
  {
268
  $MetaRecords = powerpress_metamarks_get($episode_data['id'], $episode_data['feed'] );
269
- while( list($index,$MetaMark) = each($MetaRecords) )
270
  {
271
  echo "\t\t";
272
  echo '<rawvoice:metamark type="'. esc_attr($MetaMark['type']) .'"';
7
  $Episodes = ( !empty($_POST['Powerpress']) ? $_POST['Powerpress'] : false);
8
  if( $Episodes )
9
  {
10
+ foreach( $Episodes as $feed_slug => $Powerpress )
11
  {
12
  $field = '_'.$feed_slug.':metamarks';
13
 
25
  {
26
  $MetaMarkData = $MetaMarks[ $feed_slug ];
27
  // Loop through, and convert position and duration to seconds, if specified with 00:00:00
28
+ foreach( $MetaMarkData as $index => $row )
29
  {
30
  $MetaMarkData[ $index ]['position'] = powerpress_raw_duration( $row['position'] );
31
  $MetaMarkData[ $index ]['duration'] = powerpress_raw_duration( $row['duration'] );
32
  }
33
  reset($MetaMarkData);
34
 
35
+ foreach( $MetaMarkData as $index => $row )
36
  {
37
  if( empty($MetaMarkData[ $index ]['type']) && empty($MetaMarkData[ $index ]['position']) && empty($MetaMarkData[ $index ]['duration']) && empty($MetaMarkData[ $index ]['link']) && empty($MetaMarkData[ $index ]['value']) )
38
  {
87
 
88
  $html .= '<div class="powerpress_metamarks_block" id="powerpress_metamarks_block_' . $feed_slug .'">';
89
  $index = 0;
90
+ foreach( $MetaRecords as $key => $row )
91
  {
92
  $html .= powerpress_metamarks_editrow_html($feed_slug, $index, $row);
93
  $index++;
266
  function powerpress_metamarks_print_rss2($episode_data)
267
  {
268
  $MetaRecords = powerpress_metamarks_get($episode_data['id'], $episode_data['feed'] );
269
+ foreach( $MetaRecords as $index => $MetaMark )
270
  {
271
  echo "\t\t";
272
  echo '<rawvoice:metamark type="'. esc_attr($MetaMark['type']) .'"';
powerpressadmin-migrate.php CHANGED
@@ -52,7 +52,7 @@ function powerpress_admin_migrate_get_files($clean=false, $exclude_blubrry=true)
52
  $results_data = $wpdb->get_results($query, ARRAY_A);
53
  if( $results_data )
54
  {
55
- while( list($null,$row) = each($results_data) )
56
  {
57
  $meta_id = $row['meta_id'];
58
  $EpisodeData = powerpress_get_enclosure_data($row['post_id'], 'podcast', $row['meta_value'], false); // Get the enclosure data with no redirect added
@@ -84,7 +84,7 @@ function powepress_admin_migrate_add_urls($urls)
84
 
85
  $json_data = false;
86
  $api_url_array = powerpress_get_api_array();
87
- while( list($index,$api_url) = each($api_url_array) )
88
  {
89
  $req_url = sprintf('%s/media/%s/migrate_add.json', rtrim($api_url, '/'), urlencode($Settings['blubrry_program_keyword']) );
90
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
@@ -139,7 +139,7 @@ function powerpress_admin_migrate_get_status()
139
 
140
  $json_data = false;
141
  $api_url_array = powerpress_get_api_array();
142
- while( list($index,$api_url) = each($api_url_array) )
143
  {
144
  $req_url = sprintf('%s/media/%s/migrate_status.json?status=summary&simple=true', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'] );
145
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
@@ -191,7 +191,7 @@ function powerpress_admin_migrate_get_migrated_by_status($status='migrated')
191
 
192
  $json_data = false;
193
  $api_url_array = powerpress_get_api_array();
194
- while( list($index,$api_url) = each($api_url_array) )
195
  {
196
  $req_url = sprintf('%s/media/%s/migrate_status.json?status=%s&limit=10000&simple=true', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'], urlencode($status) );
197
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
@@ -302,7 +302,7 @@ function powerpress_admin_migrate_request()
302
  $FoundCount = 0;
303
  if( !empty($QueuedEpisodes) )
304
  {
305
- while( list($index,$row) = each($URLs['results']) )
306
  {
307
  if( $row['status'] != 'completed' ) // Not migrated
308
  continue;
@@ -319,7 +319,7 @@ function powerpress_admin_migrate_request()
319
  $FoundCount++;
320
  $GLOBALS['g_powerpress_total_files_found']++;
321
 
322
- while( list($null,$meta_id) = each($found) )
323
  {
324
  // Get the post meta
325
  $meta_object = get_metadata_by_mid('post', $meta_id);
@@ -419,7 +419,7 @@ function powerpress_admin_extension_counts()
419
  {
420
  $files = powerpress_admin_migrate_get_files(true, false);
421
  $extensions = array(); // 'blubrry'=>0, 'mp3'=>0, 'm4a'=>0, 'mp4'=>0, 'm4v'=>0, '*'=>0 );
422
- while( list($meta_id,$row) = each($files) )
423
  {
424
  $extension = '*';
425
 
@@ -442,7 +442,7 @@ function powerpress_admin_queue_files($extensions=array() )
442
  {
443
  $add_urls = '';
444
  $extensions_preg_match = '';
445
- while( list($extension,$null) = each($extensions) )
446
  {
447
  if( $extension == '*' )
448
  {
@@ -473,7 +473,7 @@ function powerpress_admin_queue_files($extensions=array() )
473
  $AddedCount = 0;;
474
  $AlreadyAddedCount = 0;
475
 
476
- while( list($meta_id,$row) = each($files) )
477
  {
478
  $parts = pathinfo($row['src_url']);
479
  if( preg_match('/('.$extensions_preg_match.')/i', $parts['extension']) )
@@ -544,7 +544,7 @@ function powerpress_admin_migrate_step1()
544
  <?php
545
  }
546
  $types = array('mp3', 'm4a', 'mp4', 'm4v', 'mov', '*', 'blubrry');
547
- while (list($null, $extension) = each($types) )
548
  {
549
  if( empty($GLOBALS['powerpress_migrate_stats'][$extension]) )
550
  continue;
@@ -586,7 +586,7 @@ function powerpress_admin_migrate_step1()
586
  function powerpress_admin_migrate_find_in_results(&$results, $src_url)
587
  {
588
  $found = false;
589
- while( list($index,$row) = each($results) )
590
  {
591
  if( $row['source_url'] == $src_url )
592
  {
@@ -658,7 +658,7 @@ table.powerpress-migration-table tr:hover {
658
  <th class="powerpress-migrate-e"><?php echo __('Episode Updated', 'powerpress'); ?></th>
659
  </tr>
660
  <?php
661
- while( list($meta_id, $url) = each($QueuedResults) )
662
  {
663
  $status = __('Requested', 'powerpress');
664
  $updated = '-';
52
  $results_data = $wpdb->get_results($query, ARRAY_A);
53
  if( $results_data )
54
  {
55
+ foreach( $results_data as $null => $row )
56
  {
57
  $meta_id = $row['meta_id'];
58
  $EpisodeData = powerpress_get_enclosure_data($row['post_id'], 'podcast', $row['meta_value'], false); // Get the enclosure data with no redirect added
84
 
85
  $json_data = false;
86
  $api_url_array = powerpress_get_api_array();
87
+ foreach( $api_url_array as $index => $api_url )
88
  {
89
  $req_url = sprintf('%s/media/%s/migrate_add.json', rtrim($api_url, '/'), urlencode($Settings['blubrry_program_keyword']) );
90
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
139
 
140
  $json_data = false;
141
  $api_url_array = powerpress_get_api_array();
142
+ foreach( $api_url_array as $index => $api_url )
143
  {
144
  $req_url = sprintf('%s/media/%s/migrate_status.json?status=summary&simple=true', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'] );
145
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
191
 
192
  $json_data = false;
193
  $api_url_array = powerpress_get_api_array();
194
+ foreach( $api_url_array as $index => $api_url )
195
  {
196
  $req_url = sprintf('%s/media/%s/migrate_status.json?status=%s&limit=10000&simple=true', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'], urlencode($status) );
197
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
302
  $FoundCount = 0;
303
  if( !empty($QueuedEpisodes) )
304
  {
305
+ foreach( $URLs['results'] as $index => $row )
306
  {
307
  if( $row['status'] != 'completed' ) // Not migrated
308
  continue;
319
  $FoundCount++;
320
  $GLOBALS['g_powerpress_total_files_found']++;
321
 
322
+ foreach( $found as $null => $meta_id )
323
  {
324
  // Get the post meta
325
  $meta_object = get_metadata_by_mid('post', $meta_id);
419
  {
420
  $files = powerpress_admin_migrate_get_files(true, false);
421
  $extensions = array(); // 'blubrry'=>0, 'mp3'=>0, 'm4a'=>0, 'mp4'=>0, 'm4v'=>0, '*'=>0 );
422
+ foreach( $files as $meta_id => $row )
423
  {
424
  $extension = '*';
425
 
442
  {
443
  $add_urls = '';
444
  $extensions_preg_match = '';
445
+ foreach( $extensions as $extension => $null )
446
  {
447
  if( $extension == '*' )
448
  {
473
  $AddedCount = 0;;
474
  $AlreadyAddedCount = 0;
475
 
476
+ foreach( $files as $meta_id => $row )
477
  {
478
  $parts = pathinfo($row['src_url']);
479
  if( preg_match('/('.$extensions_preg_match.')/i', $parts['extension']) )
544
  <?php
545
  }
546
  $types = array('mp3', 'm4a', 'mp4', 'm4v', 'mov', '*', 'blubrry');
547
+ foreach( $types as $null => $extension )
548
  {
549
  if( empty($GLOBALS['powerpress_migrate_stats'][$extension]) )
550
  continue;
586
  function powerpress_admin_migrate_find_in_results(&$results, $src_url)
587
  {
588
  $found = false;
589
+ foreach( $results as $index => $row )
590
  {
591
  if( $row['source_url'] == $src_url )
592
  {
658
  <th class="powerpress-migrate-e"><?php echo __('Episode Updated', 'powerpress'); ?></th>
659
  </tr>
660
  <?php
661
+ foreach( $QueuedResults as $meta_id => $url )
662
  {
663
  $status = __('Requested', 'powerpress');
664
  $updated = '-';
powerpressadmin-mt.php CHANGED
@@ -20,7 +20,7 @@ if( !function_exists('add_action') )
20
  $results_data = $wpdb->get_results($query, ARRAY_A); // This could return a lot of data...
21
  if( $results_data )
22
  {
23
- while( list($null,$row) = each($results_data) )
24
  {
25
  $Media = powerpressadmin_mt_media_from_content($row['post_content']);
26
  if( count($Media) == 0 )
@@ -31,7 +31,7 @@ if( !function_exists('add_action') )
31
  $return[ $row['ID'] ] = array();
32
  $return[ $row['ID'] ]['post_title'] = $row['post_title'];
33
  $return[ $row['ID'] ]['post_date'] = $row['post_date'];
34
- while( list($index,$url) = each($Media) )
35
  $return[ $row['ID'] ]['enclosures'][$index]['url'] = $url;
36
  }
37
  }
@@ -128,7 +128,7 @@ if( !function_exists('add_action') )
128
  $any = $ltrs . $gunk . $punc;
129
 
130
  preg_match_all( "{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp );
131
- while( list($null,$url) = each($post_links_temp[0]) )
132
  {
133
  if( powerpressadmin_mt_is_media($url) )
134
  {
@@ -161,9 +161,9 @@ if( !function_exists('add_action') )
161
  $Mp3Info->SetDownloadBytesLimit(POWERPRESS_DOWNLOAD_BYTE_LIMIT);
162
  }
163
 
164
- while( list($post_id, $episode_feeds) = each($Import) )
165
  {
166
- while( list($media_index, $feed_slug) = each($episode_feeds) )
167
  {
168
  if( $feed_slug == '' )
169
  continue; // User decoded not to import this one..
@@ -315,7 +315,7 @@ if( !function_exists('add_action') )
315
 
316
  if( !empty($Settings['custom_feeds']) && is_array($Settings['custom_feeds']) )
317
  {
318
- while( list($feed_slug,$value) = each($Settings['custom_feeds']) )
319
  {
320
  if( $feed_slug != 'podcast' )
321
  $data['feed-'.$feed_slug] = __('Feed', 'powerpress') .': ('.$feed_slug.')';
@@ -494,7 +494,7 @@ else
494
  $MaxFileIndex = 1;
495
 
496
  $count = 0;
497
- while( list($post_id, $import_data) = each($results ) )
498
  {
499
  $edit_link = get_edit_post_link( $post_id );
500
  if( $post_id == 'feeds_required' )
@@ -506,7 +506,7 @@ else
506
 
507
  if( is_array($Settings['custom_feeds']) )
508
  {
509
- while( list($feed_slug,$value) = each($Settings['custom_feeds']) )
510
  {
511
  if( $feed_slug == 'podcast' )
512
  $enclosure_data = get_post_meta($post_id, 'enclosure', true);
@@ -524,7 +524,7 @@ else
524
  }
525
 
526
  $found = false;
527
- while( list($episode_index,$episode_data) = each($import_data['enclosures']) )
528
  {
529
  if( $episode_data['url'] == $CurrentEnclosures[ $feed_slug ]['url'] )
530
  {
@@ -584,7 +584,7 @@ else
584
  echo '</strong><br />';
585
  echo '<div style="margin-left: 10px;">';
586
  $index = 1;
587
- while( list($episode_index,$episode_data) = each($import_data['enclosures']) )
588
  {
589
  if( $index > $MaxFileIndex )
590
  $MaxFileIndex = $index;
@@ -651,7 +651,7 @@ else
651
  if( isset($CurrentEnclosures[$feed_slug]) && $CurrentEnclosures[$feed_slug]['imported'] )
652
  {
653
  $index = 1;
654
- while( list($episode_index,$episode_data) = each($import_data['enclosures']) )
655
  {
656
  echo "File $index: ";
657
  if( $CurrentEnclosures[$feed_slug]['url'] == $episode_data['url'] )
@@ -671,7 +671,7 @@ else
671
  else
672
  {
673
  $index = 1;
674
- while( list($episode_index,$episode_data) = each($import_data['enclosures']) )
675
  {
676
  echo "File&nbsp;$index:&nbsp;";
677
  if( !empty($episode_data['imported']) )
@@ -731,7 +731,7 @@ else
731
  <p style="margin: 0 0 0 40px; padding: 0;">
732
  <?php echo __('File', 'powerpress'); ?> <?php echo ($number+1); ?>:
733
  <?php
734
- while( list($feed_slug,$feed_title) = each($Settings['custom_feeds']) )
735
  {
736
  echo '<a href="javascript:void()" onclick="select_all('. $number .',\''. $feed_slug .'\');return false;">'. htmlspecialchars($feed_title) .'</a> | ';
737
  }
@@ -746,7 +746,7 @@ else
746
  <?php
747
  $comma = false;
748
  global $g_import_mt_extensions;
749
- while( list($ext, $null) = each($g_import_mt_extensions) )
750
  {
751
  if( $comma )
752
  echo ', ';
20
  $results_data = $wpdb->get_results($query, ARRAY_A); // This could return a lot of data...
21
  if( $results_data )
22
  {
23
+ foreach( $results_data as $null => $row )
24
  {
25
  $Media = powerpressadmin_mt_media_from_content($row['post_content']);
26
  if( count($Media) == 0 )
31
  $return[ $row['ID'] ] = array();
32
  $return[ $row['ID'] ]['post_title'] = $row['post_title'];
33
  $return[ $row['ID'] ]['post_date'] = $row['post_date'];
34
+ foreach( $Media as $index => $url )
35
  $return[ $row['ID'] ]['enclosures'][$index]['url'] = $url;
36
  }
37
  }
128
  $any = $ltrs . $gunk . $punc;
129
 
130
  preg_match_all( "{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp );
131
+ foreach( $post_links_temp[0] as $null => $url )
132
  {
133
  if( powerpressadmin_mt_is_media($url) )
134
  {
161
  $Mp3Info->SetDownloadBytesLimit(POWERPRESS_DOWNLOAD_BYTE_LIMIT);
162
  }
163
 
164
+ foreach( $Import as $post_id => $episode_feeds )
165
  {
166
+ foreach( $episode_feeds as $media_index => $feed_slug )
167
  {
168
  if( $feed_slug == '' )
169
  continue; // User decoded not to import this one..
315
 
316
  if( !empty($Settings['custom_feeds']) && is_array($Settings['custom_feeds']) )
317
  {
318
+ foreach( $Settings['custom_feeds'] as $feed_slug => $value )
319
  {
320
  if( $feed_slug != 'podcast' )
321
  $data['feed-'.$feed_slug] = __('Feed', 'powerpress') .': ('.$feed_slug.')';
494
  $MaxFileIndex = 1;
495
 
496
  $count = 0;
497
+ foreach( $results as $post_id => $import_data )
498
  {
499
  $edit_link = get_edit_post_link( $post_id );
500
  if( $post_id == 'feeds_required' )