PowerPress Podcasting plugin by Blubrry - Version 8.7.11

Version Description

  • Released on 03/02/2022
  • Fixed verify media bug for drafts
  • Fixed clear cache button in network section
  • Clear cache on application accept
Download this release

Release Info

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

Code changes from version 8.7.10 to 8.7.11

api-data-transfer-bus.class.php CHANGED
@@ -89,6 +89,15 @@ class PowerpressNetworkDataBus{
89
  }
90
  }
91
 
 
 
 
 
 
 
 
 
 
92
  /**
93
  * Returns networks associated to the account
94
  * @param $creds array of oauth credentials for blubrry api
89
  }
90
  }
91
 
92
+ /**
93
+ * Clears the specified cache
94
+ * @param $cacheName string
95
+ * @return true on success bool
96
+ */
97
+ static function clearCache($cacheName) {
98
+ return delete_option($cacheName);
99
+ }
100
+
101
  /**
102
  * Returns networks associated to the account
103
  * @param $creds array of oauth credentials for blubrry api
js/admin.js CHANGED
@@ -656,7 +656,7 @@ function confirmUnlink(idForm)
656
 
657
  function refreshAndCallDirectAPI(currentPage, idForm)
658
  {
659
- let refresh = jQuery('<input name = "needDirectAPI" value= "true" hidden>') ;
660
  jQuery(function($){ $("#"+idForm).append(refresh) });
661
  directStatus(currentPage, idForm, false);
662
  }
656
 
657
  function refreshAndCallDirectAPI(currentPage, idForm)
658
  {
659
+ let refresh = jQuery('<input name = "clearSiteCache" value= "true" hidden>') ;
660
  jQuery(function($){ $("#"+idForm).append(refresh) });
661
  directStatus(currentPage, idForm, false);
662
  }
powerpress-network.php CHANGED
@@ -246,6 +246,19 @@ class PowerPressNetwork
246
  $this->removeOption('link_page_program');
247
  }
248
  update_option ('powerpress_network_map', $option);
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  } else {
250
  if (empty($_POST['pageID'])) {
251
  $postID = $this->createPage();
@@ -538,6 +551,9 @@ class PowerPressNetwork
538
  'applicantId' => $_POST['applicantId']
539
  );
540
  $props = $this->apiBus->changeApplicationStatus($apiUrl, $creds, $networkInfo, $action);
 
 
 
541
  }
542
  }
543
 
246
  $this->removeOption('link_page_program');
247
  }
248
  update_option ('powerpress_network_map', $option);
249
+ } else if (isset($_POST['pageAction']) && $_POST['pageAction'] == 'clearSiteCache') {
250
+ $network_id = get_option('powerpress_network_id');
251
+ if ($network_id) {
252
+ $cacheNameBase = 'ppn-cache n-' . $network_id;
253
+ // base network data
254
+ $this->apiBus->clearCache($cacheNameBase);
255
+ // applications
256
+ $this->apiBus->clearCache($cacheNameBase . '-a');
257
+ // programs
258
+ $this->apiBus->clearCache($cacheNameBase . '-p');
259
+ // lists
260
+ $this->apiBus->clearCache($cacheNameBase . '-l');
261
+ }
262
  } else {
263
  if (empty($_POST['pageID'])) {
264
  $postID = $this->createPage();
551
  'applicantId' => $_POST['applicantId']
552
  );
553
  $props = $this->apiBus->changeApplicationStatus($apiUrl, $creds, $networkInfo, $action);
554
+ // clear programs cache so newly approved programs can be viewed
555
+ $networkId = get_option('powerpress_network_id');
556
+ $this->apiBus->clearCache('ppn-cache n-'.$networkId.'-p');
557
  }
558
  }
559
 
powerpress-player.php CHANGED
@@ -1353,7 +1353,7 @@ function powerpressplayer_build_blubrryaudio($media_url, $EpisodeData=array(), $
1353
  $instance++;
1354
 
1355
  // media URL is all we need., as long as it's hosted at blubrry.com...
1356
- if( preg_match('/(content|protected|ins)\.blubrry\.com/', $media_url) )
1357
  {
1358
  $playerSettings = get_option('powerpress_bplayer');
1359
  $hash = '';
1353
  $instance++;
1354
 
1355
  // media URL is all we need., as long as it's hosted at blubrry.com...
1356
+ if( preg_match('/(content|protected|ins|mc)\.blubrry\.com/', $media_url) )
1357
  {
1358
  $playerSettings = get_option('powerpress_bplayer');
1359
  $hash = '';
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.7.10
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.7.10' );
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.7.11
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.7.11' );
40
 
41
  // Translation support:
42
  if ( !defined('POWERPRESS_ABSPATH') )
powerpressadmin.php CHANGED
@@ -2503,6 +2503,14 @@ function powerpress_get_media_info(FeedSlug)
2503
  var program_keyword = jQuery('#powerpress_program_keyword_'+FeedSlug).val();
2504
  if( Value )
2505
  {
 
 
 
 
 
 
 
 
2506
  if( powerpress_check_url(Value, 'powerpress_warning_'+FeedSlug ) )
2507
  {
2508
  jQuery('#powerpress_check_'+FeedSlug).css("display", 'inline-block');
2503
  var program_keyword = jQuery('#powerpress_program_keyword_'+FeedSlug).val();
2504
  if( Value )
2505
  {
2506
+ <?php
2507
+ // if we're looking at a draft, we already have the full URL saved but the media isn't live
2508
+ // so, to verify in this case, we grab the filename from the URL before passing to ajax
2509
+ global $post;
2510
+ if ($post->post_status == 'draft') {
2511
+ ?>
2512
+ Value = Value.split('/').slice(-1)[0];
2513
+ <?php } ?>
2514
  if( powerpress_check_url(Value, 'powerpress_warning_'+FeedSlug ) )
2515
  {
2516
  jQuery('#powerpress_check_'+FeedSlug).css("display", 'inline-block');
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.9
7
- Stable tag: 8.7.10
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
@@ -186,6 +186,12 @@ If you are a fan of PowerPress, we would greatly appreciate it if you could take
186
 
187
  == Changelog ==
188
 
 
 
 
 
 
 
189
  = 8.7.10 =
190
  * Released on 02/07/2022
191
  * Removed warning for Blubrry media URLs with query strings
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
  Tested up to: 5.9
7
+ Stable tag: 8.7.11
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
186
 
187
  == Changelog ==
188
 
189
+ = 8.7.11 =
190
+ * Released on 03/02/2022
191
+ * Fixed verify media bug for drafts
192
+ * Fixed clear cache button in network section
193
+ * Clear cache on application accept
194
+
195
  = 8.7.10 =
196
  * Released on 02/07/2022
197
  * Removed warning for Blubrry media URLs with query strings