PowerPress Podcasting plugin by Blubrry - Version 7.1

Version Description

  • Released on 7/11/2017
  • Added support for iOS 11!
  • iTunes type added, specifcy episodic or serial for your podcast program (for iOS 11).
  • iTunes episode title, number, season and type added for your episodes (for iOS 11).
  • Subscribe on iTunes changed to Subscribe on Apple Podcasts, links have been enhanced to highlight episodes.
  • Blubrry Podcast Media Hosting and HTTPS: Media URLs are now automatically converted to HTTPS.
  • Added compatibility for the SG CachePress plugin. PowerPress will clear the cache if there was an error. (Thanks @grudesky for getting us in touch with developers!)
  • Fixed error with creating the subscribe page in some languages (Thanks @edithmayerhofer for bringing to our attention).
  • Better error reporting when importing podcast feed images.
  • Verify media option improvements, mp3 duration is now detected even faster in most cases!
  • Added logic to prevent notice messages with the subscribe_shortcode and newest versions of PHP. (Thanks @mahe for bringing to our attention)
  • Added "Hide player / links: Read more tagged posts" option, hides the player and links on pages with the read more link. (Thanks @calebsg0 for the suggestion!)
  • Google play schema URL updated.
  • Added "redirect_rule" list of post types not used for podcasting. For compatibility with the "Safe Redirect Manager" plugin.
  • Blubrry Player now uses the episode itunes image if set. The URLs to the images must be https:// in order to appear on social networking sites.
  • Windows Media Player in browser support has been removed. Microsoft Edge browser does not support Windows Media Player in the browser.
  • New logic added for dealing with Internet Explorer / Edge browser preloading media when using the MediaElement.js player.
  • Fixed PHP warning message if media size in bytes is zero when displaying file size with player links.
  • No longer using self closing XML for iTunes Categories.
  • iTunes subscribe itpc:// links are no longer supported.
  • Editing default podcast channel now imports global settings by default if blank. (Thanks Robin for bringing to our attention!)
  • RSS Podcast feed Import error message added when the PHP XML library is not available. (Thanks @hgetrost for bringing to our attention!)
Download this release

Release Info

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

Code changes from version 7.0.4 to 7.1

mp3info.class.php CHANGED
@@ -27,7 +27,10 @@
27
  function __construct()
28
  {
29
  // Empty for now
30
- $this->m_UserAgent = 'Blubrry PowerPress/'.POWERPRESS_VERSION;
 
 
 
31
  }
32
 
33
  /*
@@ -132,7 +135,12 @@
132
  $headerlength = getid3_lib::BigEndian2Int(substr($id3header, 6, 4), 1)+10;
133
 
134
  // Awesome, now we need to download the file based on this size...
135
- $this->m_DownloadBytesLimit = $headerlength +100000; // Add 100k to find valid MPEG synch
 
 
 
 
 
136
  $success = $this->Download($url);
137
  $this->m_DownloadBytesLimit = $CurrentLimit;
138
 
@@ -550,7 +558,7 @@
550
  $LocalFile = false;
551
 
552
  // If the URL starts with a http:// or https:// and ends with an mp3, then lets try the smart id3 method...
553
- if( defined('POWERPRESS_GETID3_EXPERIMENTAL') && preg_match('/^https?:\/\/.*\.mp3$/i', $File) !== false )
554
  {
555
  $LocalFile = $this->DownloadID3Headers($File);
556
  if( $LocalFile === false )
27
  function __construct()
28
  {
29
  // Empty for now
30
+ if( defined('POWERPRESS_VERSION') )
31
+ $this->m_UserAgent = 'Blubrry PowerPress/'.POWERPRESS_VERSION;
32
+ else
33
+ $this->m_UserAgent = 'Blubrry PowerPress';
34
  }
35
 
36
  /*
135
  $headerlength = getid3_lib::BigEndian2Int(substr($id3header, 6, 4), 1)+10;
136
 
137
  // Awesome, now we need to download the file based on this size...
138
+ if( $headerlength > 50 ) { // Do we have enough bytes?
139
+ $this->m_DownloadBytesLimit = $headerlength +100000; // Add 100k to find valid MPEG synch
140
+ } else {
141
+ $this->m_DownloadBytesLimit = $CurrentLimit; // Best we can do is use the default limit
142
+ }
143
+
144
  $success = $this->Download($url);
145
  $this->m_DownloadBytesLimit = $CurrentLimit;
146
 
558
  $LocalFile = false;
559
 
560
  // If the URL starts with a http:// or https:// and ends with an mp3, then lets try the smart id3 method...
561
+ if( preg_match('/^https?:\/\/.*\.mp3$/i', $File) !== false )
562
  {
563
  $LocalFile = $this->DownloadID3Headers($File);
564
  if( $LocalFile === false )
player.js CHANGED
@@ -1,21 +1,22 @@
1
  /**
2
- * jsMediaPlayer 1.5.0 for Blubrry PowerPress
3
  *
4
  * http://www.blubrry.com/powepress/
5
  *
6
- * Copyright (c) 2008-2015 Angelo Mandato (angelo [at] mandato {period} com)
7
  *
8
  * Released under Aoache 2 license:
9
  * http://www.apache.org/licenses/LICENSE-2.0
10
  *
11
- * version 1.5.0 - 04/23/2016 - Removed pp_embed_quicktime function (Preventive measure due to security issues with Quicktime) and removed pp_embed_swf, and show embed function enhanced to toggle.
 
12
  * version 1.4.0 - 09/08/2015 - Removed the pp_flashembed function (we are no longer using flash for fallback).
13
  * version 1.3.0 - 02/18/2011 - Adding HTML5 audio/video tags if format possibly supported around default video embed.
14
  * version 1.2.0 - 07/20/2009 - Major rewrite, we're now replying less upon this javascript to make way for flexibility for adding future players.
15
  * version 1.1.3 - 03/23/2009 - Added code to support FlowPlayer v3.
16
  * version 1.1.2 - 03/04/2009 - Added options to set the width for audio, width and height for video.
17
- * version 1.1.1 - 12/22/20008 - Minor change to support Windows Media in Firefox. Includes link to preferred Firefox Windows Media Player plugin.
18
- * version 1.1.0 - 11/25/20008 - Major re-write, object now stored in this include file, auto play is no longer a member variable and is determined by function call.
19
  * version 1.0.3 - 11/02/2008 - Added option for playing quicktime files in an intermediate fashion with an image to click to play.
20
  * version 1.0.2 - 07/26/2008 - Fixed pop up player bug caused by v 1.0.1
21
  * version 1.0.1 - 07/28/2008 - fixed flow player looping playback, flash player no longer loops.
@@ -157,35 +158,23 @@ function powerpress_embed_html5a(id,media_url)
157
  }
158
 
159
  /**
160
- Insert embed for windows media within specified div
161
-
162
- @div - specific div to insert embed into
163
- @media_url - URL of media file to play
164
- @width - width of player
165
- @height - height of player
166
  */
167
- function powerpress_embed_winplayer(div,media_url,width,height)
168
- {
169
- if( document.getElementById(div) )
170
- {
171
- var Html = '';
172
- Html += '<object id="winplayer" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+ width +'" height="'+ height +'" standby="loading..." type="application/x-oleobject">\n';
173
- Html += ' <param name="url" value="'+ media_url +'" />\n';
174
- Html += ' <param name="AutoStart" value="true" />\n';
175
- Html += ' <param name="AutoSize" value="true" />\n';
176
- Html += ' <param name="AllowChangeDisplaySize" value="true" />\n';
177
- Html += ' <param name="standby" value="Media is loading..." />\n';
178
- Html += ' <param name="AnimationAtStart" value="true" />\n';
179
- Html += ' <param name="scale" value="aspect" />\n';
180
- Html += ' <param name="ShowControls" value="true" />\n';
181
- Html += ' <param name="ShowCaptioning" value="false" />\n';
182
- Html += ' <param name="ShowDisplay" value="false" />\n';
183
- Html += ' <param name="ShowStatusBar" value="false" />\n';
184
- Html += ' <embed type="application/x-mplayer2" src="'+ media_url +'" width="'+ width +'" height="'+ height +'" scale="aspect" AutoStart="true" ShowDisplay="0" ShowStatusBar="0" AutoSize="1" AnimationAtStart="1" AllowChangeDisplaySize="1" ShowControls="1"></embed>\n';
185
- Html += '</object>\n';
186
- document.getElementById(div).innerHTML = Html;
187
- return false; // stop the default link from proceeding
188
  }
189
- return true; // let the default link to the media open...
190
  }
191
 
 
 
 
1
  /**
2
+ * jsMediaPlayer 1.6.0 for Blubrry PowerPress
3
  *
4
  * http://www.blubrry.com/powepress/
5
  *
6
+ * Copyright (c) 2008-2017 Angelo Mandato (angelo [at] mandato {period} com)
7
  *
8
  * Released under Aoache 2 license:
9
  * http://www.apache.org/licenses/LICENSE-2.0
10
  *
11
+ * version 1.6.0 - 06/14/2017 - Added code to deal with IE/Edge preloading media for the mediaelement.js player. Removed windows media player support.
12
+ * version 1.5.0 - 04/23/2016 - Removed pp_embed_quicktime function (Preventive measure due to security issues with Quicktime) and removed pp_embed_swf, and show embed function enhanced to toggle.
13
  * version 1.4.0 - 09/08/2015 - Removed the pp_flashembed function (we are no longer using flash for fallback).
14
  * version 1.3.0 - 02/18/2011 - Adding HTML5 audio/video tags if format possibly supported around default video embed.
15
  * version 1.2.0 - 07/20/2009 - Major rewrite, we're now replying less upon this javascript to make way for flexibility for adding future players.
16
  * version 1.1.3 - 03/23/2009 - Added code to support FlowPlayer v3.
17
  * version 1.1.2 - 03/04/2009 - Added options to set the width for audio, width and height for video.
18
+ * version 1.1.1 - 12/22/2008 - Minor change to support Windows Media in Firefox. Includes link to preferred Firefox Windows Media Player plugin.
19
+ * version 1.1.0 - 11/25/2008 - Major re-write, object now stored in this include file, auto play is no longer a member variable and is determined by function call.
20
  * version 1.0.3 - 11/02/2008 - Added option for playing quicktime files in an intermediate fashion with an image to click to play.
21
  * version 1.0.2 - 07/26/2008 - Fixed pop up player bug caused by v 1.0.1
22
  * version 1.0.1 - 07/28/2008 - fixed flow player looping playback, flash player no longer loops.
158
  }
159
 
160
  /**
161
+ PowerPress on page load, make sure IE 9+/Edge use a custom flag for playback
 
 
 
 
 
162
  */
163
+ function powerpress_onload() {
164
+ var x = document.getElementsByTagName("audio");
165
+ for(i in x) {
166
+ x[i].addEventListener("play", function(e) {
167
+ var found = this.src.match( /media.(blubrry|rawvoice).(net|biz|com)\/[a-zA-Z_]{3,30}\/p\//i );
168
+ if( found.length > 0 ) {
169
+ this.pause();
170
+ this.src = this.src.replace( found[0], found[0].replace('/p/', '/e/') );
171
+ this.load();
172
+ this.play();
173
+ }
174
+ }, true);
 
 
 
 
 
 
 
 
 
175
  }
 
176
  }
177
 
178
+ if ( window.navigator.userAgent.match( /(MSIE|Edge|Trident)\//i ) !== null && window.addEventListener) {
179
+ window.addEventListener('load', powerpress_onload, false);
180
+ }
player.min.js CHANGED
@@ -1 +1 @@
1
- function powerpress_show_embed(e){return document.getElementById("powerpress_embed_"+e)&&("block"==document.getElementById("powerpress_embed_"+e).style.display?document.getElementById("powerpress_embed_"+e).style.display="none":(document.getElementById("powerpress_embed_"+e).style.display="block",document.getElementById("powerpress_embed_"+e+"_t").select())),!1}function powerpress_embed_html5v(e,a,t,r,n){if(document.getElementById("powerpress_player_"+e)){var p="";if(document.getElementById("powerpress_player_"+e).getElementsByTagName){var o=document.getElementById("powerpress_player_"+e).getElementsByTagName("img");o.length&&o[0].src&&(p=o[0].src)}var l="video/mp4";a.indexOf(".webm")>-1&&(l="video/webm"),(a.indexOf(".ogg")>-1||a.indexOf(".ogv")>-1)&&(l="video/ogg");var m=document.createElement("video"),d=!1;if(m.canPlayType){var s=m.canPlayType(l);"probably"==s||"maybe"==s?d=!0:n&&(s=m.canPlayType("video/webm"),("probably"==s||"maybe"==s)&&(d=!0))}if(d){var i=document.createElement("source");if(m.width=t,m.height=r,m.controls=!0,p&&(m.poster=p),i.src=a,i.type=l,m.appendChild(i),n){var y=document.createElement("source");y.src=n,y.type='video/webm; codecs="vp8, vorbis"',m.appendChild(y)}return document.getElementById("powerpress_player_"+e).innerHTML="",document.getElementById("powerpress_player_"+e).appendChild(m),m.play(),window.powerpress_resize_player&&powerpress_resize_player(),!1}}return!0}function powerpress_embed_html5a(e,a){if(document.getElementById("powerpress_player_"+e)){var t="";if(document.getElementById("powerpress_player_"+e).getElementsByTagName){var r=document.getElementById("powerpress_player_"+e).getElementsByTagName("img");r.length&&r[0].src&&(t=r[0].src)}var n="audio/mpeg";a.indexOf(".m4a")>-1&&(n="audio/x-m4a"),(a.indexOf(".ogg")>-1||a.indexOf(".oga")>-1)&&(n="audio/ogg");var p=document.createElement("audio"),o=!1;if(p.canPlayType){var l=p.canPlayType(n);("probably"==l||"maybe"==l)&&(o=!0)}if(o){var m=document.createElement("source");return p.controls=!0,m.src=a,m.type=n,p.appendChild(m),document.getElementById("powerpress_player_"+e).innerHTML="",document.getElementById("powerpress_player_"+e).appendChild(p),p.play(),!1}}return!0}function powerpress_embed_winplayer(e,a,t,r){if(document.getElementById(e)){var n="";return n+='<object id="winplayer" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+t+'" height="'+r+'" standby="loading..." type="application/x-oleobject">\n',n+=' <param name="url" value="'+a+'" />\n',n+=' <param name="AutoStart" value="true" />\n',n+=' <param name="AutoSize" value="true" />\n',n+=' <param name="AllowChangeDisplaySize" value="true" />\n',n+=' <param name="standby" value="Media is loading..." />\n',n+=' <param name="AnimationAtStart" value="true" />\n',n+=' <param name="scale" value="aspect" />\n',n+=' <param name="ShowControls" value="true" />\n',n+=' <param name="ShowCaptioning" value="false" />\n',n+=' <param name="ShowDisplay" value="false" />\n',n+=' <param name="ShowStatusBar" value="false" />\n',n+=' <embed type="application/x-mplayer2" src="'+a+'" width="'+t+'" height="'+r+'" scale="aspect" AutoStart="true" ShowDisplay="0" ShowStatusBar="0" AutoSize="1" AnimationAtStart="1" AllowChangeDisplaySize="1" ShowControls="1"></embed>\n',n+="</object>\n",document.getElementById(e).innerHTML=n,!1}return!0}
1
+ function powerpress_show_embed(e){return document.getElementById("powerpress_embed_"+e)&&("block"==document.getElementById("powerpress_embed_"+e).style.display?document.getElementById("powerpress_embed_"+e).style.display="none":(document.getElementById("powerpress_embed_"+e).style.display="block",document.getElementById("powerpress_embed_"+e+"_t").select())),!1}function powerpress_embed_html5v(e,r,t,n,a){if(document.getElementById("powerpress_player_"+e)){var o="";if(document.getElementById("powerpress_player_"+e).getElementsByTagName){var d=document.getElementById("powerpress_player_"+e).getElementsByTagName("img");d.length&&d[0].src&&(o=d[0].src)}var p="video/mp4";r.indexOf(".webm")>-1&&(p="video/webm"),(r.indexOf(".ogg")>-1||r.indexOf(".ogv")>-1)&&(p="video/ogg");var s=document.createElement("video"),l=!1;if(s.canPlayType){var m=s.canPlayType(p);"probably"==m||"maybe"==m?l=!0:a&&(m=s.canPlayType("video/webm"),("probably"==m||"maybe"==m)&&(l=!0))}if(l){var i=document.createElement("source");if(s.width=t,s.height=n,s.controls=!0,o&&(s.poster=o),i.src=r,i.type=p,s.appendChild(i),a){var c=document.createElement("source");c.src=a,c.type='video/webm; codecs="vp8, vorbis"',s.appendChild(c)}return document.getElementById("powerpress_player_"+e).innerHTML="",document.getElementById("powerpress_player_"+e).appendChild(s),s.play(),window.powerpress_resize_player&&powerpress_resize_player(),!1}}return!0}function powerpress_embed_html5a(e,r){if(document.getElementById("powerpress_player_"+e)){var t="";if(document.getElementById("powerpress_player_"+e).getElementsByTagName){var n=document.getElementById("powerpress_player_"+e).getElementsByTagName("img");n.length&&n[0].src&&(t=n[0].src)}var a="audio/mpeg";r.indexOf(".m4a")>-1&&(a="audio/x-m4a"),(r.indexOf(".ogg")>-1||r.indexOf(".oga")>-1)&&(a="audio/ogg");var o=document.createElement("audio"),d=!1;if(o.canPlayType){var p=o.canPlayType(a);("probably"==p||"maybe"==p)&&(d=!0)}if(d){var s=document.createElement("source");return o.controls=!0,s.src=r,s.type=a,o.appendChild(s),document.getElementById("powerpress_player_"+e).innerHTML="",document.getElementById("powerpress_player_"+e).appendChild(o),o.play(),!1}}return!0}function powerpress_onload(){var e=document.getElementsByTagName("audio");for(i in e)e[i].addEventListener("play",function(e){var r=this.src.match(/media.(blubrry|rawvoice).(net|biz|com)\/[a-zA-Z_]{3,30}\/p\//i);r.length>0&&(this.pause(),this.src=this.src.replace(r[0],r[0].replace("/p/","/e/")),this.load(),this.play())},!0)}null!==window.navigator.userAgent.match(/(MSIE|Edge|Trident)\//i)&&window.addEventListener&&window.addEventListener("load",powerpress_onload,!1);
powerpress-player.php CHANGED
@@ -640,74 +640,13 @@ function powerpressplayer_player_other($content, $media_url, $EpisodeData = arra
640
  case 'm4b':
641
  case 'm4r':
642
  case 'qt':
643
- case 'mov': { // No more quicktime on multiple platforms, lets display an image with a link and hope for the best
644
-
645
- $content .= powerpressplayer_build_playimage($media_url, $EpisodeData, true);
646
-
647
- }; break;
648
-
649
  // Windows Media:
650
  case 'wma':
651
  case 'wmv':
652
- case 'asf': {
653
-
654
- $Settings = get_option('powerpress_general');
655
- $player_id = powerpressplayer_get_next_id();
656
- $player_width = 400;
657
- $player_height = 225;
658
- if( !empty($Settings['player_width']) )
659
- $player_width = $Settings['player_width'];
660
- if( !empty($Settings['player_height']) )
661
- $player_height = $Settings['player_height'];
662
- if( !empty($EpisodeData['width']) && is_numeric($EpisodeData['width']) )
663
- $player_width = $EpisodeData['width'];
664
- if( !empty($EpisodeData['height']) && is_numeric($EpisodeData['height']) )
665
- $player_height = $EpisodeData['height'];
666
-
667
- // If there is no cover image specified, lets use the default...
668
- if( $cover_image == '' )
669
- $cover_image = powerpress_get_root_url() . 'play_video_default.jpg';
670
-
671
- $content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">';
672
- $firefox = (stripos($_SERVER['HTTP_USER_AGENT'], 'firefox') !== false );
673
-
674
- if( (!$cover_image && !$firefox ) || $autoplay ) // if we don't have a cover image or we're supposed to auto play the media anyway...
675
- {
676
- $content .= '<object id="winplayer" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'. $player_width .'" height="'. $player_height .'" standby="..." type="application/x-oleobject">';
677
- $content .= ' <param name="url" value="'. $media_url .'" />';
678
- $content .= ' <param name="AutoStart" value="'. ($autoplay?'true':'false') .'" />';
679
- $content .= ' <param name="AutoSize" value="true" />';
680
- $content .= ' <param name="AllowChangeDisplaySize" value="true" />';
681
- $content .= ' <param name="standby" value="Media is loading..." />';
682
- $content .= ' <param name="AnimationAtStart" value="true" />';
683
- $content .= ' <param name="scale" value="aspect" />';
684
- $content .= ' <param name="ShowControls" value="true" />';
685
- $content .= ' <param name="ShowCaptioning" value="false" />';
686
- $content .= ' <param name="ShowDisplay" value="false" />';
687
- $content .= ' <param name="ShowStatusBar" value="false" />';
688
- $content .= ' <embed type="application/x-mplayer2" src="'. $media_url .'" width="'. $player_width .'" height="'. $player_height .'" scale="ASPECT" autostart="'. ($autoplay?'1':'0') .'" ShowDisplay="0" ShowStatusBar="0" autosize="1" AnimationAtStart="1" AllowChangeDisplaySize="1" ShowControls="1"></embed>';
689
- $content .= '</object>';
690
- }
691
- else
692
- {
693
- if( $cover_image == '' )
694
- $cover_image = powerpress_get_root_url() . 'play_video_default.jpg';
695
-
696
- $content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="';
697
- $content .= "return powerpress_embed_winplayer('powerpress_player_{$player_id}', '{$media_url}', {$player_width}, {$player_height} );";
698
- $content .= '">';
699
- $content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" />';
700
- $content .= '</a>';
701
- }
702
-
703
- if( $firefox )
704
- {
705
- $content .= '<p style="font-size: 85%;margin-top:0;">'. __('Best viewed with', 'powerpress');
706
- $content .= ' <a href="http://support.mozilla.com/en-US/kb/Using+the+Windows+Media+Player+plugin+with+Firefox#Installing_the_plugin" target="_blank">';
707
- $content .= __('Windows Media Player plugin for Firefox', 'powerpress') .'</a></p>';
708
- }
709
 
710
- $content .= "</div>\n";
711
 
712
  }; break;
713
  case 'pdf': {
@@ -907,6 +846,7 @@ Filters for media links, appear below the selected player
907
  */
908
  function powerpressplayer_link_download($content, $media_url, $ExtraData = array() )
909
  {
 
910
  $GeneralSettings = get_option('powerpress_general');
911
  if( !isset($GeneralSettings['podcast_link']) )
912
  $GeneralSettings['podcast_link'] = 1;
@@ -1091,12 +1031,6 @@ function powerpress_do_pinw($pinw, $process_podpress)
1091
  <?php
1092
 
1093
  do_action('wp_powerpress_player_scripts');
1094
-
1095
-
1096
- if( !empty($GLOBALS['ClammrPlayer']) ) {
1097
- $GLOBALS['ClammrPlayer']->initialize();
1098
- wp_head();
1099
- }
1100
 
1101
  ?>
1102
  <style type="text/css">
@@ -1128,11 +1062,6 @@ body { font-size: 13px; font-family: Arial, Helvetica, sans-serif; /* width: 100
1128
  wp_print_scripts();
1129
  ?>
1130
  </div>
1131
- <?php
1132
- if( !empty($GLOBALS['ClammrPlayer']) ) {
1133
- wp_footer();
1134
- }
1135
- ?>
1136
  </body>
1137
  </html>
1138
  <?php
@@ -1408,12 +1337,19 @@ function powerpressplayer_build_blubrryaudio($media_url, $EpisodeData=array(), $
1408
  // media URL is all we need., as long as it's hosted at blubrry.com...
1409
  if( preg_match('/content\.blubrry\.com/', $media_url) )
1410
  {
1411
- $url = '//player.blubrry.com?media_url='. urlencode($media_url);
1412
- if( !empty($EpisodeData['id']) ) {
1413
- // Get permalink URL
1414
- $permalink = get_permalink( $EpisodeData['id'] );
1415
- if( !empty($permalink) )
1416
- $url.= '&amp;podcast_link='. urlencode($permalink);
 
 
 
 
 
 
 
1417
  }
1418
  return '<iframe src="'. $url .'" scrolling="no" width="100%" height="138px" frameborder="0"></iframe>';
1419
  }
@@ -1454,17 +1390,14 @@ function powerpressplayer_build_mediaelementaudio($media_url, $EpisodeData=array
1454
  'preload' => 'none'
1455
  );
1456
 
1457
- if( !empty($GLOBALS['ClammrPlayer']) && is_object($GLOBALS['ClammrPlayer']) && get_option('powerpress_clammr') == 1 ) {
1458
- $content .= do_shortcode( '[audio-clammr src="'. esc_attr($media_url) .'" autoplay="'. ( $autoplay ?'on':'') .'" loop="" preload="none"]');
 
 
1459
  } else {
1460
- // Double check that WordPress is providing the shortcode...
1461
- global $shortcode_tags;
1462
- if( !defined('POWERPRESS_DO_SHORTCODE') ) { // && !empty($shortcode_tags['audio']) && is_string($shortcode_tags['audio']) && $shortcode_tags['audio'] == 'wp_audio_shortcode' ) {
1463
- $content .= wp_audio_shortcode( $attr );
1464
- } else {
1465
- $content .= do_shortcode( '[audio src="'. esc_attr($media_url) .'" autoplay="'. ( $autoplay ?'on':'') .'" loop="" preload="none"]');
1466
- }
1467
  }
 
1468
  $content .= '</div>'.PHP_EOL_WEB;
1469
  return $content;
1470
  }
640
  case 'm4b':
641
  case 'm4r':
642
  case 'qt':
643
+ case 'mov':
 
 
 
 
 
644
  // Windows Media:
645
  case 'wma':
646
  case 'wmv':
647
+ case 'asf': { // No more quicktime on multiple platforms, lets display an image with a link and hope for the best
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
648
 
649
+ $content .= powerpressplayer_build_playimage($media_url, $EpisodeData, true);
650
 
651
  }; break;
652
  case 'pdf': {
846
  */
847
  function powerpressplayer_link_download($content, $media_url, $ExtraData = array() )
848
  {
849
+ $media_url = powerpress_add_flag_to_redirect_url($media_url,'s');
850
  $GeneralSettings = get_option('powerpress_general');
851
  if( !isset($GeneralSettings['podcast_link']) )
852
  $GeneralSettings['podcast_link'] = 1;
1031
  <?php
1032
 
1033
  do_action('wp_powerpress_player_scripts');
 
 
 
 
 
 
1034
 
1035
  ?>
1036
  <style type="text/css">
1062
  wp_print_scripts();
1063
  ?>
1064
  </div>
 
 
 
 
 
1065
  </body>
1066
  </html>
1067
  <?php
1337
  // media URL is all we need., as long as it's hosted at blubrry.com...
1338
  if( preg_match('/content\.blubrry\.com/', $media_url) )
1339
  {
1340
+ if( !empty($EpisodeData['episode_id']) ) {
1341
+ $url = '//player.blubrry.com/?podcast_id='. intval($EpisodeData['episode_id']);
1342
+ } else {
1343
+ $url = '//player.blubrry.com/?media_url='. urlencode($media_url);
1344
+ if( !empty($EpisodeData['id']) ) {
1345
+ // Get permalink URL
1346
+ $permalink = get_permalink( $EpisodeData['id'] );
1347
+ if( !empty($permalink) )
1348
+ $url.= '&amp;podcast_link='. urlencode($permalink);
1349
+ }
1350
+ if( !empty($EpisodeData['itunes_image']) ) {
1351
+ $url.= '&amp;artwork_url='. urlencode($EpisodeData['itunes_image']);
1352
+ }
1353
  }
1354
  return '<iframe src="'. $url .'" scrolling="no" width="100%" height="138px" frameborder="0"></iframe>';
1355
  }
1390
  'preload' => 'none'
1391
  );
1392
 
1393
+ // Double check that WordPress is providing the shortcode...
1394
+ global $shortcode_tags;
1395
+ if( !defined('POWERPRESS_DO_SHORTCODE') ) { // && !empty($shortcode_tags['audio']) && is_string($shortcode_tags['audio']) && $shortcode_tags['audio'] == 'wp_audio_shortcode' ) {
1396
+ $content .= wp_audio_shortcode( $attr );
1397
  } else {
1398
+ $content .= do_shortcode( '[audio src="'. esc_attr($media_url) .'" autoplay="'. ( $autoplay ?'on':'') .'" loop="" preload="none"]');
 
 
 
 
 
 
1399
  }
1400
+
1401
  $content .= '</div>'.PHP_EOL_WEB;
1402
  return $content;
1403
  }
powerpress-subscribe.php CHANGED
@@ -16,13 +16,19 @@ function powerpresssubscribe_get_itunes_url($Settings)
16
  // Make URL https://, always add ?mt=2 to end of itunes.apple.com URLs, include l1 to load iTunes store if installed, and always remove uo=X if it's there
17
  return preg_replace("/^http:\/\//i", "https://", add_query_arg( array('uo' => false, 'mt' => '2', 'ls' => '1'), trim($Settings['itunes_url']) ) );
18
  }
19
-
20
- if( !empty($Settings['feed_url']) ) // && !empty($Settings['itpc']) )
21
- return preg_replace('/(^https?:\/\/)/i', 'itpc://', $Settings['feed_url']); // Still better than nothing at this point.
22
 
23
  return '';
24
  }
25
 
 
 
 
 
 
 
 
 
 
26
  function powerpresssubscribe_get_settings($ExtraData, $detect_category=true)
27
  {
28
  $GeneralSettings = get_option('powerpress_general');
@@ -255,12 +261,11 @@ function powerpressplayer_link_subscribe_pre($content, $media_url, $ExtraData =
255
 
256
  $feed_url = $SubscribeSettings['feed_url'];
257
  $itunes_url = trim($SubscribeSettings['itunes_url']);
258
- if( empty($itunes_url) )
259
- $itunes_url = preg_replace('/(^https?:\/\/)/i', 'itpc://', $feed_url);
260
-
261
  $links_array = array();
262
  if( !empty($itunes_url) ) {
263
- $links_array[] = "<a href=\"". htmlspecialchars($itunes_url) ."\" class=\"powerpress_link_subscribe powerpress_link_subscribe_itunes\" title=\"". __('Subscribe on iTunes', 'powerpress') ."\" rel=\"nofollow\">". __('iTunes','powerpress') ."</a>".PHP_EOL_WEB;
 
264
  }
265
 
266
  if( preg_match('/^(https?:\/\/)(.*)$/i', $feed_url, $matches ) ) {
@@ -364,6 +369,11 @@ function powerpress_subscribe_shortcode( $attr ) {
364
  */
365
 
366
  /**/
 
 
 
 
 
367
  if( empty($attr['slug']) && !empty($attr['feed']) )
368
  $attr['slug'] = $attr['feed'];
369
  else if( empty($attr['slug']) && !empty($attr['channel']) )
@@ -552,7 +562,7 @@ function powerpress_do_subscribe_widget($settings)
552
  $html .= '<img class="pp-sub-l" src="'. esc_url( $settings['image_url'] ) .'" '. (!empty($settings['title'])?' title="'. esc_attr($settings['title']).'" ':'') .'/>';
553
  $html .= '<div class="pp-sub-btns">';
554
  if( !empty($settings['itunes_url']) ) {
555
- $html .= '<a href="'. esc_url( $settings['itunes_url'] ) .'" class="pp-sub-btn pp-sub-itunes" title="'. esc_attr( __('Subscribe on iTunes', 'powerpress') ) .'"><span class="pp-sub-ic"></span>'. esc_html( __('on iTunes', 'powerpress') ) .'</a>';
556
  }
557
 
558
  if( preg_match('/^(https?:\/\/)(.*)$/i', $settings['feed_url'], $matches ) ) {
@@ -617,7 +627,7 @@ function powerpress_do_subscribe_sidebar_widget($settings)
617
  $html = '';
618
  $html .= '<div class="pp-ssb-widget pp-ssb-widget-'. esc_attr($settings['style']) .'">';
619
  if( !empty($settings['itunes_url']) ) {
620
- $html .= '<a href="'. esc_url( $settings['itunes_url'] ) .'" class="pp-ssb-btn pp-ssb-itunes" title="'. esc_attr( __('Subscribe on iTunes', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('on iTunes', 'powerpress') ) .'</a>';
621
  }
622
 
623
  if( preg_match('/^(https?:\/\/)(.*)$/i', $settings['feed_url'], $matches ) ) {
16
  // Make URL https://, always add ?mt=2 to end of itunes.apple.com URLs, include l1 to load iTunes store if installed, and always remove uo=X if it's there
17
  return preg_replace("/^http:\/\//i", "https://", add_query_arg( array('uo' => false, 'mt' => '2', 'ls' => '1'), trim($Settings['itunes_url']) ) );
18
  }
 
 
 
19
 
20
  return '';
21
  }
22
 
23
+ function powerpresssubscribe_add_guid_to_itunes_url($url, $guid)
24
+ {
25
+ if( !empty($guid) && preg_match('/^https:\/\/itunes\.apple\.com.*/i', $url, $matches) ) {
26
+ return $url . '#episodeGuid='. urlencode($guid);
27
+ }
28
+
29
+ return $url;
30
+ }
31
+
32
  function powerpresssubscribe_get_settings($ExtraData, $detect_category=true)
33
  {
34
  $GeneralSettings = get_option('powerpress_general');
261
 
262
  $feed_url = $SubscribeSettings['feed_url'];
263
  $itunes_url = trim($SubscribeSettings['itunes_url']);
264
+
 
 
265
  $links_array = array();
266
  if( !empty($itunes_url) ) {
267
+ $guid = get_the_guid();
268
+ $links_array[] = "<a href=\"". htmlspecialchars( powerpresssubscribe_add_guid_to_itunes_url($itunes_url, $guid) ) ."\" class=\"powerpress_link_subscribe powerpress_link_subscribe_itunes\" title=\"". __('Subscribe on Apple Podcasts', 'powerpress') ."\" rel=\"nofollow\">". __('Apple Podcasts','powerpress') ."</a>".PHP_EOL_WEB;
269
  }
270
 
271
  if( preg_match('/^(https?:\/\/)(.*)$/i', $feed_url, $matches ) ) {
369
  */
370
 
371
  /**/
372
+ if( !is_array($attr) ) // Convert to an array to avoid php notice messages
373
+ {
374
+ $attr = array();
375
+ }
376
+
377
  if( empty($attr['slug']) && !empty($attr['feed']) )
378
  $attr['slug'] = $attr['feed'];
379
  else if( empty($attr['slug']) && !empty($attr['channel']) )
562
  $html .= '<img class="pp-sub-l" src="'. esc_url( $settings['image_url'] ) .'" '. (!empty($settings['title'])?' title="'. esc_attr($settings['title']).'" ':'') .'/>';
563
  $html .= '<div class="pp-sub-btns">';
564
  if( !empty($settings['itunes_url']) ) {
565
+ $html .= '<a href="'. esc_url( $settings['itunes_url'] ) .'" class="pp-sub-btn pp-sub-itunes" title="'. esc_attr( __('Subscribe on Apple Podcasts', 'powerpress') ) .'"><span class="pp-sub-ic"></span>'. esc_html( __('on Apple Podcasts', 'powerpress') ) .'</a>';
566
  }
567
 
568
  if( preg_match('/^(https?:\/\/)(.*)$/i', $settings['feed_url'], $matches ) ) {
627
  $html = '';
628
  $html .= '<div class="pp-ssb-widget pp-ssb-widget-'. esc_attr($settings['style']) .'">';
629
  if( !empty($settings['itunes_url']) ) {
630
+ $html .= '<a href="'. esc_url( $settings['itunes_url'] ) .'" class="pp-ssb-btn pp-ssb-itunes" title="'. esc_attr( __('Subscribe on Apple Podcasts', 'powerpress') ) .'"><span class="pp-ssb-ic"></span>'. esc_html( __('on Apple Podcasts', 'powerpress') ) .'</a>';
631
  }
632
 
633
  if( preg_match('/^(https?:\/\/)(.*)$/i', $settings['feed_url'], $matches ) ) {
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 iTunes, Google Play, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
6
- Version: 7.0.4
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Requires at least: 3.6
10
- Tested up to: 4.7.3
11
  Text Domain: powerpress
12
  Change Log:
13
  Please see readme.txt for detailed change log.
@@ -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.0.4 beta' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
@@ -243,6 +243,9 @@ function powerpress_content($content)
243
  if( current_filter() == 'the_excerpt' && empty($GeneralSettings['display_player_excerpt']) )
244
  return $content; // We didn't want to modify this since the user didn't enable it for excerpts
245
 
 
 
 
246
  // Figure out which players are alerady in the body of the page...
247
  $ExcludePlayers = array();
248
  if( isset($GeneralSettings['disable_player']) )
@@ -422,6 +425,8 @@ function powerpress_pinw(pinw_url){window.open(pinw_url, 'PowerPressPlayer','too
422
  echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( $title ) . '" href="' . esc_url( $href ) . '" />' . "\n";
423
  }
424
  reset($Powerpress['custom_feeds']);
 
 
425
  }
426
  }
427
 
@@ -471,8 +476,8 @@ function powerpress_rss2_ns()
471
  }
472
  if( !defined('POWERPRESS_GOOGLEPLAY_RSS') || POWERPRESS_GOOGLEPLAY_RSS != false )
473
  {
474
- //echo 'xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"'.PHP_EOL;
475
- echo 'xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0/play-podcasts.xsd"'.PHP_EOL;
476
  }
477
  }
478
 
@@ -592,6 +597,10 @@ function powerpress_rss2_head()
592
  echo "\t".'<itunes:image href="' . powerpress_url_in_feed(powerpress_get_root_url()) . 'itunes_default.jpg" />'.PHP_EOL;
593
  }
594
 
 
 
 
 
595
  if( !empty($Feed['email']) )
596
  {
597
  echo "\t".'<itunes:owner>'.PHP_EOL;
@@ -656,53 +665,23 @@ function powerpress_rss2_head()
656
  {
657
  $CatDesc = $Categories[$Cat1.'-00'];
658
  $SubCatDesc = $Categories[$Cat1.'-'.$SubCat1];
659
- if( $Cat1 != $Cat2 && $SubCat1 == '00' )
660
- {
661
- echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'" />'.PHP_EOL;
662
- }
663
- else
664
- {
665
- echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'">'.PHP_EOL;
666
- if( $SubCat1 != '00' )
667
- echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'" />'.PHP_EOL;
668
-
669
- // End this category set
670
- if( $Cat1 != $Cat2 )
671
- echo "\t".'</itunes:category>'.PHP_EOL;
672
- }
673
  }
674
 
675
  if( $Cat2 )
676
  {
677
  $CatDesc = $Categories[$Cat2.'-00'];
678
  $SubCatDesc = $Categories[$Cat2.'-'.$SubCat2];
679
-
680
- // It's a continuation of the last category...
681
- if( $Cat1 == $Cat2 )
682
- {
683
- if( $SubCat2 != '00' )
684
- echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'" />'.PHP_EOL;
685
-
686
- // End this category set
687
- if( $Cat2 != $Cat3 )
688
- echo "\t".'</itunes:category>'.PHP_EOL;
689
- }
690
- else // This is not a continuation, lets start a new category set
691
- {
692
- if( $Cat2 != $Cat3 && $SubCat2 == '00' )
693
- {
694
- echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'" />'.PHP_EOL;
695
- }
696
- else // We have nested values
697
- {
698
- if( $Cat1 != $Cat2 ) // Start a new category set
699
- echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'">'.PHP_EOL;
700
- if( $SubCat2 != '00' )
701
- echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'" />'.PHP_EOL;
702
- if( $Cat2 != $Cat3 ) // End this category set
703
- echo "\t".'</itunes:category>'.PHP_EOL;
704
- }
705
- }
706
  }
707
 
708
  if( $Cat3 )
@@ -710,33 +689,14 @@ function powerpress_rss2_head()
710
  $CatDesc = $Categories[$Cat3.'-00'];
711
  $SubCatDesc = $Categories[$Cat3.'-'.$SubCat3];
712
 
713
- // It's a continuation of the last category...
714
- if( $Cat2 == $Cat3 )
715
- {
716
- if( $SubCat3 != '00' )
717
- echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'" />'.PHP_EOL;
718
-
719
- // End this category set
720
- echo "\t".'</itunes:category>'.PHP_EOL;
721
- }
722
- else // This is not a continuation, lets start a new category set
723
- {
724
- if( $Cat2 != $Cat3 && $SubCat3 == '00' )
725
- {
726
- echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'" />'.PHP_EOL;
727
- }
728
- else // We have nested values
729
- {
730
- if( $Cat2 != $Cat3 ) // Start a new category set
731
- echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'">'.PHP_EOL;
732
- if( $SubCat3 != '00' )
733
- echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'" />'.PHP_EOL;
734
- // End this category set
735
- echo "\t".'</itunes:category>'.PHP_EOL;
736
- }
737
- }
738
  }
739
  // End Handle iTunes categories
 
740
  if( !empty($Feed['googleplay_email']) )
741
  {
742
  echo "\t".'<googleplay:email>' . esc_html($Feed['googleplay_email']) . '</googleplay:email>'.PHP_EOL;
@@ -939,11 +899,27 @@ function powerpress_rss2_item()
939
  echo "\t\t".'<itunes:image href="' . esc_html( powerpress_url_in_feed(str_replace(' ', '+', $powerpress_feed['itunes_image'])), 'double') . '" />'.PHP_EOL;
940
  }
941
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
942
  if( !empty($explicit) && $explicit != 'no' ) {
943
  echo "\t\t<itunes:explicit>" . $explicit . '</itunes:explicit>'.PHP_EOL;
944
  }
945
 
946
- if( $EpisodeData['duration'] && preg_match('/^(\d{1,2}:){0,2}\d{1,2}$/i', ltrim($EpisodeData['duration'], '0:') ) ) { // Include duration if it is valid
947
  echo "\t\t<itunes:duration>" . ltrim($EpisodeData['duration'], '0:') . '</itunes:duration>'.PHP_EOL;
948
  }
949
 
@@ -2547,15 +2523,26 @@ function powerpress_get_root_url()
2547
  return $plugin_url . '/';
2548
  }
2549
 
2550
- function powerpress_get_the_exerpt($for_summary = false, $no_filters = false)
2551
  {
2552
  if( $no_filters ) {
2553
- global $post;
2554
- $subtitle = $post->post_excerpt;
2555
- if ( $subtitle == '') {
2556
- $subtitle = strip_shortcodes( $post->post_content );
2557
- $subtitle = str_replace(']]>', ']]&gt;', $subtitle);
2558
- $subtitle = strip_tags($subtitle);
 
 
 
 
 
 
 
 
 
 
 
2559
  }
2560
  } else {
2561
  $subtitle = get_the_excerpt();
@@ -2888,7 +2875,7 @@ function powerpress_add_redirect_url($MediaURL, $EpisodeData = false) // $channe
2888
 
2889
  // Check that redirect is either media.blubrry.com, media.techpodcasts.com, media.rawvoice.com, or *.podtrac.com
2890
  $ValidRedirectDomains = array('media.blubrry.com', 'media.rawvoice.com', 'media.techpodcasts.com', 'www.podtrac.com', 'podtrac.com');
2891
- $ValidRedirectDomainsPattern = '/^(media\.blubrry\.com|media\.rawvoice\.com|media\.techpodcasts\.com|.*\.podtrac\.com)$/';
2892
  if( $URLScheme == 'https://' ) {
2893
  $ValidRedirectDomains = array('media.blubrry.com', 'media.rawvoice.com'); // Only URLs that support https:// to an https:// media file
2894
  $ValidRedirectDomainsPattern = '/^(media\.blubrry\.com|media\.rawvoice\.com)$/';
@@ -2933,7 +2920,10 @@ Code contributed from upekshapriya on the Blubrry Forums
2933
  */
2934
  function powerpress_byte_size($ppbytes)
2935
  {
2936
- $ppsize = $ppbytes / 1024;
 
 
 
2937
  if($ppsize < 1024)
2938
  {
2939
  $ppsize = number_format($ppsize, 1);
@@ -3182,6 +3172,12 @@ function powerpress_get_enclosure_data($post_id, $feed_slug = 'podcast', $raw_da
3182
  }
3183
  }
3184
 
 
 
 
 
 
 
3185
  // Check that the content type is a valid one...
3186
  if( strstr($Data['type'], '/') == false )
3187
  $Data['type'] = powerpress_get_contenttype($Data['url']);
@@ -3534,7 +3530,10 @@ if( defined('POWERPRESS_NEW_CODE') && POWERPRESS_NEW_CODE && file_exists(POWERPR
3534
  require_once(POWERPRESS_ABSPATH.'/powerpress-new-code.php');
3535
  }
3536
 
3537
-
 
 
 
3538
 
3539
  if( defined('POWERPRESS_PREMIUM_GROUPS_PLUGIN') ) {
3540
 
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.1
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Requires at least: 3.6
10
+ Tested up to: 4.8.1
11
  Text Domain: powerpress
12
  Change Log:
13
  Please see readme.txt for detailed change log.
32
  die("access denied.");
33
 
34
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
35
+ define('POWERPRESS_VERSION', '7.1' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
243
  if( current_filter() == 'the_excerpt' && empty($GeneralSettings['display_player_excerpt']) )
244
  return $content; // We didn't want to modify this since the user didn't enable it for excerpts
245
 
246
+ if( !empty($GeneralSettings['hide_player_more']) && strstr($content, 'class="more-link"') )
247
+ return $content; // We do not want to add players and links if the read-more class found
248
+
249
  // Figure out which players are alerady in the body of the page...
250
  $ExcludePlayers = array();
251
  if( isset($GeneralSettings['disable_player']) )
425
  echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( $title ) . '" href="' . esc_url( $href ) . '" />' . "\n";
426
  }
427
  reset($Powerpress['custom_feeds']);
428
+
429
+ // TODO: Add logic to add category, post type and taxonomy feeds as well
430
  }
431
  }
432
 
476
  }
477
  if( !defined('POWERPRESS_GOOGLEPLAY_RSS') || POWERPRESS_GOOGLEPLAY_RSS != false )
478
  {
479
+ echo 'xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"'.PHP_EOL;
480
+ //echo 'xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0/play-podcasts.xsd"'.PHP_EOL;
481
  }
482
  }
483
 
597
  echo "\t".'<itunes:image href="' . powerpress_url_in_feed(powerpress_get_root_url()) . 'itunes_default.jpg" />'.PHP_EOL;
598
  }
599
 
600
+ if( !empty($Feed['itunes_type']) ) {
601
+ echo "\t".'<itunes:type>'. esc_html($Feed['itunes_type']) .'</itunes:type>'.PHP_EOL;
602
+ }
603
+
604
  if( !empty($Feed['email']) )
605
  {
606
  echo "\t".'<itunes:owner>'.PHP_EOL;
665
  {
666
  $CatDesc = $Categories[$Cat1.'-00'];
667
  $SubCatDesc = $Categories[$Cat1.'-'.$SubCat1];
668
+ echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'">'.PHP_EOL;
669
+ if( $SubCat1 != '00' )
670
+ echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'"></itunes:category>'.PHP_EOL;
671
+
672
+ // End this category set
673
+ echo "\t".'</itunes:category>'.PHP_EOL;
 
 
 
 
 
 
 
 
674
  }
675
 
676
  if( $Cat2 )
677
  {
678
  $CatDesc = $Categories[$Cat2.'-00'];
679
  $SubCatDesc = $Categories[$Cat2.'-'.$SubCat2];
680
+
681
+ echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'">'.PHP_EOL;
682
+ if( $SubCat2 != '00' )
683
+ echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'"></itunes:category>'.PHP_EOL;
684
+ echo "\t".'</itunes:category>'.PHP_EOL;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
685
  }
686
 
687
  if( $Cat3 )
689
  $CatDesc = $Categories[$Cat3.'-00'];
690
  $SubCatDesc = $Categories[$Cat3.'-'.$SubCat3];
691
 
692
+ echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'">'.PHP_EOL;
693
+ if( $SubCat3 != '00' )
694
+ echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'"></itunes:category>'.PHP_EOL;
695
+ // End this category set
696
+ echo "\t".'</itunes:category>'.PHP_EOL;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
697
  }
698
  // End Handle iTunes categories
699
+
700
  if( !empty($Feed['googleplay_email']) )
701
  {
702
  echo "\t".'<googleplay:email>' . esc_html($Feed['googleplay_email']) . '</googleplay:email>'.PHP_EOL;
899
  echo "\t\t".'<itunes:image href="' . esc_html( powerpress_url_in_feed(str_replace(' ', '+', $powerpress_feed['itunes_image'])), 'double') . '" />'.PHP_EOL;
900
  }
901
 
902
+ if( !empty($EpisodeData['season']) ) {
903
+ echo "\t\t".'<itunes:season>'. esc_html($EpisodeData['season']) .'</itunes:season>'.PHP_EOL;
904
+ }
905
+
906
+ if( !empty($EpisodeData['episode_no']) ) {
907
+ echo "\t\t".'<itunes:episode>'. esc_html($EpisodeData['episode_no']) .'</itunes:episode>'.PHP_EOL;
908
+ }
909
+
910
+ if( !empty($EpisodeData['episode_title']) ) {
911
+ echo "\t\t".'<itunes:title>'. esc_html($EpisodeData['episode_title']) .'</itunes:title>'.PHP_EOL;
912
+ }
913
+
914
+ if( !empty($EpisodeData['episode_type']) ) {
915
+ echo "\t\t".'<itunes:episodeType>'. esc_html($EpisodeData['episode_type']) .'</itunes:episodeType>'.PHP_EOL;
916
+ }
917
+
918
  if( !empty($explicit) && $explicit != 'no' ) {
919
  echo "\t\t<itunes:explicit>" . $explicit . '</itunes:explicit>'.PHP_EOL;
920
  }
921
 
922
+ if( !empty($EpisodeData['duration']) && preg_match('/^(\d{1,2}:){0,2}\d{1,2}$/i', ltrim($EpisodeData['duration'], '0:') ) ) { // Include duration if it is valid
923
  echo "\t\t<itunes:duration>" . ltrim($EpisodeData['duration'], '0:') . '</itunes:duration>'.PHP_EOL;
924
  }
925
 
2523
  return $plugin_url . '/';
2524
  }
2525
 
2526
+ function powerpress_get_the_exerpt($for_summary = false, $no_filters = false, $post_id = false)
2527
  {
2528
  if( $no_filters ) {
2529
+ if( $post_id > 0 ) {
2530
+ $post = get_post($post_id);
2531
+ $subtitle = $post->post_excerpt;
2532
+ if ( $subtitle == '') {
2533
+ $subtitle = strip_shortcodes( $post->post_content );
2534
+ $subtitle = str_replace(']]>', ']]&gt;', $subtitle);
2535
+ $subtitle = strip_tags($subtitle);
2536
+ }
2537
+ }
2538
+ else if( is_object($GLOBALS['post']) )
2539
+ {
2540
+ $subtitle = $GLOBALS['post']->post_excerpt;
2541
+ if ( $subtitle == '') {
2542
+ $subtitle = strip_shortcodes( $GLOBALS['post']->post_content );
2543
+ $subtitle = str_replace(']]>', ']]&gt;', $subtitle);
2544
+ $subtitle = strip_tags($subtitle);
2545
+ }
2546
  }
2547
  } else {
2548
  $subtitle = get_the_excerpt();
2875
 
2876
  // Check that redirect is either media.blubrry.com, media.techpodcasts.com, media.rawvoice.com, or *.podtrac.com
2877
  $ValidRedirectDomains = array('media.blubrry.com', 'media.rawvoice.com', 'media.techpodcasts.com', 'www.podtrac.com', 'podtrac.com');
2878
+ $ValidRedirectDomainsPattern = '/^(media\.blubrry\.com|media\.rawvoice\.com|media\.techpodcasts\.com|.*\.podtrac\.com|traffic\.cast\.plus)$/';
2879
  if( $URLScheme == 'https://' ) {
2880
  $ValidRedirectDomains = array('media.blubrry.com', 'media.rawvoice.com'); // Only URLs that support https:// to an https:// media file
2881
  $ValidRedirectDomainsPattern = '/^(media\.blubrry\.com|media\.rawvoice\.com)$/';
2920
  */
2921
  function powerpress_byte_size($ppbytes)
2922
  {
2923
+ $ppbytes = intval($ppbytes);
2924
+ if( empty($ppbytes) )
2925
+ return '';
2926
+ $ppsize = intval($ppbytes) / 1024;
2927
  if($ppsize < 1024)
2928
  {
2929
  $ppsize = number_format($ppsize, 1);
3172
  }
3173
  }
3174
 
3175
+ // If the URL is using Blubrry hosting, then lets pump it up to https...
3176
+ if( is_ssl() && preg_match('/^http:\/\/(.*\/content\.blubrry\.com\/.*)$/i', $Data['url'], $matches) )
3177
+ {
3178
+ $Data['url'] = 'https://'. $matches[1];
3179
+ }
3180
+
3181
  // Check that the content type is a valid one...
3182
  if( strstr($Data['type'], '/') == false )
3183
  $Data['type'] = powerpress_get_contenttype($Data['url']);
3530
  require_once(POWERPRESS_ABSPATH.'/powerpress-new-code.php');
3531
  }
3532
 
3533
+ if( defined('POWERPRESS_PTS') && POWERPRESS_PTS && file_exists(POWERPRESS_ABSPATH.'/powerpressadmin-pts.php') )
3534
+ {
3535
+ require_once(POWERPRESS_ABSPATH.'/powerpressadmin-pts.php');
3536
+ }
3537
 
3538
  if( defined('POWERPRESS_PREMIUM_GROUPS_PLUGIN') ) {
3539
 
powerpressadmin-basic.php CHANGED
@@ -502,7 +502,7 @@ function powerpressadmin_edit_entry_options($General)
502
  (<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
503
 
504
 
505
- <p style="margin-top: 15px;"><label><input id="episode_box_itunes_image" class="episode_box_option" name="General[episode_box_itunes_image]" type="checkbox" value="1"<?php if( !empty($General['episode_box_itunes_image']) ) echo ' checked'; ?> /> <?php echo __('iTunes Episode Image Field', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?>
506
  (<?php echo __('Leave unchecked to use the image embedded into your media files.', 'powerpress'); ?>)</p>
507
 
508
  <p style="margin-top: 15px;"><label><input id="episode_box_closed_captioned" class="episode_box_option" name="General[episode_box_closed_captioned]" type="checkbox" value="1"<?php if( !empty($General['episode_box_closed_captioned']) ) echo ' checked'; ?> /> <?php echo __('iTunes Closed Captioned', 'powerpress'); ?></label>
@@ -513,6 +513,14 @@ function powerpressadmin_edit_entry_options($General)
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
 
 
 
 
 
 
 
 
 
516
  <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>
517
  (<?php echo __('Display selected episode at top of your iTunes and Google Play Music directory listings', 'powerpress'); ?>)</p>
518
  <em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
@@ -1199,7 +1207,11 @@ function powerpressadmin_appearance($General=false, $Feed = false)
1199
  </li></ul>
1200
  </li>
1201
  </ul>
1202
- <p><input name="General[display_player_excerpt]" type="checkbox" value="1" <?php if( !empty($General['display_player_excerpt']) ) echo 'checked '; ?>/> <?php echo __('Display media / links in:', 'powerpress'); ?> <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" title="<?php echo __('WordPress Excerpts', 'powerpress'); ?>" target="_blank"><?php echo __('WordPress Excerpts', 'powerpress'); ?></a> (<?php echo __('e.g. search results', 'powerpress'); ?>)</p>
 
 
 
 
1203
  </td>
1204
  </tr>
1205
  </table>
502
  (<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
503
 
504
 
505
+ <p style="margin-top: 15px;"><label><input id="episode_box_itunes_image" class="episode_box_option" name="General[episode_box_itunes_image]" type="checkbox" value="1"<?php if( !empty($General['episode_box_itunes_image']) ) echo ' checked'; ?> /> <?php echo __('iTunes Episode Image Field', 'powerpress'); ?></label>
506
  (<?php echo __('Leave unchecked to use the image embedded into your media files.', 'powerpress'); ?>)</p>
507
 
508
  <p style="margin-top: 15px;"><label><input id="episode_box_closed_captioned" class="episode_box_option" name="General[episode_box_closed_captioned]" type="checkbox" value="1"<?php if( !empty($General['episode_box_closed_captioned']) ) echo ' checked'; ?> /> <?php echo __('iTunes Closed Captioned', 'powerpress'); ?></label>
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
 
516
+ <input type="hidden" name="General[episode_box_itunes_title]' value="0" />
517
+ <p style="margin-top: 15px;"><label><input id="episode_box_itunes_title" class="episode_box_option" name="General[episode_box_itunes_title]" type="checkbox" value="1"<?php if( !empty($General['episode_box_itunes_title']) ) echo ' checked'; ?> /> <?php echo __('iTunes Episode Title Field', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
518
+ <em><strong><?php echo __('Specify iTunes episode title separate from podcast feed title.', 'powerpress'); ?></strong></em>
519
+
520
+ <input type="hidden" name="General[episode_box_itunes_nst]' value="0" />
521
+ <p style="margin-top: 15px;"><label><input id="episode_box_itunes_nst" class="episode_box_option" name="General[episode_box_itunes_nst]" type="checkbox" value="1"<?php if( !empty($General['episode_box_itunes_nst']) ) echo ' checked'; ?> /> <?php echo __('iTunes Episode Number, Season and Type Fields', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
522
+ <em><strong><?php echo __('Enter specifics about episode including episode number, season number and type (full, trailer, or bonus).', 'powerpress'); ?></strong></em>
523
+
524
  <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>
525
  (<?php echo __('Display selected episode at top of your iTunes and Google Play Music directory listings', 'powerpress'); ?>)</p>
526
  <em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
1207
  </li></ul>
1208
  </li>
1209
  </ul>
1210
+ <p><input name="General[display_player_excerpt]" type="checkbox" value="1" <?php if( !empty($General['display_player_excerpt']) ) echo 'checked '; ?>/> <?php echo __('Display player / links:', 'powerpress'); ?> <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" title="<?php echo __('WordPress Excerpts', 'powerpress'); ?>" target="_blank"><?php echo __('WordPress Excerpts', 'powerpress'); ?></a> (<?php echo __('e.g. search results', 'powerpress'); ?>)</p>
1211
+
1212
+ <input type="hidden" name="General[hide_player_more]" value="0" />
1213
+ <p><input name="General[hide_player_more]" type="checkbox" value="1" <?php if( !empty($General['hide_player_more']) ) echo 'checked '; ?>/> <?php echo __('Hide player / links:', 'powerpress'); ?> <a href="https://en.support.wordpress.com/more-tag/" title="<?php echo __('Read More tagged posts', 'powerpress'); ?>" target="_blank"><?php echo __('Read More tagged posts', 'powerpress'); ?></a></p>
1214
+
1215
  </td>
1216
  </tr>
1217
  </table>
powerpressadmin-editfeed.php CHANGED
@@ -155,6 +155,11 @@ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = fals
155
  $feed_slug = $type_value;
156
  $FeedAttribs['feed_slug'] = $type_value;
157
  $FeedSettings = powerpress_get_settings('powerpress_feed_'.$feed_slug);
 
 
 
 
 
158
  if( !$FeedSettings )
159
  {
160
  $FeedSettings = array();
@@ -760,7 +765,9 @@ function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs
760
  $FeedSettings['itunes_new_feed_url_podcast'] = '';
761
  if( !isset($FeedSettings['itunes_new_feed_url']) )
762
  $FeedSettings['itunes_new_feed_url'] = '';
763
-
 
 
764
  $AdvancediTunesSettings = !empty($FeedSettings['itunes_summary']);
765
  if( !empty($FeedSettings['itunes_subtitle']) )
766
  $AdvancediTunesSettings = true;
@@ -975,6 +982,30 @@ while( list($value,$desc) = each($explicit) )
975
  <div>(<?php echo __('iTunes will email this address when your podcast is accepted into the iTunes Directory.', 'powerpress'); ?>)</div>
976
  </td>
977
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
978
  </table>
979
 
980
  <?php if( !empty($General['advanced_mode_2']) ) { ?>
155
  $feed_slug = $type_value;
156
  $FeedAttribs['feed_slug'] = $type_value;
157
  $FeedSettings = powerpress_get_settings('powerpress_feed_'.$feed_slug);
158
+ if( !$FeedSettings && $type_value == 'podcast' ) // We are editing the default podcast channel
159
+ {
160
+ $FeedSettings = powerpress_get_settings('powerpress_feed');
161
+ }
162
+
163
  if( !$FeedSettings )
164
  {
165
  $FeedSettings = array();
765
  $FeedSettings['itunes_new_feed_url_podcast'] = '';
766
  if( !isset($FeedSettings['itunes_new_feed_url']) )
767
  $FeedSettings['itunes_new_feed_url'] = '';
768
+ if( !isset($FeedSettings['itunes_type']) )
769
+ $FeedSettings['itunes_type'] = '';
770
+
771
  $AdvancediTunesSettings = !empty($FeedSettings['itunes_summary']);
772
  if( !empty($FeedSettings['itunes_subtitle']) )
773
  $AdvancediTunesSettings = true;
982
  <div>(<?php echo __('iTunes will email this address when your podcast is accepted into the iTunes Directory.', 'powerpress'); ?>)</div>
983
  </td>
984
  </tr>
985
+
986
+ <tr valign="top">
987
+ <th scope="row">
988
+ <?php echo __('iTunes Type', 'powerpress'); ?>
989
+ <?php echo powerpressadmin_new(); ?>
990
+ </th>
991
+ <td>
992
+ <select name="Feed[itunes_type]" class="bpp_input_med">
993
+ <?php
994
+ $types = array(''=> __('No option selected', 'powerpress'), 'episodic'=>__('Episodic (default)', 'powerpress'), 'serial'=>__('Serial', 'powerpress'));
995
+
996
+ while( list($value,$desc) = each($types) )
997
+ echo "\t<option value=\"$value\"". ($FeedSettings['itunes_type']==$value?' selected':''). ">$desc</option>\n";
998
+
999
+ ?>
1000
+ </select>
1001
+ <p>
1002
+ <em><?php echo __('Episodic: displays latest episode first.', 'powerpress'); ?></em>
1003
+ </p>
1004
+ <p>
1005
+ <em><?php echo __('Serial: displays latest episode last.', 'powerpress'); ?></em>
1006
+ </p>
1007
+ </td>
1008
+ </tr>
1009
  </table>
1010
 
1011
  <?php if( !empty($General['advanced_mode_2']) ) { ?>
powerpressadmin-jquery.php CHANGED
@@ -859,6 +859,19 @@ self.parent.tb_remove();
859
  powerpress_admin_jquery_footer();
860
  exit;
861
  }; break;
 
 
 
 
 
 
 
 
 
 
 
 
 
862
  }
863
 
864
  }
859
  powerpress_admin_jquery_footer();
860
  exit;
861
  }; break;
862
+ case 'powerpress-jquery-pts': {
863
+ if( function_exists('powerpress_ajax_pts') )
864
+ powerpress_ajax_pts($Settings);
865
+ else
866
+ echo "Error";
867
+ exit;
868
+ }; break;
869
+ case 'powerpress-jquery-pts-post': {
870
+ if( function_exists('powerpress_ajax_pts_post') )
871
+ powerpress_ajax_pts_post($Settings);
872
+ else
873
+ echo "Error";
874
+ }; break;
875
  }
876
 
877
  }
powerpressadmin-metabox.php CHANGED
@@ -370,6 +370,50 @@ function powerpress_meta_box($object, $box)
370
  <?php
371
  }
372
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  if( $iTunesKeywords )
374
  {
375
  ?>
@@ -385,6 +429,23 @@ function powerpress_meta_box($object, $box)
385
  <?php
386
  }
387
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
388
  if( !empty($GeneralSettings['episode_box_subtitle']) || !empty($GeneralSettings['seo_itunes']) || $iTunesSubtitle )
389
  {
390
  ?>
370
  <?php
371
  }
372
 
373
+ $DoNST = ( !empty($ExtraData['episode_no']) || !empty($ExtraData['episode_season']) || !empty($ExtraData['episode_type']) || !empty($GeneralSettings['episode_box_itunes_nst']) );
374
+ if( $DoNST ) {
375
+ echo '<div class="powerpress_row">';
376
+ echo '<label>'. __('iTunes Episode', 'powerpress') .'</label>';
377
+ echo '<div class="powerpress_row_content">';
378
+
379
+ if( empty($ExtraData['episode_no']) ) {
380
+ $ExtraData['episode_no'] = '';
381
+ }
382
+ if( empty($ExtraData['episode_season']) ) {
383
+ $ExtraData['episode_season'] = '';
384
+ }
385
+ if( empty($ExtraData['episode_type']) ) {
386
+ $ExtraData['episode_type'] = '';
387
+ }
388
+
389
+
390
+ // itunes:episode
391
+ ?>
392
+ <span for="powerpress_episode_episode_no_<?php echo $FeedSlug; ?>">Number: </span>
393
+ <input type="number" id="powerpress_episode_episode_no_<?php echo $FeedSlug; ?>" style="vertical-align: middle; width: 80px;" name="Powerpress[<?php echo $FeedSlug; ?>][episode_no]" value="<?php echo esc_attr($ExtraData['episode_no']); ?>" />
394
+ <?php
395
+ // itunes:season
396
+ ?>
397
+ <span for="powerpress_episode_season_<?php echo $FeedSlug; ?>" style="margin-left: 10px;">Season: </span>
398
+ <input type="number" id="powerpress_episode_season_<?php echo $FeedSlug; ?>" style="vertical-align: middle; width: 80px;" name="Powerpress[<?php echo $FeedSlug; ?>][season]" value="<?php echo esc_attr($ExtraData['season']); ?>" />
399
+ <?php
400
+ // itunes:episodeType
401
+ ?>
402
+ <span for="powerpress_episode_type_<?php echo $FeedSlug; ?>" style="margin-left: 10px;">Type: </span>
403
+ <select id="powerpress_episode_type_<?php echo $FeedSlug; ?>" style="vertical-align: middle; width: 120px" name="Powerpress[<?php echo $FeedSlug; ?>][episode_type]">
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
+ ?>
411
+ </select>
412
+ <?php
413
+ echo '</div>'; // end powerpress_row_content
414
+ echo '</div>'; // end powerpress_row
415
+ }
416
+
417
  if( $iTunesKeywords )
418
  {
419
  ?>
429
  <?php
430
  }
431
 
432
+ if( !empty($ExtraData['episode_title']) || !empty($GeneralSettings['episode_box_itunes_title']) ) {
433
+ if( empty($ExtraData['episode_title']) )
434
+ $ExtraData['episode_title'] = '';
435
+ // itunes:title
436
+ ?>
437
+ <div class="powerpress_row">
438
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][episode_title]"><?php echo __('iTunes Title', 'powerpress'); ?></label>
439
+ <div class="powerpress_row_content">
440
+ <input type="text" id="powerpress_episode_title_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][episode_title]" value="<?php echo esc_attr($ExtraData['episode_title']); ?>" style="width: 90%; font-size: 90%;" maxlength="255" />
441
+ </div>
442
+ <div class="powerpress_row_content">
443
+ <em><?php echo __('Apple recommends you not specify your podcast title, episode number, or season number.', 'powerpress'); ?></em>
444
+ </div>
445
+ </div>
446
+ <?php
447
+ }
448
+
449
  if( !empty($GeneralSettings['episode_box_subtitle']) || !empty($GeneralSettings['seo_itunes']) || $iTunesSubtitle )
450
  {
451
  ?>
powerpressadmin-migrate.php CHANGED
@@ -945,7 +945,7 @@ function powerpress_admin_migrate()
945
 
946
  <?php if( $Step > 0 ) { ?>
947
  <p>
948
- <?php echo __('Migration can take a while, please be patient. Please contact support if you do not see results within 48 hours. You may repeat these steps if additional episdoes have been added after to starting migration.', 'powepress'); ?>
949
  </p>
950
  <p><a href="<?php echo admin_url(); echo wp_nonce_url( "admin.php?page=powerpress/powerpressadmin_migrate.php&amp;migrate_action=reset_migrate_media&amp;action=powerpress-migrate-media", 'powerpress-migrate-media'); ?>" onclick="return confirm('<?php echo esc_js(__('Reset migration, are you sure?','powerpress')); ?>');"><?php echo __('Reset Migration', 'powerpress'); ?></a>
951
  <?php ?>
945
 
946
  <?php if( $Step > 0 ) { ?>
947
  <p>
948
+ <?php echo __('Migration can take a while, please be patient. Please contact support if you do not see results within 48 hours. You may repeat these steps if additional episodes have been added after to starting migration.', 'powepress'); ?>
949
  </p>
950
  <p><a href="<?php echo admin_url(); echo wp_nonce_url( "admin.php?page=powerpress/powerpressadmin_migrate.php&amp;migrate_action=reset_migrate_media&amp;action=powerpress-migrate-media", 'powerpress-migrate-media'); ?>" onclick="return confirm('<?php echo esc_js(__('Reset migration, are you sure?','powerpress')); ?>');"><?php echo __('Reset Migration', 'powerpress'); ?></a>
951
  <?php ?>
powerpressadmin-player-page.php CHANGED
@@ -342,9 +342,6 @@ table.html5formats tr > td:first-child {
342
  ?>
343
  </p>
344
  <?php powerpressplayer_mediaelement_info(); ?>
345
- <div style="margin: 30px 0;">
346
- <?php powerpresspartner_clammr_info(false); ?>
347
- </div>
348
  </li>
349
 
350
  <li><label><input type="radio" name="Player[player]" id="player_html5audio" value="html5audio" <?php if( $General['player'] == 'html5audio' ) echo 'checked'; ?> /> <?php echo __('HTML5 Audio Player', 'powerpress'); ?> </label>
@@ -980,6 +977,15 @@ function audio_player_defaults()
980
  </th>
981
  <td>
982
  <?php print_blubrry_player_demo(); ?>
 
 
 
 
 
 
 
 
 
983
  </td>
984
  </tr>
985
 
@@ -1017,7 +1023,6 @@ function audio_player_defaults()
1017
  <td valign="top">
1018
  <input type="text" style="width: 50px;" id="audio_player_max_width" name="General[audio_player_max_width]" class="player-width" value="<?php echo esc_attr($General['audio_player_max_width']); ?>" maxlength="4" />
1019
  <?php echo __('Width of Audio mp3 player (leave blank for max width)', 'powerpress'); ?>
1020
- <?php powerpresspartner_clammr_info(); ?>
1021
  </td>
1022
  </tr>
1023
 
@@ -1315,7 +1320,7 @@ function print_blubrry_player_demo()
1315
  </p>
1316
  <div style="border: 1px solid #000000; height: 138px; box-shadow: inset 0 0 10px black, 0 0 6px black; margin: 20px 0;">
1317
  <?php
1318
- echo powerpressplayer_build_blubrryaudio_by_id(12559710); // Special episdoe where we talk about the new player
1319
  ?></div>
1320
  <p>
1321
  <?php echo __('Modern podcast audio player complete with subscribe and share tools.', 'powerpress'); ?>
@@ -1326,4 +1331,4 @@ function print_blubrry_player_demo()
1326
  <?php
1327
  }
1328
 
1329
- ?>
342
  ?>
343
  </p>
344
  <?php powerpressplayer_mediaelement_info(); ?>
 
 
 
345
  </li>
346
 
347
  <li><label><input type="radio" name="Player[player]" id="player_html5audio" value="html5audio" <?php if( $General['player'] == 'html5audio' ) echo 'checked'; ?> /> <?php echo __('HTML5 Audio Player', 'powerpress'); ?> </label>
977
  </th>
978
  <td>
979
  <?php print_blubrry_player_demo(); ?>
980
+
981
+ <!-- <p><input name="General[itunes_image_audio]" type="hidden" value="0"/><input name="General[itunes_image_audio]" type="checkbox" value="1" <?php echo ($General['itunes_image_audio']?'checked':''); ?> /> <?php echo __('Use episode iTunes image if set', 'powerpress'); ?> </p> -->
982
+
983
+ <p>
984
+ <?php echo __('Episode level iTunes image if set will be displayed in the player. The URLs to the images must be https:// in order to appear on social networking sites.', 'powerpress'); ?>
985
+ </p>
986
+
987
+ <p><input name="General[episode_box_itunes_image]" type="hidden" value="0"/><input name="General[episode_box_itunes_image]" type="checkbox" value="1" <?php echo ($General['episode_box_itunes_image']?'checked':''); ?> /> <?php echo __('Display iTunes episode image field', 'powerpress'); ?> </p>
988
+
989
  </td>
990
  </tr>
991
 
1023
  <td valign="top">
1024
  <input type="text" style="width: 50px;" id="audio_player_max_width" name="General[audio_player_max_width]" class="player-width" value="<?php echo esc_attr($General['audio_player_max_width']); ?>" maxlength="4" />
1025
  <?php echo __('Width of Audio mp3 player (leave blank for max width)', 'powerpress'); ?>
 
1026
  </td>
1027
  </tr>
1028
 
1320
  </p>
1321
  <div style="border: 1px solid #000000; height: 138px; box-shadow: inset 0 0 10px black, 0 0 6px black; margin: 20px 0;">
1322
  <?php
1323
+ echo powerpressplayer_build_blubrryaudio_by_id(12559710); // Special episode where we talk about the new player
1324
  ?></div>
1325
  <p>
1326
  <?php echo __('Modern podcast audio player complete with subscribe and share tools.', 'powerpress'); ?>
1331
  <?php
1332
  }
1333
 
1334
+ // eof
powerpressadmin-rss-import.php CHANGED
@@ -510,6 +510,10 @@ jQuery(document).ready( function() {
510
  // download the image then save it locally...
511
  if( $download_itunes_image ) {
512
 
 
 
 
 
513
  $upload_path = false;
514
  $upload_url = false;
515
  $UploadArray = wp_upload_dir();
@@ -540,6 +544,7 @@ jQuery(document).ready( function() {
540
  $response = wp_safe_remote_get($itunes_image, $options);
541
  if ( !is_wp_error( $response ) ) {
542
  $image_data = wp_remote_retrieve_body( $response );
 
543
  $this->addError( __('Error downloading itunes image.', 'powerpress') );
544
  }
545
 
@@ -547,8 +552,17 @@ jQuery(document).ready( function() {
547
  file_put_contents($upload_path.$filename, $image_data);
548
  $NewSettings['itunes_image'] = $upload_url . $filename;
549
  $NewSettings['rss2_image'] = $itunes_image;
 
 
 
 
550
  }
 
 
551
  }
 
 
 
552
  } else if( $overwrite || empty($Feed['itunes_image']) ) {
553
  $NewSettings['itunes_image'] = $itunes_image;
554
  $NewSettings['rss2_image'] = $itunes_image;
@@ -636,6 +650,8 @@ jQuery(document).ready( function() {
636
  if( !in_array($category_id, $CurrentSettings['custom_cat_feeds']) )
637
  {
638
  $NewSettings = array();
 
 
639
  $NewSettings['custom_cat_feeds'][] = $category_id;
640
  if( empty($CurrentSettings['cat_casting']) ) {
641
  $NewSettings['cat_casting'] = 1; // Turn on category podcasting if not enabled
@@ -1410,6 +1426,15 @@ jQuery(document).ready( function() {
1410
  function _parse_enclosure($string, $post, $category_strict='')
1411
  {
1412
  global $wpdb;
 
 
 
 
 
 
 
 
 
1413
  $p = xml_parser_create();
1414
  xml_parse_into_struct($p, $string, $vals, $index);
1415
  xml_parser_free($p);
510
  // download the image then save it locally...
511
  if( $download_itunes_image ) {
512
 
513
+ echo '<hr />';
514
+ echo '<p><strong>'. __('Program iTunes image', 'powerpress') .'</strong></p>';
515
+ echo '<ul class="ul-disc">';
516
+
517
  $upload_path = false;
518
  $upload_url = false;
519
  $UploadArray = wp_upload_dir();
544
  $response = wp_safe_remote_get($itunes_image, $options);
545
  if ( !is_wp_error( $response ) ) {
546
  $image_data = wp_remote_retrieve_body( $response );
547
+ } else {
548
  $this->addError( __('Error downloading itunes image.', 'powerpress') );
549
  }
550
 
552
  file_put_contents($upload_path.$filename, $image_data);
553
  $NewSettings['itunes_image'] = $upload_url . $filename;
554
  $NewSettings['rss2_image'] = $itunes_image;
555
+ echo sprintf('iTunes image saved to %s.', ($upload_url . $filename) );
556
+ } else {
557
+ $this->addError( __('No iTunes image downloaded.', 'powerpress') );
558
+ echo 'Error occurred downloading iTunes image.';
559
  }
560
+ } else {
561
+ echo 'Unable to save image to local folder.';
562
  }
563
+
564
+ echo '</li>';
565
+ echo '</ul>';
566
  } else if( $overwrite || empty($Feed['itunes_image']) ) {
567
  $NewSettings['itunes_image'] = $itunes_image;
568
  $NewSettings['rss2_image'] = $itunes_image;
650
  if( !in_array($category_id, $CurrentSettings['custom_cat_feeds']) )
651
  {
652
  $NewSettings = array();
653
+ if( !empty($CurrentSettings['custom_cat_feeds']) )
654
+ $NewSettings['custom_cat_feeds'] = $CurrentSettings['custom_cat_feeds'];
655
  $NewSettings['custom_cat_feeds'][] = $category_id;
656
  if( empty($CurrentSettings['cat_casting']) ) {
657
  $NewSettings['cat_casting'] = 1; // Turn on category podcasting if not enabled
1426
  function _parse_enclosure($string, $post, $category_strict='')
1427
  {
1428
  global $wpdb;
1429
+
1430
+ // Create an XML parser
1431
+ if ( ! function_exists( 'xml_parser_create' ) ) {
1432
+ // These are WordPress strings, no need to use our namespace for these messages.
1433
+ trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
1434
+ wp_die( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
1435
+ }
1436
+
1437
+
1438
  $p = xml_parser_create();
1439
  xml_parse_into_struct($p, $string, $vals, $index);
1440
  xml_parser_free($p);
powerpressadmin.php CHANGED
@@ -559,7 +559,7 @@ function powerpress_admin_init()
559
 
560
  if( !isset($General['episode_box_order'] ) )
561
  $General['episode_box_order'] = 0;
562
-
563
  if( !isset($General['episode_box_feature_in_itunes'] ) )
564
  $General['episode_box_feature_in_itunes'] = 0;
565
  else
@@ -796,14 +796,6 @@ function powerpress_admin_init()
796
  }
797
  }
798
 
799
- if( isset($_POST['PowerPressClammr']) )
800
- {
801
- if( empty($_POST['PowerPressClammr']) )
802
- update_option('powerpress_clammr', 0);
803
- else
804
- update_option('powerpress_clammr', 1);
805
- }
806
-
807
  if( isset($_POST['EpisodeBoxBGColor']) )
808
  {
809
  $GeneralSettingsTemp = get_option('powerpress_general');
@@ -1371,13 +1363,16 @@ add_action('admin_init', 'powerpress_admin_init');
1371
  function powerpress_admin_notices()
1372
  {
1373
  $errors = get_option('powerpress_errors');
1374
- if( $errors )
1375
  {
1376
  if( !delete_option('powerpress_errors') ) {
1377
  // If for some reason we cannot delete this record, maybe we can at least update it with a blank value...
1378
  update_option('powerpress_errors', '');
1379
  }
1380
 
 
 
 
1381
  while( list($null, $error) = each($errors) )
1382
  {
1383
  ?>
@@ -1453,6 +1448,10 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1453
  unset($Settings['episode_box_itunes_image']);
1454
  if( isset($Settings['episode_box_order'] ) && $Settings['episode_box_order'] == 0 )
1455
  unset($Settings['episode_box_order']);
 
 
 
 
1456
  if( isset($Settings['episode_box_gp_explicit'] ) && $Settings['episode_box_gp_explicit'] == 0 )
1457
  unset($Settings['episode_box_gp_explicit']);
1458
  if( isset($Settings['episode_box_feature_in_itunes'] ) && $Settings['episode_box_feature_in_itunes'] == 0 )
@@ -1470,7 +1469,13 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1470
  if( isset($Settings['seo_feed_title']) && empty($Settings['seo_feed_title']) )
1471
  unset($Settings['seo_feed_title']);
1472
  if( isset($Settings['subscribe_feature_email']) && empty($Settings['subscribe_feature_email']) )
1473
- unset($Settings['subscribe_feature_email']);
 
 
 
 
 
 
1474
  }
1475
  else // Feed or player settings...
1476
  {
@@ -1552,7 +1557,7 @@ function powerpress_admin_get_post_types($capability_type = 'post')
1552
  $post_types = get_post_types();
1553
  while( list($index,$post_type) = each($post_types) )
1554
  {
1555
- if( $post_type == 'attachment' || $post_type == 'nav_menu_item' || $post_type == 'revision' || $post_type == 'action' )
1556
  continue;
1557
  if( $capability_type !== false )
1558
  {
@@ -1828,7 +1833,8 @@ function powerpress_edit_post($post_ID, $post)
1828
 
1829
  if( !empty($GeneralSettings['default_url']) && strpos($MediaURL, 'http://') !== 0 && strpos($MediaURL, 'https://') !== 0 && empty($Powerpress['hosting']) ) // If the url entered does not start with a http:// or https://
1830
  {
1831
- $MediaURL = rtrim($GeneralSettings['default_url'], '/') .'/'. ltrim($MediaURL, '/');
 
1832
  }
1833
 
1834
 
@@ -1957,6 +1963,16 @@ function powerpress_edit_post($post_ID, $post)
1957
  // iTunes Episode image
1958
  if( isset($Powerpress['itunes_image']) && trim($Powerpress['itunes_image']) != '' )
1959
  $ToSerialize['itunes_image'] = $Powerpress['itunes_image'];
 
 
 
 
 
 
 
 
 
 
1960
  // order
1961
  if( isset($Powerpress['order']) && trim($Powerpress['order']) != '' )
1962
  $ToSerialize['order'] = $Powerpress['order'];
@@ -2850,8 +2866,19 @@ function powerpress_create_subscribe_page()
2850
  $template_url = 'http://plugins.svn.wordpress.org/powerpress/assets/subscribe_template/';
2851
  $languages = array();
2852
  $language = get_option( 'WPLANG' );
2853
- if( !empty($language) && $language != 'en_US' )
2854
- $languages[] = $language;
 
 
 
 
 
 
 
 
 
 
 
2855
  $languages[] = 'en_US'; // fallback to the en_US version
2856
 
2857
  $template_content = false;
@@ -2861,7 +2888,7 @@ function powerpress_create_subscribe_page()
2861
  if( empty($template_content) ) { // Lets force cURL and see if that helps...
2862
  $template_content = powerpress_remote_fopen($template_url . $lang . '.txt', false, array(), 15, false, true);
2863
  }
2864
- if( !empty($template_content) )
2865
  break;
2866
  }
2867
 
@@ -4524,41 +4551,6 @@ function powerpress_admin_plugin_action_links( $links, $file )
4524
  }
4525
  add_filter( 'plugin_action_links', 'powerpress_admin_plugin_action_links', 10, 2 );
4526
 
4527
-
4528
- // At bottom of powerpressadmin.php
4529
- function powerpresspartner_clammr_info($Settings=true)
4530
- {
4531
- if( defined('POWERPRESS_DISABLE_PARTNERS') && POWERPRESS_DISABLE_PARTNERS == true )
4532
- return;
4533
- $ClammrPluginEnabled = false;
4534
- if( !empty($GLOBALS['ClammrPlayer']) )
4535
- $ClammrPluginEnabled = is_object($GLOBALS['ClammrPlayer']);
4536
- ?>
4537
- <h3 style="position: relative;margin-left: 30px; margin-bottom: 5px;">
4538
- <img src="<?php echo powerpress_get_root_url(); ?>images/clammr.png" style="width: 30px; height: 30px; position: absolute; top: 0; left: -34px;" />
4539
- <?php echo __('Clammr Player PowerPress Add-on', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></h3>
4540
- <p style="margin-left: 50px;">
4541
- <?php echo __('Blubrry has partnered with Clammr to enable a social-themed audio player for your site. As visitors listen to your podcast, they can tap the integrated Clammr Button to tag their favorite highlights and share them to Facebook and Twitter. The shared highlights contain links back to your full audio and site, driving additional audience and traffic to you.', 'powerpress'); ?>
4542
- </p>
4543
- <?php if( $Settings ) { if( $ClammrPluginEnabled == false ) {
4544
-
4545
- $plugin_link = '<a href="'. esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . 'audio-player-by-clammr' .
4546
- '&TB_iframe=true&width=640&height=662' ) ) .'" class="thickbox" title="' .
4547
- esc_attr__('Install Plugin') . '">'. __('Install Clammr Audio Player add-on plugin', 'powerpress') . '</a>';
4548
- ?>
4549
- <p style="margin-left: 50px;"><strong><?php echo $plugin_link; ?></strong></p><?php } else {
4550
- $PowerPressClammr = get_option('powerpress_clammr');
4551
- ?>
4552
- <p style="margin-bottom: 20px; margin-left: 50px;">
4553
- <input type="hidden" name="PowerPressClammr" value="0" />
4554
- <input type="checkbox" name="PowerPressClammr" value="1" <?php if( !empty($PowerPressClammr) ) echo 'checked'; ?> />
4555
- <strong><?php echo __('Enable Clammr Audio Player with PowerPress', 'powerpress'); ?></strong>
4556
- </p>
4557
- <?php
4558
- }
4559
- }
4560
- }
4561
-
4562
  function powerpress_plugin_row_meta( $links, $file ) {
4563
 
4564
  if ( strpos( $file, 'powerpress.php' ) !== false ) {
559
 
560
  if( !isset($General['episode_box_order'] ) )
561
  $General['episode_box_order'] = 0;
562
+
563
  if( !isset($General['episode_box_feature_in_itunes'] ) )
564
  $General['episode_box_feature_in_itunes'] = 0;
565
  else
796
  }
797
  }
798
 
 
 
 
 
 
 
 
 
799
  if( isset($_POST['EpisodeBoxBGColor']) )
800
  {
801
  $GeneralSettingsTemp = get_option('powerpress_general');
1363
  function powerpress_admin_notices()
1364
  {
1365
  $errors = get_option('powerpress_errors');
1366
+ if( !empty($errors) )
1367
  {
1368
  if( !delete_option('powerpress_errors') ) {
1369
  // If for some reason we cannot delete this record, maybe we can at least update it with a blank value...
1370
  update_option('powerpress_errors', '');
1371
  }
1372
 
1373
+ // Clear the SG cachepress plugin:
1374
+ if (function_exists('sg_cachepress_purge_cache')) { sg_cachepress_purge_cache(); }
1375
+
1376
  while( list($null, $error) = each($errors) )
1377
  {
1378
  ?>
1448
  unset($Settings['episode_box_itunes_image']);
1449
  if( isset($Settings['episode_box_order'] ) && $Settings['episode_box_order'] == 0 )
1450
  unset($Settings['episode_box_order']);
1451
+ if( isset($Settings['episode_box_itunes_title'] ) && $Settings['episode_box_itunes_title'] == 0 )
1452
+ unset($Settings['episode_box_itunes_title']);
1453
+ if( isset($Settings['episode_box_itunes_nst'] ) && $Settings['episode_box_itunes_nst'] == 0 )
1454
+ unset($Settings['episode_box_itunes_nst']);
1455
  if( isset($Settings['episode_box_gp_explicit'] ) && $Settings['episode_box_gp_explicit'] == 0 )
1456
  unset($Settings['episode_box_gp_explicit']);
1457
  if( isset($Settings['episode_box_feature_in_itunes'] ) && $Settings['episode_box_feature_in_itunes'] == 0 )
1469
  if( isset($Settings['seo_feed_title']) && empty($Settings['seo_feed_title']) )
1470
  unset($Settings['seo_feed_title']);
1471
  if( isset($Settings['subscribe_feature_email']) && empty($Settings['subscribe_feature_email']) )
1472
+ unset($Settings['subscribe_feature_email']);
1473
+ if( isset($Settings['poster_image_video']) && empty($Settings['poster_image_video']) )
1474
+ unset($Settings['poster_image_video']);
1475
+ if( isset($Settings['poster_image_audio']) && empty($Settings['poster_image_audio']) )
1476
+ unset($Settings['poster_image_audio']);
1477
+ if( isset($Settings['itunes_image_audio']) && empty($Settings['itunes_image_audio']) )
1478
+ unset($Settings['itunes_image_audio']);
1479
  }
1480
  else // Feed or player settings...
1481
  {
1557
  $post_types = get_post_types();
1558
  while( list($index,$post_type) = each($post_types) )
1559
  {
1560
+ if( $post_type == 'redirect_rule' || $post_type == 'attachment' || $post_type == 'nav_menu_item' || $post_type == 'revision' || $post_type == 'action' )
1561
  continue;
1562
  if( $capability_type !== false )
1563
  {
1833
 
1834
  if( !empty($GeneralSettings['default_url']) && strpos($MediaURL, 'http://') !== 0 && strpos($MediaURL, 'https://') !== 0 && empty($Powerpress['hosting']) ) // If the url entered does not start with a http:// or https://
1835
  {
1836
+ if( !empty($MediaURL) )
1837
+ $MediaURL = rtrim($GeneralSettings['default_url'], '/') .'/'. ltrim($MediaURL, '/');
1838
  }
1839
 
1840
 
1963
  // iTunes Episode image
1964
  if( isset($Powerpress['itunes_image']) && trim($Powerpress['itunes_image']) != '' )
1965
  $ToSerialize['itunes_image'] = $Powerpress['itunes_image'];
1966
+
1967
+ if( isset($Powerpress['episode_title']) && trim($Powerpress['episode_title']) != '' )
1968
+ $ToSerialize['episode_title'] = $Powerpress['episode_title'];
1969
+ if( isset($Powerpress['episode_no']) && trim($Powerpress['episode_no']) != '' )
1970
+ $ToSerialize['episode_no'] = $Powerpress['episode_no'];
1971
+ if( isset($Powerpress['season']) && trim($Powerpress['season']) != '' )
1972
+ $ToSerialize['season'] = $Powerpress['season'];
1973
+ if( isset($Powerpress['episode_type']) && trim($Powerpress['episode_type']) != '' )
1974
+ $ToSerialize['episode_type'] = $Powerpress['episode_type'];
1975
+
1976
  // order
1977
  if( isset($Powerpress['order']) && trim($Powerpress['order']) != '' )
1978
  $ToSerialize['order'] = $Powerpress['order'];
2866
  $template_url = 'http://plugins.svn.wordpress.org/powerpress/assets/subscribe_template/';
2867
  $languages = array();
2868
  $language = get_option( 'WPLANG' );
2869
+ if( !empty($language) ) {
2870
+ switch( $language )
2871
+ {
2872
+ // Template translated for the following languages
2873
+ case 'en_AU':
2874
+ case 'en_CA':
2875
+ case 'en_GB':
2876
+ case 'en_NZ':
2877
+ case 'en_ZA': {
2878
+ $languages[] = $language; // Placed at the top of array
2879
+ }; break;
2880
+ }
2881
+ }
2882
  $languages[] = 'en_US'; // fallback to the en_US version
2883
 
2884
  $template_content = false;
2888
  if( empty($template_content) ) { // Lets force cURL and see if that helps...
2889
  $template_content = powerpress_remote_fopen($template_url . $lang . '.txt', false, array(), 15, false, true);
2890
  }
2891
+ if( !empty($template_content) ) // We found a translation!
2892
  break;
2893
  }
2894
 
4551
  }
4552
  add_filter( 'plugin_action_links', 'powerpress_admin_plugin_action_links', 10, 2 );
4553
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4554
  function powerpress_plugin_row_meta( $links, $file ) {
4555
 
4556
  if ( strpos( $file, 'powerpress.php' ) !== false ) {
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: amandato, blubrry
3
  Tags: podcasting, podcast, podcaster, powerpress, itunes, google play music, 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
- Tested up to: 4.7.3
6
- Stable tag: 7.0.4
7
  Donate link: https://www.patreon.com/blubrry?ty=h
8
  License: GPLv2 or later
9
 
@@ -233,6 +233,32 @@ To install Blubrry PowerPress manually, follow these steps:
233
  = Fan of PowerPress and want to show your support? =
234
  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!
235
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  = 7.0.4 =
237
  * Released on 2/18/2017
238
  * NOTE: There is no urgency to update to this version unless you can benefit from the new import options, top level iTunes category options, or bug fixes listed.
2
  Contributors: amandato, blubrry
3
  Tags: podcasting, podcast, podcaster, powerpress, itunes, google play music, 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
+ Tested up to: 4.8.1
6
+ Stable tag: 7.1
7
  Donate link: https://www.patreon.com/blubrry?ty=h
8
  License: GPLv2 or later
9
 
233
  = Fan of PowerPress and want to show your support? =
234
  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!
235
 
236
+
237
+ = 7.1 =
238
+ * Released on 7/11/2017
239
+ * Added support for iOS 11!
240
+ * iTunes type added, specifcy episodic or serial for your podcast program (for iOS 11).
241
+ * iTunes episode title, number, season and type added for your episodes (for iOS 11).
242
+ * Subscribe on iTunes changed to Subscribe on Apple Podcasts, links have been enhanced to highlight episodes.
243
+ * Blubrry Podcast Media Hosting and HTTPS: Media URLs are now automatically converted to HTTPS.
244
+ * Added compatibility for the SG CachePress plugin. PowerPress will clear the cache if there was an error. (Thanks @grudesky for getting us in touch with developers!)
245
+ * Fixed error with creating the subscribe page in some languages (Thanks @edithmayerhofer for bringing to our attention).
246
+ * Better error reporting when importing podcast feed images.
247
+ * Verify media option improvements, mp3 duration is now detected even faster in most cases!
248
+ * Added logic to prevent notice messages with the subscribe_shortcode and newest versions of PHP. (Thanks @mahe for bringing to our attention)
249
+ * Added "Hide player / links: Read more tagged posts" option, hides the player and links on pages with the read more link. (Thanks @calebsg0 for the suggestion!)
250
+ * Google play schema URL updated.
251
+ * Added "redirect_rule" list of post types not used for podcasting. For compatibility with the "Safe Redirect Manager" plugin.
252
+ * Blubrry Player now uses the episode itunes image if set. The URLs to the images must be https:// in order to appear on social networking sites.
253
+ * Windows Media Player in browser support has been removed. Microsoft Edge browser does not support Windows Media Player in the browser.
254
+ * New logic added for dealing with Internet Explorer / Edge browser preloading media when using the MediaElement.js player.
255
+ * Fixed PHP warning message if media size in bytes is zero when displaying file size with player links.
256
+ * No longer using self closing XML for iTunes Categories.
257
+ * iTunes subscribe itpc:// links are no longer supported.
258
+ * Editing default podcast channel now imports global settings by default if blank. (Thanks Robin for bringing to our attention!)
259
+ * RSS Podcast feed Import error message added when the PHP XML library is not available. (Thanks @hgetrost for bringing to our attention!)
260
+
261
+
262
  = 7.0.4 =
263
  * Released on 2/18/2017
264
  * NOTE: There is no urgency to update to this version unless you can benefit from the new import options, top level iTunes category options, or bug fixes listed.