PowerPress Podcasting plugin by Blubrry - Version 7.0.3

Version Description

  • Released 9/13/2016
  • Fixed issue when editing channel/category/post type podcast settings double escaping & character. (Thanks Robin Brinkler for bringing to our attention!)
  • Added checks for OpenSSL and cURL SSL support to the Diagnostics page.
  • PowerPress "Verify" option now works with MemberPress. (Thanks MemberPress for the code!)
  • Added new debugging define POWERPRESS_DEBUG_QUERIES, displays SQL queries at the bottom of the feed for diagnostic purposes.
  • Feed option to not allow other plugins from modyfing podcast feeds now bypasses the the_content and the_excerpt filters.
  • Added 2 new define options for podcast feeds and HTTPS. For example, it is possible to host your website via HTTPS but serve the feed via HTTP. (Thanks @Fastmover for the patch that inspired this option)
    • define('POWERPRESS_FEEDS_FORCE_HTTPS', true); when added to wp-config.php forces all media links and iTunes images to use HTTPS.
    • define('POWERPRESS_FEEDS_FORCE_HTTP', true); when added to wp-config.php forces all media links and iTunes images to use HTTP.
Download this release

Release Info

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

Code changes from version 7.0.2 to 7.0.3

class.powerpress-subscribe-widget.php CHANGED
@@ -38,6 +38,7 @@ class PowerPressSubscribe_Widget extends WP_Widget {
38
  /*
39
  PowerPress subscribe sidebar widget
40
  */
 
41
  .widget-area .widget_powerpress_subscribe h2,
42
  .widget-area .widget_powerpress_subscribe h3,
43
  .widget-area .widget_powerpress_subscribe h4,
@@ -47,6 +48,7 @@ PowerPress subscribe sidebar widget
47
  margin-bottom: 0;
48
  padding-bottom: 0;
49
  }
 
50
 
51
  .pp-ssb-widget {
52
  width: 100%;
38
  /*
39
  PowerPress subscribe sidebar widget
40
  */
41
+ <?php if( !defined('POWERPRESS_SUBSCRIBE_SIDEBAR_NO_H_STYLING') ) { ?>
42
  .widget-area .widget_powerpress_subscribe h2,
43
  .widget-area .widget_powerpress_subscribe h3,
44
  .widget-area .widget_powerpress_subscribe h4,
48
  margin-bottom: 0;
49
  padding-bottom: 0;
50
  }
51
+ <?php } ?>
52
 
53
  .pp-ssb-widget {
54
  width: 100%;
css/subscribe.css CHANGED
@@ -78,7 +78,7 @@ body .pp-sub-widget a:hover {
78
  max-width: 300px;
79
  padding: 0;
80
  margin: 10px 0;
81
-
82
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
83
  }
84
  .pp-sub-widget .pp-sub-btns {
78
  max-width: 300px;
79
  padding: 0;
80
  margin: 10px 0;
81
+ float: left;
82
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
83
  }
84
  .pp-sub-widget .pp-sub-btns {
feed-podcast.php CHANGED
@@ -5,8 +5,41 @@
5
  * @package WordPress
6
  */
7
 
8
- function powerpress_get_the_excerpt_rss()
9
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  global $post;
11
 
12
  if ( post_password_required() ) {
@@ -18,9 +51,14 @@
18
  $output = str_replace(']]>', ']]&gt;', $output);
19
  $output = strip_tags($output);
20
  }
21
-
22
- return apply_filters('the_excerpt_rss', $output);
 
 
 
 
23
  }
 
24
 
25
  $GeneralSettings = get_option('powerpress_general');
26
  $iTunesOrderNumber = 0;
@@ -68,6 +106,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'."\n";
68
  <language><?php bloginfo_rss( 'language' ); ?></language>
69
  <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
70
  <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
 
71
  <?php do_action('rss2_head'.$FeedActionHook); ?>
72
  <?php
73
 
@@ -75,10 +114,10 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'."\n";
75
  ?>
76
  <?php while( have_posts()) :
77
 
78
- if( empty($GeneralSettings['feed_accel']) )
79
- the_post();
80
- else
81
- $GLOBALS['post'] = $GLOBALS['wp_query']->next_post(); // Use this rather than the_post() that way we do not add additional queries to the database
82
  ?>
83
  <item>
84
  <title><?php the_title_rss() ?></title>
@@ -100,13 +139,14 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'."\n";
100
  the_category_rss('rss2');
101
  }
102
  if (get_option('rss_use_excerpt')) { ?>
103
- <description><?php echo powerpress_format_itunes_value( powerpress_get_the_excerpt_rss(), 'description' ); ?></description>
104
  <?php } else { // else no rss_use_excerpt ?>
105
- <description><?php echo powerpress_format_itunes_value( powerpress_get_the_excerpt_rss(), 'description' ); ?></description>
106
- <?php if ( strlen( $post->post_content ) > 0 ) { ?>
107
- <content:encoded><![CDATA[<?php the_content_feed('rss2') ?>]]></content:encoded>
 
108
  <?php } else { // else strlen( $post->post_content ) <= 0 ?>
109
- <content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
110
  <?php } // end else strlen( $post->post_content ) <= 0 ?>
111
  <?php } // end else no rss_use_excerpt ?>
112
  <?php
@@ -114,7 +154,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'."\n";
114
  else // If feed maximizer on
115
  {
116
  ?>
117
- <description><?php echo powerpress_format_itunes_value( powerpress_get_the_excerpt_rss(), 'description' ); ?></description>
118
  <?php
119
  }
120
  ?>
@@ -166,7 +206,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'."\n";
166
  <link><?php the_permalink_rss() ?></link>
167
  <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
168
  <guid isPermaLink="false"><?php the_guid(); ?></guid>
169
- <description><?php echo powerpress_format_itunes_value( powerpress_get_the_excerpt_rss(), 'description' ); ?></description>
170
  <?php rss_enclosure(); ?>
171
  <?php do_action('rss2_item'.$FeedActionHook); ?>
172
  <?php
@@ -182,4 +222,15 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'."\n";
182
  ?>
183
  </channel>
184
  </rss>
 
 
 
 
 
 
 
 
 
 
 
185
  <?php exit; // exit feed to prevent possible notices ?>
5
  * @package WordPress
6
  */
7
 
8
+ function powerpress_get_the_content_feed($feed_type, $no_filters = false)
9
  {
10
+ if( $no_filters == false )
11
+ return get_the_content_feed($feed_type);
12
+
13
+ if ( post_password_required() ) {
14
+ return __( 'There is no content because this is a protected post.' );
15
+ }
16
+
17
+ global $post;
18
+ $content = $post->post_content;
19
+ $content = wptexturize($content);
20
+ $content = convert_smilies($content);
21
+ $content = wpautop($content);
22
+ $content = shortcode_unautop($content);
23
+ $content = prepend_attachment($content);
24
+ //$content = wp_make_content_images_responsive($content);
25
+ $content = capital_P_dangit($content);
26
+ $content = strip_shortcodes( $content );
27
+ $content = str_replace(']]>', ']]&gt;', $content);
28
+
29
+ if( function_exists('_oembed_filter_feed_content') )
30
+ return wp_staticize_emoji( _oembed_filter_feed_content( $content ) );
31
+ if( function_exists('wp_staticize_emoji') )
32
+ return wp_staticize_emoji( $content );
33
+ return $content;
34
+ }
35
+
36
+ function powerpress_get_the_excerpt_rss($no_filters = true)
37
+ {
38
+ if( $no_filters == false ) {
39
+ $output = get_the_excerpt();
40
+ return apply_filters( 'the_excerpt_rss', $output );
41
+ }
42
+
43
  global $post;
44
 
45
  if ( post_password_required() ) {
51
  $output = str_replace(']]>', ']]&gt;', $output);
52
  $output = strip_tags($output);
53
  }
54
+
55
+ return convert_chars( ent2ncr( $output ) );
56
+ }
57
+
58
+ function powerpress_the_generator() {
59
+ echo '<generator>https://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . '</generator>';
60
  }
61
+
62
 
63
  $GeneralSettings = get_option('powerpress_general');
64
  $iTunesOrderNumber = 0;
106
  <language><?php bloginfo_rss( 'language' ); ?></language>
107
  <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
108
  <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
109
+ <?php if( !empty($FeedActionHook) ) { echo '<generator>https://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . '</generator>'. PHP_EOL; } ?>
110
  <?php do_action('rss2_head'.$FeedActionHook); ?>
111
  <?php
112
 
114
  ?>
115
  <?php while( have_posts()) :
116
 
117
+ //if( empty($GeneralSettings['feed_accel']) )
118
+ the_post();
119
+ //else
120
+ // $GLOBALS['post'] = $GLOBALS['wp_query']->next_post(); // Use this rather than the_post() that way we do not add additional queries to the database
121
  ?>
122
  <item>
123
  <title><?php the_title_rss() ?></title>
139
  the_category_rss('rss2');
140
  }
141
  if (get_option('rss_use_excerpt')) { ?>
142
+ <description><?php echo powerpress_format_itunes_value( powerpress_get_the_excerpt_rss( !empty($GeneralSettings['feed_action_hook']) ), 'description' ); ?></description>
143
  <?php } else { // else no rss_use_excerpt ?>
144
+ <description><?php echo powerpress_format_itunes_value( powerpress_get_the_excerpt_rss( !empty($GeneralSettings['feed_action_hook']) ), 'description' ); ?></description>
145
+ <?php $content = powerpress_get_the_content_feed('rss2', !empty($GeneralSettings['feed_action_hook']) ); ?>
146
+ <?php if ( strlen( $content ) > 0 ) { ?>
147
+ <content:encoded><![CDATA[<?php echo $content; ?>]]></content:encoded>
148
  <?php } else { // else strlen( $post->post_content ) <= 0 ?>
149
+ <content:encoded><![CDATA[<?php echo powerpress_get_the_excerpt_rss( !empty($GeneralSettings['feed_action_hook']) ); ?>]]></content:encoded>
150
  <?php } // end else strlen( $post->post_content ) <= 0 ?>
151
  <?php } // end else no rss_use_excerpt ?>
152
  <?php
154
  else // If feed maximizer on
155
  {
156
  ?>
157
+ <description><?php echo powerpress_format_itunes_value( powerpress_get_the_excerpt_rss( !empty($GeneralSettings['feed_action_hook']) ), 'description' ); ?></description>
158
  <?php
159
  }
160
  ?>
206
  <link><?php the_permalink_rss() ?></link>
207
  <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
208
  <guid isPermaLink="false"><?php the_guid(); ?></guid>
209
+ <description><?php echo powerpress_format_itunes_value( powerpress_get_the_excerpt_rss( !empty($GeneralSettings['feed_accel']) ), 'description' ); ?></description>
210
  <?php rss_enclosure(); ?>
211
  <?php do_action('rss2_item'.$FeedActionHook); ?>
212
  <?php
222
  ?>
223
  </channel>
224
  </rss>
225
+ <?php
226
+
227
+ if( defined('POWERPRESS_DEBUG_QUERIES') ) {
228
+ if( !empty($wpdb->queries) ) {
229
+ echo "<!--\n";
230
+ echo "SQL Queries for this feed:\n";
231
+ print_r($wpdb->queries);
232
+ echo "\n-->";
233
+ }
234
+ }
235
+ ?>
236
  <?php exit; // exit feed to prevent possible notices ?>
mp3info.class.php CHANGED
@@ -343,6 +343,9 @@
343
  curl_setopt($curl, CURLOPT_USERAGENT, $this->m_UserAgent );
344
  curl_setopt($curl, CURLOPT_URL, $url);
345
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
 
 
 
346
  curl_setopt($curl, CURLOPT_HEADER, true); // header will be at output
347
  curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD'); // HTTP request
348
  curl_setopt($curl, CURLOPT_NOBODY, true );
343
  curl_setopt($curl, CURLOPT_USERAGENT, $this->m_UserAgent );
344
  curl_setopt($curl, CURLOPT_URL, $url);
345
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
346
+ if( defined('MEPR_PLUGIN_NAME') ) {
347
+ curl_setopt($curl, CURLOPT_COOKIEFILE, ""); // For MemberPress
348
+ }
349
  curl_setopt($curl, CURLOPT_HEADER, true); // header will be at output
350
  curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD'); // HTTP request
351
  curl_setopt($curl, CURLOPT_NOBODY, true );
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.2
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Requires at least: 3.6
10
- Tested up to: 4.5.2
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.2' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
@@ -581,11 +581,11 @@ function powerpress_rss2_head()
581
 
582
  if( !empty($Feed['itunes_image']) )
583
  {
584
- echo "\t".'<itunes:image href="' . esc_html( str_replace(' ', '+', $Feed['itunes_image']), 'double') . '" />'.PHP_EOL;
585
  }
586
  else
587
  {
588
- echo "\t".'<itunes:image href="' . powerpress_get_root_url() . 'itunes_default.jpg" />'.PHP_EOL;
589
  }
590
 
591
  if( !empty($Feed['email']) )
@@ -858,7 +858,7 @@ function powerpress_rss2_item()
858
  $EpisodeData['size'] = 5242880; // Use the dummy 5MB size since we don't have a size to quote
859
 
860
  echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
861
- trim($EpisodeData['url']),
862
  trim($EpisodeData['size']),
863
  trim($EpisodeData['type']),
864
  PHP_EOL);
@@ -895,19 +895,19 @@ function powerpress_rss2_item()
895
  $summary_cdata = ( !empty( $General['itunes_cdata'] ) ? true : false );
896
 
897
  if( empty($subtitle) ) {
898
- $subtitle = powerpress_get_the_exerpt( false );
899
  }
900
 
901
  // If no summary specified and we have enhanced summary enabled...
902
  if( empty($summary) && !empty($powerpress_feed['enhance_itunes_summary']) ) {
903
- $summary = powerpress_enhanced_itunes_summary();
904
  if( !empty($summary) ) {
905
  $summary_cdata = true; // Always use CDATA for enhanced iTunes summary
906
  }
907
  }
908
 
909
  if( empty($summary) ) { // Backwards compatbility with PodPress, the excerpt is used as the itunes summary if set
910
- $summary = powerpress_get_the_exerpt( true ); // Will call powerpress_get_the_content(true) if the excerpt does not exist
911
  }
912
 
913
  if( !empty($subtitle) ) {
@@ -930,9 +930,9 @@ function powerpress_rss2_item()
930
 
931
  // itunes episode image
932
  if( !empty( $EpisodeData['itunes_image']) ) {
933
- echo "\t\t".'<itunes:image href="' . esc_html( str_replace(' ', '+', $EpisodeData['itunes_image']), 'double') . '" />'.PHP_EOL;
934
  } else if( !empty($powerpress_feed['itunes_image']) ) {
935
- echo "\t\t".'<itunes:image href="' . esc_html( str_replace(' ', '+', $powerpress_feed['itunes_image']), 'double') . '" />'.PHP_EOL;
936
  }
937
 
938
  if( !empty($explicit) && $explicit != 'no' ) {
@@ -1051,7 +1051,7 @@ function powerpress_filter_rss_enclosure($content)
1051
  $EpisodeData = powerpress_get_enclosure_data($post->ID);
1052
 
1053
  // Modified Media URL
1054
- $ModifiedURL = $EpisodeData['url']; // powerpress_add_redirect_url($OrigURL);
1055
 
1056
  // Check that the content type is a valid one...
1057
  $match_count = preg_match('/\stype="([^"]*)"/', $content, $matches);
@@ -2543,31 +2543,71 @@ function powerpress_get_root_url()
2543
  return $plugin_url . '/';
2544
  }
2545
 
2546
- function powerpress_get_the_exerpt($for_summary = false)
2547
  {
2548
- $subtitle = trim( strip_tags( get_the_excerpt() ) );
 
 
 
 
 
 
 
 
 
 
 
 
2549
  if( !empty($subtitle) )
2550
  return $subtitle;
2551
- return powerpress_get_the_content( $for_summary );
2552
  }
2553
 
2554
- function powerpress_get_the_content($for_summary = true) {
2555
- $content_no_html = get_the_content();
 
 
 
 
 
 
 
 
2556
  $content_no_html = strip_shortcodes( $content_no_html );
 
 
 
2557
  if( $for_summary ) {
2558
  return trim( strip_tags($content_no_html, '<a><p><br>') );
2559
  }
2560
  return trim( strip_tags($content_no_html) );
2561
  }
2562
 
2563
- function powerpress_enhanced_itunes_summary()
2564
  {
2565
- $summary = apply_filters( 'the_content', get_the_content() );
 
 
 
 
2566
  $summary = str_replace("<li>", '<li>* ', $summary);
2567
  $summary = strip_tags($summary, '<a><br>'); // We can leave a tags for itunes:summary, this will also strip CDATA tags
2568
  return $summary;
2569
  }
2570
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2571
 
2572
  function powerpress_format_itunes_value($value, $tag, $cdata=false)
2573
  {
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.3
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Requires at least: 3.6
10
+ Tested up to: 4.6.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.0.3' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
581
 
582
  if( !empty($Feed['itunes_image']) )
583
  {
584
+ echo "\t".'<itunes:image href="' . esc_html( powerpress_url_in_feed(str_replace(' ', '+', $Feed['itunes_image'])), 'double') . '" />'.PHP_EOL;
585
  }
586
  else
587
  {
588
+ echo "\t".'<itunes:image href="' . powerpress_url_in_feed(powerpress_get_root_url()) . 'itunes_default.jpg" />'.PHP_EOL;
589
  }
590
 
591
  if( !empty($Feed['email']) )
858
  $EpisodeData['size'] = 5242880; // Use the dummy 5MB size since we don't have a size to quote
859
 
860
  echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
861
+ powerpress_url_in_feed(trim($EpisodeData['url'])),
862
  trim($EpisodeData['size']),
863
  trim($EpisodeData['type']),
864
  PHP_EOL);
895
  $summary_cdata = ( !empty( $General['itunes_cdata'] ) ? true : false );
896
 
897
  if( empty($subtitle) ) {
898
+ $subtitle = powerpress_get_the_exerpt( false, !empty($General['feed_action_hook']) );
899
  }
900
 
901
  // If no summary specified and we have enhanced summary enabled...
902
  if( empty($summary) && !empty($powerpress_feed['enhance_itunes_summary']) ) {
903
+ $summary = powerpress_enhanced_itunes_summary( !empty($General['feed_action_hook']) );
904
  if( !empty($summary) ) {
905
  $summary_cdata = true; // Always use CDATA for enhanced iTunes summary
906
  }
907
  }
908
 
909
  if( empty($summary) ) { // Backwards compatbility with PodPress, the excerpt is used as the itunes summary if set
910
+ $summary = powerpress_get_the_exerpt( true, !empty($General['feed_action_hook']) ); // Will call powerpress_get_the_content(true) if the excerpt does not exist
911
  }
912
 
913
  if( !empty($subtitle) ) {
930
 
931
  // itunes episode image
932
  if( !empty( $EpisodeData['itunes_image']) ) {
933
+ echo "\t\t".'<itunes:image href="' . esc_html( powerpress_url_in_feed(str_replace(' ', '+', $EpisodeData['itunes_image'])), 'double') . '" />'.PHP_EOL;
934
  } else if( !empty($powerpress_feed['itunes_image']) ) {
935
+ echo "\t\t".'<itunes:image href="' . esc_html( powerpress_url_in_feed(str_replace(' ', '+', $powerpress_feed['itunes_image'])), 'double') . '" />'.PHP_EOL;
936
  }
937
 
938
  if( !empty($explicit) && $explicit != 'no' ) {
1051
  $EpisodeData = powerpress_get_enclosure_data($post->ID);
1052
 
1053
  // Modified Media URL
1054
+ $ModifiedURL = powerpress_url_in_feed($EpisodeData['url']); // powerpress_add_redirect_url($OrigURL);
1055
 
1056
  // Check that the content type is a valid one...
1057
  $match_count = preg_match('/\stype="([^"]*)"/', $content, $matches);
2543
  return $plugin_url . '/';
2544
  }
2545
 
2546
+ function powerpress_get_the_exerpt($for_summary = false, $no_filters = false)
2547
  {
2548
+ if( $no_filters ) {
2549
+ global $post;
2550
+ $subtitle = $post->post_excerpt;
2551
+ if ( $subtitle == '') {
2552
+ $subtitle = strip_shortcodes( $post->post_content );
2553
+ $subtitle = str_replace(']]>', ']]&gt;', $subtitle);
2554
+ $subtitle = strip_tags($subtitle);
2555
+ }
2556
+ } else {
2557
+ $subtitle = get_the_excerpt();
2558
+ }
2559
+
2560
+ $subtitle = trim( strip_tags( $subtitle ) );
2561
  if( !empty($subtitle) )
2562
  return $subtitle;
2563
+ return powerpress_get_the_content( $for_summary, $no_filters );
2564
  }
2565
 
2566
+ function powerpress_get_the_content($for_summary = true, $no_filters = false, $no_strip_tags = false) {
2567
+ if( $no_filters ) {
2568
+ global $post;
2569
+ $content_no_html = $post->post_content;
2570
+ $content_no_html = strip_shortcodes( $content_no_html );
2571
+ $content_no_html = str_replace(']]>', ']]&gt;', $content_no_html);
2572
+ $content_no_html = wp_staticize_emoji( _oembed_filter_feed_content( $content_no_html ) );
2573
+ } else {
2574
+ $content_no_html = get_the_content();
2575
+ }
2576
  $content_no_html = strip_shortcodes( $content_no_html );
2577
+ if( $no_strip_tags )
2578
+ return $content_no_html;
2579
+
2580
  if( $for_summary ) {
2581
  return trim( strip_tags($content_no_html, '<a><p><br>') );
2582
  }
2583
  return trim( strip_tags($content_no_html) );
2584
  }
2585
 
2586
+ function powerpress_enhanced_itunes_summary($no_filters = false)
2587
  {
2588
+ if( $no_filters ) {
2589
+ $summary = powerpress_get_the_content(false, true, true);
2590
+ } else {
2591
+ $summary = apply_filters( 'the_content', powerpress_get_the_content(false, $no_filters, true) );
2592
+ }
2593
  $summary = str_replace("<li>", '<li>* ', $summary);
2594
  $summary = strip_tags($summary, '<a><br>'); // We can leave a tags for itunes:summary, this will also strip CDATA tags
2595
  return $summary;
2596
  }
2597
 
2598
+ function powerpress_url_in_feed($url) {
2599
+ if( defined('POWERPRESS_FEEDS_FORCE_HTTP') && is_feed() ) {
2600
+ if( preg_match('/^https:\/\/(.*)$/', $url, $matches) ) {
2601
+ return 'http://'.$matches[1];
2602
+ }
2603
+ }
2604
+ else if( defined('POWERPRESS_FEEDS_FORCE_HTTPS') && is_feed() ) {
2605
+ if( preg_match('/^http:\/\/(.*)$/', $url, $matches) ) {
2606
+ return 'https://'.$matches[1];
2607
+ }
2608
+ }
2609
+ return $url;
2610
+ }
2611
 
2612
  function powerpress_format_itunes_value($value, $tag, $cdata=false)
2613
  {
powerpressadmin-diagnostics.php CHANGED
@@ -13,6 +13,7 @@
13
  $powerpress_diags['detecting_media']['allow_url_fopen'] = (ini_get( 'allow_url_fopen' ) != false); // fopen
14
  $powerpress_diags['detecting_media']['curl'] = function_exists( 'curl_init' ); // cURL
15
  $powerpress_diags['detecting_media']['message2'] = ''; // if ( !ini_get('safe_mode') && !ini_get('open_basedir') )
 
16
 
17
  // Testing:
18
  //$powerpress_diags['detecting_media']['allow_url_fopen'] = false;
@@ -50,44 +51,24 @@
50
  $powerpress_diags['detecting_media']['message'] = __('Your server must either have the php.ini setting \'allow_url_fopen\' enabled or have the PHP cURL library installed in order to detect media information.', 'powerpress');
51
  }
52
 
53
- // Second, see if we can ping itunes, OpenSSL is required
54
- $powerpress_diags['pinging_itunes'] = array();
55
- $powerpress_diags['pinging_itunes']['success'] = true;
56
- $powerpress_diags['pinging_itunes']['openssl'] = extension_loaded('openssl');
57
- $powerpress_diags['pinging_itunes']['curl_ssl'] = false;
58
  if( function_exists('curl_version') )
59
  {
60
  $curl_info = curl_version();
61
- $powerpress_diags['pinging_itunes']['curl_ssl'] = ($curl_info['features'] & CURL_VERSION_SSL );
 
 
 
 
 
62
  }
63
 
64
  // testing:
65
  //$powerpress_diags['pinging_itunes']['openssl'] = false;
66
  //$powerpress_diags['pinging_itunes']['curl_ssl'] = false;
67
 
68
- if( $powerpress_diags['detecting_media']['success'] == false )
69
- {
70
- $powerpress_diags['pinging_itunes']['success'] = false;
71
- $powerpress_diags['pinging_itunes']['message'] = __('The problem with \'Detecting Media Information\' above needs to be resolved for this test to continue.', 'powerpress');
72
- }
73
- else if( $powerpress_diags['detecting_media']['curl'] && $powerpress_diags['pinging_itunes']['curl_ssl'] )
74
- {
75
- $powerpress_diags['pinging_itunes']['message'] = __('Your web server supports secure HTTPS connections.', 'powerpress');
76
- }
77
- else if( $powerpress_diags['detecting_media']['curl'] )
78
- {
79
- $powerpress_diags['pinging_itunes']['success'] = false;
80
- $powerpress_diags['pinging_itunes']['message'] = __('Your web server\'s cURL library does not support secure HTTPS connections.', 'powerpress');
81
- }
82
- else if( $powerpress_diags['pinging_itunes']['openssl'] && $powerpress_diags['detecting_media']['allow_url_fopen'] )
83
- {
84
- $powerpress_diags['pinging_itunes']['message'] = __('Your web server supports secure HTTPS connections.', 'powerpress');
85
- }
86
- else
87
- {
88
- $powerpress_diags['pinging_itunes']['success'] = false;
89
- $powerpress_diags['pinging_itunes']['message'] = __('Pinging iTunes requires the PHP OpenSSL library to be installed.', 'powerpress');
90
- }
91
 
92
  // Third, see if the uploads/powerpress folder is writable
93
  $UploadArray = wp_upload_dir();
@@ -278,8 +259,11 @@
278
  $message .= " &nbsp; \t &nbsp; ". __('warning:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['warning']?'true':'false') ."<br />\n";
279
  $message .= " &nbsp; \t &nbsp; ". __('allow_url_fopen:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['allow_url_fopen']?'true':'false') ."<br />\n";
280
  $message .= " &nbsp; \t &nbsp; ". __('curl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl']?'true':'false') ."<br />\n";
 
 
281
  $message .= " &nbsp; \t &nbsp; ". __('message:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message'] ."<br />\n";
282
  $message .= " &nbsp; \t &nbsp; ". __('message 2:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message2'] ."<br />\n";
 
283
 
284
  // Pinging iTunes
285
  //$message .= "<br />\n";
@@ -423,33 +407,23 @@
423
  <p><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message']); ?></p>
424
  <?php if( $powerpress_diags['detecting_media']['message2'] ) { ?>
425
  <p><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message2']); ?></p><?php } ?>
 
 
426
  <?php if( $powerpress_diags['detecting_media']['success'] ) { ?>
427
  <p><?php echo __('If you are still having problems detecting media information, check with your web hosting provider if there is a firewall blocking your server.', 'powerpress'); ?></p>
428
  <?php } else { ?>
429
  <p><?php echo __('Contact your web hosting provider with the information above.', 'powerpress'); ?></p>
430
  <?php } ?>
 
 
 
 
 
 
431
  </td>
432
  </tr>
433
  </table>
434
 
435
- <!--
436
- <h3 style="margin-bottom: 0;"><?php echo __('Pinging iTunes', 'powerpress'); ?></h3>
437
- <p style="margin: 0;"><?php echo __('The following test checks to see that your web server can make connections with Apple\'s secure ping server.', 'powerpress'); ?></p>
438
- <table class="form-table">
439
- <tr valign="top">
440
- <th scope="row">
441
- <?php powerpressadmin_diagnostics_status($powerpress_diags['pinging_itunes']['success']); ?>
442
- </th>
443
- <td>
444
- <p><?php echo htmlspecialchars($powerpress_diags['pinging_itunes']['message']); ?></p>
445
- <?php if( $powerpress_diags['pinging_itunes']['success'] == false ) { ?>
446
- <p><?php echo __('Contact your web hosting provider with the information above.', 'powerpress'); ?></p>
447
- <?php } ?>
448
- </td>
449
- </tr>
450
- </table>
451
- -->
452
-
453
  <h3 style="margin-bottom: 0;"><?php echo __('Uploading Artwork', 'powerpress'); ?></h3>
454
  <p style="margin: 0;"><?php echo __('The following test checks to see that you can upload and store files on your web server.', 'powerpress'); ?></p>
455
  <table class="form-table">
13
  $powerpress_diags['detecting_media']['allow_url_fopen'] = (ini_get( 'allow_url_fopen' ) != false); // fopen
14
  $powerpress_diags['detecting_media']['curl'] = function_exists( 'curl_init' ); // cURL
15
  $powerpress_diags['detecting_media']['message2'] = ''; // if ( !ini_get('safe_mode') && !ini_get('open_basedir') )
16
+ $powerpress_diags['detecting_media']['message3'] = ''; // ssl checks
17
 
18
  // Testing:
19
  //$powerpress_diags['detecting_media']['allow_url_fopen'] = false;
51
  $powerpress_diags['detecting_media']['message'] = __('Your server must either have the php.ini setting \'allow_url_fopen\' enabled or have the PHP cURL library installed in order to detect media information.', 'powerpress');
52
  }
53
 
54
+ // OpenSSL or curl SSL is required
55
+ $powerpress_diags['detecting_media']['openssl'] = extension_loaded('openssl');
56
+ $powerpress_diags['detecting_media']['curl_ssl'] = false;
 
 
57
  if( function_exists('curl_version') )
58
  {
59
  $curl_info = curl_version();
60
+ $powerpress_diags['detecting_media']['curl_ssl'] = ($curl_info['features'] & CURL_VERSION_SSL );
61
+ }
62
+
63
+ if( $powerpress_diags['detecting_media']['openssl'] == false && $powerpress_diags['detecting_media']['curl_ssl'] == false ) {
64
+ $powerpress_diags['detecting_media']['warning'] = true;
65
+ $powerpress_diags['detecting_media']['message3'] = __('WARNING: Your server should support SSL either openssl or curl_ssl.', 'powerpress');
66
  }
67
 
68
  // testing:
69
  //$powerpress_diags['pinging_itunes']['openssl'] = false;
70
  //$powerpress_diags['pinging_itunes']['curl_ssl'] = false;
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
  // Third, see if the uploads/powerpress folder is writable
74
  $UploadArray = wp_upload_dir();
259
  $message .= " &nbsp; \t &nbsp; ". __('warning:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['warning']?'true':'false') ."<br />\n";
260
  $message .= " &nbsp; \t &nbsp; ". __('allow_url_fopen:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['allow_url_fopen']?'true':'false') ."<br />\n";
261
  $message .= " &nbsp; \t &nbsp; ". __('curl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl']?'true':'false') ."<br />\n";
262
+ $message .= " &nbsp; \t &nbsp; ". __('curl_ssl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl_ssl']?'true':'false') ."<br />\n";
263
+ $message .= " &nbsp; \t &nbsp; ". __('openssl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['openssl']?'true':'false') ."<br />\n";
264
  $message .= " &nbsp; \t &nbsp; ". __('message:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message'] ."<br />\n";
265
  $message .= " &nbsp; \t &nbsp; ". __('message 2:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message2'] ."<br />\n";
266
+ $message .= " &nbsp; \t &nbsp; ". __('message 3:', 'powerpress') .' '. $powerpress_diags['detecting_media']['message3'] ."<br />\n";
267
 
268
  // Pinging iTunes
269
  //$message .= "<br />\n";
407
  <p><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message']); ?></p>
408
  <?php if( $powerpress_diags['detecting_media']['message2'] ) { ?>
409
  <p><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message2']); ?></p><?php } ?>
410
+ <?php if( $powerpress_diags['detecting_media']['message3'] ) { ?>
411
+ <p><?php echo htmlspecialchars($powerpress_diags['detecting_media']['message3']); ?></p><?php } ?>
412
  <?php if( $powerpress_diags['detecting_media']['success'] ) { ?>
413
  <p><?php echo __('If you are still having problems detecting media information, check with your web hosting provider if there is a firewall blocking your server.', 'powerpress'); ?></p>
414
  <?php } else { ?>
415
  <p><?php echo __('Contact your web hosting provider with the information above.', 'powerpress'); ?></p>
416
  <?php } ?>
417
+ <ul><li><ul>
418
+ <li><?php echo __('allow_url_fopen:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['allow_url_fopen']?'true':'false'); ?></li>
419
+ <li><?php echo __('curl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl']?'true':'false'); ?></li>
420
+ <li><?php echo __('curl_ssl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['curl_ssl']?'true':'false'); ?></li>
421
+ <li><?php echo __('openssl:', 'powerpress') .' '. ($powerpress_diags['detecting_media']['openssl']?'true':'false'); ?></li>
422
+ </ul></li></ul>
423
  </td>
424
  </tr>
425
  </table>
426
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
427
  <h3 style="margin-bottom: 0;"><?php echo __('Uploading Artwork', 'powerpress'); ?></h3>
428
  <p style="margin: 0;"><?php echo __('The following test checks to see that you can upload and store files on your web server.', 'powerpress'); ?></p>
429
  <table class="form-table">
powerpressadmin.php CHANGED
@@ -1509,6 +1509,8 @@ function powerpress_htmlspecialchars($data)
1509
  {
1510
  while( list($key,$value) = each($data) )
1511
  {
 
 
1512
  if( is_array($value) )
1513
  $data[$key] = powerpress_htmlspecialchars($value);
1514
  else
1509
  {
1510
  while( list($key,$value) = each($data) )
1511
  {
1512
+ if( $key == 'itunes_summary' )
1513
+ continue; // Skip this one as we escape it in the form.
1514
  if( is_array($value) )
1515
  $data[$key] = powerpress_htmlspecialchars($value);
1516
  else
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: amandato, blubrry
3
  Tags: powerpress, podcasting, podcast, podcaster, 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.5.3
6
- Stable tag: 7.0.2
7
  Donate link: https://www.patreon.com/blubrry?ty=h
8
  License: GPLv2 or later
9
 
@@ -13,6 +13,7 @@ No. 1 Podcasting plugin for WordPress, with simple & advanced modes, players, su
13
 
14
  PowerPress 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, TuneIn and Blubrry Podcasting directories, as well as all podcast applications and clients.
15
 
 
16
 
17
  = Simple Mode =
18
  If you are just getting started or feel overwelmed with all the settings and options, switch to Simple mode! PowerPress's Simple Mode will walk you through getting started in 3 easy steps.
@@ -226,6 +227,18 @@ To install Blubrry PowerPress manually, follow these steps:
226
  = Become a PowerPress Patron! =
227
  Help support your favorite podcasting plugin via Patreon. [Visit Blubrry's Patreon page](https://www.patreon.com/blubrry?ty=h)
228
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  = 7.0.2 =
230
  * Released on 7/22/2016
231
  * Fixed bug with new Blubrry Player not displaying show notes button.
2
  Contributors: amandato, blubrry
3
  Tags: powerpress, podcasting, podcast, podcaster, 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.6.1
6
+ Stable tag: 7.0.3
7
  Donate link: https://www.patreon.com/blubrry?ty=h
8
  License: GPLv2 or later
9
 
13
 
14
  PowerPress 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, TuneIn and Blubrry Podcasting directories, as well as all podcast applications and clients.
15
 
16
+ [youtube https://www.youtube.com/watch?v=twqKrVehY3o]
17
 
18
  = Simple Mode =
19
  If you are just getting started or feel overwelmed with all the settings and options, switch to Simple mode! PowerPress's Simple Mode will walk you through getting started in 3 easy steps.
227
  = Become a PowerPress Patron! =
228
  Help support your favorite podcasting plugin via Patreon. [Visit Blubrry's Patreon page](https://www.patreon.com/blubrry?ty=h)
229
 
230
+ = 7.0.3 =
231
+ * Released 9/13/2016
232
+ * Fixed issue when editing channel/category/post type podcast settings double escaping & character. (Thanks Robin Brinkler for bringing to our attention!)
233
+ * Added checks for OpenSSL and cURL SSL support to the Diagnostics page.
234
+ * PowerPress "Verify" option now works with MemberPress. (Thanks MemberPress for the code!)
235
+ * Added new debugging define `POWERPRESS_DEBUG_QUERIES`, displays SQL queries at the bottom of the feed for diagnostic purposes.
236
+ * Feed option to not allow other plugins from modyfing podcast feeds now bypasses the `the_content` and `the_excerpt` filters.
237
+ * Added 2 new define options for podcast feeds and HTTPS. For example, it is possible to host your website via HTTPS but serve the feed via HTTP. (Thanks @Fastmover for the patch that inspired this option)
238
+ * `define('POWERPRESS_FEEDS_FORCE_HTTPS', true);` when added to wp-config.php forces all media links and iTunes images to use HTTPS.
239
+ * `define('POWERPRESS_FEEDS_FORCE_HTTP', true);` when added to wp-config.php forces all media links and iTunes images to use HTTP.
240
+
241
+
242
  = 7.0.2 =
243
  * Released on 7/22/2016
244
  * Fixed bug with new Blubrry Player not displaying show notes button.