PowerPress Podcasting plugin by Blubrry - Version 7.4.1

Version Description

  • Released on 4/10/2019
  • Added logic to authentication email addresses differently for premium password protected podcasts.
  • Added support for YoastSEO and Google Podcasts (Thanks @sunkast for bringing to our attention!)
  • Removed use of create_function to fix damaged serialized data created by the old PodPress plugin. (Thanks @oilmanmag and Dimitris for bringing to our attention!)
  • Fixed esc_attr()bug with podpress import.
  • Added Tamil (ta) as a podcast feed language option. Thanks KT for requesting! If you do not see your language pelase contact us we will add it!
  • Changed feed join query to solve conflict with the Affiliate Disclosure Pro plugin. (Thanks @ndnakashima for bringing to our attention!)
  • New functionality for Taxonomy podcasting and the powerpress_subscribe shortcode (Thanks @tristanmason for testing!)
  • Fixed taxonomy bugs with the playlist player shortcodes (Thanks @tristanmason for the code and helping us test!)
  • PowerPress playlist player can now be ordered in ascending order with attribute order="asc" (Thanks @tristanmason for the code and helping us test!)
  • Fixed bug with skipto shortcode leaving a blank value in feeds. (Thanks @tszt for bringing to our attention!)
  • Skipto timestamp now uses the timestamp exactly as you entered it as the label as long as it has at least one colon to separate minutes from seconds.
  • Fixed bug for post type podcasting in the situation where there can be multiple post types for blog posts or pages. (Thanks @shawnogordo for the bug fix!)
Download this release

Release Info

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

Code changes from version 7.4 to 7.4.1

getid3/module.audio-video.quicktime.php CHANGED
@@ -113,7 +113,7 @@ class getid3_quicktime extends getid3_handler
113
  $longitude = false;
114
  $altitude = false;
115
  if (preg_match('#^([\\+\\-])([0-9]{2}|[0-9]{4}|[0-9]{6})(\\.[0-9]+)?([\\+\\-])([0-9]{3}|[0-9]{5}|[0-9]{7})(\\.[0-9]+)?(([\\+\\-])([0-9]{3}|[0-9]{5}|[0-9]{7})(\\.[0-9]+)?)?/$#', $ISO6709string, $matches)) {
116
- @list($dummy, $lat_sign, $lat_deg, $lat_deg_dec, $lon_sign, $lon_deg, $lon_deg_dec, $dummy, $alt_sign, $alt_deg, $alt_deg_dec) = $matches;
117
 
118
  if (strlen($lat_deg) == 2) { // [+-]DD.D
119
  $latitude = floatval(ltrim($lat_deg, '0').$lat_deg_dec);
113
  $longitude = false;
114
  $altitude = false;
115
  if (preg_match('#^([\\+\\-])([0-9]{2}|[0-9]{4}|[0-9]{6})(\\.[0-9]+)?([\\+\\-])([0-9]{3}|[0-9]{5}|[0-9]{7})(\\.[0-9]+)?(([\\+\\-])([0-9]{3}|[0-9]{5}|[0-9]{7})(\\.[0-9]+)?)?/$#', $ISO6709string, $matches)) {
116
+ @list($dummy, $lat_sign, $lat_deg, $lat_deg_dec, $lon_sign, $lon_deg, $lon_deg_dec, $dummy2, $alt_sign, $alt_deg, $alt_deg_dec) = $matches;
117
 
118
  if (strlen($lat_deg) == 2) { // [+-]DD.D
119
  $latitude = floatval(ltrim($lat_deg, '0').$lat_deg_dec);
powerpress-feed-auth.php CHANGED
@@ -31,6 +31,12 @@
31
  $user = $_SERVER['PHP_AUTH_USER'];
32
  $password = $_SERVER['PHP_AUTH_PW'];
33
 
 
 
 
 
 
 
34
  $userObj = wp_authenticate($user, $password);
35
 
36
  if( !is_wp_error($userObj) )
31
  $user = $_SERVER['PHP_AUTH_USER'];
32
  $password = $_SERVER['PHP_AUTH_PW'];
33
 
34
+ if( strpos( $user, '@', 1 ) !== false ) {
35
+ $userObjID = get_user_by( 'email', $user); // Get the user by email
36
+ if( !is_wp_error($userIDObj) )
37
+ $user = $userObjID->user_login; // Use the user's login (not email) to authenticate
38
+ }
39
+
40
  $userObj = wp_authenticate($user, $password);
41
 
42
  if( !is_wp_error($userObj) )
powerpress-player.php CHANGED
@@ -176,6 +176,10 @@ function powerpress_shortcode_handler( $attributes, $content = null )
176
  if( !empty($GeneralSettings['posttype_podcasting']) )
177
  {
178
  $post_type = get_query_var('post_type');
 
 
 
 
179
  // Get the feed slugs and titles for this post type
180
  $PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
181
  // Loop through this array...
@@ -763,8 +767,6 @@ function powerpressplayer_mediaobjects($type, $content, $media_url, $EpisodeData
763
  if( $length > 250 ) {
764
  $subtitle = (function_exists('mb_substr')?mb_substr($subtitle, 0, 250):substr($subtitle, 0, 250) ). '...';
765
  }
766
-
767
- $addhtml .= '<meta itemprop="description" content="'. htmlspecialchars($subtitle) .'" />'.PHP_EOL_WEB;
768
  }
769
 
770
  if( empty($subtitle) )
@@ -1724,13 +1726,18 @@ function powerpress_shortcode_skipto($attributes, $content = null)
1724
 
1725
  // Prepare data
1726
  $timeInSeconds = powerpress_raw_duration($pos);
1727
- $readableTime = powerpress_readable_duration($timeInSeconds);
 
 
1728
  if( empty($content) )
1729
  $content = $readableTime;
1730
 
1731
  // We can't add players to feeds
1732
- if( is_feed() )
 
 
1733
  return $content;
 
1734
 
1735
  $feedSlug = 'podcast';
1736
  if( !empty($attributes['channel']) )
176
  if( !empty($GeneralSettings['posttype_podcasting']) )
177
  {
178
  $post_type = get_query_var('post_type');
179
+ if ( is_array( $post_type ) ) {
180
+ $post_type = reset( $post_type ); // get first element in array
181
+ }
182
+
183
  // Get the feed slugs and titles for this post type
184
  $PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
185
  // Loop through this array...
767
  if( $length > 250 ) {
768
  $subtitle = (function_exists('mb_substr')?mb_substr($subtitle, 0, 250):substr($subtitle, 0, 250) ). '...';
769
  }
 
 
770
  }
771
 
772
  if( empty($subtitle) )
1726
 
1727
  // Prepare data
1728
  $timeInSeconds = powerpress_raw_duration($pos);
1729
+ $readableTime = $pos;
1730
+ if( strpos($readableTime, ':') === false ) // If the time they entered is not in colon format, lets use a readable format with the colons...
1731
+ $readableTime = powerpress_readable_duration($timeInSeconds);
1732
  if( empty($content) )
1733
  $content = $readableTime;
1734
 
1735
  // We can't add players to feeds
1736
+ if( is_feed() ) {
1737
+ if( empty($content) ) // If no custom label is set, lets use this timestamp in a readable format with colons
1738
+ return $readableTime;
1739
  return $content;
1740
+ }
1741
 
1742
  $feedSlug = 'podcast';
1743
  if( !empty($attributes['channel']) )
powerpress-playlist.php CHANGED
@@ -2,37 +2,17 @@
2
  // powerpress-playlist.php
3
 
4
 
5
- function powerpress_get_term_by_ttid($ttid, $output = OBJECT, $filter = 'raw')
6
  {
7
  global $wpdb;
8
-
9
- $value = intval($ttid);
10
- $field = 'tt.term_taxonomy_id';
11
-
12
- $term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE $field = %s LIMIT 1", $value) );
13
- if ( !$term )
14
  return false;
15
-
16
- $taxonomy = $term->taxonomy;
17
- wp_cache_add($term->term_id, $term, $taxonomy);
18
-
19
- /** This filter is documented in wp-includes/taxonomy.php */
20
- $term = apply_filters( 'get_term', $term, $taxonomy );
21
 
22
- /** This filter is documented in wp-includes/taxonomy.php */
23
- $term = apply_filters( "get_$taxonomy", $term, $taxonomy );
24
-
25
- $term = sanitize_term($term, $taxonomy, $filter);
26
-
27
- if ( $output == OBJECT ) {
28
- return $term;
29
- } elseif ( $output == ARRAY_A ) {
30
- return get_object_vars($term);
31
- } elseif ( $output == ARRAY_N ) {
32
- return array_values(get_object_vars($term));
33
- } else {
34
- return $term;
35
- }
36
  }
37
 
38
  function powepress_get_program_title_by_term_taxonomy_id($ttid)
@@ -118,7 +98,8 @@ function powerpress_playlist_episodes($args)
118
  'taxonomy'=>'',
119
  'tax_term'=>'',
120
  'term_taxonomy_id'=>'',
121
- 'ids'=>''
 
122
  );
123
  $args = wp_parse_args( $args, $defaults );
124
 
@@ -182,6 +163,8 @@ function powerpress_playlist_episodes($args)
182
  $query .= "GROUP BY p.ID ";
183
  if( !empty($for_query) ) {
184
  $query .= "ORDER BY FIELD('id', $for_query) ";
 
 
185
  } else {
186
  $query .= "ORDER BY p.post_date DESC ";
187
  }
@@ -321,7 +304,8 @@ function powerpress_playlist_shortcode( $attr ) {
321
  'channel'=>'', // Used for PowerPress Playlist
322
  'post_type' => 'post', // Used for PowerPress Playlist
323
  'limit'=>10, // Used for PowerPress Playlist
324
- 'ids'=>'' // Used to specify specific post ids to assemble a player with specific episodes
 
325
  ), $attr, 'powerpressplaylist' ) );
326
 
327
 
@@ -355,7 +339,8 @@ function powerpress_playlist_shortcode( $attr ) {
355
  'term_id'=>'',
356
  'taxonomy'=>'',
357
  'term_taxonomy_id'=>$term_taxonomy_id,
358
- 'ids'=>$ids
 
359
  );
360
 
361
  $episodes = powerpress_playlist_episodes( $args );
2
  // powerpress-playlist.php
3
 
4
 
5
+ function powerpress_get_term_by_ttid($ttid)
6
  {
7
  global $wpdb;
8
+ $ttid = intval($ttid);
9
+ $term_info = $wpdb->get_results("SELECT term_id, taxonomy FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id = {$ttid} LIMIT 1", ARRAY_A);
10
+ if( empty( $term_info[0]['term_id']) )
 
 
 
11
  return false;
 
 
 
 
 
 
12
 
13
+ $term_ID = $term_info[0]['term_id'];
14
+ $taxonomy_type = $term_info[0]['taxonomy'];
15
+ return get_term_by('id', $term_ID, $taxonomy_type);
 
 
 
 
 
 
 
 
 
 
 
16
  }
17
 
18
  function powepress_get_program_title_by_term_taxonomy_id($ttid)
98
  'taxonomy'=>'',
99
  'tax_term'=>'',
100
  'term_taxonomy_id'=>'',
101
+ 'ids'=>'',
102
+ 'order'=>''
103
  );
104
  $args = wp_parse_args( $args, $defaults );
105
 
163
  $query .= "GROUP BY p.ID ";
164
  if( !empty($for_query) ) {
165
  $query .= "ORDER BY FIELD('id', $for_query) ";
166
+ } else if ( !empty($args['order']) && strtolower($args['order']) == 'asc' ) {
167
+ $query .= "ORDER BY p.post_date ASC ";
168
  } else {
169
  $query .= "ORDER BY p.post_date DESC ";
170
  }
304
  'channel'=>'', // Used for PowerPress Playlist
305
  'post_type' => 'post', // Used for PowerPress Playlist
306
  'limit'=>10, // Used for PowerPress Playlist
307
+ 'ids'=>'', // Used to specify specific post ids to assemble a player with specific episodes
308
+ 'order'=>'' // Order of episodes, descending by default
309
  ), $attr, 'powerpressplaylist' ) );
310
 
311
 
339
  'term_id'=>'',
340
  'taxonomy'=>'',
341
  'term_taxonomy_id'=>$term_taxonomy_id,
342
+ 'ids'=>$ids,
343
+ 'order'=>$order
344
  );
345
 
346
  $episodes = powerpress_playlist_episodes( $args );
powerpress-subscribe.php CHANGED
@@ -142,9 +142,38 @@ function powerpresssubscribe_get_settings($ExtraData, $detect_category=true)
142
  // Taxonomy
143
  if( $ExtraData['subscribe_type'] == 'ttid' )
144
  {
145
- if( !empty($GeneralSettings['taxonomy_podcasting']) )
146
  {
147
- // TODO! Taxonomy Podcasting subscription options
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
149
  return false;
150
  }
142
  // Taxonomy
143
  if( $ExtraData['subscribe_type'] == 'ttid' )
144
  {
145
+ if( !empty($GeneralSettings['taxonomy_podcasting']) && !empty($taxonomy_term_id) )
146
  {
147
+ $term_ID = '';
148
+ $taxonomy_type = '';
149
+ $Settings = get_option('powerpress_taxonomy_'. intval($taxonomy_term_id) );
150
+ if( !empty($Settings) ) {
151
+ global $wpdb;
152
+ $term_info = $wpdb->get_results("SELECT term_id, taxonomy FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id = {$taxonomy_term_id} LIMIT 1", ARRAY_A);
153
+ if( !empty( $term_info[0]['term_id']) ) {
154
+ $term_ID = $term_info[0]['term_id'];
155
+ $taxonomy_type = $term_info[0]['taxonomy'];
156
+ }
157
+ }
158
+
159
+ if( empty($term_ID) || empty($taxonomy_type) )
160
+ return false;
161
+
162
+ if( !empty($Settings['feed_redirect_url']) )
163
+ $Settings['feed_url'] = $Settings['feed_redirect_url'];
164
+ if( empty($General['feed_url']) )
165
+ $Settings['feed_url'] = get_term_feed_link($term_ID, $taxonomy_type, 'rss2');
166
+
167
+ $Settings['subscribe_page_url'] = powerpresssubscribe_get_subscribe_page($Settings);
168
+ $Settings['itunes_url'] = powerpresssubscribe_get_itunes_url($Settings);
169
+ $Settings['image_url'] = $Settings['itunes_image'];
170
+ $Settings['subscribe_feature_rss'] = (!empty($GeneralSettings['subscribe_feature_rss']) || !isset($GeneralSettings['subscribe_feature_rss']) );
171
+ $Settings['subscribe_feature_email'] = (!empty($GeneralSettings['subscribe_feature_email']) );
172
+ $Settings['subscribe_feature_gp'] = (!empty($GeneralSettings['subscribe_feature_gp']) );
173
+ $Settings['subscribe_feature_stitcher'] = (!empty($GeneralSettings['subscribe_feature_stitcher']) );
174
+ $Settings['subscribe_feature_tunein'] = (!empty($GeneralSettings['subscribe_feature_tunein']) );
175
+ $Settings['subscribe_feature_spotify'] = (!empty($GeneralSettings['subscribe_feature_spotify']) );
176
+ return $Settings;
177
  }
178
  return false;
179
  }
powerpress.php CHANGED
@@ -3,11 +3,11 @@
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.4
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Requires at least: 3.6
10
- Tested up to: 4.9.9
11
  Text Domain: powerpress
12
  Change Log:
13
  Please see readme.txt for detailed change log.
@@ -28,11 +28,14 @@ License: GPL (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
28
  */
29
 
30
 
31
- 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.4' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
@@ -200,8 +203,10 @@ function powerpress_content($content)
200
  if( !empty($GeneralSettings['posttype_podcasting']) )
201
  {
202
  $post_type = get_query_var('post_type');
203
- //$post_type = get_post_type();
204
-
 
 
205
  // Get the feed slugs and titles for this post type
206
  $PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
207
  // Loop through this array of post type settings...
@@ -1342,6 +1347,13 @@ function powerpress_template_redirect()
1342
  {
1343
  if( is_feed() && powerpress_is_custom_podcast_feed() )
1344
  {
 
 
 
 
 
 
 
1345
  remove_action('template_redirect', 'ol_feed_redirect'); // Remove this action so feedsmith doesn't redirect
1346
  global $powerpress_feed;
1347
  if( !isset($powerpress_feed['feed_redirect_url']) )
@@ -1673,6 +1685,8 @@ function powerpress_load_general_feed_settings()
1673
  $GeneralSettings = get_option('powerpress_general');
1674
  if( !isset($GeneralSettings['custom_feeds']['podcast']) )
1675
  $GeneralSettings['custom_feeds']['podcast'] = 'Podcast Feed'; // Fixes scenario where the user never configured the custom default podcast feed.
 
 
1676
 
1677
  if( $GeneralSettings )
1678
  {
@@ -1810,9 +1824,13 @@ function powerpress_load_general_feed_settings()
1810
  if( !empty($GeneralSettings['posttype_podcasting']) )
1811
  {
1812
  $post_type = get_query_var('post_type');
1813
- //$post_type = get_post_type();
1814
  if( !empty($post_type) )
1815
  {
 
 
 
 
1816
  // Get the settings for this podcast post type
1817
  $PostTypeSettingsArray = get_option('powerpress_posttype_'. $post_type);
1818
  if( !empty($PostTypeSettingsArray[ $feed_slug ]) )
@@ -1984,7 +2002,7 @@ function powerpress_posts_fields($cols)
1984
  {
1985
  $feed_slug = get_query_var('feed');
1986
  global $wpdb;
1987
- $cols .= ", {$wpdb->postmeta}.meta_value AS podcast_meta_value ";
1988
  }
1989
  }
1990
 
@@ -2006,8 +2024,8 @@ function powerpress_posts_join($join)
2006
  if( powerpress_is_custom_podcast_feed() || get_query_var('feed') === 'podcast' )
2007
  {
2008
  global $wpdb;
2009
- $join .= " INNER JOIN {$wpdb->postmeta} ";
2010
- $join .= " ON {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id ";
2011
  }
2012
 
2013
  return $join;
@@ -2030,13 +2048,13 @@ function powerpress_posts_where($where)
2030
  $where .= " AND (";
2031
 
2032
  if( powerpress_is_custom_podcast_feed() && get_query_var('feed') !== 'podcast' )
2033
- $where .= " {$wpdb->postmeta}.meta_key = '_". get_query_var('feed') .":enclosure' ";
2034
  else
2035
- $where .= " {$wpdb->postmeta}.meta_key = 'enclosure' ";
2036
 
2037
  // Include Podpress data if exists...
2038
  if( !empty($powerpress_feed['process_podpress']) && get_query_var('feed') === 'podcast' )
2039
- $where .= " OR {$wpdb->postmeta}.meta_key = 'podPressMedia' OR {$wpdb->postmeta}.meta_key = '_podPressMedia' ";
2040
 
2041
  $where .= ") ";
2042
  }
@@ -2171,8 +2189,10 @@ function get_the_powerpress_content()
2171
  if( !empty($GeneralSettings['posttype_podcasting']) )
2172
  {
2173
  $post_type = get_query_var('post_type');
2174
- //$post_type = get_post_type();
2175
-
 
 
2176
  // Get the feed slugs and titles for this post type
2177
  $PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
2178
  // Loop through this array of post type settings...
@@ -3048,20 +3068,19 @@ function powerpress_repair_serialize($string)
3048
  {
3049
  if( @unserialize($string) )
3050
  return $string; // Nothing to repair...
 
3051
  $string = preg_replace_callback('/(s:(\d+):"([^"]*)")/',
3052
- create_function(
3053
- '$matches',
3054
- 'if( strlen($matches[3]) == $matches[2] ) return $matches[0]; return sprintf(\'s:%d:"%s"\', strlen($matches[3]), $matches[3]);'
3055
- ),
3056
- $string);
3057
 
3058
  if( substr($string, 0, 2) == 's:' ) // Sometimes the serialized data is double serialized, so we need to re-serialize the outside string
3059
  {
3060
  $string = preg_replace_callback('/(s:(\d+):"(.*)";)$/',
3061
- create_function(
3062
- '$matches',
3063
- 'if( strlen($matches[3]) == $matches[2] ) return $matches[0]; return sprintf(\'s:%d:"%s";\', strlen($matches[3]), $matches[3]);'
3064
- ),
3065
  $string);
3066
  }
3067
 
@@ -3411,6 +3430,10 @@ function powerpress_premium_content_authorized_filter($default, $feed_slug)
3411
  }
3412
 
3413
  $post_type = get_query_var('post_type');
 
 
 
 
3414
  if( $post_type != 'post' )
3415
  {
3416
  $GeneralSettings = get_option('powerpress_general');
@@ -3441,6 +3464,10 @@ function powerpress_premium_content_message($post_id, $feed_slug, $EpisodeData =
3441
  return '';
3442
  $FeedSettings = get_option('powerpress_feed_'.$feed_slug);
3443
  $post_type = get_query_var('post_type');
 
 
 
 
3444
  if( $post_type != 'post' )
3445
  {
3446
  $GeneralSettings = get_option('powerpress_general');
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.4.1
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Requires at least: 3.6
10
+ Tested up to: 5.1.1
11
  Text Domain: powerpress
12
  Change Log:
13
  Please see readme.txt for detailed change log.
28
  */
29
 
30
 
31
+ if( !function_exists('add_action') ) {
32
+ header( 'Status: 403 Forbidden' );
33
+ header( 'HTTP/1.1 403 Forbidden' );
34
+ exit();
35
+ }
36
 
37
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
38
+ define('POWERPRESS_VERSION', '7.4.1' );
39
 
40
  // Translation support:
41
  if ( !defined('POWERPRESS_ABSPATH') )
203
  if( !empty($GeneralSettings['posttype_podcasting']) )
204
  {
205
  $post_type = get_query_var('post_type');
206
+ if ( is_array( $post_type ) ) {
207
+ $post_type = reset( $post_type ); // get first element in array
208
+ }
209
+
210
  // Get the feed slugs and titles for this post type
211
  $PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
212
  // Loop through this array of post type settings...
1347
  {
1348
  if( is_feed() && powerpress_is_custom_podcast_feed() )
1349
  {
1350
+ if ( defined('WPSEO_VERSION') && version_compare(WPSEO_VERSION, '7.7', '>=') && class_exists( 'WPSEO_Frontend' ) ) {
1351
+ $wpseo_frontend = WPSEO_Frontend::get_instance();
1352
+ if( !empty($wpseo_frontend) ) {
1353
+ remove_action( 'template_redirect', array( $wpseo_frontend, 'noindex_feed' ) );
1354
+ }
1355
+ }
1356
+
1357
  remove_action('template_redirect', 'ol_feed_redirect'); // Remove this action so feedsmith doesn't redirect
1358
  global $powerpress_feed;
1359
  if( !isset($powerpress_feed['feed_redirect_url']) )
1685
  $GeneralSettings = get_option('powerpress_general');
1686
  if( !isset($GeneralSettings['custom_feeds']['podcast']) )
1687
  $GeneralSettings['custom_feeds']['podcast'] = 'Podcast Feed'; // Fixes scenario where the user never configured the custom default podcast feed.
1688
+ if( empty($GeneralSettings['default_url']) )
1689
+ $GeneralSettings['default_url'] = '';
1690
 
1691
  if( $GeneralSettings )
1692
  {
1824
  if( !empty($GeneralSettings['posttype_podcasting']) )
1825
  {
1826
  $post_type = get_query_var('post_type');
1827
+
1828
  if( !empty($post_type) )
1829
  {
1830
+ if ( is_array( $post_type ) ) {
1831
+ $post_type = reset( $post_type ); // get first element in array
1832
+ }
1833
+
1834
  // Get the settings for this podcast post type
1835
  $PostTypeSettingsArray = get_option('powerpress_posttype_'. $post_type);
1836
  if( !empty($PostTypeSettingsArray[ $feed_slug ]) )
2002
  {
2003
  $feed_slug = get_query_var('feed');
2004
  global $wpdb;
2005
+ $cols .= ", pp_{$wpdb->postmeta}.meta_value AS podcast_meta_value ";
2006
  }
2007
  }
2008
 
2024
  if( powerpress_is_custom_podcast_feed() || get_query_var('feed') === 'podcast' )
2025
  {
2026
  global $wpdb;
2027
+ $join .= " INNER JOIN {$wpdb->postmeta} AS pp_{$wpdb->postmeta} ";
2028
+ $join .= " ON {$wpdb->posts}.ID = pp_{$wpdb->postmeta}.post_id ";
2029
  }
2030
 
2031
  return $join;
2048
  $where .= " AND (";
2049
 
2050
  if( powerpress_is_custom_podcast_feed() && get_query_var('feed') !== 'podcast' )
2051
+ $where .= " pp_{$wpdb->postmeta}.meta_key = '_". get_query_var('feed') .":enclosure' ";
2052
  else
2053
+ $where .= " pp_{$wpdb->postmeta}.meta_key = 'enclosure' ";
2054
 
2055
  // Include Podpress data if exists...
2056
  if( !empty($powerpress_feed['process_podpress']) && get_query_var('feed') === 'podcast' )
2057
+ $where .= " OR pp_{$wpdb->postmeta}.meta_key = 'podPressMedia' OR pp_{$wpdb->postmeta}.meta_key = '_podPressMedia' ";
2058
 
2059
  $where .= ") ";
2060
  }
2189
  if( !empty($GeneralSettings['posttype_podcasting']) )
2190
  {
2191
  $post_type = get_query_var('post_type');
2192
+ if ( is_array( $post_type ) ) {
2193
+ $post_type = reset( $post_type ); // get first element in array
2194
+ }
2195
+
2196
  // Get the feed slugs and titles for this post type
2197
  $PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
2198
  // Loop through this array of post type settings...
3068
  {
3069
  if( @unserialize($string) )
3070
  return $string; // Nothing to repair...
3071
+
3072
  $string = preg_replace_callback('/(s:(\d+):"([^"]*)")/',
3073
+ function ($matches) {
3074
+ if( strlen($matches[3]) == $matches[2] ) return $matches[0]; return sprintf('s:%d:"%s"', strlen($matches[3]), $matches[3]);
3075
+ },
3076
+ $string);
 
3077
 
3078
  if( substr($string, 0, 2) == 's:' ) // Sometimes the serialized data is double serialized, so we need to re-serialize the outside string
3079
  {
3080
  $string = preg_replace_callback('/(s:(\d+):"(.*)";)$/',
3081
+ function ($matches) {
3082
+ if( strlen($matches[3]) == $matches[2] ) return $matches[0]; return sprintf('s:%d:"%s";', strlen($matches[3]), $matches[3]);
3083
+ },
 
3084
  $string);
3085
  }
3086
 
3430
  }
3431
 
3432
  $post_type = get_query_var('post_type');
3433
+ if ( is_array( $post_type ) ) {
3434
+ $post_type = reset( $post_type ); // get first element in array
3435
+ }
3436
+
3437
  if( $post_type != 'post' )
3438
  {
3439
  $GeneralSettings = get_option('powerpress_general');
3464
  return '';
3465
  $FeedSettings = get_option('powerpress_feed_'.$feed_slug);
3466
  $post_type = get_query_var('post_type');
3467
+ if ( is_array( $post_type ) ) {
3468
+ $post_type = reset( $post_type ); // get first element in array
3469
+ }
3470
+
3471
  if( $post_type != 'post' )
3472
  {
3473
  $GeneralSettings = get_option('powerpress_general');
powerpressadmin-editfeed.php CHANGED
@@ -113,6 +113,7 @@ function powerpress_languages()
113
  $langs['sv'] = __('Swedish', 'powerpress');
114
  $langs['sv-fi'] = __('Swedish (Finland)', 'powerpress');
115
  $langs['sv-se'] = __('Swedish (Sweden)', 'powerpress');
 
116
  $langs['tr'] = __('Turkish', 'powerpress');
117
  $langs['uk'] = __('Ukranian', 'powerpress');
118
  return $langs;
113
  $langs['sv'] = __('Swedish', 'powerpress');
114
  $langs['sv-fi'] = __('Swedish (Finland)', 'powerpress');
115
  $langs['sv-se'] = __('Swedish (Sweden)', 'powerpress');
116
+ $langs['ta'] = __('Tamil', 'powerpress');
117
  $langs['tr'] = __('Turkish', 'powerpress');
118
  $langs['uk'] = __('Ukranian', 'powerpress');
119
  return $langs;
powerpressadmin-jquery.php CHANGED
@@ -881,6 +881,13 @@ self.parent.tb_remove();
881
 
882
  function powerpress_admin_jquery_header($title, $jquery = false)
883
  {
 
 
 
 
 
 
 
884
  header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
885
  header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
886
  header( 'Cache-Control: no-store, no-cache, must-revalidate' );
881
 
882
  function powerpress_admin_jquery_header($title, $jquery = false)
883
  {
884
+ if( function_exists('get_current_screen') ) {
885
+ $current_screen = get_current_screen();
886
+ if( !empty($current_screen) && is_object($current_screen) && $current_screen->is_block_editor() ) {
887
+ return;
888
+ }
889
+ }
890
+
891
  header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
892
  header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
893
  header( 'Cache-Control: no-store, no-cache, must-revalidate' );
powerpressadmin-podpress.php CHANGED
@@ -115,7 +115,7 @@ if( !function_exists('add_action') )
115
  {
116
  // display a warning here...
117
  if( $hide_errors == false )
118
- powerpress_page_message_add_error( sprintf( __('Error decoding PodPress data for post "%s"', 'powerpress'), est_attr($row['post_title']) ) );
119
  continue;
120
  }
121
 
115
  {
116
  // display a warning here...
117
  if( $hide_errors == false )
118
+ powerpress_page_message_add_error( sprintf( __('Error decoding PodPress data for post "%s"', 'powerpress'), esc_attr($row['post_title']) ) );
119
  continue;
120
  }
121
 
powerpressadmin-pts.php CHANGED
@@ -88,7 +88,7 @@ class PowerPressPostToSocial {
88
  }
89
 
90
  function do_pings() {
91
- $Settings = powerpress_get_settings( 'powerpress_general' );
92
 
93
  $post_id = get_the_ID();
94
  $program_keyword = $Settings['blubrry_program_keyword'];
@@ -111,7 +111,7 @@ class PowerPressPostToSocial {
111
  * @return array|mixed|object|string
112
  */
113
  function callUpdateListing( $post_id, $program_keyword, $guid ) {
114
- $Settings = powerpress_get_settings('powerpress_general');
115
  $episodeData = powerpress_get_enclosure_data( $post_id );
116
  if( empty($episodeData['duration']) )
117
  $episodeData['duration'] = '';
@@ -130,7 +130,7 @@ function callUpdateListing( $post_id, $program_keyword, $guid ) {
130
  $subtitle = substr( get_the_content( $post_id ), 0, 255 );
131
  }
132
 
133
- $FeedSettings = powerpress_get_settings( 'powerpress_feed' );
134
 
135
  $post_params = array(
136
  'feed-url' => '', // required
@@ -174,7 +174,7 @@ function callUpdateListing( $post_id, $program_keyword, $guid ) {
174
  * @return array|mixed|object|string
175
  */
176
  function callGetSocialOptions( $program_keyword ) {
177
- $Settings = powerpress_get_settings( 'powerpress_general' );
178
 
179
  $api_url_array = powerpress_get_api_array();
180
 
88
  }
89
 
90
  function do_pings() {
91
+ $Settings = get_option( 'powerpress_general' );
92
 
93
  $post_id = get_the_ID();
94
  $program_keyword = $Settings['blubrry_program_keyword'];
111
  * @return array|mixed|object|string
112
  */
113
  function callUpdateListing( $post_id, $program_keyword, $guid ) {
114
+ $Settings = get_option( 'powerpress_general' );
115
  $episodeData = powerpress_get_enclosure_data( $post_id );
116
  if( empty($episodeData['duration']) )
117
  $episodeData['duration'] = '';
130
  $subtitle = substr( get_the_content( $post_id ), 0, 255 );
131
  }
132
 
133
+ $FeedSettings = get_option( 'powerpress_feed' );
134
 
135
  $post_params = array(
136
  'feed-url' => '', // required
174
  * @return array|mixed|object|string
175
  */
176
  function callGetSocialOptions( $program_keyword ) {
177
+ $Settings = get_option( 'powerpress_general' );
178
 
179
  $api_url_array = powerpress_get_api_array();
180
 
powerpressadmin.php CHANGED
@@ -3479,7 +3479,7 @@ function powerpress_remote_fopen($url, $basic_auth = false, $post_args = array()
3479
  }
3480
  else if( $http_code > 399 )
3481
  {
3482
- echo '40x';
3483
  $GLOBALS['g_powerpress_remote_error'] = "HTTP $http_code";
3484
  $GLOBALS['g_powerpress_remote_errorno'] = $http_code;
3485
  switch( $http_code )
3479
  }
3480
  else if( $http_code > 399 )
3481
  {
3482
+ //echo '40x';
3483
  $GLOBALS['g_powerpress_remote_error'] = "HTTP $http_code";
3484
  $GLOBALS['g_powerpress_remote_errorno'] = $http_code;
3485
  switch( $http_code )
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: amandato, blubrry
3
  Tags: podcasting, podcast, podcaster, powerpress, itunes, apple, apple podcasts, google podcasts, google play, enclosure, professional, apple, apple tv, ipad, iphone, soundcloud, squarespace, youtube, viddler, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, mp4, m4v, wordpressmu, mu, wordpress mu, multisite, multi site, mediacaster, post, plugin, posts, simple, social, dashboard, TSG, Buzzsprout, MTR, WP-boxCast, CastMyBlog, tgs podcasting, simple podcasting, seriously simple podcasting, seriously-simple-podcasting, serious, seriously, ssp, podlove, podcast.de, clammr, clammr radio, audio player, stitcher, tunein, show, shows, series, docs, documentation, support, free, add-ons, extensions, addons, libsyn, libsyn-podcasting, podbean, podomatic, spreaker
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
- Tested up to: 4.9.9
7
- Stable tag: 7.4
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
@@ -235,6 +235,22 @@ To install Blubrry PowerPress manually, follow these steps:
235
  If you are a fan of PowerPress, we would greatly appreciate it if you could take a moment and [leave us a review on WordPress.org](https://wordpress.org/support/plugin/powerpress/reviews/?rate=5#new-post). Your support is greatly appreciated!
236
 
237
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  = 7.4 =
239
  * Released on 10/03/2018
240
  * NEW: [Skip to Position in Player](https://create.blubrry.com/resources/powerpress/advanced-tools-and-options/skip-to-position-in-player/) shortcode, quickly skip to a position in your audio episodes from your show notes. e.g. `[skipto time="2:34"]` [Learn more](https://create.blubrry.com/resources/powerpress/advanced-tools-and-options/skip-to-position-in-player/)
3
  Tags: podcasting, podcast, podcaster, powerpress, itunes, apple, apple podcasts, google podcasts, google play, enclosure, professional, apple, apple tv, ipad, iphone, soundcloud, squarespace, youtube, viddler, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, mp4, m4v, wordpressmu, mu, wordpress mu, multisite, multi site, mediacaster, post, plugin, posts, simple, social, dashboard, TSG, Buzzsprout, MTR, WP-boxCast, CastMyBlog, tgs podcasting, simple podcasting, seriously simple podcasting, seriously-simple-podcasting, serious, seriously, ssp, podlove, podcast.de, clammr, clammr radio, audio player, stitcher, tunein, show, shows, series, docs, documentation, support, free, add-ons, extensions, addons, libsyn, libsyn-podcasting, podbean, podomatic, spreaker
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
+ Tested up to: 5.1.1
7
+ Stable tag: 7.4.1
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
235
  If you are a fan of PowerPress, we would greatly appreciate it if you could take a moment and [leave us a review on WordPress.org](https://wordpress.org/support/plugin/powerpress/reviews/?rate=5#new-post). Your support is greatly appreciated!
236
 
237
 
238
+ = 7.4.1 =
239
+ * Released on 4/10/2019
240
+ * Added logic to authentication email addresses differently for premium password protected podcasts.
241
+ * Added support for YoastSEO and Google Podcasts (Thanks @sunkast for bringing to our attention!)
242
+ * Removed use of `create_function` to fix damaged serialized data created by the old PodPress plugin. (Thanks @oilmanmag and Dimitris for bringing to our attention!)
243
+ * Fixed `esc_attr()`bug with podpress import.
244
+ * Added Tamil (ta) as a podcast feed language option. Thanks KT for requesting! If you do not see your language pelase contact us we will add it!
245
+ * Changed feed join query to solve conflict with the Affiliate Disclosure Pro plugin. (Thanks @ndnakashima for bringing to our attention!)
246
+ * New functionality for Taxonomy podcasting and the `powerpress_subscribe` shortcode (Thanks @tristanmason for testing!)
247
+ * Fixed taxonomy bugs with the playlist player shortcodes (Thanks @tristanmason for the code and helping us test!)
248
+ * PowerPress playlist player can now be ordered in ascending order with attribute order="asc" (Thanks @tristanmason for the code and helping us test!)
249
+ * Fixed bug with skipto shortcode leaving a blank value in feeds. (Thanks @tszt for bringing to our attention!)
250
+ * Skipto timestamp now uses the timestamp exactly as you entered it as the label as long as it has at least one colon to separate minutes from seconds.
251
+ * Fixed bug for post type podcasting in the situation where there can be multiple post types for blog posts or pages. (Thanks @shawnogordo for the bug fix!)
252
+
253
+
254
  = 7.4 =
255
  * Released on 10/03/2018
256
  * NEW: [Skip to Position in Player](https://create.blubrry.com/resources/powerpress/advanced-tools-and-options/skip-to-position-in-player/) shortcode, quickly skip to a position in your audio episodes from your show notes. e.g. `[skipto time="2:34"]` [Learn more](https://create.blubrry.com/resources/powerpress/advanced-tools-and-options/skip-to-position-in-player/)
views/settings_tab_appearance.php CHANGED
@@ -68,7 +68,7 @@
68
  {
69
  ?>
70
  <h3><a href="#" id="powerpress_create_subscribe_page"><?php echo __('Create a subscribe page from Template', 'powerpress'); ?></a></h3>
71
- <p><?php echo __('Creates a page from a template with the [powerpress_subscribe] shortcode. We encourage you to edit this page in your own words. Depending on your SEO stratigy, you may want to configure the meta robots content to noindex.', 'powerpress'); ?>
72
  </p>
73
  <?php
74
  }
@@ -110,7 +110,7 @@
110
  }
111
  if( !empty($FeedAttribs['term_taxonomy_id']) )
112
  {
113
- $shortcode['powerpress_playlist'] = '[powerpress_playlist term_taxonomy_id="'.$FeedAttribs['term_taxonomy_id'].'"]';
114
  $shortcode['powerpress_subscribe'] = '[powerpress_subscribe term_taxonomy_id="'.$FeedAttribs['term_taxonomy_id'].'"]';
115
  }
116
 
68
  {
69
  ?>
70
  <h3><a href="#" id="powerpress_create_subscribe_page"><?php echo __('Create a subscribe page from Template', 'powerpress'); ?></a></h3>
71
+ <p><?php echo __('Creates a page from a template with the [powerpress_subscribe] shortcode. We encourage you to edit this page in your own words. Depending on your SEO strategy, you may want to configure the meta robots content to noindex.', 'powerpress'); ?>
72
  </p>
73
  <?php
74
  }
110
  }
111
  if( !empty($FeedAttribs['term_taxonomy_id']) )
112
  {
113
+ $shortcode['powerpress_playlist'] = '[powerpress_playlist term_taxonomy_id="'.$FeedAttribs['term_taxonomy_id'].'" post_type="post"]';
114
  $shortcode['powerpress_subscribe'] = '[powerpress_subscribe term_taxonomy_id="'.$FeedAttribs['term_taxonomy_id'].'"]';
115
  }
116