PowerPress Podcasting plugin by Blubrry - Version 8.6.5

Version Description

  • Released 06/02/2021
  • Bypass caching in network-related API calls
  • Start sending website admin URL for Blubrry users
Download this release

Release Info

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

Code changes from version 8.6.4 to 8.6.5

api-data-transfer-bus.class.php CHANGED
@@ -97,7 +97,7 @@ class PowerpressNetworkDataBus{
97
  static function getNetworksInAccount($creds)
98
  {
99
  $cacheName = 'ppn-cache n';
100
- $requestUrl = '/2/powerpress/network';
101
  return PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, true);
102
  }
103
 
@@ -113,7 +113,7 @@ class PowerpressNetworkDataBus{
113
  {
114
  if (isset($networkInfo['network_id'])) {
115
  $cacheName = 'ppn-cache n-' . $networkInfo['network_id'];
116
- $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'];
117
  $props = PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, $needDirectAPI);
118
  return $props;
119
  }
@@ -131,7 +131,7 @@ class PowerpressNetworkDataBus{
131
  static function getProgramsInNetwork($apiUrl, $creds, $networkInfo, $needDirectAPI)
132
  {
133
  $cacheName = 'ppn-cache n-'.$networkInfo['network_id'].'-p';
134
- $requestUrl = '/2/powerpress/network/' . $networkInfo['network_id'] . '/programs';
135
  return PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, $needDirectAPI);
136
  }
137
 
@@ -160,7 +160,7 @@ class PowerpressNetworkDataBus{
160
  static function getListsInNetwork($apiUrl, $creds, $networkInfo, $needDirectAPI)
161
  {
162
  $cacheName = 'ppn-cache n-'.$networkInfo['network_id'].'-l';
163
- $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/lists/';
164
  $props = PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, $needDirectAPI);
165
  return $props;
166
  }
@@ -224,7 +224,7 @@ class PowerpressNetworkDataBus{
224
  static function getApplicantsInNetwork($apiUrl, $creds, $networkInfo, $needDirectAPI)
225
  {
226
  $cacheName = "ppn-cache n-".$networkInfo['network_id']."-a";
227
- $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/applicant';
228
  return PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, $needDirectAPI);
229
  }
230
 
@@ -239,7 +239,7 @@ class PowerpressNetworkDataBus{
239
  {
240
  if (!empty($networkInfo['network_id']) && !empty ($networkInfo['list_id'])) {
241
  $cacheName = 'ppn-cache n-' . $networkInfo['network_id'] . '-l-' . $networkInfo['list_id'];
242
- $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/lists/' . $networkInfo['list_id'] . '/programs';
243
  $props = PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, $needDirectAPI = true);
244
  if (!empty($props['list_info']['list_title']) && !empty($props['list_info']['list_description'])) {
245
  PowerPressNetwork::insertOption('list_title', $props['list_info']['list_title']);
@@ -262,7 +262,7 @@ class PowerpressNetworkDataBus{
262
  {
263
  $cacheName = 'ppn-cache n-'.$networkInfo['network_id'].'-p-'.$networkInfo['program_id'];
264
  if (!empty($networkInfo['network_id']) && !empty($networkInfo['program_id']) ) {
265
- $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/programs/' . $networkInfo['program_id'];
266
  $props = PowerpressNetworkDataBus::getCacheOrCallAPI(false, $cacheName, $requestUrl, $needDirectAPI);
267
  if (!empty($props['program_info']['program_id']) && !empty($props['program_info']['program_title'])) {
268
  PowerPressNetwork::insertOption('program_id', $props['program_info']['program_id']);
@@ -308,7 +308,7 @@ class PowerpressNetworkDataBus{
308
  {
309
  if(!empty($networkInfo['network_id']))
310
  {
311
- $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/account/information/';
312
  $props = self::getCacheOrCallAPI($creds, null, $requestUrl, $needDirectAPI);
313
  return $props;
314
  } else {
@@ -350,7 +350,7 @@ class PowerpressNetworkDataBus{
350
  $feedUrl = trim($feedUrl);
351
  $feedUrl = preg_replace('#^(https?://|ftps?://)?(www.)?#', '', $feedUrl);
352
  $feedUrl = urlencode($feedUrl);
353
- $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/applicant/findshow?feedUrl=' . $feedUrl;
354
  $props = PowerpressNetworkDataBus::getCacheOrCallAPI($creds, null, $requestUrl, true);
355
  $requestUrl = $apiUrl.'2/powerpress/network/'.$networkInfo['network_id'].'/lists/';
356
  $props['list'] = PowerpressNetworkDataBus::getCacheOrCallAPI($creds, null, $requestUrl, true);
97
  static function getNetworksInAccount($creds)
98
  {
99
  $cacheName = 'ppn-cache n';
100
+ $requestUrl = '/2/powerpress/network?cache=' . md5( rand(0, 999) . time()) ;
101
  return PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, true);
102
  }
103
 
113
  {
114
  if (isset($networkInfo['network_id'])) {
115
  $cacheName = 'ppn-cache n-' . $networkInfo['network_id'];
116
+ $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id']. '?cache=' . md5( rand(0, 999) . time()) ;
117
  $props = PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, $needDirectAPI);
118
  return $props;
119
  }
131
  static function getProgramsInNetwork($apiUrl, $creds, $networkInfo, $needDirectAPI)
132
  {
133
  $cacheName = 'ppn-cache n-'.$networkInfo['network_id'].'-p';
134
+ $requestUrl = '/2/powerpress/network/' . $networkInfo['network_id'] . '/programs?cache=' . md5( rand(0, 999) . time()) ;
135
  return PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, $needDirectAPI);
136
  }
137
 
160
  static function getListsInNetwork($apiUrl, $creds, $networkInfo, $needDirectAPI)
161
  {
162
  $cacheName = 'ppn-cache n-'.$networkInfo['network_id'].'-l';
163
+ $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/lists/?cache=' . md5( rand(0, 999) . time()) ;
164
  $props = PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, $needDirectAPI);
165
  return $props;
166
  }
224
  static function getApplicantsInNetwork($apiUrl, $creds, $networkInfo, $needDirectAPI)
225
  {
226
  $cacheName = "ppn-cache n-".$networkInfo['network_id']."-a";
227
+ $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/applicant?cache=' . md5( rand(0, 999) . time() );
228
  return PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, $needDirectAPI);
229
  }
230
 
239
  {
240
  if (!empty($networkInfo['network_id']) && !empty ($networkInfo['list_id'])) {
241
  $cacheName = 'ppn-cache n-' . $networkInfo['network_id'] . '-l-' . $networkInfo['list_id'];
242
+ $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/lists/' . $networkInfo['list_id'] . '/programs?cache=' . md5( rand(0, 999) . time()) ;
243
  $props = PowerpressNetworkDataBus::getCacheOrCallAPI($creds, $cacheName, $requestUrl, $needDirectAPI = true);
244
  if (!empty($props['list_info']['list_title']) && !empty($props['list_info']['list_description'])) {
245
  PowerPressNetwork::insertOption('list_title', $props['list_info']['list_title']);
262
  {
263
  $cacheName = 'ppn-cache n-'.$networkInfo['network_id'].'-p-'.$networkInfo['program_id'];
264
  if (!empty($networkInfo['network_id']) && !empty($networkInfo['program_id']) ) {
265
+ $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/programs/' . $networkInfo['program_id'] . '?cache=' . md5( rand(0, 999) . time()) ;
266
  $props = PowerpressNetworkDataBus::getCacheOrCallAPI(false, $cacheName, $requestUrl, $needDirectAPI);
267
  if (!empty($props['program_info']['program_id']) && !empty($props['program_info']['program_title'])) {
268
  PowerPressNetwork::insertOption('program_id', $props['program_info']['program_id']);
308
  {
309
  if(!empty($networkInfo['network_id']))
310
  {
311
+ $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/account/information/?cache=' . md5( rand(0, 999) . time()) ;
312
  $props = self::getCacheOrCallAPI($creds, null, $requestUrl, $needDirectAPI);
313
  return $props;
314
  } else {
350
  $feedUrl = trim($feedUrl);
351
  $feedUrl = preg_replace('#^(https?://|ftps?://)?(www.)?#', '', $feedUrl);
352
  $feedUrl = urlencode($feedUrl);
353
+ $requestUrl = $apiUrl . '2/powerpress/network/' . $networkInfo['network_id'] . '/applicant/findshow?feedUrl=' . $feedUrl . '&cache=' . md5( rand(0, 999) . time()) ;
354
  $props = PowerpressNetworkDataBus::getCacheOrCallAPI($creds, null, $requestUrl, true);
355
  $requestUrl = $apiUrl.'2/powerpress/network/'.$networkInfo['network_id'].'/lists/';
356
  $props['list'] = PowerpressNetworkDataBus::getCacheOrCallAPI($creds, null, $requestUrl, true);
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.6.4
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.6.4' );
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.6.5
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.6.5' );
40
 
41
  // Translation support:
42
  if ( !defined('POWERPRESS_ABSPATH') )
powerpressadmin-jquery.php CHANGED
@@ -208,9 +208,14 @@ function powerpress_admin_jquery_init()
208
  $json_data = false;
209
  $json_data_programs = false;
210
  $api_url_array = powerpress_get_api_array();
 
 
 
 
 
211
  if ($creds) {
212
  $accessToken = powerpress_getAccessToken();
213
- $req_url = sprintf('/2/media/%s/index.json?quota=true&wp_admin_url=%s&published=true&cache=' . md5( rand(0, 999) . time() ), $blubrryProgramKeyword, urlencode(admin_url('admin.php')));
214
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
215
  $req_url_programs = sprintf('/2/service/index.json?cache=' . md5( rand(0, 999) . time() ));
216
  $req_url_programs .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '?' . POWERPRESS_BLUBRRY_API_QSA : '');
@@ -218,7 +223,7 @@ function powerpress_admin_jquery_init()
218
  $results_programs = $auth->api($accessToken, $req_url_programs);
219
  } else {
220
  foreach ($api_url_array as $index => $api_url) {
221
- $req_url = sprintf('%s/media/%s/index.json?quota=true&wp_admin_url=%s&published=true&cache=' . md5( rand(0, 999) . time() ), rtrim($api_url, '/'), $blubrryProgramKeyword, urlencode(admin_url('admin.php')));
222
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
223
  $req_url_programs = sprintf('%s/service/index.json?cache=' . md5( rand(0, 999) . time() ), rtrim($api_url, '/'));
224
  $req_url_programs .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '?' . POWERPRESS_BLUBRRY_API_QSA : '');
208
  $json_data = false;
209
  $json_data_programs = false;
210
  $api_url_array = powerpress_get_api_array();
211
+ if (is_plugin_active('powerpress-hosting/powerpress-hosting.php')) {
212
+ $website_detection_string = "&wp_blubrry_hosted=true";
213
+ } else {
214
+ $website_detection_string = "&wp_admin_url=" . urlencode(admin_url('admin.php'));
215
+ }
216
  if ($creds) {
217
  $accessToken = powerpress_getAccessToken();
218
+ $req_url = sprintf('/2/media/%s/index.json?quota=true%s&published=true&cache=' . md5( rand(0, 999) . time() ), $blubrryProgramKeyword, $website_detection_string);
219
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
220
  $req_url_programs = sprintf('/2/service/index.json?cache=' . md5( rand(0, 999) . time() ));
221
  $req_url_programs .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '?' . POWERPRESS_BLUBRRY_API_QSA : '');
223
  $results_programs = $auth->api($accessToken, $req_url_programs);
224
  } else {
225
  foreach ($api_url_array as $index => $api_url) {
226
+ $req_url = sprintf('%s/media/%s/index.json?quota=true%s&published=true&cache=' . md5( rand(0, 999) . time() ), rtrim($api_url, '/'), $blubrryProgramKeyword, $website_detection_string);
227
  $req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
228
  $req_url_programs = sprintf('%s/service/index.json?cache=' . md5( rand(0, 999) . time() ), rtrim($api_url, '/'));
229
  $req_url_programs .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '?' . POWERPRESS_BLUBRRY_API_QSA : '');
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.6.4
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
@@ -184,6 +184,11 @@ If you are a fan of PowerPress, we would greatly appreciate it if you could take
184
 
185
  == Changelog ==
186
 
 
 
 
 
 
187
  = 8.6.4 =
188
  * Released 05/19/2021
189
  * Small bugfix from today's earlier release
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
  Tested up to: 5.7
7
+ Stable tag: 8.6.5
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
184
 
185
  == Changelog ==
186
 
187
+ = 8.6.5 =
188
+ * Released 06/02/2021
189
+ * Bypass caching in network-related API calls
190
+ * Start sending website admin URL for Blubrry users
191
+
192
  = 8.6.4 =
193
  * Released 05/19/2021
194
  * Small bugfix from today's earlier release