Version Description
- Released on 3/13/2011
- Fixed bug where media links did not appear for theme functions
get_the_powerpress_content()
andthe_powerpress_content()
. (Thanks Douglas for bringing to our attention) - Fixed download link not appearing after saving settings in 2.0. Download link setting was not getting saved correctly.
- Fixed bug where player does not appear if PowerPress was previously in Simple Mode.
- Fixed bug with Verify button failing with HTTP error 302 or 301 when URL has more than 1 redirect.
- Added
POWERPRESS_EMBED_TEXT
define option so the embed text can be changed. Just adddefine("POWERPRESS_EMBED_TEXT", "Your Embed Text");
above the include line in your wp-config.php. - Restored quicktime as default player for m4a files, for those who need quicktime to display chapter info. To play m4a with FlowPlayerClassic/HTML5, go to PowerPress Settings > Appearance tab.
- Fixed FlowPlayerClassic scaling, video now maintains aspect ratio when displayed in player.
- Blubrry Community News now only shows latest video embed, all others minimized with small play button.
- Media statistics redirect URLs now applied to alternative webm URLs when specified with mp4/m4v video.
Download this release
Release Info
Developer | amandato |
Plugin | PowerPress Podcasting plugin by Blubrry |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.0.1
- player.js +2 -2
- powerpress-player.php +57 -57
- powerpress.php +8 -4
- powerpressadmin-basic.php +20 -0
- powerpressadmin-find-replace.php +28 -1
- powerpressadmin-mt.php +27 -3
- powerpressadmin.php +56 -10
- readme.txt +14 -2
player.js
CHANGED
@@ -156,7 +156,7 @@ function powerpress_embed_html5v(id,media_url,width,height,webm_media_url)
|
|
156 |
pp_flashembed(
|
157 |
'powerpress_player_'+id,
|
158 |
{src: powerpress_url +'FlowPlayerClassic.swf', width: width, height: height, wmode: 'transparent' },
|
159 |
-
{config: { autoPlay: true, autoBuffering: true,
|
160 |
);
|
161 |
}
|
162 |
|
@@ -219,7 +219,7 @@ function powerpress_embed_html5a(id,media_url)
|
|
219 |
pp_flashembed(
|
220 |
'powerpress_player_'+id,
|
221 |
{src: powerpress_url +'FlowPlayerClassic.swf', width: 320, height: 24, wmode: 'transparent' },
|
222 |
-
{config: { autoPlay: true, autoBuffering: true,
|
223 |
);
|
224 |
} else { return true; }
|
225 |
}
|
156 |
pp_flashembed(
|
157 |
'powerpress_player_'+id,
|
158 |
{src: powerpress_url +'FlowPlayerClassic.swf', width: width, height: height, wmode: 'transparent' },
|
159 |
+
{config: { autoPlay: true, autoBuffering: true, showFullScreenButton: false, showMenu: false, videoFile: media_url, loop: false, autoRewind: true, splashImageFile: poster } }
|
160 |
);
|
161 |
}
|
162 |
|
219 |
pp_flashembed(
|
220 |
'powerpress_player_'+id,
|
221 |
{src: powerpress_url +'FlowPlayerClassic.swf', width: 320, height: 24, wmode: 'transparent' },
|
222 |
+
{config: { autoPlay: true, autoBuffering: true, showFullScreenButton: false, showMenu: false, videoFile: media_url, loop: false, autoRewind: true } }
|
223 |
);
|
224 |
} else { return true; }
|
225 |
}
|
powerpress-player.php
CHANGED
@@ -122,7 +122,7 @@ function powerpress_shortcode_handler( $attributes, $content = null )
|
|
122 |
}
|
123 |
|
124 |
if( !isset($EpisodeData['no_player']) )
|
125 |
-
$return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('feed'=>$feed, 'image'=>$image, 'type'=>$EpisodeData['type'],'width'=>$width, 'height'=>$height) );
|
126 |
if( empty($EpisodeData['no_links']) )
|
127 |
$return .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
128 |
}
|
@@ -519,33 +519,6 @@ function powerpressplayer_in_embed($player, $media_url, $EpisodeData = array())
|
|
519 |
$content .= '}'. PHP_EOL;
|
520 |
$content .= '</script>'. PHP_EOL;
|
521 |
|
522 |
-
/*
|
523 |
-
|
524 |
-
if( jQuery("#powerpress_settings_page").length > 0 )
|
525 |
-
{
|
526 |
-
var tabs = jQuery("#powerpress_settings_page").tabs();
|
527 |
-
tabs.tabs('select', <?php echo (empty($_POST['tab'])?0:$_POST['tab']); ?>);
|
528 |
-
jQuery('form').submit(function() {
|
529 |
-
var selectedTemp = tabs.tabs('option', 'selected');
|
530 |
-
jQuery('#save_tab_pos').val(selectedTemp);
|
531 |
-
});
|
532 |
-
}
|
533 |
-
|
534 |
-
jQuery('.powerpress-parental-rating-tip').click( function() {
|
535 |
-
jQuery('.powerpress-parental-rating-tip-p').css('display', 'none');
|
536 |
-
jQuery('#'+this.id +'_p').css('display', 'block');
|
537 |
-
});
|
538 |
-
jQuery('.activate-player').click( function(event) {
|
539 |
-
var PlayerName = this.id.replace(/(activate_)(.*)$/, "$2");
|
540 |
-
if( !PlayerName )
|
541 |
-
return;
|
542 |
-
|
543 |
-
jQuery('#player_'+PlayerName).attr('checked', true);
|
544 |
-
jQuery("form:first").submit();
|
545 |
-
event.preventDefault();
|
546 |
-
});
|
547 |
-
|
548 |
-
*/
|
549 |
// Head specific settings for player
|
550 |
switch( $player )
|
551 |
{
|
@@ -618,6 +591,9 @@ function powerpressplayer_player_audio($content, $media_url, $EpisodeData = arra
|
|
618 |
case 'mp3':
|
619 |
{
|
620 |
$Settings = get_option('powerpress_general');
|
|
|
|
|
|
|
621 |
switch( $Settings['player'] )
|
622 |
{
|
623 |
case 'default':
|
@@ -645,6 +621,12 @@ function powerpressplayer_player_audio($content, $media_url, $EpisodeData = arra
|
|
645 |
case 'm4a': {
|
646 |
|
647 |
$Settings = get_option('powerpress_general');
|
|
|
|
|
|
|
|
|
|
|
|
|
648 |
switch( $Settings['player'] )
|
649 |
{
|
650 |
case 'default':
|
@@ -704,7 +686,9 @@ function powerpressplayer_player_video($content, $media_url, $EpisodeData = arra
|
|
704 |
{
|
705 |
|
706 |
$Settings = get_option('powerpress_general');
|
707 |
-
|
|
|
|
|
708 |
switch( $Settings['video_player'] )
|
709 |
{
|
710 |
case 'default':
|
@@ -747,7 +731,6 @@ function powerpressplayer_player_other($content, $media_url, $EpisodeData = arra
|
|
747 |
case 'mp3':
|
748 |
case 'mp4':
|
749 |
case 'm4v':
|
750 |
-
case 'm4a':
|
751 |
case 'webm';
|
752 |
case 'ogg':
|
753 |
case 'ogv':
|
@@ -758,6 +741,7 @@ function powerpressplayer_player_other($content, $media_url, $EpisodeData = arra
|
|
758 |
case 'flv': {
|
759 |
$content .= powerpressplayer_build_flowplayerclassic($media_url, $EpisodeData);
|
760 |
}; break;
|
|
|
761 |
// Old Quicktime formats:
|
762 |
case 'avi':
|
763 |
case 'mpg':
|
@@ -768,6 +752,11 @@ function powerpressplayer_player_other($content, $media_url, $EpisodeData = arra
|
|
768 |
case 'mov': {
|
769 |
|
770 |
$Settings = get_option('powerpress_general');
|
|
|
|
|
|
|
|
|
|
|
771 |
$player_id = powerpressplayer_get_next_id();
|
772 |
$player_width = 400;
|
773 |
$player_height = 225;
|
@@ -801,7 +790,7 @@ function powerpressplayer_player_other($content, $media_url, $EpisodeData = arra
|
|
801 |
$content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="';
|
802 |
$content .= "return powerpress_embed_quicktime('powerpress_player_{$player_id}', '{$media_url}', {$player_width}, {$player_height}, '{$scale}' );";
|
803 |
$content .= '">';
|
804 |
-
$content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" />';
|
805 |
$content .= '</a>';
|
806 |
$content .= "</div>\n";
|
807 |
}
|
@@ -934,6 +923,8 @@ Filters for media links, appear below the selected player
|
|
934 |
function powerpressplayer_link_download($content, $media_url, $ExtraData = array() )
|
935 |
{
|
936 |
$GeneralSettings = get_option('powerpress_general');
|
|
|
|
|
937 |
|
938 |
$player_links = '';
|
939 |
if( $GeneralSettings['podcast_link'] == 1 )
|
@@ -961,6 +952,8 @@ function powerpressplayer_link_download($content, $media_url, $ExtraData = array
|
|
961 |
function powerpressplayer_link_pinw($content, $media_url, $ExtraData = array() )
|
962 |
{
|
963 |
$GeneralSettings = get_option('powerpress_general');
|
|
|
|
|
964 |
$is_pdf = (strtolower( substr($media_url, -3) ) == 'pdf' );
|
965 |
|
966 |
$player_links = '';
|
@@ -996,6 +989,11 @@ function powerpressplayer_embedable($media_url, $ExtraData = array())
|
|
996 |
$GeneralSettings = get_option('powerpress_general');
|
997 |
if( empty($GeneralSettings['podcast_embed']) )
|
998 |
return false;
|
|
|
|
|
|
|
|
|
|
|
999 |
switch( $extension )
|
1000 |
{
|
1001 |
case 'mp3':
|
@@ -1005,11 +1003,14 @@ function powerpressplayer_embedable($media_url, $ExtraData = array())
|
|
1005 |
|
1006 |
}; break;
|
1007 |
case 'mp4':
|
1008 |
-
case 'm4v':
|
|
|
|
|
|
|
1009 |
case 'webm':
|
1010 |
case 'ogg':
|
1011 |
case 'ogv': {
|
1012 |
-
if( $GeneralSettings['video_player'] == '
|
1013 |
$player = $GeneralSettings['video_player'];
|
1014 |
}; break;
|
1015 |
}
|
@@ -1021,12 +1022,11 @@ function powerpressplayer_embedable($media_url, $ExtraData = array())
|
|
1021 |
function powerpressplayer_link_embed($content, $media_url, $ExtraData = array() )
|
1022 |
{
|
1023 |
$player_links = '';
|
1024 |
-
// TODO: add code to provide embed to media episode
|
1025 |
|
1026 |
$player = powerpressplayer_embedable($media_url, $ExtraData);
|
1027 |
if( $player )
|
1028 |
{
|
1029 |
-
$player_links .= "<a href=\"#\" class=\"powerpress_link_e\" title=\"".
|
1030 |
}
|
1031 |
|
1032 |
if( $player_links && !empty($content) )
|
@@ -1190,26 +1190,35 @@ function powerpressplayer_build_html5video($media_url, $EpisodeData=array(), $em
|
|
1190 |
|
1191 |
if( !empty($EpisodeData['webm_src']) )
|
1192 |
{
|
|
|
1193 |
$content .='<source src="'. $EpisodeData['webm_src'] .'" type="video/webm" />';
|
1194 |
}
|
1195 |
|
1196 |
-
|
1197 |
-
$content .= powerpressplayer_build_playimage($media_url, $EpisodeData);
|
1198 |
-
else
|
1199 |
-
$content .= powerpressplayer_build_playlink($media_url);
|
1200 |
$content .= '</video>'.PHP_EOL;
|
1201 |
$content .= '</div>'.PHP_EOL;
|
1202 |
}
|
1203 |
else
|
1204 |
{
|
|
|
1205 |
if( !$cover_image )
|
1206 |
$cover_image = powerpress_get_root_url() . 'black.png';
|
1207 |
$webm_src = '';
|
1208 |
if( !empty($EpisodeData['webm_src']) )
|
1209 |
-
$webm_src = $EpisodeData['webm_src'];
|
1210 |
$content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">';
|
1211 |
$content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="return powerpress_embed_html5v(\''.$player_id.'\',\''.$media_url.'\',\''. $player_width .'\',\''. $player_height .'\', \''. $webm_src .'\');" target="_blank" style="position: relative;">';
|
1212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1213 |
if(!isset($Settings['poster_play_image']) || $Settings['poster_play_image'] )
|
1214 |
{
|
1215 |
$bottom = floor(($player_height/2)-30);
|
@@ -1257,13 +1266,17 @@ function powerpressplayer_build_html5audio($media_url, $EpisodeData=array(), $em
|
|
1257 |
$content .= ' preload="none"';
|
1258 |
$content .= '>'.PHP_EOL;
|
1259 |
|
1260 |
-
$content .=
|
1261 |
$content .= '</audio>'.PHP_EOL;
|
1262 |
$content .= '</div>'.PHP_EOL;
|
1263 |
}
|
1264 |
else
|
1265 |
{
|
1266 |
$cover_image = powerpress_get_root_url() . 'play_audio.png';
|
|
|
|
|
|
|
|
|
1267 |
$content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">';
|
1268 |
$content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="return powerpress_embed_html5a(\''.$player_id.'\',\''.$media_url.'\');" target="_blank">';
|
1269 |
$content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" style="border:0;" />';
|
@@ -1386,9 +1399,9 @@ function powerpressplayer_build_flowplayerclassic($media_url, $EpisodeData = arr
|
|
1386 |
$content .= " 'powerpress_player_{$player_id}',\n";
|
1387 |
$content .= " {src: '". powerpress_get_root_url() ."FlowPlayerClassic.swf', width: '{$player_width}', height: '{$player_height}', wmode: 'transparent' },\n";
|
1388 |
if( $cover_image )
|
1389 |
-
$content .= " {config: { autoPlay: ". ($autoplay?'true':'false') .", autoBuffering: false,
|
1390 |
else
|
1391 |
-
$content .= " {config: { autoPlay: ". ($autoplay?'true':'false') .", autoBuffering: false,
|
1392 |
$content .= ");\n";
|
1393 |
$content .= "</script>\n";
|
1394 |
return $content;
|
@@ -1460,19 +1473,6 @@ function powerpressplayer_build_playimageaudio($media_url, $include_div = false)
|
|
1460 |
return $content;
|
1461 |
}
|
1462 |
|
1463 |
-
function powerpressplayer_build_playlink($media_url, $include_div = false)
|
1464 |
-
{
|
1465 |
-
$content = '';
|
1466 |
-
if( $include_div )
|
1467 |
-
$content .= '<div class="powerpress_player" id="powerpress_player_'. powerpressplayer_get_next_id() .'">';
|
1468 |
-
$content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" target="_blank">';
|
1469 |
-
$content .= htmlspecialchars(POWERPRESS_PLAY_TEXT);
|
1470 |
-
$content .= '</a>';
|
1471 |
-
if( $include_div )
|
1472 |
-
$content .= "</div>\n";
|
1473 |
-
return $content;
|
1474 |
-
}
|
1475 |
-
|
1476 |
/*
|
1477 |
1 pixel out player
|
1478 |
*/
|
122 |
}
|
123 |
|
124 |
if( !isset($EpisodeData['no_player']) )
|
125 |
+
$return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('id'=>$post->ID,'feed'=>$feed, 'image'=>$image, 'type'=>$EpisodeData['type'],'width'=>$width, 'height'=>$height) );
|
126 |
if( empty($EpisodeData['no_links']) )
|
127 |
$return .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
128 |
}
|
519 |
$content .= '}'. PHP_EOL;
|
520 |
$content .= '</script>'. PHP_EOL;
|
521 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
// Head specific settings for player
|
523 |
switch( $player )
|
524 |
{
|
591 |
case 'mp3':
|
592 |
{
|
593 |
$Settings = get_option('powerpress_general');
|
594 |
+
if( !isset($Settings['player']) )
|
595 |
+
$Settings['player'] = 'default';
|
596 |
+
|
597 |
switch( $Settings['player'] )
|
598 |
{
|
599 |
case 'default':
|
621 |
case 'm4a': {
|
622 |
|
623 |
$Settings = get_option('powerpress_general');
|
624 |
+
if( empty($Settings['m4a']) || $Settings['m4a'] != 'use_players' )
|
625 |
+
break;
|
626 |
+
|
627 |
+
if( !isset($Settings['player']) )
|
628 |
+
$Settings['player'] = 'default';
|
629 |
+
|
630 |
switch( $Settings['player'] )
|
631 |
{
|
632 |
case 'default':
|
686 |
{
|
687 |
|
688 |
$Settings = get_option('powerpress_general');
|
689 |
+
if( !isset($Settings['video_player']) )
|
690 |
+
$Settings['video_player'] = 'flow-player-classic';
|
691 |
+
|
692 |
switch( $Settings['video_player'] )
|
693 |
{
|
694 |
case 'default':
|
731 |
case 'mp3':
|
732 |
case 'mp4':
|
733 |
case 'm4v':
|
|
|
734 |
case 'webm';
|
735 |
case 'ogg':
|
736 |
case 'ogv':
|
741 |
case 'flv': {
|
742 |
$content .= powerpressplayer_build_flowplayerclassic($media_url, $EpisodeData);
|
743 |
}; break;
|
744 |
+
case 'm4a': // Special case for thos audiobook folks (could be modern player, could be old embed)
|
745 |
// Old Quicktime formats:
|
746 |
case 'avi':
|
747 |
case 'mpg':
|
752 |
case 'mov': {
|
753 |
|
754 |
$Settings = get_option('powerpress_general');
|
755 |
+
|
756 |
+
// Special case for thos audiobook folks
|
757 |
+
if( $extension == 'm4a' && !empty($Settings['m4a']) && $Settings['m4a'] == 'use_players' )
|
758 |
+
break;
|
759 |
+
|
760 |
$player_id = powerpressplayer_get_next_id();
|
761 |
$player_width = 400;
|
762 |
$player_height = 225;
|
790 |
$content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="';
|
791 |
$content .= "return powerpress_embed_quicktime('powerpress_player_{$player_id}', '{$media_url}', {$player_width}, {$player_height}, '{$scale}' );";
|
792 |
$content .= '">';
|
793 |
+
$content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" style="width: '. $player_width .'px; height: '.$player_height .'px;" />';
|
794 |
$content .= '</a>';
|
795 |
$content .= "</div>\n";
|
796 |
}
|
923 |
function powerpressplayer_link_download($content, $media_url, $ExtraData = array() )
|
924 |
{
|
925 |
$GeneralSettings = get_option('powerpress_general');
|
926 |
+
if( !isset($GeneralSettings['podcast_link']) )
|
927 |
+
$GeneralSettings['podcast_link'] = 1;
|
928 |
|
929 |
$player_links = '';
|
930 |
if( $GeneralSettings['podcast_link'] == 1 )
|
952 |
function powerpressplayer_link_pinw($content, $media_url, $ExtraData = array() )
|
953 |
{
|
954 |
$GeneralSettings = get_option('powerpress_general');
|
955 |
+
if( !isset($GeneralSettings['player_function']) )
|
956 |
+
$GeneralSettings['player_function'] = 1;
|
957 |
$is_pdf = (strtolower( substr($media_url, -3) ) == 'pdf' );
|
958 |
|
959 |
$player_links = '';
|
989 |
$GeneralSettings = get_option('powerpress_general');
|
990 |
if( empty($GeneralSettings['podcast_embed']) )
|
991 |
return false;
|
992 |
+
if( !isset($GeneralSettings['player']) )
|
993 |
+
$GeneralSettings['player'] = 'default';
|
994 |
+
if( !isset($GeneralSettings['video_player']) )
|
995 |
+
$GeneralSettings['video_player'] = 'flow-player-classic';
|
996 |
+
|
997 |
switch( $extension )
|
998 |
{
|
999 |
case 'mp3':
|
1003 |
|
1004 |
}; break;
|
1005 |
case 'mp4':
|
1006 |
+
case 'm4v': {
|
1007 |
+
if( $GeneralSettings['video_player'] == 'flow-player-classic' || $GeneralSettings['video_player'] == 'html5video' )
|
1008 |
+
$player = $GeneralSettings['video_player'];
|
1009 |
+
}; break;
|
1010 |
case 'webm':
|
1011 |
case 'ogg':
|
1012 |
case 'ogv': {
|
1013 |
+
if( $GeneralSettings['video_player'] == 'html5video' )
|
1014 |
$player = $GeneralSettings['video_player'];
|
1015 |
}; break;
|
1016 |
}
|
1022 |
function powerpressplayer_link_embed($content, $media_url, $ExtraData = array() )
|
1023 |
{
|
1024 |
$player_links = '';
|
|
|
1025 |
|
1026 |
$player = powerpressplayer_embedable($media_url, $ExtraData);
|
1027 |
if( $player )
|
1028 |
{
|
1029 |
+
$player_links .= "<a href=\"#\" class=\"powerpress_link_e\" title=\"". htmlspecialchars(POWERPRESS_EMBED_TEXT) ."\" onclick=\"return powerpress_show_embed('{$ExtraData['id']}-{$ExtraData['feed']}');\">". htmlspecialchars(POWERPRESS_EMBED_TEXT) ."</a>";
|
1030 |
}
|
1031 |
|
1032 |
if( $player_links && !empty($content) )
|
1190 |
|
1191 |
if( !empty($EpisodeData['webm_src']) )
|
1192 |
{
|
1193 |
+
$EpisodeData['webm_src'] = powerpress_add_flag_to_redirect_url($EpisodeData['webm_src'], 'p');
|
1194 |
$content .='<source src="'. $EpisodeData['webm_src'] .'" type="video/webm" />';
|
1195 |
}
|
1196 |
|
1197 |
+
$content .= powerpressplayer_build_playimage($media_url, $EpisodeData);
|
|
|
|
|
|
|
1198 |
$content .= '</video>'.PHP_EOL;
|
1199 |
$content .= '</div>'.PHP_EOL;
|
1200 |
}
|
1201 |
else
|
1202 |
{
|
1203 |
+
|
1204 |
if( !$cover_image )
|
1205 |
$cover_image = powerpress_get_root_url() . 'black.png';
|
1206 |
$webm_src = '';
|
1207 |
if( !empty($EpisodeData['webm_src']) )
|
1208 |
+
$webm_src = powerpress_add_flag_to_redirect_url($EpisodeData['webm_src'], 'p');
|
1209 |
$content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">';
|
1210 |
$content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="return powerpress_embed_html5v(\''.$player_id.'\',\''.$media_url.'\',\''. $player_width .'\',\''. $player_height .'\', \''. $webm_src .'\');" target="_blank" style="position: relative;">';
|
1211 |
+
if( !empty($EpisodeData['custom_play_button']) )
|
1212 |
+
{
|
1213 |
+
$cover_image = $EpisodeData['custom_play_button'];
|
1214 |
+
$Settings['poster_play_image'] = false;
|
1215 |
+
$content .= '<img class="powerpress-player-poster" src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" />';
|
1216 |
+
}
|
1217 |
+
else
|
1218 |
+
{
|
1219 |
+
$content .= '<img class="powerpress-player-poster" src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" style="width: '. $player_width .'px; height: '. $player_height .'px;" />';
|
1220 |
+
}
|
1221 |
+
|
1222 |
if(!isset($Settings['poster_play_image']) || $Settings['poster_play_image'] )
|
1223 |
{
|
1224 |
$bottom = floor(($player_height/2)-30);
|
1266 |
$content .= ' preload="none"';
|
1267 |
$content .= '>'.PHP_EOL;
|
1268 |
|
1269 |
+
$content .= powerpressplayer_build_playimageaudio($media_url);
|
1270 |
$content .= '</audio>'.PHP_EOL;
|
1271 |
$content .= '</div>'.PHP_EOL;
|
1272 |
}
|
1273 |
else
|
1274 |
{
|
1275 |
$cover_image = powerpress_get_root_url() . 'play_audio.png';
|
1276 |
+
if( !empty($EpisodeData['custom_play_button']) )
|
1277 |
+
{
|
1278 |
+
$cover_image = $EpisodeData['custom_play_button'];
|
1279 |
+
}
|
1280 |
$content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">';
|
1281 |
$content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="return powerpress_embed_html5a(\''.$player_id.'\',\''.$media_url.'\');" target="_blank">';
|
1282 |
$content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" style="border:0;" />';
|
1399 |
$content .= " 'powerpress_player_{$player_id}',\n";
|
1400 |
$content .= " {src: '". powerpress_get_root_url() ."FlowPlayerClassic.swf', width: '{$player_width}', height: '{$player_height}', wmode: 'transparent' },\n";
|
1401 |
if( $cover_image )
|
1402 |
+
$content .= " {config: { autoPlay: ". ($autoplay?'true':'false') .", autoBuffering: false, showFullScreenButton: false, showMenu: false, videoFile: '{$media_url}', splashImageFile: '{$cover_image}', scaleSplash: true, loop: false, autoRewind: true } }\n";
|
1403 |
else
|
1404 |
+
$content .= " {config: { autoPlay: ". ($autoplay?'true':'false') .", autoBuffering: false, showFullScreenButton: false, showMenu: false, videoFile: '{$media_url}', loop: false, autoRewind: true } }\n";
|
1405 |
$content .= ");\n";
|
1406 |
$content .= "</script>\n";
|
1407 |
return $content;
|
1473 |
return $content;
|
1474 |
}
|
1475 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1476 |
/*
|
1477 |
1 pixel out player
|
1478 |
*/
|
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: 2.0
|
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', '2.0' );
|
37 |
|
38 |
// Translation support:
|
39 |
if ( !defined('POWERPRESS_ABSPATH') )
|
@@ -61,6 +61,8 @@ if( !defined('POWERPRESS_DOWNLOAD_TEXT') )
|
|
61 |
define('POWERPRESS_DOWNLOAD_TEXT', __('Download', 'powerpress') );
|
62 |
if( !defined('POWERPRESS_PLAY_TEXT') )
|
63 |
define('POWERPRESS_PLAY_TEXT', __('Play', 'powerpress') );
|
|
|
|
|
64 |
|
65 |
if( !defined('POWERPRESS_BLUBRRY_API_URL') )
|
66 |
define('POWERPRESS_BLUBRRY_API_URL', 'http://api.blubrry.com/');
|
@@ -1450,8 +1452,7 @@ function get_the_powerpress_content()
|
|
1450 |
}
|
1451 |
|
1452 |
if( !isset($EpisodeData['no_links']) )
|
1453 |
-
$
|
1454 |
-
// $new_content .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData);
|
1455 |
}
|
1456 |
}
|
1457 |
}
|
@@ -2018,6 +2019,9 @@ function powerpress_get_enclosure_data($post_id, $feed_slug = 'podcast')
|
|
2018 |
|
2019 |
if( isset($Data['length']) ) // Setting from the "Podcasting" plugin...
|
2020 |
$Data['duration'] = powerpress_readable_duration($Data['length'], true);
|
|
|
|
|
|
|
2021 |
}
|
2022 |
}
|
2023 |
|
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: 2.0.1
|
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', '2.0.1' );
|
37 |
|
38 |
// Translation support:
|
39 |
if ( !defined('POWERPRESS_ABSPATH') )
|
61 |
define('POWERPRESS_DOWNLOAD_TEXT', __('Download', 'powerpress') );
|
62 |
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/');
|
1452 |
}
|
1453 |
|
1454 |
if( !isset($EpisodeData['no_links']) )
|
1455 |
+
$new_content .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
|
|
1456 |
}
|
1457 |
}
|
1458 |
}
|
2019 |
|
2020 |
if( isset($Data['length']) ) // Setting from the "Podcasting" plugin...
|
2021 |
$Data['duration'] = powerpress_readable_duration($Data['length'], true);
|
2022 |
+
|
2023 |
+
if( isset($Data['webm_src']) )
|
2024 |
+
$Data['webm_src'] = powerpress_add_redirect_url( trim($Data['webm_src']) );
|
2025 |
}
|
2026 |
}
|
2027 |
|
powerpressadmin-basic.php
CHANGED
@@ -1011,6 +1011,26 @@ while( list($value,$desc) = each($linkoptions) )
|
|
1011 |
</div>
|
1012 |
<!-- end advanced features -->
|
1013 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1014 |
</div>
|
1015 |
<!-- end presentation settings -->
|
1016 |
<?php
|
1011 |
</div>
|
1012 |
<!-- end advanced features -->
|
1013 |
|
1014 |
+
<h3><?php echo __('Media Format Settings', 'powerpress'); ?></h3>
|
1015 |
+
<table class="form-table">
|
1016 |
+
|
1017 |
+
<tr valign="top">
|
1018 |
+
<th scope="row">
|
1019 |
+
<?php echo __('AAC Audio (.m4a)', 'powerpress'); ?>
|
1020 |
+
</th>
|
1021 |
+
<td>
|
1022 |
+
|
1023 |
+
<p style="margin: 8px 0 0 0;">
|
1024 |
+
<input type="checkbox" name="General[m4a]" value="use_players" <?php if( !empty($General['m4a']) && $General['m4a'] == 'use_players' ) echo 'checked'; ?> /> <?php echo __('Use Flow Player Classic / HTML5 Audio player', 'powerpress'); ?>
|
1025 |
+
</p>
|
1026 |
+
<div style="margin-left: 20px;"><?php echo __('Leave this option unchecked if you want m4a chapter markers, images and information displayed.', 'powerpress'); ?></div>
|
1027 |
+
<div style="margin: 10px 0 0 20px;"><?php echo __('When unchecked, m4a will be played with the quicktime video embed. Video player width/height settings apply.', 'powerpress'); ?></div>
|
1028 |
+
|
1029 |
+
</td>
|
1030 |
+
</tr>
|
1031 |
+
</table>
|
1032 |
+
|
1033 |
+
|
1034 |
</div>
|
1035 |
<!-- end presentation settings -->
|
1036 |
<?php
|
powerpressadmin-find-replace.php
CHANGED
@@ -67,7 +67,34 @@
|
|
67 |
$good = true;
|
68 |
if( @$FindReplace['verify'] )
|
69 |
{
|
70 |
-
$response =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
if ( is_wp_error( $response ) )
|
72 |
{
|
73 |
$g_FindReplaceResults[ $meta_id ]['error'] = $response->get_error_message();
|
67 |
$good = true;
|
68 |
if( @$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();
|
powerpressadmin-mt.php
CHANGED
@@ -164,11 +164,35 @@ if( !function_exists('add_action') )
|
|
164 |
//$headers = wp_remote_head($url);
|
165 |
//$response = wp_remote_request($url, $options);
|
166 |
$response = wp_remote_head( $url );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
$headers = wp_remote_retrieve_headers( $response );
|
168 |
|
169 |
if ( is_wp_error( $response ) )
|
170 |
{
|
171 |
-
powerpressadmin_mt_import_log($Titles[ $post_id ], $
|
172 |
}
|
173 |
else if( $headers && $response['response']['code'] >= 200 && $response['response']['code'] < 300 )
|
174 |
{
|
@@ -196,7 +220,7 @@ if( !function_exists('add_action') )
|
|
196 |
$EnclosureData = $EpisodeData['url'] . "\n" . $EpisodeData['size'] . "\n". $EpisodeData['type'];
|
197 |
if( $EpisodeData['duration'] )
|
198 |
$EnclosureData .= "\n".serialize( array('duration'=>$EpisodeData['duration']) );
|
199 |
-
|
200 |
// Save it here...
|
201 |
if( $feed_slug == 'podcast' )
|
202 |
add_post_meta($post_id, 'enclosure', $EnclosureData, true);
|
@@ -207,7 +231,7 @@ if( !function_exists('add_action') )
|
|
207 |
}
|
208 |
else
|
209 |
{
|
210 |
-
powerpressadmin_mt_import_log($Titles[ $post_id ], $
|
211 |
}
|
212 |
}
|
213 |
}
|
164 |
//$headers = wp_remote_head($url);
|
165 |
//$response = wp_remote_request($url, $options);
|
166 |
$response = wp_remote_head( $url );
|
167 |
+
// Redirect 1
|
168 |
+
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
|
169 |
+
{
|
170 |
+
$headers = wp_remote_retrieve_headers( $response );
|
171 |
+
$response = wp_remote_head( $headers['location'] );
|
172 |
+
}
|
173 |
+
// Redirect 2
|
174 |
+
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
|
175 |
+
{
|
176 |
+
$headers = wp_remote_retrieve_headers( $response );
|
177 |
+
$response = wp_remote_head( $headers['location'] );
|
178 |
+
}
|
179 |
+
// Redirect 3
|
180 |
+
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
|
181 |
+
{
|
182 |
+
$headers = wp_remote_retrieve_headers( $response );
|
183 |
+
$response = wp_remote_head( $headers['location'] );
|
184 |
+
}
|
185 |
+
// Redirect 4
|
186 |
+
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
|
187 |
+
{
|
188 |
+
$headers = wp_remote_retrieve_headers( $response );
|
189 |
+
$response = wp_remote_head( $headers['location'] );
|
190 |
+
}
|
191 |
$headers = wp_remote_retrieve_headers( $response );
|
192 |
|
193 |
if ( is_wp_error( $response ) )
|
194 |
{
|
195 |
+
powerpressadmin_mt_import_log($Titles[ $post_id ], $url, $feed_slug, 'A system error occurred.');
|
196 |
}
|
197 |
else if( $headers && $response['response']['code'] >= 200 && $response['response']['code'] < 300 )
|
198 |
{
|
220 |
$EnclosureData = $EpisodeData['url'] . "\n" . $EpisodeData['size'] . "\n". $EpisodeData['type'];
|
221 |
if( $EpisodeData['duration'] )
|
222 |
$EnclosureData .= "\n".serialize( array('duration'=>$EpisodeData['duration']) );
|
223 |
+
|
224 |
// Save it here...
|
225 |
if( $feed_slug == 'podcast' )
|
226 |
add_post_meta($post_id, 'enclosure', $EnclosureData, true);
|
231 |
}
|
232 |
else
|
233 |
{
|
234 |
+
powerpressadmin_mt_import_log($Titles[ $post_id ], $url, $feed_slug, __('HTTP return code', 'powerpress') .' '. $response['response']['code'] .'.');
|
235 |
}
|
236 |
}
|
237 |
}
|
powerpressadmin.php
CHANGED
@@ -301,15 +301,15 @@ function powerpress_admin_init()
|
|
301 |
if( empty($PlayerSettings['display_media_player']) )
|
302 |
$PlayerSettings['display_media_player'] = 0;
|
303 |
$General['player_function'] = abs( @$PlayerSettings['display_pinw'] - @$PlayerSettings['display_media_player'] );
|
304 |
-
$
|
305 |
if( !empty($PlayerSettings['display_download']) )
|
306 |
{
|
307 |
-
$
|
308 |
if( !empty($PlayerSettings['display_download_size']) )
|
309 |
{
|
310 |
-
$
|
311 |
if( !empty($PlayerSettings['display_download_duration']) )
|
312 |
-
$
|
313 |
}
|
314 |
}
|
315 |
|
@@ -317,6 +317,8 @@ function powerpress_admin_init()
|
|
317 |
$General['podcast_embed'] = 0;
|
318 |
if( !isset($General['podcast_embed_in_feed'] ) )
|
319 |
$General['podcast_embed_in_feed'] = 0;
|
|
|
|
|
320 |
}
|
321 |
|
322 |
if( $_POST['action'] == 'powerpress-save-tags' )
|
@@ -1674,10 +1676,15 @@ function powerpress_send_to_poster_image(url)
|
|
1674 |
</script>
|
1675 |
<?php
|
1676 |
}
|
1677 |
-
else
|
1678 |
{
|
1679 |
-
// Print this line for debugging when
|
1680 |
//echo "<!-- WP Page Name: $page_name; Hook Suffix: $hook_suffix -->\n";
|
|
|
|
|
|
|
|
|
|
|
1681 |
}
|
1682 |
}
|
1683 |
|
@@ -2943,6 +2950,31 @@ function powerpress_get_media_info_local($media_file, $content_type='', $file_si
|
|
2943 |
if( $content_type != '' && $file_size == 0 )
|
2944 |
{
|
2945 |
$response = wp_remote_head( $media_file );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2946 |
if ( is_wp_error( $response ) )
|
2947 |
{
|
2948 |
return array('error'=>$response->get_error_message() );
|
@@ -3038,7 +3070,7 @@ function powerpressadmin_community_news($items=3)
|
|
3038 |
}
|
3039 |
else
|
3040 |
{
|
3041 |
-
|
3042 |
while( list($null,$item) = each($rss_items) )
|
3043 |
{
|
3044 |
$enclosure = $item->get_enclosure();
|
@@ -3060,7 +3092,7 @@ function powerpressadmin_community_news($items=3)
|
|
3060 |
|
3061 |
echo '<div class="powerpressNewsPlayer">';
|
3062 |
|
3063 |
-
if( $embed )
|
3064 |
{
|
3065 |
if( preg_match('/width="(\d{1,4})"/i', $embed, $matches ) && count($matches) > 1 )
|
3066 |
{
|
@@ -3076,12 +3108,26 @@ function powerpressadmin_community_news($items=3)
|
|
3076 |
$EpisodeData['type'] = $enclosure->type;
|
3077 |
$EpisodeData['duration'] = $enclosure->duration;
|
3078 |
$EpisodeData['poster'] = $poster_image;
|
3079 |
-
$EpisodeData['width'] = '
|
3080 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3081 |
}
|
3082 |
echo '</div>';
|
3083 |
}
|
3084 |
echo '</li>';
|
|
|
3085 |
}
|
3086 |
}
|
3087 |
|
301 |
if( empty($PlayerSettings['display_media_player']) )
|
302 |
$PlayerSettings['display_media_player'] = 0;
|
303 |
$General['player_function'] = abs( @$PlayerSettings['display_pinw'] - @$PlayerSettings['display_media_player'] );
|
304 |
+
$General['podcast_link'] = 0;
|
305 |
if( !empty($PlayerSettings['display_download']) )
|
306 |
{
|
307 |
+
$General['podcast_link'] = 1;
|
308 |
if( !empty($PlayerSettings['display_download_size']) )
|
309 |
{
|
310 |
+
$General['podcast_link'] = 2;
|
311 |
if( !empty($PlayerSettings['display_download_duration']) )
|
312 |
+
$General['podcast_link'] = 3;
|
313 |
}
|
314 |
}
|
315 |
|
317 |
$General['podcast_embed'] = 0;
|
318 |
if( !isset($General['podcast_embed_in_feed'] ) )
|
319 |
$General['podcast_embed_in_feed'] = 0;
|
320 |
+
if( !isset($General['m4a'] ) )
|
321 |
+
$General['m4a'] = '';
|
322 |
}
|
323 |
|
324 |
if( $_POST['action'] == 'powerpress-save-tags' )
|
1676 |
</script>
|
1677 |
<?php
|
1678 |
}
|
1679 |
+
else if( $page_name == 'index' )
|
1680 |
{
|
1681 |
+
// Print this line for debugging when looking for other pages to include header data for
|
1682 |
//echo "<!-- WP Page Name: $page_name; Hook Suffix: $hook_suffix -->\n";
|
1683 |
+
?>
|
1684 |
+
<script type="text/javascript">
|
1685 |
+
powerpress_url = '<?php echo powerpress_get_root_url(); ?>';
|
1686 |
+
</script>
|
1687 |
+
<?php
|
1688 |
}
|
1689 |
}
|
1690 |
|
2950 |
if( $content_type != '' && $file_size == 0 )
|
2951 |
{
|
2952 |
$response = wp_remote_head( $media_file );
|
2953 |
+
// Redirect 1
|
2954 |
+
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
|
2955 |
+
{
|
2956 |
+
$headers = wp_remote_retrieve_headers( $response );
|
2957 |
+
$response = wp_remote_head( $headers['location'] );
|
2958 |
+
}
|
2959 |
+
// Redirect 2
|
2960 |
+
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
|
2961 |
+
{
|
2962 |
+
$headers = wp_remote_retrieve_headers( $response );
|
2963 |
+
$response = wp_remote_head( $headers['location'] );
|
2964 |
+
}
|
2965 |
+
// Redirect 3
|
2966 |
+
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
|
2967 |
+
{
|
2968 |
+
$headers = wp_remote_retrieve_headers( $response );
|
2969 |
+
$response = wp_remote_head( $headers['location'] );
|
2970 |
+
}
|
2971 |
+
// Redirect 4
|
2972 |
+
if( !is_wp_error( $response ) && ($response['response']['code'] == 301 || $response['response']['code'] == 302) )
|
2973 |
+
{
|
2974 |
+
$headers = wp_remote_retrieve_headers( $response );
|
2975 |
+
$response = wp_remote_head( $headers['location'] );
|
2976 |
+
}
|
2977 |
+
|
2978 |
if ( is_wp_error( $response ) )
|
2979 |
{
|
2980 |
return array('error'=>$response->get_error_message() );
|
3070 |
}
|
3071 |
else
|
3072 |
{
|
3073 |
+
$first_item = true;
|
3074 |
while( list($null,$item) = each($rss_items) )
|
3075 |
{
|
3076 |
$enclosure = $item->get_enclosure();
|
3092 |
|
3093 |
echo '<div class="powerpressNewsPlayer">';
|
3094 |
|
3095 |
+
if( $first_item && $embed )
|
3096 |
{
|
3097 |
if( preg_match('/width="(\d{1,4})"/i', $embed, $matches ) && count($matches) > 1 )
|
3098 |
{
|
3108 |
$EpisodeData['type'] = $enclosure->type;
|
3109 |
$EpisodeData['duration'] = $enclosure->duration;
|
3110 |
$EpisodeData['poster'] = $poster_image;
|
3111 |
+
$EpisodeData['width'] = '100%';
|
3112 |
+
$EpisodeData['custom_play_button'] = powerpress_get_root_url() . 'play_audio.png';
|
3113 |
+
$ext = powerpressplayer_get_extension($enclosure->link);
|
3114 |
+
switch($ext)
|
3115 |
+
{
|
3116 |
+
case 'mp4':
|
3117 |
+
case 'm4v':
|
3118 |
+
case 'webm': {
|
3119 |
+
echo powerpressplayer_build_html5video($enclosure->link, $EpisodeData);
|
3120 |
+
}; break;
|
3121 |
+
case 'mp3':
|
3122 |
+
case 'm4a': {
|
3123 |
+
echo powerpressplayer_build_html5audio($enclosure->link, $EpisodeData);
|
3124 |
+
}; break;
|
3125 |
+
}
|
3126 |
}
|
3127 |
echo '</div>';
|
3128 |
}
|
3129 |
echo '</li>';
|
3130 |
+
$first_item = false;
|
3131 |
}
|
3132 |
}
|
3133 |
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Blubrry PowerPress Podcasting plugin ===
|
2 |
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: 2.8
|
5 |
Tested up to: 3.1
|
6 |
-
Stable tag: 2.0
|
7 |
|
8 |
Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
|
9 |
|
@@ -147,6 +147,18 @@ To install Blubrry PowerPress manually, follow these steps:
|
|
147 |
* 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/)
|
148 |
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
= 2.0 =
|
151 |
* Released on 3/7/2011
|
152 |
* PowerPress now requires WordPress version 2.8 or newer.
|
1 |
=== Blubrry PowerPress Podcasting plugin ===
|
2 |
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: 2.8
|
5 |
Tested up to: 3.1
|
6 |
+
Stable tag: 2.0.1
|
7 |
|
8 |
Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
|
9 |
|
147 |
* 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/)
|
148 |
|
149 |
|
150 |
+
= 2.0.1 =
|
151 |
+
* Released on 3/13/2011
|
152 |
+
* Fixed bug where media links did not appear for theme functions `get_the_powerpress_content()` and `the_powerpress_content()`. (Thanks Douglas for bringing to our attention)
|
153 |
+
* Fixed download link not appearing after saving settings in 2.0. Download link setting was not getting saved correctly.
|
154 |
+
* Fixed bug where player does not appear if PowerPress was previously in Simple Mode.
|
155 |
+
* Fixed bug with Verify button failing with HTTP error 302 or 301 when URL has more than 1 redirect.
|
156 |
+
* Added `POWERPRESS_EMBED_TEXT` define option so the embed text can be changed. Just add `define("POWERPRESS_EMBED_TEXT", "Your Embed Text");` above the include line in your wp-config.php.
|
157 |
+
* Restored quicktime as default player for m4a files, for those who need quicktime to display chapter info. To play m4a with FlowPlayerClassic/HTML5, go to PowerPress Settings > Appearance tab.
|
158 |
+
* Fixed FlowPlayerClassic scaling, video now maintains aspect ratio when displayed in player.
|
159 |
+
* Blubrry Community News now only shows latest video embed, all others minimized with small play button.
|
160 |
+
* Media statistics redirect URLs now applied to alternative webm URLs when specified with mp4/m4v video.
|
161 |
+
|
162 |
= 2.0 =
|
163 |
* Released on 3/7/2011
|
164 |
* PowerPress now requires WordPress version 2.8 or newer.
|