PowerPress Podcasting plugin by Blubrry - Version 8.5.6

Version Description

  • Released 04/14/2021
  • Fixed Create New Episode button for Post Type feeds
  • Fixed soon-to-be broken assets2.blubrry.com links
  • Small bugfixes
Download this release

Release Info

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

Code changes from version 8.5.5 to 8.5.6

powerpress-subscribe.php CHANGED
@@ -918,7 +918,7 @@ function powerpress_do_subscribe_widget($settings, $PowerPressSettings)
918
 
919
  // Lets build the subscribe box...
920
  $html .= '<div class="pp-sub-bx">';
921
- $html .= '<img class="pp-sub-l" src="'. esc_url( $settings['image_url'] ) .'" '. (!empty($settings['title'])?' title="'. esc_attr($settings['title']).'" ':'') .'/>';
922
  $html .= '<div class="pp-sub-btns">';
923
 
924
  if( !empty($settings['itunes_url']) && !empty($settings['subscribe_feature_apple_shortcode']) ) {
918
 
919
  // Lets build the subscribe box...
920
  $html .= '<div class="pp-sub-bx">';
921
+ $html .= '<img class="pp-sub-l" src="'. esc_url( $settings['image_url'] ) .'" '. (!empty($settings['title'])?' title="'. esc_attr($settings['title']).'" alt="'. esc_attr($settings['title']).'" ':' alt="No show image" ') .'/>';
922
  $html .= '<div class="pp-sub-btns">';
923
 
924
  if( !empty($settings['itunes_url']) && !empty($settings['subscribe_feature_apple_shortcode']) ) {
powerpress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="https://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: 8.5.5
7
  Author: Blubrry
8
  Author URI: https://blubrry.com/
9
  Requires at least: 3.6
@@ -36,7 +36,7 @@ if( !function_exists('add_action') ) {
36
 
37
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
38
 
39
- define('POWERPRESS_VERSION', '8.5.5' );
40
 
41
  // Translation support:
42
  if ( !defined('POWERPRESS_ABSPATH') )
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="https://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: 8.5.6
7
  Author: Blubrry
8
  Author URI: https://blubrry.com/
9
  Requires at least: 3.6
36
 
37
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
38
 
39
+ define('POWERPRESS_VERSION', '8.5.6' );
40
 
41
  // Translation support:
42
  if ( !defined('POWERPRESS_ABSPATH') )
powerpressadmin-basic.php CHANGED
@@ -836,7 +836,7 @@ function powerpress_settings_tab_footer()
836
  </div>
837
  <?php
838
  }
839
- function powerpressadmin_welcome($GeneralSettings, $FeedSettings)
840
  {
841
  if (isset($_GET['feed_slug'])) {
842
  $feed_slug = $_GET['feed_slug'];
@@ -889,7 +889,7 @@ function powerpressadmin_welcome($GeneralSettings, $FeedSettings)
889
  </div>
890
  </div>
891
  <div class="prog-sum-contents">
892
- <a id="welcome-tab-new-post" href="<?php echo admin_url('post-new.php') ?>">
893
  <div class="pp_button-container">
894
  <?php echo __('CREATE NEW EPISODE', 'powerpress'); ?>
895
  </div>
836
  </div>
837
  <?php
838
  }
839
+ function powerpressadmin_welcome($GeneralSettings, $FeedSettings, $NewPostQueryString = '')
840
  {
841
  if (isset($_GET['feed_slug'])) {
842
  $feed_slug = $_GET['feed_slug'];
889
  </div>
890
  </div>
891
  <div class="prog-sum-contents">
892
+ <a id="welcome-tab-new-post" href="<?php echo admin_url('post-new.php') . $NewPostQueryString; ?>">
893
  <div class="pp_button-container">
894
  <?php echo __('CREATE NEW EPISODE', 'powerpress'); ?>
895
  </div>
powerpressadmin-editfeed.php CHANGED
@@ -180,7 +180,7 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
180
  }
181
 
182
  $FeedTitle = __('Feed Settings', 'powerpress');
183
-
184
  switch( $type )
185
  {
186
  case 'channel': {
@@ -226,7 +226,7 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
226
  $FeedAttribs['term_taxonomy_id'] = $type_value;
227
  $FeedSettings = powerpress_get_settings('powerpress_taxonomy_'.$term_taxonomy_id);
228
  $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
229
-
230
  global $wpdb;
231
  $term_info = $wpdb->get_results("SELECT term_id, taxonomy FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = $term_taxonomy_id", ARRAY_A);
232
  if( !empty( $term_info[0]['term_id']) ) {
@@ -254,7 +254,7 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
254
  if( !is_array($FeedSettingsArray[ $feed_slug ]) )
255
  $FeedSettingsArray[ $feed_slug ] = array();
256
  $FeedSettings = powerpress_default_settings($FeedSettingsArray[ $feed_slug ], 'editfeed_custom');
257
-
258
  //$category = get_category_to_edit($cat_ID);
259
  $PostTypeTitle = $FeedAttribs['post_type']; // TODO: Get readable title of post type
260
  $FeedTitle = sprintf( __('Podcast Settings for Post Type %s with slug %s', 'powerpress'), htmlspecialchars($PostTypeTitle) , htmlspecialchars($feed_slug));
@@ -304,7 +304,7 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
304
  </div>
305
  <button style="display: none;" id="welcome-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'welcome-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
306
  <div id="welcome-all" class="pp-sidenav-tab active">
307
- <?php powerpressadmin_welcome($General, $FeedSettings); ?>
308
  </div>
309
  </div>
310
 
180
  }
181
 
182
  $FeedTitle = __('Feed Settings', 'powerpress');
183
+ $NewPostQueryString = '';
184
  switch( $type )
185
  {
186
  case 'channel': {
226
  $FeedAttribs['term_taxonomy_id'] = $type_value;
227
  $FeedSettings = powerpress_get_settings('powerpress_taxonomy_'.$term_taxonomy_id);
228
  $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
229
+
230
  global $wpdb;
231
  $term_info = $wpdb->get_results("SELECT term_id, taxonomy FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = $term_taxonomy_id", ARRAY_A);
232
  if( !empty( $term_info[0]['term_id']) ) {
254
  if( !is_array($FeedSettingsArray[ $feed_slug ]) )
255
  $FeedSettingsArray[ $feed_slug ] = array();
256
  $FeedSettings = powerpress_default_settings($FeedSettingsArray[ $feed_slug ], 'editfeed_custom');
257
+ $NewPostQueryString = '?post_type=' . $type_value;
258
  //$category = get_category_to_edit($cat_ID);
259
  $PostTypeTitle = $FeedAttribs['post_type']; // TODO: Get readable title of post type
260
  $FeedTitle = sprintf( __('Podcast Settings for Post Type %s with slug %s', 'powerpress'), htmlspecialchars($PostTypeTitle) , htmlspecialchars($feed_slug));
304
  </div>
305
  <button style="display: none;" id="welcome-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'welcome-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
306
  <div id="welcome-all" class="pp-sidenav-tab active">
307
+ <?php powerpressadmin_welcome($General, $FeedSettings, $NewPostQueryString); ?>
308
  </div>
309
  </div>
310
 
powerpressadmin-jquery.php CHANGED
@@ -590,10 +590,19 @@ window.onload = function() {
590
  check_admin_referer('powerpress-jquery-account-verify');
591
 
592
  if (isset($_GET['logout']) && $_GET['logout']) {
593
- $action_url = admin_url('admin.php?action=powerpress-jquery-account-save');
594
- $action = 'powerpress-jquery-account-save';
595
- $logout_url = wp_nonce_url($action_url, $action) . '&remove=true';
596
- header("Location: " . $logout_url);
 
 
 
 
 
 
 
 
 
597
  exit;
598
  }
599
 
590
  check_admin_referer('powerpress-jquery-account-verify');
591
 
592
  if (isset($_GET['logout']) && $_GET['logout']) {
593
+ if ($creds) {
594
+ $accessToken = powerpress_getAccessToken();
595
+ $auth->revokeClient($accessToken, $creds['client_id'], $creds['client_secret']);
596
+ delete_option('powerpress_creds');
597
+ }
598
+ ?>
599
+ <script>
600
+ jQuery(document).ready(function() {
601
+ window.parent.tb_remove();
602
+ parent.location.reload(1);
603
+ });
604
+ </script>
605
+ <?php
606
  exit;
607
  }
608
 
powerpressadmin.php CHANGED
@@ -2507,7 +2507,7 @@ function powerpress_get_media_info(FeedSlug)
2507
  data: { action: 'powerpress_media_info', media_url : Value, feed_slug : encodeURIComponent(FeedSlug), hosting: Hosting, program_keyword: program_keyword },
2508
  timeout: (30 * 1000),
2509
  success: function(response) {
2510
-
2511
  response = response.trim();
2512
  // This logic will parse beyond warning messages generated by the server that we don't know about
2513
  var foundAt = response.indexOf('VERIFY-OK');
@@ -2873,16 +2873,26 @@ function powerpress_media_info_ajax()
2873
 
2874
  if( !isset($MediaInfo['error']) && !empty($MediaInfo['length']) )
2875
  {
2876
- //substr('', 'abc');
2877
- echo "VERIFY-OK\n";
2878
- echo "$feed_slug\n"; // swap positions
2879
- echo "{$MediaInfo['length']}\n";
2880
- echo powerpress_readable_duration($MediaInfo['duration'], true) ."\n";
2881
- if( isset($MediaInfo['warnings']) )
2882
- echo $MediaInfo['warnings'];
2883
-
2884
- echo "\n"; // make sure this line is ended
2885
- exit;
 
 
 
 
 
 
 
 
 
 
2886
  }
2887
 
2888
  echo "$feed_slug\n";
2507
  data: { action: 'powerpress_media_info', media_url : Value, feed_slug : encodeURIComponent(FeedSlug), hosting: Hosting, program_keyword: program_keyword },
2508
  timeout: (30 * 1000),
2509
  success: function(response) {
2510
+
2511
  response = response.trim();
2512
  // This logic will parse beyond warning messages generated by the server that we don't know about
2513
  var foundAt = response.indexOf('VERIFY-OK');
2873
 
2874
  if( !isset($MediaInfo['error']) && !empty($MediaInfo['length']) )
2875
  {
2876
+ //If the file is unpublished, check to make sure the user has hosting space
2877
+ if( strpos($media_url, 'http://') !== 0 && strpos($media_url, 'https://') !== 0) {
2878
+ if (isset($MediaInfo['space_remaining']) && !$MediaInfo['space_remaining']) {
2879
+ echo "VERIFY-WARNING\n";
2880
+ echo __('Not enough storage space remaining to publish this file.', 'powerpress');
2881
+ echo "\n";
2882
+ exit;
2883
+ }
2884
+ }
2885
+
2886
+ //substr('', 'abc');
2887
+ echo "VERIFY-OK\n";
2888
+ echo "$feed_slug\n"; // swap positions
2889
+ echo "{$MediaInfo['length']}\n";
2890
+ echo powerpress_readable_duration($MediaInfo['duration'], true) . "\n";
2891
+ if (isset($MediaInfo['warnings']))
2892
+ echo $MediaInfo['warnings'];
2893
+
2894
+ echo "\n"; // make sure this line is ended
2895
+ exit;
2896
  }
2897
 
2898
  echo "$feed_slug\n";
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: podcasting, podcast, podcaster, powerpress, itunes, apple, apple podcasts,
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
  Tested up to: 5.7
7
- Stable tag: 8.5.5
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
@@ -184,6 +184,12 @@ If you are a fan of PowerPress, we would greatly appreciate it if you could take
184
 
185
  == Changelog ==
186
 
 
 
 
 
 
 
187
  = 8.5.5 =
188
  * Released 04/08/2021
189
  * Accept JSON uploads in episode box
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
  Tested up to: 5.7
7
+ Stable tag: 8.5.6
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
184
 
185
  == Changelog ==
186
 
187
+ = 8.5.6 =
188
+ * Released 04/14/2021
189
+ * Fixed Create New Episode button for Post Type feeds
190
+ * Fixed soon-to-be broken assets2.blubrry.com links
191
+ * Small bugfixes
192
+
193
  = 8.5.5 =
194
  * Released 04/08/2021
195
  * Accept JSON uploads in episode box
shortcodes/views/program.php CHANGED
@@ -9,21 +9,21 @@ $pagename = get_query_var('pagename');
9
  ?>
10
 
11
  <head>
12
- <link href="https://assets2.blubrry.com/css/blubrryicons.css" rel="stylesheet" type="text/css"/>
13
- <link href="https://assets2.blubrry.com/tests/colorbox.css" rel="stylesheet" type="text/css"/>
14
- <link href="https://assets2.blubrry.com/css/ekko-lightbox.css" rel="stylesheet" type="text/css"/>
15
- <link href="https://assets2.blubrry.com/css/ekko-lightbox.min.css" rel="stylesheet" type="text/css"/>
16
- <link href="https://assets2.blubrry.com/css/blubrryicons.css" rel="stylesheet" type="text/css"/>
17
  <link href="<?php if (isset($_SERVER['HTTPS'])) {
18
  echo 'https://' . $_SERVER['SERVER_NAME'] . '/wp-content/plugins/powerpress-directory/js/mediaelement/build/mediaelementplayer.min.css';
19
  } else {
20
  echo 'http://' . $_SERVER['SERVER_NAME'] . '/wp-content/plugins/powerpress-directory/js/mediaelement/build/mediaelementplayer.min.css';
21
  } ?>" rel="stylesheet" type="text/css"/>
22
 
23
- <script src="https://assets2.blubrry.com/js/ekko-lightbox.js"></script>
24
- <script src="https://assets2.blubrry.com/js/ekko-lightbox.min.js"></script>
25
- <script src="https://assets2.blubrry.com/js/jquery.colorbox.js"></script>
26
- <script src="https://assets2.blubrry.com/js/jquery.colorbox-min.js"></script>
27
  <script src="<?php if (isset($_SERVER['HTTPS'])) {
28
  echo 'https://' . $_SERVER['SERVER_NAME'] . '/wp-content/plugins/powerpress-directory/js/mediaelement/build/mediaelement-and-player.js';
29
  } else {
9
  ?>
10
 
11
  <head>
12
+ <link href="https://assets.blubrry.com/css/blubrryicons.css" rel="stylesheet" type="text/css"/>
13
+ <link href="https://assets.blubrry.com/tests/colorbox.css" rel="stylesheet" type="text/css"/>
14
+ <link href="https://assets.blubrry.com/css/ekko-lightbox.css" rel="stylesheet" type="text/css"/>
15
+ <link href="https://assets.blubrry.com/css/ekko-lightbox.min.css" rel="stylesheet" type="text/css"/>
16
+ <link href="https://assets.blubrry.com/css/blubrryicons.css" rel="stylesheet" type="text/css"/>
17
  <link href="<?php if (isset($_SERVER['HTTPS'])) {
18
  echo 'https://' . $_SERVER['SERVER_NAME'] . '/wp-content/plugins/powerpress-directory/js/mediaelement/build/mediaelementplayer.min.css';
19
  } else {
20
  echo 'http://' . $_SERVER['SERVER_NAME'] . '/wp-content/plugins/powerpress-directory/js/mediaelement/build/mediaelementplayer.min.css';
21
  } ?>" rel="stylesheet" type="text/css"/>
22
 
23
+ <script src="https://assets.blubrry.com/js/ekko-lightbox.js"></script>
24
+ <script src="https://assets.blubrry.com/js/ekko-lightbox.min.js"></script>
25
+ <script src="https://assets.blubrry.com/js/jquery.colorbox.js"></script>
26
+ <script src="https://assets.blubrry.com/js/jquery.colorbox-min.js"></script>
27
  <script src="<?php if (isset($_SERVER['HTTPS'])) {
28
  echo 'https://' . $_SERVER['SERVER_NAME'] . '/wp-content/plugins/powerpress-directory/js/mediaelement/build/mediaelement-and-player.js';
29
  } else {
views/onboarding/blubrry_signin.php CHANGED
@@ -62,49 +62,51 @@
62
  }
63
 
64
 
65
- $tempClient = get_option('powerpress_temp_client');
66
- if ($_GET['state'] != $tempClient['state']) {
67
- powerpress_page_message_add_error(__('An error occurred linking your account. State does not match.', 'powerpress'));
68
- return false;
69
- }
70
- $redirectUri = get_option('powerpress_blubrry_api_redirect_uri');
 
 
71
 
72
- // Get the client ID for this installation
73
- $resultClient = $auth->issueClient($_GET['code'], $tempClient['temp_client_id'], $tempClient['temp_client_secret'], $redirectUri);
74
- if ($resultClient === false || empty($resultClient['client_id']) || empty($resultClient['client_secret'])) {
75
- if (!empty($resultTokens['error_description']))
76
- powerpress_page_message_add_error($resultTokens['error_description']);
77
- else if (!empty($resultTokens['error']))
78
- powerpress_page_message_add_error($resultTokens['error']);
79
- else
80
- powerpress_page_message_add_error(__('Error issuing client:', 'powerpress-network') . ' ' . $auth->GetLastError() . $auth->getDebugInfo());
81
- powerpress_page_message_print();
82
- exit;
83
- }
84
 
85
- // Get the access and refresh token for this client
86
- $resultTokens = $auth->getAccessTokenFromCode($_GET['code'], $resultClient['client_id'], $resultClient['client_secret'], $redirectUri);
 
 
 
 
 
 
 
 
 
 
87
 
88
- if ($resultTokens === false || empty($resultTokens['access_token']) || empty($resultTokens['refresh_token'])) {
89
- if (!empty($resultTokens['error_description']))
90
- powerpress_page_message_add_error($resultTokens['error_description']);
91
- else if (!empty($resultTokens['error']))
92
- powerpress_page_message_add_error($resultTokens['error']);
93
- else
94
- powerpress_page_message_add_error(__('Error retrieving access token:', 'powerpress-network') . ' ' . $auth->GetLastError());
95
- powerpress_page_message_print();
96
- exit;
97
  }
98
 
99
- $props = array();
100
- $props['code'] = $_GET['code'];
101
- $props['client_id'] = $resultClient['client_id'];
102
- $props['client_secret'] = $resultClient['client_secret'];
103
- $props['access_token'] = $resultTokens['access_token'];
104
- $props['access_expires'] = (time() + $resultTokens['expires_in'] - 10);
105
- $props['refresh_token'] = $resultTokens['refresh_token'];
106
- powerpress_save_settings($props, 'powerpress_creds');
107
-
108
  $result = $auth->checkAccountVerified();
109
  if (isset($result['account_enabled']) && isset($result['account_confirmed'])) {
110
  if (!$result['account_enabled'] || !$result['account_confirmed']) {
62
  }
63
 
64
 
65
+ $creds = get_option('powerpress_creds');
66
+ if (!$creds) {
67
+ $tempClient = get_option('powerpress_temp_client');
68
+ if ($_GET['state'] != $tempClient['state']) {
69
+ powerpress_page_message_add_error(__('An error occurred linking your account. State does not match.', 'powerpress'));
70
+ return false;
71
+ }
72
+ $redirectUri = get_option('powerpress_blubrry_api_redirect_uri');
73
 
74
+ // Get the client ID for this installation
75
+ $resultClient = $auth->issueClient($_GET['code'], $tempClient['temp_client_id'], $tempClient['temp_client_secret'], $redirectUri);
76
+ if ($resultClient === false || empty($resultClient['client_id']) || empty($resultClient['client_secret'])) {
77
+ if (!empty($resultTokens['error_description']))
78
+ powerpress_page_message_add_error($resultTokens['error_description']);
79
+ else if (!empty($resultTokens['error']))
80
+ powerpress_page_message_add_error($resultTokens['error']);
81
+ else
82
+ powerpress_page_message_add_error(__('Error issuing client:', 'powerpress-network') . ' ' . $auth->GetLastError() . $auth->getDebugInfo());
83
+ powerpress_page_message_print();
84
+ exit;
85
+ }
86
 
87
+ // Get the access and refresh token for this client
88
+ $resultTokens = $auth->getAccessTokenFromCode($_GET['code'], $resultClient['client_id'], $resultClient['client_secret'], $redirectUri);
89
+ if ($resultTokens === false || empty($resultTokens['access_token']) || empty($resultTokens['refresh_token'])) {
90
+ if (!empty($resultTokens['error_description']))
91
+ powerpress_page_message_add_error($resultTokens['error_description']);
92
+ else if (!empty($resultTokens['error']))
93
+ powerpress_page_message_add_error($resultTokens['error']);
94
+ else
95
+ powerpress_page_message_add_error(__('Error retrieving access token:', 'powerpress-network') . ' ' . $auth->GetLastError());
96
+ powerpress_page_message_print();
97
+ exit;
98
+ }
99
 
100
+ $props = array();
101
+ $props['code'] = $_GET['code'];
102
+ $props['client_id'] = $resultClient['client_id'];
103
+ $props['client_secret'] = $resultClient['client_secret'];
104
+ $props['access_token'] = $resultTokens['access_token'];
105
+ $props['access_expires'] = (time() + $resultTokens['expires_in'] - 10);
106
+ $props['refresh_token'] = $resultTokens['refresh_token'];
107
+ powerpress_save_settings($props, 'powerpress_creds');
 
108
  }
109
 
 
 
 
 
 
 
 
 
 
110
  $result = $auth->checkAccountVerified();
111
  if (isset($result['account_enabled']) && isset($result['account_confirmed'])) {
112
  if (!$result['account_enabled'] || !$result['account_confirmed']) {