PowerPress Podcasting plugin by Blubrry - Version 4.0.7

Version Description

  • Released on 2/14/2013
  • The 1 Pixel Out player is back! Learn More
  • Added new define option POWERPRESS_READ_TEXT to customize the 'Read' label for pdf/epub books.
  • Player logic updated to display specific PDF/ePub images with links to the files.
  • PDF image from Hybrid Design.
  • ePub image from ThreePress.
  • Calls to wp_remote_head now set to use HTTP 1.1 protocol (WordPress defaults to HTTP 1.0 for what ever reason. Thanks vinull for your bug fix!)
  • Added support for Kindle Fire in the list of detected mobile HTML5 players. (Thanks Chris Bockay for bringing to our attention and helpnig us diagnose!)
  • Added logic to not include header javascript in theme's if the Media Apperance option "Disable PowerPress Media Players and Links" is disabled.
  • Added logic to fix the play in new window and embed links if Joost de Valk's Google Analytics for WordPress plugin has "Track outbound clicks & downloads" enabled.
  • Added logic to the getid3 library to use the WordPress temp folder path rather than use the system detected path. This should fix the verify problems a small portion of folks have when the /tmp folder not being writable.
  • Happy Valentines day!
Download this release

Release Info

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

Code changes from version 4.0.6 to 4.0.7

audio-player.swf ADDED
Binary file
css/admin.css CHANGED
@@ -79,6 +79,7 @@ color:#999999;
79
.powerpress_tabbed_content ul a:hover {
80
}
81
82
.powerpress_tabbed_content ul .ui-tabs-selected a {
83
background-color:#FFFFFF;
84
border-bottom:0 none;
@@ -87,6 +88,8 @@ color:#999999;
87
padding-bottom:3px;
88
}
89
90
.powerpress_tabbed_content > div {
91
padding: 0px 10px 10px 10px;
92
*padding-top:3px;
79
.powerpress_tabbed_content ul a:hover {
80
}
81
82
+ .powerpress_tabbed_content ul .ui-tabs-active a,
83
.powerpress_tabbed_content ul .ui-tabs-selected a {
84
background-color:#FFFFFF;
85
border-bottom:0 none;
88
padding-bottom:3px;
89
}
90
91
+
92
+
93
.powerpress_tabbed_content > div {
94
padding: 0px 10px 10px 10px;
95
*padding-top:3px;
css/dashboard.css CHANGED
@@ -1,16 +1,16 @@
1
/* PowerPress Dashboard CSS */
2
3
/* Dashboard Notice, based on Dashboard Browser Nag */
4
- #powerpress_dashboard_notice_2 a.update-browser-link {
5
font-size: 1.2em;
6
font-weight: bold;
7
}
8
9
- #powerpress_dashboard_notice_2 a {
10
text-decoration: underline;
11
}
12
13
- #powerpress_dashboard_notice_2.postbox {
14
background-color: #e29808;
15
background-image: none;
16
border-color: #edc048;
@@ -20,7 +20,7 @@
20
color: #fff;
21
}
22
23
- #powerpress_dashboard_notice_2.postbox h3 {
24
border-bottom-color: #f6e2ac;
25
text-shadow: none;
26
-moz-box-shadow: none;
@@ -30,16 +30,16 @@
30
color: #fff;
31
}
32
33
- #powerpress_dashboard_notice_2 a {
34
color: #fff;
35
}
36
37
- #powerpress_dashboard_notice_2.browser-insecure a.browse-happy-link,
38
- #powerpress_dashboard_notice_2.browser-insecure a.update-browser-link {
39
text-shadow: #871b15 0 1px 0;
40
}
41
42
- #powerpress_dashboard_notice_2 a.browse-happy-link,
43
- #powerpress_dashboard_notice_2 a.update-browser-link {
44
text-shadow: #d29a04 0 1px 0;
45
}
1
/* PowerPress Dashboard CSS */
2
3
/* Dashboard Notice, based on Dashboard Browser Nag */
4
+ #powerpress_dashboard_notice_3 a.update-browser-link {
5
font-size: 1.2em;
6
font-weight: bold;
7
}
8
9
+ #powerpress_dashboard_notice_3 a {
10
text-decoration: underline;
11
}
12
13
+ #powerpress_dashboard_notice_3.postbox {
14
background-color: #e29808;
15
background-image: none;
16
border-color: #edc048;
20
color: #fff;
21
}
22
23
+ #powerpress_dashboard_notice_3.postbox h3 {
24
border-bottom-color: #f6e2ac;
25
text-shadow: none;
26
-moz-box-shadow: none;
30
color: #fff;
31
}
32
33
+ #powerpress_dashboard_notice_3 a {
34
color: #fff;
35
}
36
37
+ #powerpress_dashboard_notice_3.browser-insecure a.browse-happy-link,
38
+ #powerpress_dashboard_notice_3.browser-insecure a.update-browser-link {
39
text-shadow: #871b15 0 1px 0;
40
}
41
42
+ #powerpress_dashboard_notice_3 a.browse-happy-link,
43
+ #powerpress_dashboard_notice_3 a.update-browser-link {
44
text-shadow: #d29a04 0 1px 0;
45
}
getid3/getid3.php CHANGED
@@ -9,6 +9,14 @@
9
// ///
10
/////////////////////////////////////////////////////////////////
11
12
// attempt to define temp dir as something flexible but reliable
13
$temp_dir = ini_get('upload_tmp_dir');
14
if ($temp_dir && (!is_dir($temp_dir) || !is_readable($temp_dir))) {
@@ -47,6 +55,10 @@ if ($open_basedir) {
47
if (!$temp_dir) {
48
$temp_dir = '*'; // invalid directory name should force tempnam() to use system default temp dir
49
}
50
// $temp_dir = '/something/else/'; // feel free to override temp dir here if it works better for your system
51
define('GETID3_TEMP_DIR', $temp_dir);
52
unset($open_basedir, $temp_dir);
9
// ///
10
/////////////////////////////////////////////////////////////////
11
12
+ // START Added for PowerPress
13
+ if( function_exists('get_temp_dir') ) // If wordpress function is available, lets use it
14
+ {
15
+ $temp_dir = get_temp_dir(); // WordPress temp folder
16
+ }
17
+ else
18
+ { // END Added for PowerPress
19
+
20
// attempt to define temp dir as something flexible but reliable
21
$temp_dir = ini_get('upload_tmp_dir');
22
if ($temp_dir && (!is_dir($temp_dir) || !is_readable($temp_dir))) {
55
if (!$temp_dir) {
56
$temp_dir = '*'; // invalid directory name should force tempnam() to use system default temp dir
57
}
58
+
59
+ } // Added for PowerPress
60
+
61
+
62
// $temp_dir = '/something/else/'; // feel free to override temp dir here if it works better for your system
63
define('GETID3_TEMP_DIR', $temp_dir);
64
unset($open_basedir, $temp_dir);
languages/{zh-cn.mo → powerpress-zh-CN.mo} RENAMED
File without changes
languages/{zh-cn.po → powerpress-zh-CN.po} RENAMED
File without changes
play_epub.png ADDED
Binary file
play_pdf.png ADDED
Binary file
powerpress-player.php CHANGED
@@ -930,6 +930,13 @@ function powerpressplayer_player_other($content, $media_url, $EpisodeData = arra
930
}
931
932
}; break;
933
934
// Default, just display the play image.
935
default: {
@@ -1545,14 +1552,47 @@ function powerpressplayer_build_playimageaudio($media_url, $include_div = false)
1545
return $content;
1546
}
1547
1548
/*
1549
1 pixel out player
1550
*/
1551
function powerpressplayer_build_1pxoutplayer($media_url, $EpisodeData = array())
1552
{
1553
- return powerpressplayer_build_flowplayerclassic($media_url, $EpisodeData); // Replaces 1 pixel out player for now
1554
- /*
1555
-
1556
$content = '';
1557
$autoplay = false;
1558
if( isset($EpisodeData['autoplay']) && $EpisodeData['autoplay'] )
@@ -1631,7 +1671,6 @@ function powerpressplayer_build_1pxoutplayer($media_url, $EpisodeData = array())
1631
$content .= '</div>'.PHP_EOL;
1632
1633
return $content;
1634
- */
1635
}
1636
1637
/*
930
}
931
932
}; break;
933
+
934
+ case 'pdf': {
935
+ $content .= powerpressplayer_build_playimagepdf($media_url, true);
936
+ }; break;
937
+ case 'epub': {
938
+ $content .= powerpressplayer_build_playimageepub($media_url, true);
939
+ }; break;
940
941
// Default, just display the play image.
942
default: {
1552
return $content;
1553
}
1554
1555
+ function powerpressplayer_build_playimagepdf($media_url, $include_div = false)
1556
+ {
1557
+ $content = '';
1558
+ $cover_image = powerpress_get_root_url() . 'play_pdf.png';
1559
+ $GeneralSettings = get_option('powerpress_general');
1560
+ if( !empty($GeneralSettings['pdf_custom_play_button']) )
1561
+ $cover_image = $GeneralSettings['pdf_custom_play_button'];
1562
+
1563
+ if( $include_div )
1564
+ $content .= '<div class="powerpress_player" id="powerpress_player_'. powerpressplayer_get_next_id() .'">';
1565
+ $content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" target="_blank">';
1566
+ $content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" style="border:0;" />';
1567
+ $content .= '</a>';
1568
+ if( $include_div )
1569
+ $content .= "</div>\n";
1570
+ return $content;
1571
+ }
1572
+
1573
+ function powerpressplayer_build_playimageepub($media_url, $include_div = false)
1574
+ {
1575
+ $content = '';
1576
+ $cover_image = powerpress_get_root_url() . 'play_epub.png';
1577
+ $GeneralSettings = get_option('powerpress_general');
1578
+ if( !empty($GeneralSettings['epub_custom_play_button']) )
1579
+ $cover_image = $GeneralSettings['epub_custom_play_button'];
1580
+
1581
+ if( $include_div )
1582
+ $content .= '<div class="powerpress_player" id="powerpress_player_'. powerpressplayer_get_next_id() .'">';
1583
+ $content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" target="_blank">';
1584
+ $content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" style="border:0;" />';
1585
+ $content .= '</a>';
1586
+ if( $include_div )
1587
+ $content .= "</div>\n";
1588
+ return $content;
1589
+ }
1590
+
1591
/*
1592
1 pixel out player
1593
*/
1594
function powerpressplayer_build_1pxoutplayer($media_url, $EpisodeData = array())
1595
{
1596
$content = '';
1597
$autoplay = false;
1598
if( isset($EpisodeData['autoplay']) && $EpisodeData['autoplay'] )
1671
$content .= '</div>'.PHP_EOL;
1672
1673
return $content;
1674
}
1675
1676
/*
powerpress.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Blubrry PowerPress
4
Plugin URI: http://www.blubrry.com/powerpress/
5
Description: <a href="http://www.blubrry.com/powerpress/" target="_blank">Blubrry PowerPress</a> adds podcasting support to your blog. Features include: media player, 3rd party statistics, iTunes integration, Blubrry Services (Media Statistics and Hosting) integration and a lot more.
6
- Version: 4.0.6
7
Author: Blubrry
8
Author URI: http://www.blubrry.com/
9
Change Log:
@@ -33,7 +33,7 @@ if( !function_exists('add_action') )
33
die("access denied.");
34
35
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
36
- define('POWERPRESS_VERSION', '4.0.6' );
37
38
// Translation support:
39
if ( !defined('POWERPRESS_ABSPATH') )
@@ -63,7 +63,9 @@ if( !defined('POWERPRESS_PLAY_TEXT') )
63
define('POWERPRESS_PLAY_TEXT', __('Play', 'powerpress') );
64
if( !defined('POWERPRESS_EMBED_TEXT') )
65
define('POWERPRESS_EMBED_TEXT', __('Embed', 'powerpress') );
66
-
67
if( !defined('POWERPRESS_BLUBRRY_API_URL') )
68
define('POWERPRESS_BLUBRRY_API_URL', 'http://api.blubrry.com/');
69
@@ -95,7 +97,7 @@ if( !defined('PHP_EOL') )
95
96
// Set regular expression values for determining mobile devices
97
if( !defined('POWERPRESS_MOBILE_REGEX') )
98
- define('POWERPRESS_MOBILE_REGEX', 'iphone|ipod|ipad|aspen|android|blackberry|opera mini|webos|incognito|webmate');
99
100
$powerpress_feed = NULL; // DO NOT CHANGE
101
@@ -299,14 +301,16 @@ function powerpress_header()
299
$Powerpress = get_option('powerpress_general');
300
if( !isset($Powerpress['custom_feeds']) )
301
$Powerpress['custom_feeds'] = array('podcast'=>'Default Podcast Feed');
302
-
303
- if( !isset($Powerpress['player_function']) || $Powerpress['player_function'] > 0 ) // Don't include the player in the header if it is not needed...
304
{
305
- $PowerpressPluginURL = powerpress_get_root_url();
306
- if( !defined('POWERPRESS_ENQUEUE_SCRIPTS') )
307
{
308
- echo "<script type=\"text/javascript\" src=\"". powerpress_get_root_url() ."player.js\"></script>\n";
309
- }
310
?>
311
<script type="text/javascript"><!--
312
<?php
@@ -323,6 +327,7 @@ powerpress_url = '<?php echo powerpress_get_root_url(); ?>';
323
//-->
324
</script>
325
<?php
326
}
327
328
if( !empty($Powerpress['feed_links']) )
@@ -1119,7 +1124,17 @@ function powerpress_init()
1119
}
1120
}
1121
1122
-
1123
}
1124
1125
add_action('init', 'powerpress_init', -100); // We need to add the feeds before other plugins start screwing with them
3
Plugin Name: Blubrry PowerPress
4
Plugin URI: http://www.blubrry.com/powerpress/
5
Description: <a href="http://www.blubrry.com/powerpress/" target="_blank">Blubrry PowerPress</a> adds podcasting support to your blog. Features include: media player, 3rd party statistics, iTunes integration, Blubrry Services (Media Statistics and Hosting) integration and a lot more.
6
+ Version: 4.0.7
7
Author: Blubrry
8
Author URI: http://www.blubrry.com/
9
Change Log:
33
die("access denied.");
34
35
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
36
+ define('POWERPRESS_VERSION', '4.0.7' );
37
38
// Translation support:
39
if ( !defined('POWERPRESS_ABSPATH') )
63
define('POWERPRESS_PLAY_TEXT', __('Play', 'powerpress') );
64
if( !defined('POWERPRESS_EMBED_TEXT') )
65
define('POWERPRESS_EMBED_TEXT', __('Embed', 'powerpress') );
66
+ if( !defined('POWERPRESS_READ_TEXT') )
67
+ define('POWERPRESS_READ_TEXT', __('Read', 'powerpress') );
68
+
69
if( !defined('POWERPRESS_BLUBRRY_API_URL') )
70
define('POWERPRESS_BLUBRRY_API_URL', 'http://api.blubrry.com/');
71
97
98
// Set regular expression values for determining mobile devices
99
if( !defined('POWERPRESS_MOBILE_REGEX') )
100
+ define('POWERPRESS_MOBILE_REGEX', 'iphone|ipod|ipad|aspen|android|blackberry|opera mini|webos|incognito|webmate|silk');
101
102
$powerpress_feed = NULL; // DO NOT CHANGE
103
301
$Powerpress = get_option('powerpress_general');
302
if( !isset($Powerpress['custom_feeds']) )
303
$Powerpress['custom_feeds'] = array('podcast'=>'Default Podcast Feed');
304
+
305
+ if( empty($Powerpress['disable_appearance']) || $Powerpress['disable_appearance'] == false )
306
{
307
+ if( !isset($Powerpress['player_function']) || $Powerpress['player_function'] > 0 ) // Don't include the player in the header if it is not needed...
308
{
309
+ $PowerpressPluginURL = powerpress_get_root_url();
310
+ if( !defined('POWERPRESS_ENQUEUE_SCRIPTS') )
311
+ {
312
+ echo "<script type=\"text/javascript\" src=\"". powerpress_get_root_url() ."player.js\"></script>\n";
313
+ }
314
?>
315
<script type="text/javascript"><!--
316
<?php
327
//-->
328
</script>
329
<?php
330
+ }
331
}
332
333
if( !empty($Powerpress['feed_links']) )
1124
}
1125
}
1126
1127
+ // CHECK if the Google Analytics for WordPress plugin is enabled, if so, lets add our players after it modifies the post content...
1128
+ if( defined('GAWP_VERSION') && POWERPRESS_CONTENT_ACTION_PRIORITY < 120 )
1129
+ {
1130
+ remove_filter('get_the_excerpt', 'powerpress_content', (POWERPRESS_CONTENT_ACTION_PRIORITY - 1) );
1131
+ remove_filter('the_content', 'powerpress_content', POWERPRESS_CONTENT_ACTION_PRIORITY);
1132
+ remove_filter('the_excerpt', 'powerpress_content', POWERPRESS_CONTENT_ACTION_PRIORITY);
1133
+
1134
+ add_filter('get_the_excerpt', 'powerpress_content', (120-1) );
1135
+ add_filter('the_content', 'powerpress_content', 120);
1136
+ add_filter('the_excerpt', 'powerpress_content', 120);
1137
+ }
1138
}
1139
1140
add_action('init', 'powerpress_init', -100); // We need to add the feeds before other plugins start screwing with them
powerpressadmin-dashboard.php CHANGED
@@ -198,6 +198,19 @@ function powerpress_dashboard_notice_2_content()
198
powerpress_dashboard_notice_message(2, $message );
199
}
200
201
function powerpress_dashboard_notice_message($notice_id, $message)
202
{
203
echo $message;
@@ -233,37 +246,24 @@ function powerpress_dashboard_setup()
233
if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
234
$StatsDashboard = false;
235
236
- // PowerPress Dashboard Notice 1:
237
- $Notice1Dashboard = false;
238
- if( !empty($Settings['timestamp']) && $Settings['timestamp'] < mktime(0, 0, 0, 5, 15, 2012) )
239
{
240
- $Notice1Dashboard = true;
241
- // Now check if they dismissed the notice...
242
$DismissedNotices = get_option('powerpress_dismissed_notices');
243
- if( !empty($DismissedNotices[1]) )
244
- $Notice1Dashboard = false;
245
- }
246
-
247
- $Notice2Dashboard = true;
248
- $DismissedNotices = get_option('powerpress_dismissed_notices');
249
- if( !empty($DismissedNotices[2]) )
250
- {
251
- $Notice2Dashboard = false;
252
}
253
//$Notice1Dashboard = false;// Temporary till release
254
255
- if( $Notice1Dashboard )
256
- {
257
- $user = wp_get_current_user();
258
- powerpressadmin_add_dashboard_notice_widget($user->ID, 1);
259
- wp_add_dashboard_widget( 'powerpress_dashboard_notice_1', __( 'Blubrry PowerPress Notice - May 2012', 'powerpress'), 'powerpress_dashboard_notice_1_content' );
260
- }
261
-
262
- if( $Notice2Dashboard )
263
{
264
$user = wp_get_current_user();
265
- powerpressadmin_add_dashboard_notice_widget($user->ID, 2);
266
- wp_add_dashboard_widget( 'powerpress_dashboard_notice_2', __( 'Blubrry PowerPress Notice - January 2013', 'powerpress'), 'powerpress_dashboard_notice_2_content' );
267
}
268
269
if( $NewsDashboard )
198
powerpress_dashboard_notice_message(2, $message );
199
}
200
201
+ function powerpress_dashboard_notice_3_content()
202
+ {
203
+ $DismissedNotices = get_option('powerpress_dismissed_notices');
204
+
205
+ if( !empty($DismissedNotices[3]) )
206
+ return; // Lets not do anything to the dashboard for PowerPress Notice
207
+
208
+ $message = '<p>'. __('The 1 Pixel Out player is back! The security concerns have been addressed in this latest version.', 'powerpress') .'<br />';
209
+ $message .= '<a href="http://blog.blubrry.com/2013/02/14/1-pixel-out-player-returns-to-powerpress/" target="_blank">'. __("Learn More", "powerpress") .'</a></p>';
210
+
211
+ powerpress_dashboard_notice_message(3, $message );
212
+ }
213
+
214
function powerpress_dashboard_notice_message($notice_id, $message)
215
{
216
echo $message;
246
if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
247
$StatsDashboard = false;
248
249
+ // PowerPress Dashboard Notice 3:
250
+ $Notice3Dashboard = false;
251
+ if( time() < mktime(0, 0, 0, 2, 21, 2013) ) // One week later after update, lets no longer but folks about the news
252
{
253
+ $Notice3Dashboard = true;
254
$DismissedNotices = get_option('powerpress_dismissed_notices');
255
+ if( !empty($DismissedNotices[3]) )
256
+ {
257
+ $Notice3Dashboard = false; // Month notice is over
258
+ }
259
}
260
//$Notice1Dashboard = false;// Temporary till release
261
262
+ if( $Notice3Dashboard )
263
{
264
$user = wp_get_current_user();
265
+ powerpressadmin_add_dashboard_notice_widget($user->ID, 3);
266
+ wp_add_dashboard_widget( 'powerpress_dashboard_notice_3', __( 'Blubrry PowerPress Notice - February 2013', 'powerpress'), 'powerpress_dashboard_notice_3_content' );
267
}
268
269
if( $NewsDashboard )
powerpressadmin-find-replace.php CHANGED
@@ -67,34 +67,34 @@
67
$good = true;
68
if( !empty($FindReplace['verify']) )
69
{
70
- $response = wp_remote_head( $new_url );
71
// Redirect 1
72
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
73
{
74
$headers = wp_remote_retrieve_headers( $response );
75
- $response = wp_remote_head( $headers['location'] );
76
}
77
// Redirect 2
78
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
79
{
80
$headers = wp_remote_retrieve_headers( $response );
81
- $response = wp_remote_head( $headers['location'] );
82
}
83
// Redirect 3
84
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
85
{
86
$headers = wp_remote_retrieve_headers( $response );
87
- $response = wp_remote_head( $headers['location'] );
88
}
89
// Redirect 4
90
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
91
{
92
$headers = wp_remote_retrieve_headers( $response );
93
- $response = wp_remote_head( $headers['location'] );
94
}
95
//$headers = wp_remote_retrieve_headers( $response );
96
97
- //$response = @wp_remote_head( $new_url );
98
if ( is_wp_error( $response ) )
99
{
100
$g_FindReplaceResults[ $meta_id ]['error'] = $response->get_error_message();
67
$good = true;
68
if( !empty($FindReplace['verify']) )
69
{
70
+ $response = wp_remote_head( $new_url, array('httpversion' => 1.1) );
71
// Redirect 1
72
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
73
{
74
$headers = wp_remote_retrieve_headers( $response );
75
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
76
}
77
// Redirect 2
78
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
79
{
80
$headers = wp_remote_retrieve_headers( $response );
81
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
82
}
83
// Redirect 3
84
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
85
{
86
$headers = wp_remote_retrieve_headers( $response );
87
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
88
}
89
// Redirect 4
90
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
91
{
92
$headers = wp_remote_retrieve_headers( $response );
93
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
94
}
95
//$headers = wp_remote_retrieve_headers( $response );
96
97
+ //$response = @wp_remote_head( $new_url, array('httpversion' => 1.1) );
98
if ( is_wp_error( $response ) )
99
{
100
$g_FindReplaceResults[ $meta_id ]['error'] = $response->get_error_message();
powerpressadmin-mt.php CHANGED
@@ -164,32 +164,32 @@ if( !function_exists('add_action') )
164
if( $feed_slug == '' )
165
continue; // User decoded not to import this one..
166
$url = $Media[$post_id][$media_index];
167
- //$headers = wp_remote_head($url);
168
//$response = wp_remote_request($url, $options);
169
- $response = wp_remote_head( $url );
170
// Redirect 1
171
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
172
{
173
$headers = wp_remote_retrieve_headers( $response );
174
- $response = wp_remote_head( $headers['location'] );
175
}
176
// Redirect 2
177
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
178
{
179
$headers = wp_remote_retrieve_headers( $response );
180
- $response = wp_remote_head( $headers['location'] );
181
}
182
// Redirect 3
183
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
184
{
185
$headers = wp_remote_retrieve_headers( $response );
186
- $response = wp_remote_head( $headers['location'] );
187
}
188
// Redirect 4
189
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
190
{
191
$headers = wp_remote_retrieve_headers( $response );
192
- $response = wp_remote_head( $headers['location'] );
193
}
194
$headers = wp_remote_retrieve_headers( $response );
195
164
if( $feed_slug == '' )
165
continue; // User decoded not to import this one..
166
$url = $Media[$post_id][$media_index];
167
+ //$headers = wp_remote_head($url, array('httpversion' => 1.1));
168
//$response = wp_remote_request($url, $options);
169
+ $response = wp_remote_head( $url, array('httpversion' => 1.1) );
170
// Redirect 1
171
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
172
{
173
$headers = wp_remote_retrieve_headers( $response );
174
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
175
}
176
// Redirect 2
177
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
178
{
179
$headers = wp_remote_retrieve_headers( $response );
180
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
181
}
182
// Redirect 3
183
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
184
{
185
$headers = wp_remote_retrieve_headers( $response );
186
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
187
}
188
// Redirect 4
189
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
190
{
191
$headers = wp_remote_retrieve_headers( $response );
192
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
193
}
194
$headers = wp_remote_retrieve_headers( $response );
195
powerpressadmin-player-page.php CHANGED
@@ -60,9 +60,6 @@ function powerpress_admin_players($type='audio')
60
$select_player = false;
61
if( isset($_GET['sp']) )
62
$select_player = true;
63
-
64
- if( $General['player'] == 'audio-player' )
65
- unset($General['player']); // Force the user to select a different player
66
67
if( $type == 'video' )
68
{
@@ -354,21 +351,15 @@ table.html5formats tr > td:first-child {
354
<?php powerpressplayer_flowplayer_info(); ?>
355
</li>
356
357
- <li><label><input type="radio" name="Player[player]" id="player_audio_player" value="audio-player" <?php if( $General['player'] == 'audio-player' ) echo 'checked'; ?> disabled="disabled" /> <del><?php echo __('1 Pixel Out Audio Player', 'powerpress'); ?></del></label>
358
- <strong style="padding-top: 8px; margin-left: 20px;">(<?php echo __("Currently Not Available", 'powerpress'); ?>)</strong>
359
</li>
360
<li style="margin-left: 30px; margin-bottom:16px;">
361
<p>
362
- <?php // echo powerpressplayer_build_1pxoutplayer( $Audio['audio-player'] ); ?>
363
</p>
364
- <p><del>
365
- <?php echo __('1 Pixel Out Audio Player is a popular customizable audio (mp3 only) flash player. Features include an animated play/pause button, scrollable position bar, ellapsed/remaining time, volume control and color styling options.', 'powerpress'); ?>
366
- </del></p>
367
<p>
368
- <strong>
369
- <?php echo __("Due to concerns of possible security exploits, the 1 Pixel Out Audio Player has been removed from PowerPress.", "powerpress"); ?> <br />
370
- <a href="http://blog.blubrry.com/?p=1163" target="_blank"><?php echo __("Learn More", "powerpress"); ?></a>
371
- </strong>
372
</p>
373
</li>
374
@@ -499,7 +490,6 @@ table.html5formats tr > td:first-child {
499
{
500
switch( $General['player'] )
501
{
502
- /*
503
case 'audio-player': {
504
505
$PlayerSettings = powerpress_get_settings('powerpress_audio-player');
@@ -1010,7 +1000,6 @@ function audio_player_defaults()
1010
1011
<?php
1012
}; break;
1013
- */
1014
case 'simple_flash': { ?>
1015
<table class="form-table">
1016
<tr valign="top">
60
$select_player = false;
61
if( isset($_GET['sp']) )
62
$select_player = true;
63
64
if( $type == 'video' )
65
{
351
<?php powerpressplayer_flowplayer_info(); ?>
352
</li>
353
354
+ <li><label><input type="radio" name="Player[player]" id="player_audio_player" value="audio-player" <?php if( $General['player'] == 'audio-player' ) echo 'checked'; ?> /> <?php echo __('1 Pixel Out Audio Player', 'powerpress'); ?></label>
355
+ <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_audio_player" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
356
</li>
357
<li style="margin-left: 30px; margin-bottom:16px;">
358
<p>
359
+ <?php echo powerpressplayer_build_1pxoutplayer( $Audio['audio-player'] ); ?>
360
</p>
361
<p>
362
+ <?php echo __('1 Pixel Out Audio Player is a popular customizable audio (mp3 only) flash player. Features include an animated play/pause button, scrollable position bar, ellapsed/remaining time, volume control and color styling options.', 'powerpress'); ?>
363
</p>
364
</li>
365
490
{
491
switch( $General['player'] )
492
{
493
case 'audio-player': {
494
495
$PlayerSettings = powerpress_get_settings('powerpress_audio-player');
1000
1001
<?php
1002
}; break;
1003
case 'simple_flash': { ?>
1004
<table class="form-table">
1005
<tr valign="top">
powerpressadmin.php CHANGED
@@ -132,16 +132,22 @@ function powerpress_admin_init()
132
{
133
if( ( $ImageData[2] == IMAGETYPE_JPEG || $ImageData[2] == IMAGETYPE_PNG ) && $ImageData[0] == $ImageData[1] && $ImageData[0] >= 600 && $ImageData['channels'] == 3 ) // Just check that it is an image, the correct image type and that the image is square
134
{
135
- move_uploaded_file($temp, $upload_path . $filename);
136
- $Feed['itunes_image'] = $upload_url . $filename;
137
- if( !empty($_POST['itunes_image_checkbox_as_rss']) )
138
{
139
- $Feed['rss2_image'] = $upload_url . $filename;
140
}
141
-
142
- if( $ImageData[0] < 1400 )
143
{
144
- powerpress_page_message_add_error( __('iTunes image warning', 'powerpress') .': '. htmlspecialchars($_FILES['itunes_image_file']['name']) . __(' is', 'powerpress') .' '. $ImageData[0] .' x '.$ImageData[0] .' - '. __('Image must be square 1400 x 1400 pixels or larger.', 'powerprss') );
145
}
146
}
147
else if( $ImageData['channels'] != 3 )
@@ -184,8 +190,14 @@ function powerpress_admin_init()
184
185
if( @getimagesize($temp) ) // Just check that it is an image, we may add more to this later
186
{
187
- move_uploaded_file($temp, $upload_path . $filename);
188
- $Feed['rss2_image'] = $upload_url . $filename;
189
}
190
else
191
{
@@ -210,9 +222,15 @@ function powerpress_admin_init()
210
211
if( @getimagesize($temp) ) // Just check that it is an image, we may add more to this later
212
{
213
- move_uploaded_file($temp, $upload_path . $filename);
214
- $_POST['TagValues']['tag_coverart'] = $upload_url . $filename;
215
- $General['tag_coverart'] = $upload_url . $filename;
216
}
217
else
218
{
@@ -237,8 +255,14 @@ function powerpress_admin_init()
237
238
if( @getimagesize($temp) ) // Just check that it is an image, we may add more to this later
239
{
240
- move_uploaded_file($temp, $upload_path . $filename);
241
- $General['poster_image'] = $upload_url . $filename;
242
}
243
else
244
{
@@ -264,8 +288,14 @@ function powerpress_admin_init()
264
265
if( @getimagesize($temp) ) // Just check that it is an image, we may add more to this later
266
{
267
- move_uploaded_file($temp, $upload_path . $filename);
268
- $General['audio_custom_play_button'] = $upload_url . $filename;
269
}
270
else
271
{
@@ -291,8 +321,14 @@ function powerpress_admin_init()
291
$imageInfo = @getimagesize($temp);
292
if( $imageInfo && $imageInfo[0] == $imageInfo[1] && $imageInfo[0] == 60 ) // Just check that it is an image, we may add more to this later
293
{
294
- move_uploaded_file($temp, $upload_path . $filename);
295
- $General['video_custom_play_button'] = $upload_url . $filename;
296
}
297
else if( $imageInfo )
298
{
@@ -3174,30 +3210,30 @@ function powerpress_get_media_info_local($media_file, $content_type='', $file_si
3174
3175
if( $content_type != '' && $file_size == 0 )
3176
{
3177
- $response = wp_remote_head( $media_file );
3178
// Redirect 1
3179
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
3180
{
3181
$headers = wp_remote_retrieve_headers( $response );
3182
- $response = wp_remote_head( $headers['location'] );
3183
}
3184
// Redirect 2
3185
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
3186
{
3187
$headers = wp_remote_retrieve_headers( $response );
3188
- $response = wp_remote_head( $headers['location'] );
3189
}
3190
// Redirect 3
3191
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
3192
{
3193
$headers = wp_remote_retrieve_headers( $response );
3194
- $response = wp_remote_head( $headers['location'] );
3195
}
3196
// Redirect 4
3197
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
3198
{
3199
$headers = wp_remote_retrieve_headers( $response );
3200
- $response = wp_remote_head( $headers['location'] );
3201
}
3202
3203
if ( is_wp_error( $response ) )
@@ -3285,7 +3321,7 @@ function powerpressadmin_support_uploads()
3285
$g_SupportUploads = @wp_mkdir_p( rtrim($upload_path, '/') );
3286
else
3287
$g_SupportUploads = true;
3288
- }
3289
return $g_SupportUploads;
3290
}
3291
132
{
133
if( ( $ImageData[2] == IMAGETYPE_JPEG || $ImageData[2] == IMAGETYPE_PNG ) && $ImageData[0] == $ImageData[1] && $ImageData[0] >= 600 && $ImageData['channels'] == 3 ) // Just check that it is an image, the correct image type and that the image is square
134
{
135
+ if( !move_uploaded_file($temp, $upload_path . $filename) )
136
{
137
+ powerpress_page_message_add_error( __('Error saving iTunes image', 'powerpress') .': ' . htmlspecialchars($_FILES['itunes_image_file']['name']) .' - '. __('An error occurred saving the iTunes image on the server.', 'powerprss'). ' '. sprintf(__('Local folder: %s; File name: %s', 'powerpress'), $upload_path, $filename) );
138
}
139
+ else
140
{
141
+ $Feed['itunes_image'] = $upload_url . $filename;
142
+ if( !empty($_POST['itunes_image_checkbox_as_rss']) )
143
+ {
144
+ $Feed['rss2_image'] = $upload_url . $filename;
145
+ }
146
+
147
+ if( $ImageData[0] < 1400 )
148
+ {
149
+ powerpress_page_message_add_error( __('iTunes image warning', 'powerpress') .': '. htmlspecialchars($_FILES['itunes_image_file']['name']) . __(' is', 'powerpress') .' '. $ImageData[0] .' x '.$ImageData[0] .' - '. __('Image must be square 1400 x 1400 pixels or larger.', 'powerprss') );
150
+ }
151
}
152
}
153
else if( $ImageData['channels'] != 3 )
190
191
if( @getimagesize($temp) ) // Just check that it is an image, we may add more to this later
192
{
193
+ if( !move_uploaded_file($temp, $upload_path . $filename) )
194
+ {
195
+ powerpress_page_message_add_error( __('Error saving RSS image', 'powerpress') .': ' . htmlspecialchars($_FILES['itunes_image_file']['name']) .' - '. __('An error occurred saving the RSS image on the server.', 'powerprss'). ' '. sprintf(__('Local folder: %s; File name: %s', 'powerpress'), $upload_path, $filename) );
196
+ }
197
+ else
198
+ {
199
+ $Feed['rss2_image'] = $upload_url . $filename;
200
+ }
201
}
202
else
203
{
222
223
if( @getimagesize($temp) ) // Just check that it is an image, we may add more to this later
224
{
225
+ if( !move_uploaded_file($temp, $upload_path . $filename) )
226
+ {
227
+ powerpress_page_message_add_error( __('Error saving Coverart image', 'powerpress') .': ' . htmlspecialchars($_FILES['itunes_image_file']['name']) .' - '. __('An error occurred saving the coverart image on the server.', 'powerprss'). ' '. sprintf(__('Local folder: %s; File name: %s', 'powerpress'), $upload_path, $filename) );
228
+ }
229
+ else
230
+ {
231
+ $_POST['TagValues']['tag_coverart'] = $upload_url . $filename;
232
+ $General['tag_coverart'] = $upload_url . $filename;
233
+ }
234
}
235
else
236
{
255
256
if( @getimagesize($temp) ) // Just check that it is an image, we may add more to this later
257
{
258
+ if( !move_uploaded_file($temp, $upload_path . $filename) )
259
+ {
260
+ powerpress_page_message_add_error( __('Error saving Poster image', 'powerpress') .': ' . htmlspecialchars($_FILES['itunes_image_file']['name']) .' - '. __('An error occurred saving the poster image on the server.', 'powerprss'). ' '. sprintf(__('Local folder: %s; File name: %s', 'powerpress'), $upload_path, $filename) );
261
+ }
262
+ else
263
+ {
264
+ $General['poster_image'] = $upload_url . $filename;
265
+ }
266
}
267
else
268
{
288
289
if( @getimagesize($temp) ) // Just check that it is an image, we may add more to this later
290
{
291
+ if( !move_uploaded_file($temp, $upload_path . $filename) )
292
+ {
293
+ powerpress_page_message_add_error( __('Error saving Play image', 'powerpress') .': ' . htmlspecialchars($_FILES['itunes_image_file']['name']) .' - '. __('An error occurred saving the play image on the server.', 'powerprss'). ' '. sprintf(__('Local folder: %s; File name: %s', 'powerpress'), $upload_path, $filename) );
294
+ }
295
+ else
296
+ {
297
+ $General['audio_custom_play_button'] = $upload_url . $filename;
298
+ }
299
}
300
else
301
{
321
$imageInfo = @getimagesize($temp);
322
if( $imageInfo && $imageInfo[0] == $imageInfo[1] && $imageInfo[0] == 60 ) // Just check that it is an image, we may add more to this later
323
{
324
+ if( !move_uploaded_file($temp, $upload_path . $filename) )
325
+ {
326
+ powerpress_page_message_add_error( __('Error saving Video Play icon image', 'powerpress') .': ' . htmlspecialchars($_FILES['itunes_image_file']['name']) .' - '. __('An error occurred saving the Video Play icon image on the server.', 'powerprss'). ' '. sprintf(__('Local folder: %s; File name: %s', 'powerpress'), $upload_path, $filename) );
327
+ }
328
+ else
329
+ {
330
+ $General['video_custom_play_button'] = $upload_url . $filename;
331
+ }
332
}
333
else if( $imageInfo )
334
{
3210
3211
if( $content_type != '' && $file_size == 0 )
3212
{
3213
+ $response = wp_remote_head( $media_file, array('httpversion' => 1.1) );
3214
// Redirect 1
3215
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
3216
{
3217
$headers = wp_remote_retrieve_headers( $response );
3218
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
3219
}
3220
// Redirect 2
3221
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
3222
{
3223
$headers = wp_remote_retrieve_headers( $response );
3224
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
3225
}
3226
// Redirect 3
3227
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
3228
{
3229
$headers = wp_remote_retrieve_headers( $response );
3230
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
3231
}
3232
// Redirect 4
3233
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
3234
{
3235
$headers = wp_remote_retrieve_headers( $response );
3236
+ $response = wp_remote_head( $headers['location'], array('httpversion' => 1.1) );
3237
}
3238
3239
if ( is_wp_error( $response ) )
3321
$g_SupportUploads = @wp_mkdir_p( rtrim($upload_path, '/') );
3322
else
3323
$g_SupportUploads = true;
3324
+ }
3325
return $g_SupportUploads;
3326
}
3327
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Angelo Mandato, Blubrry.com
3
Tags: podcasting, podcast, podcaster, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, webm, mp4, m4v, wordpressmu, mu, wordpress mu, mediacaster, post, plugin, posts, simple, social, dashboard, TSG, Buzzsprout, MTR, WP-boxCast, CastMyBlog
4
Requires at least: 3.0
5
Tested up to: 3.5
6
- Stable tag: 4.0.6
7
8
Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
9
@@ -158,6 +158,21 @@ To install Blubrry PowerPress manually, follow these steps:
158
* Translation support is now complete. Please visit the following link if you would like to have a version in your language: [http://www.blubrry.com/powerpress_translate/](http://www.blubrry.com/powerpress_translate/)
159
160
161
= 4.0.6 =
162
* Released on 1/23/2013
163
* Everyone is **strongly encouraged to update their copy of PowerPress immediately!**
3
Tags: podcasting, podcast, podcaster, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, webm, mp4, m4v, wordpressmu, mu, wordpress mu, mediacaster, post, plugin, posts, simple, social, dashboard, TSG, Buzzsprout, MTR, WP-boxCast, CastMyBlog
4
Requires at least: 3.0
5
Tested up to: 3.5
6
+ Stable tag: 4.0.7
7
8
Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
9
158
* Translation support is now complete. Please visit the following link if you would like to have a version in your language: [http://www.blubrry.com/powerpress_translate/](http://www.blubrry.com/powerpress_translate/)
159
160
161
+ = 4.0.7 =
162
+ * Released on 2/14/2013
163
+ * The 1 Pixel Out player is back! [Learn More](http://blog.blubrry.com/2013/02/14/1-pixel-out-player-returns-to-powerpress/)
164
+ * Added new define option `POWERPRESS_READ_TEXT` to customize the 'Read' label for pdf/epub books.
165
+ * Player logic updated to display specific PDF/ePub images with links to the files.
166
+ * PDF image from Hybrid Design.
167
+ * ePub image from ThreePress.
168
+ * Calls to wp_remote_head now set to use HTTP 1.1 protocol (WordPress defaults to HTTP 1.0 for what ever reason. Thanks vinull for your bug fix!)
169
+ * Added support for Kindle Fire in the list of detected mobile HTML5 players. (Thanks Chris Bockay for bringing to our attention and helpnig us diagnose!)
170
+ * Added logic to not include header javascript in theme's if the Media Apperance option "Disable PowerPress Media Players and Links" is disabled.
171
+ * Added logic to fix the play in new window and embed links if Joost de Valk's Google Analytics for WordPress plugin has "Track outbound clicks & downloads" enabled.
172
+ * Added logic to the getid3 library to use the WordPress temp folder path rather than use the system detected path. This should fix the verify problems a small portion of folks have when the /tmp folder not being writable.
173
+ * Happy Valentines day!
174
+
175
+
176
= 4.0.6 =
177
* Released on 1/23/2013
178
* Everyone is **strongly encouraged to update their copy of PowerPress immediately!**