Version Description
- Released on 5/11/2012
- New iTunes image requirements updated throughout plugin. RGB 1400x1400 jpg is recommended.
- Feed Episode Maximizer feature added, only applies to podcast channel feeds.
- Added VideoJS video player option, requires "VideoJS - HTML5 Video Player for WordPress" plugin to be installed and activated.
- Enhanced support for uploading RSS/iTunes images, the iTunes image upload now checks for 1400x1400 or larger jpg/png image in RGB color space.
- Notice message regarding new iTunes image requirements added to dashboard.
- Added .epub to list of file content types supported.
- iTunes image can now also be used as the RSS image.
- Additional information added to powerpress shortcode documentation.
- iTunes block episode feature added, requires following define in wp-config.php:
define("POWERPRESS_NOT_SUPPORTED", true);
- iTunes block feed feature added, requires following define in wp-config.php:
define("POWERPRESS_NOT_SUPPORTED", true);
- iTunes complete feed feature added, requires following define in wp-config.php:
define("POWERPRESS_NOT_SUPPORTED", true);
- iTunes order episode feature added.
- Feature Episode in iTunes option added, allows you to put specific episode at the top of your iTunes podcast directory listing.
- ref=Nofollow tags added to play in new window, download and embed links.
- Fixed warning message when metamark's default row is removed and does not exist upon saving.
- Increased the performance of the podcast only and podcast channel feeds.
- Removed "new" from no longer new features.
- iTunes default image updated to 1400 x 1400.
Download this release
Release Info
Developer | amandato |
Plugin | PowerPress Podcasting plugin by Blubrry |
Version | 4.0 |
Comparing to | |
See all releases |
Code changes from version 3.0.1 to 4.0
- css/admin.css +3 -2
- css/dashboard.css +45 -0
- feed-podcast.php +141 -0
- itunes_default.jpg +0 -0
- powerpress-player.php +94 -12
- powerpress.php +99 -55
- powerpressadmin-basic.php +53 -7
- powerpressadmin-dashboard.php +107 -8
- powerpressadmin-editfeed.php +122 -8
- powerpressadmin-metabox.php +82 -1
- powerpressadmin-metamarks.php +34 -16
- powerpressadmin-player-page.php +365 -264
- powerpressadmin.php +136 -16
- readme.txt +41 -20
css/admin.css
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
font-weight: bold;
|
20 |
}
|
21 |
#powerpress_settings {
|
22 |
-
background-image:url(http://images.blubrry.com/powerpress/
|
23 |
background-repeat: no-repeat;
|
24 |
background-position: bottom right;
|
25 |
}
|
@@ -180,4 +180,5 @@ padding-bottom: 15px;
|
|
180 |
}
|
181 |
.powerpress-welcome-news h2, .powerpress-welcome-highlighted h2 {
|
182 |
padding: 0;
|
183 |
-
}
|
|
19 |
font-weight: bold;
|
20 |
}
|
21 |
#powerpress_settings {
|
22 |
+
background-image:url(http://images.blubrry.com/powerpress/blubrry_logo4.png);
|
23 |
background-repeat: no-repeat;
|
24 |
background-position: bottom right;
|
25 |
}
|
180 |
}
|
181 |
.powerpress-welcome-news h2, .powerpress-welcome-highlighted h2 {
|
182 |
padding: 0;
|
183 |
+
}
|
184 |
+
|
css/dashboard.css
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* PowerPress Dashboard CSS */
|
2 |
+
|
3 |
+
/* Dashboard Notice, based on Dashboard Browser Nag */
|
4 |
+
#powerpress_dashboard_notice_1 a.update-browser-link {
|
5 |
+
font-size: 1.2em;
|
6 |
+
font-weight: bold;
|
7 |
+
}
|
8 |
+
|
9 |
+
#powerpress_dashboard_notice_1 a {
|
10 |
+
text-decoration: underline;
|
11 |
+
}
|
12 |
+
|
13 |
+
#powerpress_dashboard_notice_1.postbox {
|
14 |
+
background-color: #e29808;
|
15 |
+
background-image: none;
|
16 |
+
border-color: #edc048;
|
17 |
+
-moz-box-shadow: none;
|
18 |
+
-webkit-box-shadow: none;
|
19 |
+
box-shadow: none;
|
20 |
+
color: #fff;
|
21 |
+
}
|
22 |
+
|
23 |
+
#powerpress_dashboard_notice_1.postbox h3 {
|
24 |
+
border-bottom-color: #f6e2ac;
|
25 |
+
text-shadow: none;
|
26 |
+
-moz-box-shadow: none;
|
27 |
+
-webkit-box-shadow: none;
|
28 |
+
box-shadow: none;
|
29 |
+
background: transparent none;
|
30 |
+
color: #fff;
|
31 |
+
}
|
32 |
+
|
33 |
+
#powerpress_dashboard_notice_1 a {
|
34 |
+
color: #fff;
|
35 |
+
}
|
36 |
+
|
37 |
+
#powerpress_dashboard_notice_1.browser-insecure a.browse-happy-link,
|
38 |
+
#powerpress_dashboard_notice_1.browser-insecure a.update-browser-link {
|
39 |
+
text-shadow: #871b15 0 1px 0;
|
40 |
+
}
|
41 |
+
|
42 |
+
#powerpress_dashboard_notice_1 a.browse-happy-link,
|
43 |
+
#powerpress_dashboard_notice_1 a.update-browser-link {
|
44 |
+
text-shadow: #d29a04 0 1px 0;
|
45 |
+
}
|
feed-podcast.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* RSS2 Podcast Feed Template for displaying RSS2 Podcast Posts feed.
|
4 |
+
*
|
5 |
+
* @package WordPress
|
6 |
+
*/
|
7 |
+
|
8 |
+
$FeaturedPodcastID = 0;
|
9 |
+
$iTunesFeatured = get_option('powerpress_itunes_featured');
|
10 |
+
$feed_slug = get_query_var('feed');
|
11 |
+
if( !empty($iTunesFeatured[ $feed_slug ]) )
|
12 |
+
{
|
13 |
+
$FeaturedPodcastID = $iTunesFeatured[ $feed_slug ];
|
14 |
+
$GLOBALS['powerpress_feed']['itunes_feature'] = true; // So any custom order value is not used when looping through the feeds.
|
15 |
+
}
|
16 |
+
$iTunesOrderNumber = 2; // One reserved for featured episode
|
17 |
+
|
18 |
+
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
|
19 |
+
$more = 1;
|
20 |
+
|
21 |
+
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
22 |
+
|
23 |
+
<rss version="2.0"
|
24 |
+
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
25 |
+
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
26 |
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
27 |
+
xmlns:atom="http://www.w3.org/2005/Atom"
|
28 |
+
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
29 |
+
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
|
30 |
+
<?php do_action('rss2_ns'); ?>
|
31 |
+
>
|
32 |
+
|
33 |
+
<channel>
|
34 |
+
<title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
|
35 |
+
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
|
36 |
+
<link><?php bloginfo_rss('url') ?></link>
|
37 |
+
<description><?php bloginfo_rss("description") ?></description>
|
38 |
+
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
|
39 |
+
<language><?php echo get_option('rss_language'); ?></language>
|
40 |
+
<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
|
41 |
+
<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
|
42 |
+
<?php do_action('rss2_head'); ?>
|
43 |
+
<?php
|
44 |
+
|
45 |
+
$ItemCount = 0;
|
46 |
+
?>
|
47 |
+
<?php while( have_posts()) : the_post(); ?>
|
48 |
+
<item>
|
49 |
+
<title><?php the_title_rss() ?></title>
|
50 |
+
<link><?php the_permalink_rss() ?></link>
|
51 |
+
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
|
52 |
+
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
53 |
+
<?php
|
54 |
+
if( empty($GLOBALS['powerpress_feed']['feed_maximizer_on']) ) // If feed maximizer off
|
55 |
+
{
|
56 |
+
?>
|
57 |
+
<comments><?php comments_link_feed(); ?></comments>
|
58 |
+
<dc:creator><?php the_author() ?></dc:creator>
|
59 |
+
<?php the_category_rss('rss2') ?>
|
60 |
+
<?php if (get_option('rss_use_excerpt')) : ?>
|
61 |
+
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
62 |
+
<?php else : ?>
|
63 |
+
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
64 |
+
<?php if ( strlen( $post->post_content ) > 0 ) : ?>
|
65 |
+
<content:encoded><![CDATA[<?php the_content_feed('rss2') ?>]]></content:encoded>
|
66 |
+
<?php else : ?>
|
67 |
+
<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
|
68 |
+
<?php endif; ?>
|
69 |
+
<?php endif; ?>
|
70 |
+
<wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
|
71 |
+
<slash:comments><?php echo get_comments_number(); ?></slash:comments>
|
72 |
+
<?php
|
73 |
+
}
|
74 |
+
else // If feed maximizer on
|
75 |
+
{ // itunes does not like CDATA, so we're changing it to the other method...
|
76 |
+
?>
|
77 |
+
<description><?php echo esc_html( get_the_excerpt() ); ?></description>
|
78 |
+
<?php
|
79 |
+
}
|
80 |
+
?>
|
81 |
+
<?php rss_enclosure(); ?>
|
82 |
+
<?php do_action('rss2_item'); ?>
|
83 |
+
<?php
|
84 |
+
if( !empty($iTunesFeatured[ $feed_slug ]) )
|
85 |
+
{
|
86 |
+
echo "\t<itunes:order>";
|
87 |
+
if( $FeaturedPodcastID == get_the_ID() )
|
88 |
+
{
|
89 |
+
echo 1;
|
90 |
+
$FeaturedPodcastID = 0;
|
91 |
+
}
|
92 |
+
else
|
93 |
+
{
|
94 |
+
echo $iTunesOrderNumber;
|
95 |
+
$iTunesOrderNumber++;
|
96 |
+
}
|
97 |
+
echo "</itunes:order>\n";
|
98 |
+
}
|
99 |
+
|
100 |
+
// Decide based on count if we want to flip on the feed maximizer...
|
101 |
+
$ItemCount++;
|
102 |
+
|
103 |
+
if( empty($GLOBALS['powerpress_feed']['feed_maximizer_on']) && $ItemCount >= 10 && !empty($GLOBALS['powerpress_feed']['maximize_feed']) )
|
104 |
+
{
|
105 |
+
$GLOBALS['powerpress_feed']['feed_maximizer_on'] = true; // All future items will be minimized in order to maximize episode count
|
106 |
+
}
|
107 |
+
|
108 |
+
?>
|
109 |
+
</item>
|
110 |
+
<?php endwhile; ?>
|
111 |
+
<?php
|
112 |
+
|
113 |
+
if( !empty($FeaturedPodcastID) )
|
114 |
+
{
|
115 |
+
query_posts( array('p'=>$FeaturedPodcastID) );
|
116 |
+
if( have_posts())
|
117 |
+
{
|
118 |
+
the_post();
|
119 |
+
// Featured podcast epiosde, give it the highest itunes:order value...
|
120 |
+
?>
|
121 |
+
<item>
|
122 |
+
<title><?php the_title_rss() ?></title>
|
123 |
+
<link><?php the_permalink_rss() ?></link>
|
124 |
+
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
|
125 |
+
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
126 |
+
<description><?php echo esc_html( get_the_excerpt() ); ?></description>
|
127 |
+
<?php rss_enclosure(); ?>
|
128 |
+
<?php do_action('rss2_item'); ?>
|
129 |
+
<?php
|
130 |
+
echo "\t<itunes:order>";
|
131 |
+
echo 1;
|
132 |
+
echo "</itunes:order>\n";
|
133 |
+
?>
|
134 |
+
</item>
|
135 |
+
<?php
|
136 |
+
}
|
137 |
+
wp_reset_query();
|
138 |
+
}
|
139 |
+
?>
|
140 |
+
</channel>
|
141 |
+
</rss>
|
itunes_default.jpg
CHANGED
Binary file
|
powerpress-player.php
CHANGED
@@ -678,9 +678,20 @@ function powerpressplayer_player_video($content, $media_url, $EpisodeData = arra
|
|
678 |
// OGG Video / WebM
|
679 |
case 'webm':
|
680 |
case 'ogv': { // Use native player when possible
|
|
|
|
|
|
|
681 |
|
682 |
// HTML5 Video as an embed
|
683 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
684 |
}; break;
|
685 |
// H.264
|
686 |
case 'm4v':
|
@@ -699,6 +710,9 @@ function powerpressplayer_player_video($content, $media_url, $EpisodeData = arra
|
|
699 |
|
700 |
$content .= powerpressplayer_build_flowplayerclassic($media_url, $EpisodeData);
|
701 |
}; break;
|
|
|
|
|
|
|
702 |
case 'html5video': {
|
703 |
// HTML5 Video as an embed
|
704 |
$content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
|
@@ -934,18 +948,18 @@ function powerpressplayer_link_download($content, $media_url, $ExtraData = array
|
|
934 |
$player_links = '';
|
935 |
if( $GeneralSettings['podcast_link'] == 1 )
|
936 |
{
|
937 |
-
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\">". POWERPRESS_DOWNLOAD_TEXT ."</a>".PHP_EOL;
|
938 |
}
|
939 |
else if( $GeneralSettings['podcast_link'] == 2 )
|
940 |
{
|
941 |
-
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (".powerpress_byte_size($ExtraData['size']).") ".PHP_EOL;
|
942 |
}
|
943 |
else if( $GeneralSettings['podcast_link'] == 3 )
|
944 |
{
|
945 |
if( $ExtraData['duration'] && ltrim($ExtraData['duration'], '0:') != '' )
|
946 |
-
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (". htmlspecialchars(POWERPRESS_DURATION_TEXT) .": " . powerpress_readable_duration($ExtraData['duration']) ." — ".powerpress_byte_size($ExtraData['size']).")".PHP_EOL;
|
947 |
else
|
948 |
-
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (".powerpress_byte_size($ExtraData['size']).")".PHP_EOL;
|
949 |
}
|
950 |
|
951 |
if( $player_links && !empty($content) )
|
@@ -968,11 +982,11 @@ function powerpressplayer_link_pinw($content, $media_url, $ExtraData = array() )
|
|
968 |
case 3: // Play in new window only
|
969 |
case 5: { // Play in page and new window
|
970 |
if( $is_pdf )
|
971 |
-
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". __('Open in New Window', 'powerpress') ."\">". __('Open in New Window', 'powerpress') ."</a>".PHP_EOL;
|
972 |
else if( !empty($ExtraData['id']) && !empty($ExtraData['feed']) )
|
973 |
-
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\" onclick=\"return powerpress_pinw('{$ExtraData['id']}-{$ExtraData['feed']}');\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
|
974 |
else
|
975 |
-
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
|
976 |
}; break;
|
977 |
}//end switch
|
978 |
|
@@ -1031,7 +1045,7 @@ function powerpressplayer_link_embed($content, $media_url, $ExtraData = array()
|
|
1031 |
$player = powerpressplayer_embedable($media_url, $ExtraData);
|
1032 |
if( $player )
|
1033 |
{
|
1034 |
-
$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>";
|
1035 |
}
|
1036 |
|
1037 |
if( $player_links && !empty($content) )
|
@@ -1807,14 +1821,82 @@ function powerpressplayer_build_simpleflash($media_url, $EpisodeData = array())
|
|
1807 |
}
|
1808 |
|
1809 |
/*
|
1810 |
-
VideoJS for PowerPress
|
1811 |
*/
|
1812 |
function powerpressplayer_build_videojs($media_url, $EpisodeData = array())
|
1813 |
{
|
1814 |
-
|
1815 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1816 |
return $content;
|
1817 |
}
|
1818 |
|
1819 |
|
|
|
1820 |
?>
|
678 |
// OGG Video / WebM
|
679 |
case 'webm':
|
680 |
case 'ogv': { // Use native player when possible
|
681 |
+
$Settings = get_option('powerpress_general');
|
682 |
+
if( !isset($Settings['video_player']) )
|
683 |
+
$Settings['video_player'] = 'html5video';
|
684 |
|
685 |
// HTML5 Video as an embed
|
686 |
+
switch( $Settings['video_player'] )
|
687 |
+
{
|
688 |
+
case 'videojs-html5-video-player-for-wordpress': {
|
689 |
+
$content .= powerpressplayer_build_videojs($media_url, $EpisodeData);
|
690 |
+
}; break;
|
691 |
+
default: {
|
692 |
+
$content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
|
693 |
+
}; break;
|
694 |
+
}
|
695 |
}; break;
|
696 |
// H.264
|
697 |
case 'm4v':
|
710 |
|
711 |
$content .= powerpressplayer_build_flowplayerclassic($media_url, $EpisodeData);
|
712 |
}; break;
|
713 |
+
case 'videojs-html5-video-player-for-wordpress': {
|
714 |
+
$content .= powerpressplayer_build_videojs($media_url, $EpisodeData);
|
715 |
+
}; break;
|
716 |
case 'html5video': {
|
717 |
// HTML5 Video as an embed
|
718 |
$content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
|
948 |
$player_links = '';
|
949 |
if( $GeneralSettings['podcast_link'] == 1 )
|
950 |
{
|
951 |
+
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\" rel=\"nofollow\">". POWERPRESS_DOWNLOAD_TEXT ."</a>".PHP_EOL;
|
952 |
}
|
953 |
else if( $GeneralSettings['podcast_link'] == 2 )
|
954 |
{
|
955 |
+
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\" rel=\"nofollow\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (".powerpress_byte_size($ExtraData['size']).") ".PHP_EOL;
|
956 |
}
|
957 |
else if( $GeneralSettings['podcast_link'] == 3 )
|
958 |
{
|
959 |
if( $ExtraData['duration'] && ltrim($ExtraData['duration'], '0:') != '' )
|
960 |
+
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\" rel=\"nofollow\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (". htmlspecialchars(POWERPRESS_DURATION_TEXT) .": " . powerpress_readable_duration($ExtraData['duration']) ." — ".powerpress_byte_size($ExtraData['size']).")".PHP_EOL;
|
961 |
else
|
962 |
+
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\" rel=\"nofollow\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (".powerpress_byte_size($ExtraData['size']).")".PHP_EOL;
|
963 |
}
|
964 |
|
965 |
if( $player_links && !empty($content) )
|
982 |
case 3: // Play in new window only
|
983 |
case 5: { // Play in page and new window
|
984 |
if( $is_pdf )
|
985 |
+
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". __('Open in New Window', 'powerpress') ."\" rel=\"nofollow\">". __('Open in New Window', 'powerpress') ."</a>".PHP_EOL;
|
986 |
else if( !empty($ExtraData['id']) && !empty($ExtraData['feed']) )
|
987 |
+
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\" onclick=\"return powerpress_pinw('{$ExtraData['id']}-{$ExtraData['feed']}');\" rel=\"nofollow\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
|
988 |
else
|
989 |
+
$player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\" rel=\"nofollow\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
|
990 |
}; break;
|
991 |
}//end switch
|
992 |
|
1045 |
$player = powerpressplayer_embedable($media_url, $ExtraData);
|
1046 |
if( $player )
|
1047 |
{
|
1048 |
+
$player_links .= "<a href=\"#\" class=\"powerpress_link_e\" title=\"". htmlspecialchars(POWERPRESS_EMBED_TEXT) ."\" onclick=\"return powerpress_show_embed('{$ExtraData['id']}-{$ExtraData['feed']}');\" rel=\"nofollow\">". htmlspecialchars(POWERPRESS_EMBED_TEXT) ."</a>";
|
1049 |
}
|
1050 |
|
1051 |
if( $player_links && !empty($content) )
|
1821 |
}
|
1822 |
|
1823 |
/*
|
1824 |
+
VideoJS for PowerPress 4.0
|
1825 |
*/
|
1826 |
function powerpressplayer_build_videojs($media_url, $EpisodeData = array())
|
1827 |
{
|
1828 |
+
$content = '';
|
1829 |
+
if( function_exists('add_videojs_header') )
|
1830 |
+
{
|
1831 |
+
// Global Settings
|
1832 |
+
$Settings = get_option('powerpress_general');
|
1833 |
+
|
1834 |
+
$player_id = powerpressplayer_get_next_id();
|
1835 |
+
$cover_image = '';
|
1836 |
+
$player_width = 400;
|
1837 |
+
$player_height = 225;
|
1838 |
+
$autoplay = false;
|
1839 |
+
|
1840 |
+
if( !empty($Settings['player_width']) )
|
1841 |
+
$player_width = $Settings['player_width'];
|
1842 |
+
if( !empty($Settings['player_height']) )
|
1843 |
+
$player_height = $Settings['player_height'];
|
1844 |
+
if( !empty($Settings['poster_image']) )
|
1845 |
+
$cover_image = $Settings['poster_image'];
|
1846 |
+
|
1847 |
+
// Episode Settings
|
1848 |
+
if( !empty($EpisodeData['image']) )
|
1849 |
+
$cover_image = $EpisodeData['image'];
|
1850 |
+
if( !empty($EpisodeData['width']) )
|
1851 |
+
$player_width = $EpisodeData['width'];
|
1852 |
+
if( !empty($EpisodeData['height']) )
|
1853 |
+
$player_height = $EpisodeData['height'];
|
1854 |
+
if( !empty($EpisodeData['autoplay']) )
|
1855 |
+
$autoplay = true;
|
1856 |
+
|
1857 |
+
// Poster image supplied
|
1858 |
+
$poster_attribute = '';
|
1859 |
+
if ($cover_image)
|
1860 |
+
$poster_attribute = ' poster="'.$cover_image.'"';
|
1861 |
+
|
1862 |
+
// Autoplay the video?
|
1863 |
+
$autoplay_attribute = '';
|
1864 |
+
if ( $autoplay )
|
1865 |
+
$autoplay_attribute = ' autoplay';
|
1866 |
+
|
1867 |
+
// We never do pre-poading for podcasting as it inflates statistics
|
1868 |
+
|
1869 |
+
// Is there a custom class?
|
1870 |
+
$class = '';
|
1871 |
+
if ( !empty($Settings['videojs_css_class']) )
|
1872 |
+
$class = ' '. $Settings['videojs_css_class'];
|
1873 |
+
|
1874 |
+
$content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">';
|
1875 |
+
|
1876 |
+
$content .= '<video id="videojs_player_'. $player_id .'" class="video-js vjs-default-skin'. $class .'" width="'. $player_width .'" height="'. $player_height .'"'. $poster_attribute .' controls '. $autoplay_attribute .' data-setup="{}">';
|
1877 |
+
|
1878 |
+
$content_type = powerpress_get_contenttype($media_url);
|
1879 |
+
if( $content_type == 'video/x-m4v' )
|
1880 |
+
$content_type = 'video/mp4'; // Mp4
|
1881 |
+
$content .='<source src="'. $media_url .'" type="'. $content_type .'" />';
|
1882 |
+
|
1883 |
+
if( !empty($EpisodeData['webm_src']) )
|
1884 |
+
{
|
1885 |
+
$EpisodeData['webm_src'] = powerpress_add_flag_to_redirect_url($EpisodeData['webm_src'], 'p');
|
1886 |
+
$content .='<source src="'. $EpisodeData['webm_src'] .'" type="video/webm; codecs="vp8, vorbis" />';
|
1887 |
+
}
|
1888 |
+
|
1889 |
+
$content .= '</video>';
|
1890 |
+
$content .= "</div>\n";
|
1891 |
+
}
|
1892 |
+
else
|
1893 |
+
{
|
1894 |
+
$content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
|
1895 |
+
}
|
1896 |
+
|
1897 |
return $content;
|
1898 |
}
|
1899 |
|
1900 |
|
1901 |
+
|
1902 |
?>
|
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:
|
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', '
|
37 |
|
38 |
// Translation support:
|
39 |
if ( !defined('POWERPRESS_ABSPATH') )
|
@@ -401,7 +401,10 @@ function powerpress_rss2_head()
|
|
401 |
echo "\t".'<itunes:explicit>' . $powerpress_feed['explicit'] . '</itunes:explicit>'.PHP_EOL;
|
402 |
|
403 |
if( !empty($Feed['itunes_block']) )
|
404 |
-
echo "\t
|
|
|
|
|
|
|
405 |
|
406 |
if( !empty($Feed['itunes_image']) )
|
407 |
{
|
@@ -621,6 +624,7 @@ function powerpress_rss2_item()
|
|
621 |
$subtitle = false;
|
622 |
$keywords = false;
|
623 |
$block = false;
|
|
|
624 |
|
625 |
if( isset( $EpisodeData['summary'] ) && strlen($EpisodeData['summary']) > 1 )
|
626 |
$summary = $EpisodeData['summary'];
|
@@ -639,11 +643,13 @@ function powerpress_rss2_item()
|
|
639 |
$author = $EpisodeData['author'];
|
640 |
if( !empty( $EpisodeData['block'] ) )
|
641 |
$block = 'yes';
|
|
|
|
|
642 |
|
643 |
if( $custom_enclosure ) // We need to add the enclosure tag here...
|
644 |
{
|
645 |
-
if(
|
646 |
-
$
|
647 |
|
648 |
echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
|
649 |
trim($EpisodeData['url']),
|
@@ -668,7 +674,7 @@ function powerpress_rss2_item()
|
|
668 |
}
|
669 |
}
|
670 |
|
671 |
-
if( $keywords )
|
672 |
echo "\t\t<itunes:keywords>" . powerpress_format_itunes_value($keywords, 'keywords') . '</itunes:keywords>'.PHP_EOL;
|
673 |
|
674 |
$excerpt_no_html = '';
|
@@ -685,25 +691,28 @@ function powerpress_rss2_item()
|
|
685 |
}
|
686 |
|
687 |
if( $subtitle )
|
688 |
-
echo "\t
|
689 |
else if( $excerpt_no_html )
|
690 |
-
echo "\t
|
691 |
else
|
692 |
-
echo "\t
|
693 |
-
|
694 |
-
if( $summary )
|
695 |
-
echo "\t\t<itunes:summary>". powerpress_format_itunes_value($summary, 'summary') .'</itunes:summary>'.PHP_EOL;
|
696 |
-
else if( $powerpress_feed['enhance_itunes_summary'] )
|
697 |
-
echo "\t\t<itunes:summary>". powerpress_itunes_summary($post->post_content) .'</itunes:summary>'.PHP_EOL;
|
698 |
-
else if( $excerpt_no_html )
|
699 |
-
echo "\t\t<itunes:summary>". powerpress_format_itunes_value($excerpt_no_html, 'summary') .'</itunes:summary>'.PHP_EOL;
|
700 |
-
else
|
701 |
-
echo "\t\t<itunes:summary>". powerpress_format_itunes_value($content_no_html, 'summary') .'</itunes:summary>'.PHP_EOL;
|
702 |
|
703 |
-
if( $
|
704 |
-
|
705 |
-
|
706 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
|
708 |
if( $explicit )
|
709 |
echo "\t\t<itunes:explicit>" . $explicit . '</itunes:explicit>'.PHP_EOL;
|
@@ -712,42 +721,58 @@ function powerpress_rss2_item()
|
|
712 |
echo "\t\t<itunes:duration>" . ltrim($EpisodeData['duration'], '0:') . '</itunes:duration>'.PHP_EOL;
|
713 |
|
714 |
if( $block && $block == 'yes' )
|
715 |
-
echo "\t\t<itunes:block>yes</itunes:block>".PHP_EOL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
716 |
|
717 |
// RawVoice RSS Tags
|
718 |
-
if(
|
719 |
{
|
720 |
-
if( !
|
721 |
-
echo "\t\t<rawvoice:isHD>yes</rawvoice:isHD>".PHP_EOL;;
|
722 |
-
if( !empty($EpisodeData['image']) )
|
723 |
-
echo "\t\t<rawvoice:poster url=\"". $EpisodeData['image'] ."\" />".PHP_EOL;
|
724 |
-
if( !empty($EpisodeData['embed']) )
|
725 |
-
echo "\t\t<rawvoice:embed>". htmlspecialchars($EpisodeData['embed']) ."</rawvoice:embed>".PHP_EOL;
|
726 |
-
else if( !empty($powerpress_feed['podcast_embed_in_feed']) && function_exists('powerpress_generate_embed') )
|
727 |
{
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
736 |
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
$GeneralSettings = get_option('powerpress_general');
|
746 |
-
|
747 |
-
if( !empty($GeneralSettings) && !empty($GeneralSettings['metamarks']) )
|
748 |
-
{
|
749 |
-
require_once(POWERPRESS_ABSPATH .'/powerpressadmin-metamarks.php');
|
750 |
-
powerpress_metamarks_print_rss2($EpisodeData);
|
751 |
}
|
752 |
}
|
753 |
}
|
@@ -907,8 +932,17 @@ function powerpress_do_podcast_feed($for_comments=false)
|
|
907 |
}
|
908 |
}
|
909 |
|
910 |
-
|
911 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
912 |
}
|
913 |
|
914 |
function powerpress_template_redirect()
|
@@ -1152,6 +1186,8 @@ function powerpress_load_general_feed_settings()
|
|
1152 |
$powerpress_feed['rss_language'] = $Feed['rss_language'];
|
1153 |
if( !empty($GeneralSettings['podcast_embed_in_feed']) )
|
1154 |
$powerpress_feed['podcast_embed_in_feed'] = true;
|
|
|
|
|
1155 |
return;
|
1156 |
}
|
1157 |
|
@@ -1564,6 +1600,11 @@ function powerpress_get_contenttype($file, $use_wp_check_filetype = true)
|
|
1564 |
return 'application/x-shockwave-flash';
|
1565 |
case 'ogx':
|
1566 |
return 'application/ogg';
|
|
|
|
|
|
|
|
|
|
|
1567 |
default: // Let it fall through
|
1568 |
}
|
1569 |
}
|
@@ -1885,6 +1926,9 @@ function powerpress_merge_empty_feed_settings($CustomFeedSettings, $FeedSettings
|
|
1885 |
unset($FeedSettings['itunes_new_feed_url']);
|
1886 |
unset($FeedSettings['apply_to']);
|
1887 |
unset($FeedSettings['feed_redirect_url']);
|
|
|
|
|
|
|
1888 |
|
1889 |
// If the setting is not already set, set the enhnaced itunes setting if they have PHP5+ on by default
|
1890 |
if( !isset($FeedSettings['enhance_itunes_summary']) )
|
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 |
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' );
|
37 |
|
38 |
// Translation support:
|
39 |
if ( !defined('POWERPRESS_ABSPATH') )
|
401 |
echo "\t".'<itunes:explicit>' . $powerpress_feed['explicit'] . '</itunes:explicit>'.PHP_EOL;
|
402 |
|
403 |
if( !empty($Feed['itunes_block']) )
|
404 |
+
echo "\t<itunes:block>yes</itunes:block>".PHP_EOL;
|
405 |
+
|
406 |
+
if( !empty($Feed['itunes_complete']) )
|
407 |
+
echo "\t<itunes:complete>yes</itunes:complete>".PHP_EOL;
|
408 |
|
409 |
if( !empty($Feed['itunes_image']) )
|
410 |
{
|
624 |
$subtitle = false;
|
625 |
$keywords = false;
|
626 |
$block = false;
|
627 |
+
$cc = false;
|
628 |
|
629 |
if( isset( $EpisodeData['summary'] ) && strlen($EpisodeData['summary']) > 1 )
|
630 |
$summary = $EpisodeData['summary'];
|
643 |
$author = $EpisodeData['author'];
|
644 |
if( !empty( $EpisodeData['block'] ) )
|
645 |
$block = 'yes';
|
646 |
+
if( !empty( $EpisodeData['cc'] ) )
|
647 |
+
$cc = 'yes';
|
648 |
|
649 |
if( $custom_enclosure ) // We need to add the enclosure tag here...
|
650 |
{
|
651 |
+
if( empty($EpisodeData['size']) )
|
652 |
+
$EpisodeData['size'] = 5242880; // Use the dummy 5MB size since we don't have a size to quote
|
653 |
|
654 |
echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
|
655 |
trim($EpisodeData['url']),
|
674 |
}
|
675 |
}
|
676 |
|
677 |
+
if( empty($powerpress_feed['feed_maximizer_on']) && $keywords )
|
678 |
echo "\t\t<itunes:keywords>" . powerpress_format_itunes_value($keywords, 'keywords') . '</itunes:keywords>'.PHP_EOL;
|
679 |
|
680 |
$excerpt_no_html = '';
|
691 |
}
|
692 |
|
693 |
if( $subtitle )
|
694 |
+
echo "\t<itunes:subtitle>". powerpress_format_itunes_value($subtitle, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
|
695 |
else if( $excerpt_no_html )
|
696 |
+
echo "\t<itunes:subtitle>". powerpress_format_itunes_value($excerpt_no_html, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
|
697 |
else
|
698 |
+
echo "\t<itunes:subtitle>". powerpress_format_itunes_value($content_no_html, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
699 |
|
700 |
+
if( empty($powerpress_feed['feed_maximizer_on']) )
|
701 |
+
{
|
702 |
+
if( $summary )
|
703 |
+
echo "\t\t<itunes:summary>". powerpress_format_itunes_value($summary, 'summary') .'</itunes:summary>'.PHP_EOL;
|
704 |
+
else if( $powerpress_feed['enhance_itunes_summary'] )
|
705 |
+
echo "\t\t<itunes:summary>". powerpress_itunes_summary($post->post_content) .'</itunes:summary>'.PHP_EOL;
|
706 |
+
else if( $excerpt_no_html )
|
707 |
+
echo "\t\t<itunes:summary>". powerpress_format_itunes_value($excerpt_no_html, 'summary') .'</itunes:summary>'.PHP_EOL;
|
708 |
+
else
|
709 |
+
echo "\t\t<itunes:summary>". powerpress_format_itunes_value($content_no_html, 'summary') .'</itunes:summary>'.PHP_EOL;
|
710 |
+
|
711 |
+
if( $author )
|
712 |
+
echo "\t\t<itunes:author>" . esc_html($author) . '</itunes:author>'.PHP_EOL;
|
713 |
+
else
|
714 |
+
echo "\t\t<itunes:author>".'NO AUTHOR</itunes:author>'.PHP_EOL;
|
715 |
+
}
|
716 |
|
717 |
if( $explicit )
|
718 |
echo "\t\t<itunes:explicit>" . $explicit . '</itunes:explicit>'.PHP_EOL;
|
721 |
echo "\t\t<itunes:duration>" . ltrim($EpisodeData['duration'], '0:') . '</itunes:duration>'.PHP_EOL;
|
722 |
|
723 |
if( $block && $block == 'yes' )
|
724 |
+
echo "\t\t<itunes:block>yes</itunes:block>".PHP_EOL;
|
725 |
+
|
726 |
+
if( $cc && $cc == 'yes' )
|
727 |
+
echo "\t\t<itunes:isClosedCaptioned>yes</itunes:isClosedCaptioned>".PHP_EOL;
|
728 |
+
|
729 |
+
if( !empty($powerpress_feed['itunes_feature']) ) // We are using the itunes:order option to feature a specific episode.
|
730 |
+
{
|
731 |
+
// Skip inserting the order tag
|
732 |
+
}
|
733 |
+
else
|
734 |
+
{
|
735 |
+
if( isset( $EpisodeData['order'] ) && is_numeric($EpisodeData['order']) )
|
736 |
+
echo "\t\t<itunes:order>". $EpisodeData['order'] ."</itunes:order>".PHP_EOL;
|
737 |
+
}
|
738 |
|
739 |
// RawVoice RSS Tags
|
740 |
+
if( empty($powerpress_feed['feed_maximizer_on']) )
|
741 |
{
|
742 |
+
if( !defined('POWERPRESS_RAWVOICE_RSS') || POWERPRESS_RAWVOICE_RSS != false )
|
|
|
|
|
|
|
|
|
|
|
|
|
743 |
{
|
744 |
+
if( !empty($EpisodeData['ishd']) )
|
745 |
+
echo "\t\t<rawvoice:isHD>yes</rawvoice:isHD>".PHP_EOL;;
|
746 |
+
if( !empty($EpisodeData['image']) )
|
747 |
+
echo "\t\t<rawvoice:poster url=\"". $EpisodeData['image'] ."\" />".PHP_EOL;
|
748 |
+
if( !empty($EpisodeData['embed']) )
|
749 |
+
echo "\t\t<rawvoice:embed>". htmlspecialchars($EpisodeData['embed']) ."</rawvoice:embed>".PHP_EOL;
|
750 |
+
else if( !empty($powerpress_feed['podcast_embed_in_feed']) && function_exists('powerpress_generate_embed') )
|
751 |
+
{
|
752 |
+
$player = powerpressplayer_embedable($EpisodeData['url'], $EpisodeData);
|
753 |
+
$embed_content = '';
|
754 |
+
// TODO:
|
755 |
+
if( $player )
|
756 |
+
$embed_content = powerpress_generate_embed($player, $EpisodeData);
|
757 |
+
if( $embed_content )
|
758 |
+
echo "\t\t<rawvoice:embed>". htmlspecialchars( $embed_content ) ."</rawvoice:embed>".PHP_EOL;
|
759 |
+
}
|
760 |
+
|
761 |
+
if( !empty($EpisodeData['webm_src']) )
|
762 |
+
{
|
763 |
+
echo "\t\t<rawvoice:webm src=\"". $EpisodeData['webm_src'] ."\"";
|
764 |
+
if( $EpisodeData['webm_length'] )
|
765 |
+
echo " length=\"". $EpisodeData['webm_length'] ."\"";
|
766 |
+
echo " type=\"video/webm\" />".PHP_EOL;
|
767 |
+
}
|
768 |
|
769 |
+
$GeneralSettings = get_option('powerpress_general');
|
770 |
+
|
771 |
+
if( !empty($GeneralSettings) && !empty($GeneralSettings['metamarks']) )
|
772 |
+
{
|
773 |
+
require_once(POWERPRESS_ABSPATH .'/powerpressadmin-metamarks.php');
|
774 |
+
powerpress_metamarks_print_rss2($EpisodeData);
|
775 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
776 |
}
|
777 |
}
|
778 |
}
|
932 |
}
|
933 |
}
|
934 |
|
935 |
+
//$wp_query->get_posts(); // No longer needed as it duplicates the existing get posts query already performed
|
936 |
+
if( !empty($GeneralSettings['episode_box_feature_in_itunes']) || !empty($GeneralSettings['feature_in_itunes']) )
|
937 |
+
{
|
938 |
+
// Use the template for the always featured option
|
939 |
+
load_template( POWERPRESS_ABSPATH . '/feed-podcast.php' );
|
940 |
+
}
|
941 |
+
else
|
942 |
+
{
|
943 |
+
do_feed_rss2($for_comments);
|
944 |
+
}
|
945 |
+
|
946 |
}
|
947 |
|
948 |
function powerpress_template_redirect()
|
1186 |
$powerpress_feed['rss_language'] = $Feed['rss_language'];
|
1187 |
if( !empty($GeneralSettings['podcast_embed_in_feed']) )
|
1188 |
$powerpress_feed['podcast_embed_in_feed'] = true;
|
1189 |
+
if( !empty($Feed['maximize_feed']) )
|
1190 |
+
$powerpress_feed['maximize_feed'] = true;
|
1191 |
return;
|
1192 |
}
|
1193 |
|
1600 |
return 'application/x-shockwave-flash';
|
1601 |
case 'ogx':
|
1602 |
return 'application/ogg';
|
1603 |
+
|
1604 |
+
// Most recently added by Apple:
|
1605 |
+
case 'epub':
|
1606 |
+
return 'document/x-epub';
|
1607 |
+
|
1608 |
default: // Let it fall through
|
1609 |
}
|
1610 |
}
|
1926 |
unset($FeedSettings['itunes_new_feed_url']);
|
1927 |
unset($FeedSettings['apply_to']);
|
1928 |
unset($FeedSettings['feed_redirect_url']);
|
1929 |
+
unset($FeedSettings['itunes_complete']);
|
1930 |
+
unset($FeedSettings['itunes_block']);
|
1931 |
+
unset($FeedSettings['maximize_feed']);
|
1932 |
|
1933 |
// If the setting is not already set, set the enhnaced itunes setting if they have PHP5+ on by default
|
1934 |
if( !isset($FeedSettings['enhance_itunes_summary']) )
|
powerpressadmin-basic.php
CHANGED
@@ -85,6 +85,18 @@ jQuery(document).ready(function($) {
|
|
85 |
}
|
86 |
}
|
87 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
} );
|
89 |
//-->
|
90 |
</script>
|
@@ -200,7 +212,7 @@ jQuery(document).ready(function($) {
|
|
200 |
</div>
|
201 |
<div>
|
202 |
<input type="checkbox" name="General[metamarks]" value="1" <?php echo ( !empty($General['metamarks']) ?' checked':''); ?> />
|
203 |
-
<strong><?php echo __('Meta Marks', 'powerpress'); ?></strong
|
204 |
<?php echo __('Add additional meta information to your media for syndication.', 'powerpress'); ?>
|
205 |
<?php echo powerpress_help_link('http://www.powerpresspodcast.com/metamarks/'); ?>
|
206 |
<span style="font-size: 85%;">(<?php echo __('feature will appear in episode entry box', 'powerpress'); ?>)</span>
|
@@ -252,6 +264,13 @@ function powerpressadmin_edit_entry_options($General)
|
|
252 |
$General['auto_enclose'] = 0;
|
253 |
if( !isset($General['episode_box_player_size']) )
|
254 |
$General['episode_box_player_size'] = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
?>
|
256 |
<h3><?php echo __('Episode Entry Options', 'powerpress'); ?></h3>
|
257 |
|
@@ -295,12 +314,13 @@ function powerpressadmin_edit_entry_options($General)
|
|
295 |
|
296 |
</div>
|
297 |
|
298 |
-
<p style="margin-top: 15px;"><input id="episode_box_cover_image" class="episode_box_option" name="General[episode_box_cover_image]" type="checkbox" value="1"<?php if( !empty($General['episode_box_cover_image']) ) echo ' checked'; ?> /> <?php echo __('
|
299 |
(<?php echo __('Specify URL to poster artwork specific to each episode', 'powerpress'); ?>)</p>
|
300 |
|
301 |
-
<p style="margin-top: 15px;"><input id="episode_box_player_size" class="episode_box_option" name="General[episode_box_player_size]" type="checkbox" value="1"<?php if( !empty($General['episode_box_player_size']) ) echo ' checked'; ?> /> <?php echo __('Player Width and Height', 'powerpress'); ?>
|
302 |
(<?php echo __('Customize player width and height on a per episode basis', 'powerpress'); ?>)</p>
|
303 |
|
|
|
304 |
<p style="margin-top: 15px;"><input id="episode_box_keywords" class="episode_box_option" name="General[episode_box_keywords]" type="checkbox" value="1"<?php if( !empty($General['episode_box_keywords']) ) echo ' checked'; ?> /> <?php echo __('iTunes Keywords Field', 'powerpress'); ?>
|
305 |
(<?php echo __('Leave unchecked to use your blog post tags', 'powerpress'); ?>)</p>
|
306 |
<p style="margin-top: 15px;"><input id="episode_box_subtitle" class="episode_box_option" name="General[episode_box_subtitle]" type="checkbox" value="1"<?php if( !empty($General['episode_box_subtitle']) ) echo ' checked'; ?> /> <?php echo __('iTunes Subtitle Field', 'powerpress'); ?>
|
@@ -311,11 +331,34 @@ function powerpressadmin_edit_entry_options($General)
|
|
311 |
(<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
|
312 |
<p style="margin-top: 15px;"><input id="episode_box_explicit" class="episode_box_option" name="General[episode_box_explicit]" type="checkbox" value="1"<?php if( !empty($General['episode_box_explicit']) ) echo ' checked'; ?> /> <?php echo __('iTunes Explicit Field', 'powerpress'); ?>
|
313 |
(<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
314 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
<em><?php echo __('NOTE: An invalid entry into any of the iTunes fields may cause problems with your iTunes listing. It is highly recommended that you validate your feed using feedvalidator.org everytime you modify any of the iTunes fields listed above.', 'powerpress'); ?></em><br />
|
316 |
-
<em><strong><?php echo __('USE THE ITUNES FIELDS ABOVE AT YOUR OWN RISK.', 'powerpress'); ?></strong></em>
|
317 |
</div>
|
318 |
-
|
319 |
|
320 |
</td>
|
321 |
</tr>
|
@@ -905,6 +948,9 @@ function powerpressadmin_appearance($General=false)
|
|
905 |
<p>
|
906 |
<?php echo sprintf(__('Please visit the %s page for additional options.', 'powerpress'), '<a href="http://help.blubrry.com/blubrry-powerpress/shortcode/" target="_blank">'. __('PowerPress Shortcode', 'powerpress') .'</a>' ); ?>
|
907 |
</p>
|
|
|
|
|
|
|
908 |
</td>
|
909 |
</tr>
|
910 |
|
@@ -939,7 +985,7 @@ function powerpressadmin_appearance($General=false)
|
|
939 |
<p style="margin-left: 35px;"><input type="checkbox" id="display_download_size" name="PlayerSettings[display_download_size]" value="1" <?php if( $General['podcast_link'] == 2 || $General['podcast_link'] == 3 ) echo 'checked'; ?> onclick="if( !this.checked ) { jQuery('#display_download_duration').removeAttr('checked'); }" /> <?php echo __('Include file size', 'powerpress'); ?>
|
940 |
<input type="checkbox" style="margin-left: 30px;" id="display_download_duration" name="PlayerSettings[display_download_duration]" value="1" <?php if( $General['podcast_link'] == 3 ) echo 'checked'; ?> onclick="if( this.checked ) { jQuery('#display_download_size').attr('checked','checked'); }" /> <?php echo __('Include file size and duration', 'powerpress'); ?></p>
|
941 |
|
942 |
-
<p><label><input type="checkbox" name="General[podcast_embed]" value="1" <?php if( !empty($General['podcast_embed']) ) echo 'checked '; ?>/> <?php echo __('Display Player Embed Link', 'powerpress'); ?>
|
943 |
<p style="margin-left: 35px;">
|
944 |
<input type="checkbox" name="General[podcast_embed_in_feed]" value="1" <?php if( !empty($General['podcast_embed_in_feed']) ) echo 'checked'; ?> /> <?php echo __('Include embed in feeds', 'powerpress'); ?>
|
945 |
</p>
|
@@ -1060,7 +1106,7 @@ function powerpressadmin_edit_tv($FeedSettings = false, $feed_slug='podcast', $c
|
|
1060 |
<table class="form-table">
|
1061 |
<tr valign="top">
|
1062 |
<th scope="row">
|
1063 |
-
<?php echo __('Parental Rating', 'powerpress'); ?>
|
1064 |
<td>
|
1065 |
<p><?php echo sprintf(__('A parental rating is used to display your content on %s applications available on Internet connected TV\'s. The TV Parental Rating applies to both audio and video media.', 'powerpress'), '<strong><a href="http://www.blubrry.com/roku_blubrry/" target="_blank">Blubrry</a></strong>'); ?></p>
|
1066 |
<?php
|
85 |
}
|
86 |
}
|
87 |
} );
|
88 |
+
|
89 |
+
jQuery('#episode_box_feature_in_itunes').change( function() {
|
90 |
+
var objectChecked = jQuery('#episode_box_feature_in_itunes').attr('checked');
|
91 |
+
if(typeof jQuery.prop === 'function') {
|
92 |
+
objectChecked = jQuery('#episode_box_feature_in_itunes').prop('checked');
|
93 |
+
}
|
94 |
+
if( objectChecked ) {
|
95 |
+
$("#episode_box_order").attr("disabled", true);
|
96 |
+
} else {
|
97 |
+
$("#episode_box_order").removeAttr("disabled");
|
98 |
+
}
|
99 |
+
});
|
100 |
} );
|
101 |
//-->
|
102 |
</script>
|
212 |
</div>
|
213 |
<div>
|
214 |
<input type="checkbox" name="General[metamarks]" value="1" <?php echo ( !empty($General['metamarks']) ?' checked':''); ?> />
|
215 |
+
<strong><?php echo __('Meta Marks', 'powerpress'); ?></strong> -
|
216 |
<?php echo __('Add additional meta information to your media for syndication.', 'powerpress'); ?>
|
217 |
<?php echo powerpress_help_link('http://www.powerpresspodcast.com/metamarks/'); ?>
|
218 |
<span style="font-size: 85%;">(<?php echo __('feature will appear in episode entry box', 'powerpress'); ?>)</span>
|
264 |
$General['auto_enclose'] = 0;
|
265 |
if( !isset($General['episode_box_player_size']) )
|
266 |
$General['episode_box_player_size'] = 0;
|
267 |
+
if( !isset($General['episode_box_closed_captioned']) )
|
268 |
+
$General['episode_box_closed_captioned'] = 0;
|
269 |
+
if( !isset($General['episode_box_order']) )
|
270 |
+
$General['episode_box_order'] = 0;
|
271 |
+
if( !isset($General['episode_box_feature_in_itunes']) )
|
272 |
+
$General['episode_box_feature_in_itunes'] = 0;
|
273 |
+
|
274 |
?>
|
275 |
<h3><?php echo __('Episode Entry Options', 'powerpress'); ?></h3>
|
276 |
|
314 |
|
315 |
</div>
|
316 |
|
317 |
+
<p style="margin-top: 15px;"><input id="episode_box_cover_image" class="episode_box_option" name="General[episode_box_cover_image]" type="checkbox" value="1"<?php if( !empty($General['episode_box_cover_image']) ) echo ' checked'; ?> /> <?php echo __('Poster Image', 'powerpress'); ?>
|
318 |
(<?php echo __('Specify URL to poster artwork specific to each episode', 'powerpress'); ?>)</p>
|
319 |
|
320 |
+
<p style="margin-top: 15px;"><input id="episode_box_player_size" class="episode_box_option" name="General[episode_box_player_size]" type="checkbox" value="1"<?php if( !empty($General['episode_box_player_size']) ) echo ' checked'; ?> /> <?php echo __('Player Width and Height', 'powerpress'); ?>
|
321 |
(<?php echo __('Customize player width and height on a per episode basis', 'powerpress'); ?>)</p>
|
322 |
|
323 |
+
<em><strong><?php echo __('USE THE ITUNES FIELDS BELOW AT YOUR OWN RISK.', 'powerpress'); ?></strong></em>
|
324 |
<p style="margin-top: 15px;"><input id="episode_box_keywords" class="episode_box_option" name="General[episode_box_keywords]" type="checkbox" value="1"<?php if( !empty($General['episode_box_keywords']) ) echo ' checked'; ?> /> <?php echo __('iTunes Keywords Field', 'powerpress'); ?>
|
325 |
(<?php echo __('Leave unchecked to use your blog post tags', 'powerpress'); ?>)</p>
|
326 |
<p style="margin-top: 15px;"><input id="episode_box_subtitle" class="episode_box_option" name="General[episode_box_subtitle]" type="checkbox" value="1"<?php if( !empty($General['episode_box_subtitle']) ) echo ' checked'; ?> /> <?php echo __('iTunes Subtitle Field', 'powerpress'); ?>
|
331 |
(<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
|
332 |
<p style="margin-top: 15px;"><input id="episode_box_explicit" class="episode_box_option" name="General[episode_box_explicit]" type="checkbox" value="1"<?php if( !empty($General['episode_box_explicit']) ) echo ' checked'; ?> /> <?php echo __('iTunes Explicit Field', 'powerpress'); ?>
|
333 |
(<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
|
334 |
+
|
335 |
+
<p style="margin-top: 15px;"><input id="episode_box_closed_captioned" class="episode_box_option" name="General[episode_box_closed_captioned]" type="checkbox" value="1"<?php if( !empty($General['episode_box_closed_captioned']) ) echo ' checked'; ?> /> <?php echo __('iTunes Closed Captioned', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
|
336 |
+
(<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
|
337 |
+
|
338 |
+
<p style="margin-top: 15px;"><input id="episode_box_order" class="episode_box_option" name="General[episode_box_order]" type="checkbox" value="1"<?php if( !empty($General['episode_box_order']) ) echo ' checked'; ?> <?php if( !empty($General['episode_box_feature_in_itunes']) ) echo ' disabled'; ?> /> <?php echo __('iTunes Order', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
|
339 |
+
(<?php echo __('Override the default ordering of episodes on the iTunes podcast directory', 'powerpress'); ?>)</p>
|
340 |
+
<em><strong><?php echo __('If conflicting values are present the iTunes directory will use the default ordering.', 'powerpress'); ?></strong></em><br />
|
341 |
+
<em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
|
342 |
|
343 |
+
<p style="margin-top: 15px;"><input id="episode_box_feature_in_itunes" class="episode_box_option" name="General[episode_box_feature_in_itunes]" type="checkbox" value="1"<?php if( !empty($General['episode_box_feature_in_itunes']) ) echo ' checked'; ?> /> <?php echo __('Feature Episode in iTunes', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
|
344 |
+
(<?php echo __('Display selected episode at top of your iTunes Directory listing', 'powerpress'); ?>)</p>
|
345 |
+
<em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
|
346 |
+
<em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
|
347 |
+
|
348 |
+
<?php if( defined('POWERPRESS_NOT_SUPPORTED') ) { ?>
|
349 |
+
<fieldset style="border: 1px dashed #333333; margin: 10px 0 10px -20px;">
|
350 |
+
<legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php echo __('Features Not Supported by PowerPress', 'powerpress'); ?></legend>
|
351 |
+
<p style="margin: 5px 10px 0 20px;">
|
352 |
+
<strong style="color: #CC0000;"><?php echo __('USE THE FOLLOWING SETTINGS AT YOUR OWN RISK.', 'powerpress'); ?></strong>
|
353 |
+
</p>
|
354 |
+
<p style="margin: 10px 10px 10px 20px;"><input id="episode_box_block" class="episode_box_option" name="General[episode_box_block]" type="checkbox" value="1"<?php if( !empty($General['episode_box_block']) ) echo ' checked'; ?> /> <?php echo __('iTunes Block', 'powerpress'); ?>
|
355 |
+
(<?php echo __('Prevent episodes from appearing in iTunes. Feature only applies to iTunes, episodes will still appear in other directories and applications', 'powerpress'); ?>)</p>
|
356 |
+
|
357 |
+
|
358 |
+
</fieldset>
|
359 |
+
<?php } ?>
|
360 |
<em><?php echo __('NOTE: An invalid entry into any of the iTunes fields may cause problems with your iTunes listing. It is highly recommended that you validate your feed using feedvalidator.org everytime you modify any of the iTunes fields listed above.', 'powerpress'); ?></em><br />
|
|
|
361 |
</div>
|
|
|
362 |
|
363 |
</td>
|
364 |
</tr>
|
948 |
<p>
|
949 |
<?php echo sprintf(__('Please visit the %s page for additional options.', 'powerpress'), '<a href="http://help.blubrry.com/blubrry-powerpress/shortcode/" target="_blank">'. __('PowerPress Shortcode', 'powerpress') .'</a>' ); ?>
|
950 |
</p>
|
951 |
+
<p>
|
952 |
+
<?php echo __('Note: When specifying a URL to media in the powerpress shortcode, only the player is included. The Media Links will <u>NOT</u> be included since there is not enough meta information to display them.', 'powerpress'); ?>
|
953 |
+
</p>
|
954 |
</td>
|
955 |
</tr>
|
956 |
|
985 |
<p style="margin-left: 35px;"><input type="checkbox" id="display_download_size" name="PlayerSettings[display_download_size]" value="1" <?php if( $General['podcast_link'] == 2 || $General['podcast_link'] == 3 ) echo 'checked'; ?> onclick="if( !this.checked ) { jQuery('#display_download_duration').removeAttr('checked'); }" /> <?php echo __('Include file size', 'powerpress'); ?>
|
986 |
<input type="checkbox" style="margin-left: 30px;" id="display_download_duration" name="PlayerSettings[display_download_duration]" value="1" <?php if( $General['podcast_link'] == 3 ) echo 'checked'; ?> onclick="if( this.checked ) { jQuery('#display_download_size').attr('checked','checked'); }" /> <?php echo __('Include file size and duration', 'powerpress'); ?></p>
|
987 |
|
988 |
+
<p><label><input type="checkbox" name="General[podcast_embed]" value="1" <?php if( !empty($General['podcast_embed']) ) echo 'checked '; ?>/> <?php echo __('Display Player Embed Link', 'powerpress'); ?> </label></p>
|
989 |
<p style="margin-left: 35px;">
|
990 |
<input type="checkbox" name="General[podcast_embed_in_feed]" value="1" <?php if( !empty($General['podcast_embed_in_feed']) ) echo 'checked'; ?> /> <?php echo __('Include embed in feeds', 'powerpress'); ?>
|
991 |
</p>
|
1106 |
<table class="form-table">
|
1107 |
<tr valign="top">
|
1108 |
<th scope="row">
|
1109 |
+
<?php echo __('Parental Rating', 'powerpress'); ?> </th>
|
1110 |
<td>
|
1111 |
<p><?php echo sprintf(__('A parental rating is used to display your content on %s applications available on Internet connected TV\'s. The TV Parental Rating applies to both audio and video media.', 'powerpress'), '<strong><a href="http://www.blubrry.com/roku_blubrry/" target="_blank">Blubrry</a></strong>'); ?></p>
|
1112 |
<?php
|
powerpressadmin-dashboard.php
CHANGED
@@ -84,6 +84,23 @@ function powerpress_dashboard_head()
|
|
84 |
margin-top: 5px;
|
85 |
}
|
86 |
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
<?php
|
88 |
}
|
89 |
|
@@ -155,6 +172,27 @@ function powerpress_dashboard_news_content()
|
|
155 |
powerpressadmin_community_news();
|
156 |
}
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
|
159 |
function powerpress_feed_text_limit( $text, $limit, $finish = '…') {
|
160 |
if( strlen( $text ) > $limit ) {
|
@@ -182,15 +220,31 @@ function powerpress_dashboard_setup()
|
|
182 |
|
183 |
if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
|
184 |
$StatsDashboard = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
|
|
|
|
|
|
|
|
194 |
|
195 |
$user_options = get_user_option('powerpress_user');
|
196 |
if( empty($user_options) || empty($user_options['dashboard_installed']) || $user_options['dashboard_installed'] < 2 )
|
@@ -199,6 +253,8 @@ function powerpress_dashboard_setup()
|
|
199 |
$user_options = array();
|
200 |
$user = wp_get_current_user();
|
201 |
|
|
|
|
|
202 |
// First time we've seen this setting, so must be first time we've added the widgets, lets stack them at the top for convenience.
|
203 |
powerpressadmin_add_dashboard_widgets($user->ID);
|
204 |
$user_options['dashboard_installed'] = 2; // version of PowerPress
|
@@ -210,6 +266,25 @@ function powerpress_dashboard_setup()
|
|
210 |
}
|
211 |
}
|
212 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
function powerpressadmin_add_dashboard_widgets( $check_user_id = false)
|
214 |
{
|
215 |
// Only re-order the powerpress widgets if they aren't already on the dashboard:
|
@@ -246,6 +321,15 @@ function powerpressadmin_add_dashboard_widgets( $check_user_id = false)
|
|
246 |
$dashboard_current = $wp_meta_boxes['dashboard']['normal']['core'];
|
247 |
|
248 |
$dashboard_powerpress = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
if( isset( $dashboard_current['powerpress_dashboard_news'] ) )
|
250 |
{
|
251 |
$dashboard_powerpress['powerpress_dashboard_news'] = $dashboard_current['powerpress_dashboard_news'];
|
@@ -267,4 +351,19 @@ function powerpressadmin_add_dashboard_widgets( $check_user_id = false)
|
|
267 |
add_action('admin_head-index.php', 'powerpress_dashboard_head');
|
268 |
add_action('wp_dashboard_setup', 'powerpress_dashboard_setup');
|
269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
?>
|
84 |
margin-top: 5px;
|
85 |
}
|
86 |
</style>
|
87 |
+
<script type="text/javascript"><!--
|
88 |
+
jQuery(document).ready(function($) {
|
89 |
+
jQuery('.powerpress-dashboard-notice').click( function(e) {
|
90 |
+
e.preventDefault();
|
91 |
+
var dash_id = jQuery(this).parents('.postbox').attr('id');
|
92 |
+
jQuery( '#' + dash_id + '-hide' ).prop('checked', false).triggerHandler('click');
|
93 |
+
|
94 |
+
jQuery.ajax( {
|
95 |
+
type: 'POST',
|
96 |
+
url: '<?php echo admin_url(); ?>admin-ajax.php',
|
97 |
+
data: { action: 'powerpress_dashboard_dismiss', dismiss_dash_id : dash_id },
|
98 |
+
success: function(response) {
|
99 |
+
}
|
100 |
+
});
|
101 |
+
});
|
102 |
+
});
|
103 |
+
// --></script>
|
104 |
<?php
|
105 |
}
|
106 |
|
172 |
powerpressadmin_community_news();
|
173 |
}
|
174 |
|
175 |
+
function powerpress_dashboard_notice_1_content()
|
176 |
+
{
|
177 |
+
$DismissedNotices = get_option('powerpress_dismissed_notices');
|
178 |
+
|
179 |
+
if( !empty($DismissedNotices[1]) )
|
180 |
+
return; // Lets not do anything to the dashboard for PowerPress Notice
|
181 |
+
|
182 |
+
$message = '<p>'. __('Apple iTunes podcast specifications for show artwork have changed! Your iTunes image should now be 1400 x 1400 in jpg format.', 'powerpress') .'</p>';
|
183 |
+
$message .= '<p><a href="http://www.powerpresspodcast.com/2012/05/10/itunes-podcasting-specifications-changed-may-2012-what-that-means-for-podcasting/" target="_blank">'. __('Learn more about iTunes podcasting changes', 'powerpress') .'</a></p>';
|
184 |
+
|
185 |
+
powerpress_dashboard_notice_message(1, $message );
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
function powerpress_dashboard_notice_message($notice_id, $message)
|
190 |
+
{
|
191 |
+
echo $message;
|
192 |
+
// Add link to remove this notice.
|
193 |
+
echo '<p><a href="#" id="powerpress_dashboard_notice_'. $notice_id .'_dismiss" class="powerpress-dashboard-notice">'. __('Dismiss', 'powerpress') .'</a></p>';
|
194 |
+
}
|
195 |
+
|
196 |
|
197 |
function powerpress_feed_text_limit( $text, $limit, $finish = '…') {
|
198 |
if( strlen( $text ) > $limit ) {
|
220 |
|
221 |
if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
|
222 |
$StatsDashboard = false;
|
223 |
+
|
224 |
+
// PowerPress Dashboard Notice 1:
|
225 |
+
$Notice1Dashboard = false;
|
226 |
+
if( $Settings['timestamp'] < mktime(0, 0, 0, 5, 15, 2012) )
|
227 |
+
{
|
228 |
+
$Notice1Dashboard = true;
|
229 |
+
// Now check if they dismissed the notice...
|
230 |
+
$DismissedNotices = get_option('powerpress_dismissed_notices');
|
231 |
+
if( !empty($DismissedNotices[1]) )
|
232 |
+
$Notice1Dashboard = false;
|
233 |
+
}
|
234 |
+
//$Notice1Dashboard = false;// Temporary till release
|
235 |
|
236 |
+
if( $Notice1Dashboard )
|
237 |
+
{
|
238 |
+
$user = wp_get_current_user();
|
239 |
+
powerpressadmin_add_dashboard_notice_widget($user->ID, 1);
|
240 |
+
wp_add_dashboard_widget( 'powerpress_dashboard_notice_1', __( 'Blubrry PowerPress Notice - May 2012', 'powerpress'), 'powerpress_dashboard_notice_1_content' );
|
241 |
+
}
|
242 |
+
|
243 |
+
if( $NewsDashboard )
|
244 |
+
wp_add_dashboard_widget( 'powerpress_dashboard_news', __( 'Blubrry PowerPress & Community Podcast', 'powerpress'), 'powerpress_dashboard_news_content' );
|
245 |
+
|
246 |
+
if( $StatsDashboard )
|
247 |
+
wp_add_dashboard_widget( 'powerpress_dashboard_stats', __( 'Blubrry Podcast Statistics', 'powerpress'), 'powerpress_dashboard_stats_content' );
|
248 |
|
249 |
$user_options = get_user_option('powerpress_user');
|
250 |
if( empty($user_options) || empty($user_options['dashboard_installed']) || $user_options['dashboard_installed'] < 2 )
|
253 |
$user_options = array();
|
254 |
$user = wp_get_current_user();
|
255 |
|
256 |
+
|
257 |
+
|
258 |
// First time we've seen this setting, so must be first time we've added the widgets, lets stack them at the top for convenience.
|
259 |
powerpressadmin_add_dashboard_widgets($user->ID);
|
260 |
$user_options['dashboard_installed'] = 2; // version of PowerPress
|
266 |
}
|
267 |
}
|
268 |
|
269 |
+
function powerpressadmin_add_dashboard_notice_widget($user_id, $notice_id)
|
270 |
+
{
|
271 |
+
$user_options = get_user_option('meta-box-order_dashboard', $user_id);
|
272 |
+
if( $user_options )
|
273 |
+
{
|
274 |
+
$save = false;
|
275 |
+
if( !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['normal']) && !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['side']) && !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['column3']) && !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['column4']) )
|
276 |
+
{
|
277 |
+
$save = true;
|
278 |
+
$user_options['normal'] = 'powerpress_dashboard_notice_'.$notice_id.','.$user_options['normal'];
|
279 |
+
}
|
280 |
+
|
281 |
+
if( $save )
|
282 |
+
{
|
283 |
+
update_user_option($user_id, "meta-box-order_dashboard", $user_options, true);
|
284 |
+
}
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
function powerpressadmin_add_dashboard_widgets( $check_user_id = false)
|
289 |
{
|
290 |
// Only re-order the powerpress widgets if they aren't already on the dashboard:
|
321 |
$dashboard_current = $wp_meta_boxes['dashboard']['normal']['core'];
|
322 |
|
323 |
$dashboard_powerpress = array();
|
324 |
+
for( $i = 0; $i < 20; $i++ )
|
325 |
+
{
|
326 |
+
if( isset( $dashboard_current['powerpress_dashboard_notice_' . $i] ) )
|
327 |
+
{
|
328 |
+
$dashboard_powerpress['powerpress_dashboard_notice_' . $i] = $dashboard_current['powerpress_dashboard_notice_' . $i];
|
329 |
+
unset($dashboard_current['powerpress_dashboard_notice_' . $i]);
|
330 |
+
}
|
331 |
+
}
|
332 |
+
|
333 |
if( isset( $dashboard_current['powerpress_dashboard_news'] ) )
|
334 |
{
|
335 |
$dashboard_powerpress['powerpress_dashboard_news'] = $dashboard_current['powerpress_dashboard_news'];
|
351 |
add_action('admin_head-index.php', 'powerpress_dashboard_head');
|
352 |
add_action('wp_dashboard_setup', 'powerpress_dashboard_setup');
|
353 |
|
354 |
+
function powerpress_dashboard_dismiss() // Called by AJAX call
|
355 |
+
{
|
356 |
+
$dismiss_dash_id = $_POST['dismiss_dash_id'];
|
357 |
+
preg_match('/^powerpress_dashboard_notice_(.*)$/i', $dismiss_dash_id, $match );
|
358 |
+
if( empty($match[1]) )
|
359 |
+
exit;
|
360 |
+
$DismissedNotices = get_option('powerpress_dismissed_notices');
|
361 |
+
if( !is_array($DismissedNotices) )
|
362 |
+
$DismissedNotices = array();
|
363 |
+
$DismissedNotices[ $match[1] ] = 1;
|
364 |
+
update_option('powerpress_dismissed_notices', $DismissedNotices);
|
365 |
+
echo 'ok';
|
366 |
+
exit;
|
367 |
+
}
|
368 |
+
|
369 |
?>
|
powerpressadmin-editfeed.php
CHANGED
@@ -518,9 +518,31 @@ else
|
|
518 |
<?php if( !$feed_slug && !$cat_ID ) { ?>
|
519 |
<p style="margin-top: 5px; margin-bottomd: 0;"><?php echo __('Note: Setting above applies only to podcast channel feeds', 'powerpress'); ?></p>
|
520 |
<?php } ?>
|
|
|
521 |
</td>
|
522 |
</tr>
|
523 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
524 |
<tr valign="top">
|
525 |
<th scope="row">
|
526 |
<?php echo __('RSS2 Image', 'powerpress'); ?> <br />
|
@@ -530,7 +552,9 @@ else
|
|
530 |
<a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
|
531 |
|
532 |
<p><?php echo __('Place the URL to the RSS image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> http://mysite.com/images/rss.jpg</p>
|
533 |
-
|
|
|
|
|
534 |
|
535 |
<?php if( $SupportUploads ) { ?>
|
536 |
<p><input name="rss2_image_checkbox" type="checkbox" onchange="powerpress_show_field('rss_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?></p>
|
@@ -589,14 +613,14 @@ if( isset($Languages[ $rss_language ]) )
|
|
589 |
<div id="rawvoice_basic_options">
|
590 |
<table class="form-table">
|
591 |
<tr valign="top">
|
592 |
-
<th scope="row"><?php echo __('Location', 'powerpress');
|
593 |
<td>
|
594 |
<input type="text" style="width: 300px;" name="Feed[location]" value="<?php echo $FeedSettings['location']; ?>" maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?>)
|
595 |
<p><?php echo __('e.g. Cleveland, Ohio', 'powerpress'); ?></p>
|
596 |
</td>
|
597 |
</tr>
|
598 |
<tr valign="top">
|
599 |
-
<th scope="row"><?php echo __('Episode Frequency', 'powerpress');
|
600 |
<td>
|
601 |
<input type="text" style="width: 300px;" name="Feed[frequency]" value="<?php echo $FeedSettings['frequency']; ?>" maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?>)
|
602 |
<p><?php echo __('e.g. Weekly', 'powerpress'); ?></p>
|
@@ -1035,15 +1059,26 @@ while( list($value,$desc) = each($explicit) )
|
|
1035 |
<input type="text" id="itunes_image" name="Feed[itunes_image]" style="width: 60%;" value="<?php echo ( !empty($FeedSettings['itunes_image'])? $FeedSettings['itunes_image']:''); ?>" maxlength="250" />
|
1036 |
<a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
|
1037 |
|
1038 |
-
<p><?php echo __('
|
1039 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1040 |
|
1041 |
-
<p><?php echo __('Note:
|
1042 |
<?php echo sprintf( __('Please contact %s if you are having issues with your image changes not appearing in iTunes.', 'powerpress'), '<a href="http://www.apple.com/support/itunes/">'. __('iTunes Support', 'powerpress') .'</a>'); ?></p>
|
1043 |
<?php if( $SupportUploads ) { ?>
|
1044 |
-
|
|
|
|
|
|
|
1045 |
<div style="display:none" id="itunes_image_upload">
|
1046 |
-
<label for="itunes_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="itunes_image_file" />
|
|
|
1047 |
</div>
|
1048 |
<?php } ?>
|
1049 |
</td>
|
@@ -1141,9 +1176,88 @@ while( list($value,$desc) = each($explicit) )
|
|
1141 |
</div>
|
1142 |
</td>
|
1143 |
</tr>
|
|
|
1144 |
<!-- end advanced features -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1146 |
</table>
|
|
|
|
|
|
|
1147 |
<?php
|
1148 |
}
|
1149 |
|
518 |
<?php if( !$feed_slug && !$cat_ID ) { ?>
|
519 |
<p style="margin-top: 5px; margin-bottomd: 0;"><?php echo __('Note: Setting above applies only to podcast channel feeds', 'powerpress'); ?></p>
|
520 |
<?php } ?>
|
521 |
+
<p style="margin-top: 5px; margin-bottomd: 0;"><?php echo __('WARNING: Setting this value larger than 10 may cause feed timeout errors and delay podcast directory listings from updating.', 'powerpress'); ?></p>
|
522 |
</td>
|
523 |
</tr>
|
524 |
|
525 |
+
<?php
|
526 |
+
if( $feed_slug )
|
527 |
+
{
|
528 |
+
?>
|
529 |
+
<tr valign="top">
|
530 |
+
<th scope="row">
|
531 |
+
<?php echo __('Feed Episode Maximizer', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
|
532 |
+
</th>
|
533 |
+
<td>
|
534 |
+
<input type="checkbox" name="Feed[maximize_feed]" value="1" <?php if( !empty($FeedSettings['maximize_feed']) ) echo 'checked'; ?> />
|
535 |
+
<?php echo __('The latest 10 episodes in feed will remain as normal. The remaining 11+ older episodes in feed will have only the bare essential tags in order to maximize the number of episodes in the feed.', 'powerpress'); ?>
|
536 |
+
|
537 |
+
<p style="margin-top: 0px; margin-bottomd: 0;"><?php echo powerpressadmin_notice( __('This feature is experimental, use at your own risk.', 'powerpress') ); ?></p>
|
538 |
+
|
539 |
+
|
540 |
+
<p style="margin-top: 0px; margin-bottomd: 0;"><?php echo __('NOTE: This feature may allow you to enter a larger value for the "Show the most recent" setting above. You must make sure that your feed does not exceed 512KB (1/2 MB) in size.', 'powerpress'); ?></p>
|
541 |
+
</td>
|
542 |
+
</tr>
|
543 |
+
<?php
|
544 |
+
}
|
545 |
+
?>
|
546 |
<tr valign="top">
|
547 |
<th scope="row">
|
548 |
<?php echo __('RSS2 Image', 'powerpress'); ?> <br />
|
552 |
<a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
|
553 |
|
554 |
<p><?php echo __('Place the URL to the RSS image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> http://mysite.com/images/rss.jpg</p>
|
555 |
+
|
556 |
+
<p><?php echo __('RSS image should be at least 88 pixels wide and at least 31 pixels high in either .gif, .jpg and .png format.', 'powerpress'); ?></p>
|
557 |
+
<p><strong><?php echo __('A square image that is 300 x 300 pixel or larger in .jpg format is recommended.', 'powerpress'); ?></strong></p>
|
558 |
|
559 |
<?php if( $SupportUploads ) { ?>
|
560 |
<p><input name="rss2_image_checkbox" type="checkbox" onchange="powerpress_show_field('rss_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?></p>
|
613 |
<div id="rawvoice_basic_options">
|
614 |
<table class="form-table">
|
615 |
<tr valign="top">
|
616 |
+
<th scope="row"><?php echo __('Location', 'powerpress'); ?></th>
|
617 |
<td>
|
618 |
<input type="text" style="width: 300px;" name="Feed[location]" value="<?php echo $FeedSettings['location']; ?>" maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?>)
|
619 |
<p><?php echo __('e.g. Cleveland, Ohio', 'powerpress'); ?></p>
|
620 |
</td>
|
621 |
</tr>
|
622 |
<tr valign="top">
|
623 |
+
<th scope="row"><?php echo __('Episode Frequency', 'powerpress'); ?></th>
|
624 |
<td>
|
625 |
<input type="text" style="width: 300px;" name="Feed[frequency]" value="<?php echo $FeedSettings['frequency']; ?>" maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?>)
|
626 |
<p><?php echo __('e.g. Weekly', 'powerpress'); ?></p>
|
1059 |
<input type="text" id="itunes_image" name="Feed[itunes_image]" style="width: 60%;" value="<?php echo ( !empty($FeedSettings['itunes_image'])? $FeedSettings['itunes_image']:''); ?>" maxlength="250" />
|
1060 |
<a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
|
1061 |
|
1062 |
+
<p><?php echo powerpressadmin_notice( __('iTunes image specifications changed in May, 2012', 'powerpress') ); ?></p>
|
1063 |
+
<p><?php echo __('iTunes image should be at least 1400 x 1400 pixels in .jpg or .png format using RGB color space.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?>: http://example.com/images/itunes.jpg
|
1064 |
+
</p>
|
1065 |
+
|
1066 |
+
<p><strong><?php echo __('A square image that is 1400 x 1400 pixels in .jpg format is recommended.', 'powerpress'); ?></strong></p>
|
1067 |
+
|
1068 |
+
<p>
|
1069 |
+
<?php echo __('This image is for your listing on the iTunes podcast directory and may also be used by other directories such as Zune and Blubrry. It is not the artwork that is displayed during episode playback. That artwork needs to be saved into the media file in the form of tags (ID3 tags for mp3) following the production of the media file.', 'powerpress'); ?>
|
1070 |
+
</p>
|
1071 |
|
1072 |
+
<p><?php echo __('Note: If you change the iTunes image without changing the file name it may take some time (days or even months) for iTunes to update the image in the iTunes Podcast Directory.', 'powerpress'); ?>
|
1073 |
<?php echo sprintf( __('Please contact %s if you are having issues with your image changes not appearing in iTunes.', 'powerpress'), '<a href="http://www.apple.com/support/itunes/">'. __('iTunes Support', 'powerpress') .'</a>'); ?></p>
|
1074 |
<?php if( $SupportUploads ) { ?>
|
1075 |
+
|
1076 |
+
<p><input name="itunes_image_checkbox" type="checkbox" onchange="powerpress_show_field('itunes_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?>
|
1077 |
+
<span style="font-size:85%;">(<?php echo __('Using this option should update your image on iTunes within 24 hours', 'powerpress'); ?>)</span>
|
1078 |
+
</p>
|
1079 |
<div style="display:none" id="itunes_image_upload">
|
1080 |
+
<label for="itunes_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="itunes_image_file" /><br />
|
1081 |
+
<div style="margin-left: 85px;"><input name="itunes_image_checkbox_as_rss" type="checkbox" value="1" /> <?php echo __('Also use as RSS image', 'powerpress'); ?></div>
|
1082 |
</div>
|
1083 |
<?php } ?>
|
1084 |
</td>
|
1176 |
</div>
|
1177 |
</td>
|
1178 |
</tr>
|
1179 |
+
</table>
|
1180 |
<!-- end advanced features -->
|
1181 |
+
<?php if( defined('POWERPRESS_NOT_SUPPORTED') ) { // start powerpress not supported features ?>
|
1182 |
+
<fieldset style="border: 1px dashed #333333;">
|
1183 |
+
<legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php echo __('Features Not Supported by PowerPress', 'powerpress'); ?></legend>
|
1184 |
+
|
1185 |
+
<div style="margin-left: 230px; margin-bottom: 10px;">
|
1186 |
+
<p>
|
1187 |
+
<strong style="color: #CC0000; font-weight: bold;"><?php echo __('USE THE FOLLOWING SETTINGS AT YOUR OWN RISK.', 'powerpress'); ?></strong>
|
1188 |
+
</p>
|
1189 |
+
<p style="margin-bottom: 0;">
|
1190 |
+
<?php echo __('Feeds affected', 'powerpress'); ?>:
|
1191 |
+
</p>
|
1192 |
+
<div style="margin-left: 20px;">
|
1193 |
+
<?php
|
1194 |
+
// $General, $feed_slug=false, $cat_ID=false
|
1195 |
+
|
1196 |
+
if( $feed_slug )
|
1197 |
+
{
|
1198 |
+
echo '<a href="';
|
1199 |
+
echo get_feed_link($feed_slug);
|
1200 |
+
echo '" target="_blank">';
|
1201 |
+
echo get_feed_link($feed_slug);
|
1202 |
+
echo '</a>';
|
1203 |
+
}
|
1204 |
+
else if( $cat_ID )
|
1205 |
+
{
|
1206 |
+
echo '<a href="';
|
1207 |
+
echo get_category_feed_link( $cat_ID );
|
1208 |
+
echo '" target="_blank">';
|
1209 |
+
echo get_category_feed_link( $cat_ID );
|
1210 |
+
echo '</a>';
|
1211 |
+
}
|
1212 |
+
else
|
1213 |
+
{
|
1214 |
+
echo '<a href="';
|
1215 |
+
echo get_feed_link('feed');
|
1216 |
+
echo '" target="_blank">';
|
1217 |
+
echo get_feed_link('feed');
|
1218 |
+
echo '</a>';
|
1219 |
+
|
1220 |
+
if( empty($General['custom_feeds']['podcast']) )
|
1221 |
+
{
|
1222 |
+
echo '<br /><a href="';
|
1223 |
+
echo get_feed_link('podcast');
|
1224 |
+
echo '" target="_blank">';
|
1225 |
+
echo get_feed_link('podcast');
|
1226 |
+
echo '</a>';
|
1227 |
+
}
|
1228 |
+
}
|
1229 |
+
|
1230 |
+
?>
|
1231 |
+
</div>
|
1232 |
+
|
1233 |
+
</div>
|
1234 |
+
<!-- start advanced features -->
|
1235 |
+
<div id="permanent_itunes_settings">
|
1236 |
+
<table class="form-table">
|
1237 |
+
|
1238 |
+
<tr valign="top">
|
1239 |
+
<th scope="row" >
|
1240 |
|
1241 |
+
<?php echo __('iTunes Block', 'powerpress'); ?></th>
|
1242 |
+
<td>
|
1243 |
+
<input type="checkbox" name="Feed[itunes_block]" value="1" <?php if( !empty($FeedSettings['itunes_block']) ) echo 'checked'; ?> />
|
1244 |
+
<?php echo __('Prevent the entire podcast from appearing in the iTunes Podcast directory.', 'powerpress'); ?>
|
1245 |
+
</td>
|
1246 |
+
</tr>
|
1247 |
+
|
1248 |
+
<tr valign="top">
|
1249 |
+
<th scope="row" >
|
1250 |
+
|
1251 |
+
<?php echo __('iTunes Complete', 'powerpress'); ?></th>
|
1252 |
+
<td>
|
1253 |
+
<input type="checkbox" name="Feed[itunes_complete]" value="1" <?php if( !empty($FeedSettings['itunes_complete']) ) echo 'checked'; ?> />
|
1254 |
+
<?php echo __('Indicate the completion of a podcast. iTunes will no longer update your listing in the iTunes Podcast directory.', 'powerpress'); ?>
|
1255 |
+
</td>
|
1256 |
+
</tr>
|
1257 |
</table>
|
1258 |
+
</div>
|
1259 |
+
</fieldset>
|
1260 |
+
<?php } // End PowerPress not supported features ?>
|
1261 |
<?php
|
1262 |
}
|
1263 |
|
powerpressadmin-metabox.php
CHANGED
@@ -21,6 +21,10 @@ function powerpress_meta_box($object, $box)
|
|
21 |
$iTunesSummary = '';
|
22 |
$iTunesAuthor = '';
|
23 |
$iTunesExplicit = '';
|
|
|
|
|
|
|
|
|
24 |
$NoPlayer = false;
|
25 |
$NoLinks = false;
|
26 |
$IsHD = false;
|
@@ -91,6 +95,14 @@ function powerpress_meta_box($object, $box)
|
|
91 |
$NoLinks = $ExtraData['no_links'];
|
92 |
if( isset($ExtraData['explicit']) )
|
93 |
$iTunesExplicit = $ExtraData['explicit'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
if( isset($ExtraData['image']) )
|
95 |
$CoverImage = $ExtraData['image'];
|
96 |
if( isset($ExtraData['ishd']) )
|
@@ -374,13 +386,82 @@ function powerpress_meta_box($object, $box)
|
|
374 |
<div class="powerpress_row">
|
375 |
<label for "Powerpress[<?php echo $FeedSlug; ?>][explicit]"><?php echo __('iTunes Explicit', 'powerpress'); ?></label>
|
376 |
<div class="powerpress_row_content">
|
377 |
-
<select id="powerpress_explicit_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][explicit]" style="width:
|
378 |
<?php
|
379 |
$explicit_array = array(''=>__('Use feed\'s explicit setting', 'powerpress'), 0=>__('no - display nothing', 'powerpress'), 1=>__('yes - explicit content', 'powerpress'), 2=>__('clean - no explicit content', 'powerpress') );
|
380 |
|
381 |
while( list($value,$desc) = each($explicit_array) )
|
382 |
echo "\t<option value=\"$value\"". ($iTunesExplicit==$value?' selected':''). ">$desc</option>\n";
|
383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
?>
|
385 |
</select>
|
386 |
</div>
|
21 |
$iTunesSummary = '';
|
22 |
$iTunesAuthor = '';
|
23 |
$iTunesExplicit = '';
|
24 |
+
$iTunesCC = false;
|
25 |
+
$iTunesOrder = false;
|
26 |
+
$FeedAlways = false;
|
27 |
+
$iTunesBlock = false;
|
28 |
$NoPlayer = false;
|
29 |
$NoLinks = false;
|
30 |
$IsHD = false;
|
95 |
$NoLinks = $ExtraData['no_links'];
|
96 |
if( isset($ExtraData['explicit']) )
|
97 |
$iTunesExplicit = $ExtraData['explicit'];
|
98 |
+
if( isset($ExtraData['cc']) )
|
99 |
+
$iTunesCC = $ExtraData['cc'];
|
100 |
+
if( isset($ExtraData['order']) )
|
101 |
+
$iTunesOrder = $ExtraData['order'];
|
102 |
+
if( isset($ExtraData['always']) )
|
103 |
+
$FeedAlways = $ExtraData['always'];
|
104 |
+
if( isset($ExtraData['block']) )
|
105 |
+
$iTunesBlock = $ExtraData['block'];
|
106 |
if( isset($ExtraData['image']) )
|
107 |
$CoverImage = $ExtraData['image'];
|
108 |
if( isset($ExtraData['ishd']) )
|
386 |
<div class="powerpress_row">
|
387 |
<label for "Powerpress[<?php echo $FeedSlug; ?>][explicit]"><?php echo __('iTunes Explicit', 'powerpress'); ?></label>
|
388 |
<div class="powerpress_row_content">
|
389 |
+
<select id="powerpress_explicit_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][explicit]" style="width: 220px;">
|
390 |
<?php
|
391 |
$explicit_array = array(''=>__('Use feed\'s explicit setting', 'powerpress'), 0=>__('no - display nothing', 'powerpress'), 1=>__('yes - explicit content', 'powerpress'), 2=>__('clean - no explicit content', 'powerpress') );
|
392 |
|
393 |
while( list($value,$desc) = each($explicit_array) )
|
394 |
echo "\t<option value=\"$value\"". ($iTunesExplicit==$value?' selected':''). ">$desc</option>\n";
|
395 |
|
396 |
+
?>
|
397 |
+
</select>
|
398 |
+
</div>
|
399 |
+
</div>
|
400 |
+
<?php
|
401 |
+
}
|
402 |
+
|
403 |
+
if( !empty($GeneralSettings['episode_box_closed_captioned']) || $iTunesCC )
|
404 |
+
{
|
405 |
+
?>
|
406 |
+
<div class="powerpress_row">
|
407 |
+
<label for "Powerpress[<?php echo $FeedSlug; ?>][cc]"><?php echo __('iTunes CC', 'powerpress'); ?></label>
|
408 |
+
<div class="powerpress_row_content">
|
409 |
+
<select id="powerpress_cc_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][cc]" style="width: 220px;">
|
410 |
+
<?php
|
411 |
+
$cc_array = array(''=>__('No Closed Captioning', 'powerpress'), 1=>__('Yes, Closed Captioned media', 'powerpress') );
|
412 |
+
|
413 |
+
while( list($value,$desc) = each($cc_array) )
|
414 |
+
echo "\t<option value=\"$value\"". ($iTunesCC==$value?' selected':''). ">$desc</option>\n";
|
415 |
+
unset($cc_array);
|
416 |
+
?>
|
417 |
+
</select>
|
418 |
+
</div>
|
419 |
+
</div>
|
420 |
+
<?php
|
421 |
+
}
|
422 |
+
|
423 |
+
if( !empty($GeneralSettings['episode_box_order']) || $iTunesOrder )
|
424 |
+
{
|
425 |
+
?>
|
426 |
+
<div class="powerpress_row">
|
427 |
+
<label for "Powerpress[<?php echo $FeedSlug; ?>][order]"><?php echo __('iTunes Order', 'powerpress'); ?></label>
|
428 |
+
<div class="powerpress_row_content">
|
429 |
+
<input id="powerpress_order_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][order]" value="<?php echo htmlspecialchars($iTunesOrder); ?>" style="width: 60px; font-size: 90%;" size="250" />
|
430 |
+
</div>
|
431 |
+
</div>
|
432 |
+
<?php
|
433 |
+
}
|
434 |
+
|
435 |
+
if( !empty($GeneralSettings['episode_box_feature_in_itunes']) )
|
436 |
+
{
|
437 |
+
$iTunesFeatured = get_option('powerpress_itunes_featured');
|
438 |
+
$FeaturedChecked = false;
|
439 |
+
if( !empty($object->ID) && !empty($iTunesFeatured[ $FeedSlug ]) && $iTunesFeatured[ $FeedSlug ] == $object->ID ) {
|
440 |
+
$FeaturedChecked = true; }
|
441 |
+
?>
|
442 |
+
<div class="powerpress_row">
|
443 |
+
<label for "PowerpressFeature[<?php echo $FeedSlug; ?>]"><?php echo __('Feature Episode', 'powerpress'); ?></label>
|
444 |
+
<div class="powerpress_row_content">
|
445 |
+
<input type="checkbox" id="powerpress_feature_<?php echo $FeedSlug; ?>" name="PowerpressFeature[<?php echo $FeedSlug; ?>]" value="1" <?php echo ($FeaturedChecked?'checked':''); ?> />
|
446 |
+
<?php echo __('Episode will appear at the top of your episode list in the iTunes directory.', 'powerpress'); ?>
|
447 |
+
</div>
|
448 |
+
</div>
|
449 |
+
<?php
|
450 |
+
}
|
451 |
+
|
452 |
+
if( !empty($GeneralSettings['episode_box_block']) || $iTunesBlock )
|
453 |
+
{
|
454 |
+
?>
|
455 |
+
<div class="powerpress_row">
|
456 |
+
<label for "Powerpress[<?php echo $FeedSlug; ?>][block]"><?php echo __('iTunes Block', 'powerpress'); ?></label>
|
457 |
+
<div class="powerpress_row_content">
|
458 |
+
<select id="powerpress_block_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][block]" style="width: 220px;">
|
459 |
+
<?php
|
460 |
+
$block_array = array(''=>__('No', 'powerpress'), 1=>__('Yes, Block episode from iTunes', 'powerpress') );
|
461 |
+
|
462 |
+
while( list($value,$desc) = each($block_array) )
|
463 |
+
echo "\t<option value=\"$value\"". ($iTunesBlock==$value?' selected':''). ">$desc</option>\n";
|
464 |
+
unset($block_array);
|
465 |
?>
|
466 |
</select>
|
467 |
</div>
|
powerpressadmin-metamarks.php
CHANGED
@@ -21,23 +21,41 @@
|
|
21 |
if( $Powerpress['url'] == '' )
|
22 |
continue; // go to the next media file
|
23 |
|
24 |
-
|
25 |
-
// Loop through, and convert position and duration to seconds, if specified with 00:00:00
|
26 |
-
while( list($index,$row) = each($MetaMarkData) )
|
27 |
{
|
28 |
-
$MetaMarkData
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
}
|
43 |
} // Loop through posted episodes...
|
21 |
if( $Powerpress['url'] == '' )
|
22 |
continue; // go to the next media file
|
23 |
|
24 |
+
if( !empty($MetaMarks[ $feed_slug ]) )
|
|
|
|
|
25 |
{
|
26 |
+
$MetaMarkData = $MetaMarks[ $feed_slug ];
|
27 |
+
// Loop through, and convert position and duration to seconds, if specified with 00:00:00
|
28 |
+
while( list($index,$row) = each($MetaMarkData) )
|
29 |
+
{
|
30 |
+
$MetaMarkData[ $index ]['position'] = powerpress_raw_duration( $row['position'] );
|
31 |
+
$MetaMarkData[ $index ]['duration'] = powerpress_raw_duration( $row['duration'] );
|
32 |
+
}
|
33 |
+
reset($MetaMarkData);
|
34 |
+
|
35 |
+
while( list($index,$row) = each($MetaMarkData) )
|
36 |
+
{
|
37 |
+
if( empty($MetaMarkData[ $index ]['type']) && empty($MetaMarkData[ $index ]['position']) && empty($MetaMarkData[ $index ]['duration']) && empty($MetaMarkData[ $index ]['link']) && empty($MetaMarkData[ $index ]['value']) )
|
38 |
+
{
|
39 |
+
unset($MetaMarkData[ $index ]);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
reset($MetaMarkData);
|
43 |
+
|
44 |
+
if( count($MetaMarkData) > 0 )
|
45 |
+
{
|
46 |
+
if( !empty($Powerpress['new_podcast']) )
|
47 |
+
{
|
48 |
+
add_post_meta($post_ID, $field, $MetaMarkData, true);
|
49 |
+
}
|
50 |
+
else
|
51 |
+
{
|
52 |
+
update_post_meta($post_ID, $field, $MetaMarkData);
|
53 |
+
}
|
54 |
+
}
|
55 |
+
else // Delete them from the database...
|
56 |
+
{
|
57 |
+
delete_post_meta($post_ID, $field );
|
58 |
+
}
|
59 |
}
|
60 |
}
|
61 |
} // Loop through posted episodes...
|
powerpressadmin-player-page.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
// PowerPress Player settings page
|
3 |
|
4 |
require_once( POWERPRESS_ABSPATH. '/powerpress-player.php'); // Include, if not included already
|
@@ -14,10 +14,39 @@ function powerpressplayer_flowplayer_info()
|
|
14 |
<?php echo __('Flow Player Classic was chosen as the default player in Blubrry PowerPress because if its backwards compatibility with older versions of Flash and support for both audio and video.', 'powerpress'); ?>
|
15 |
</p>
|
16 |
<?php
|
17 |
-
}
|
18 |
-
|
19 |
-
function
|
20 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
$General = powerpress_get_settings('powerpress_general');
|
22 |
|
23 |
if( empty($General['player']) )
|
@@ -27,10 +56,10 @@ function powerpress_admin_players($type='audio')
|
|
27 |
$General['video_player'] = '';
|
28 |
if( empty($General['audio_custom_play_button']) )
|
29 |
$General['audio_custom_play_button'] = '';
|
30 |
-
|
31 |
-
$select_player = false;
|
32 |
-
if( isset($_GET['sp']) )
|
33 |
-
$select_player = true;
|
34 |
|
35 |
if( $type == 'video' )
|
36 |
{
|
@@ -50,20 +79,22 @@ function powerpress_admin_players($type='audio')
|
|
50 |
$Audio['flashmp3-maxi'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Flash_Maxi_Player.mp3';
|
51 |
$Audio['simple_flash'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Simple_Flash_MP3_Player.mp3';
|
52 |
$Audio['audioplay'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3';
|
53 |
-
$Audio['html5audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/HTML5Audio.mp3';
|
54 |
|
55 |
|
56 |
$Video = array();
|
57 |
$Video['flare-player'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlarePlayer.mp4';
|
58 |
$Video['flow-player-classic'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlowPlayerClassic.flv';
|
59 |
$Video['html5video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/HTML5Video.mp4';
|
|
|
60 |
/*
|
61 |
<div><
|
62 |
object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="30" height="30">
|
63 |
<PARAM NAME=movie VALUE="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause"><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent><embed src="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause" quality=high wmode=transparent width="30" height="30" align="" TYPE="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object></div><!-- End of generated code -->
|
64 |
*/
|
65 |
|
66 |
-
|
|
|
67 |
?>
|
68 |
<link rel="stylesheet" href="<?php echo powerpress_get_root_url(); ?>3rdparty/colorpicker/css/colorpicker.css" type="text/css" />
|
69 |
<script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?>3rdparty/colorpicker/js/colorpicker.js"></script>
|
@@ -132,12 +163,12 @@ jQuery(document).ready(function($) {
|
|
132 |
//-->
|
133 |
</script>
|
134 |
|
135 |
-
|
136 |
-
<!-- special page styling goes here -->
|
137 |
-
<style type="text/css">
|
138 |
-
div.color_control { display: block; float:left; width: 100%; padding: 0; }
|
139 |
-
div.color_control input { display: inline; float: left; }
|
140 |
-
div.color_control div.color_picker { display: inline; float: left; margin-top: 3px; }
|
141 |
#player_preview { margin-bottom: 0px; height: 50px; margin-top: 8px;}
|
142 |
input#colorpicker-value-input {
|
143 |
width: 60px;
|
@@ -173,17 +204,17 @@ table.html5formats tr td {
|
|
173 |
}
|
174 |
table.html5formats tr > td:first-child {
|
175 |
border-left: 1px solid #000000;
|
176 |
-
}
|
177 |
-
</style>
|
178 |
-
<?php
|
179 |
-
|
180 |
-
// mainly 2 pages, first page selects a player, second configures the player, if there are optiosn to configure for that player. If the user is on the second page,
|
181 |
-
// a link should be provided to select a different player.
|
182 |
-
if( $select_player )
|
183 |
-
{
|
184 |
-
?>
|
185 |
-
<input type="hidden" name="action" value="powerpress-select-player" />
|
186 |
-
<h2><?php echo __('Blubrry PowerPress Player Options', 'powerpress'); ?></h2>
|
187 |
<p style="margin-bottom: 0;"><?php echo __('Select the media player you would like to use.', 'powerpress'); ?></p>
|
188 |
|
189 |
<?php
|
@@ -210,7 +241,7 @@ table.html5formats tr > td:first-child {
|
|
210 |
?>
|
211 |
</li>
|
212 |
|
213 |
-
<li><label><input type="radio" name="VideoPlayer[video_player]" id="player_html5video" value="html5video" <?php if( $General['video_player'] == 'html5video' ) echo 'checked'; ?> /> <?php echo __('HTML5 Video Player', 'powerpress'); ?>
|
214 |
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_html5video" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
215 |
</li>
|
216 |
<li style="margin-left: 30px; margin-bottom:16px;">
|
@@ -270,6 +301,27 @@ table.html5formats tr > td:first-child {
|
|
270 |
</p>
|
271 |
</li>
|
272 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
|
274 |
</ul>
|
275 |
|
@@ -280,24 +332,24 @@ table.html5formats tr > td:first-child {
|
|
280 |
}
|
281 |
else
|
282 |
{
|
283 |
-
?>
|
284 |
-
<table class="form-table">
|
285 |
-
<tr valign="top">
|
286 |
-
<th scope="row"> </th>
|
287 |
-
<td>
|
288 |
-
<ul>
|
289 |
<li><label><input type="radio" name="Player[player]" id="player_default" value="default" <?php if( $General['player'] == 'default' ) echo 'checked'; ?> />
|
290 |
<?php echo __('Flow Player Classic (default)', 'powerpress'); ?></label>
|
291 |
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_default" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
292 |
-
</li>
|
293 |
-
<li style="margin-left: 30px; margin-bottom:16px;">
|
294 |
-
<p>
|
295 |
<?php
|
296 |
-
echo powerpressplayer_build_flowplayerclassic( $Audio['default'] );
|
297 |
-
?>
|
298 |
</p>
|
299 |
-
<?php powerpressplayer_flowplayer_info(); ?>
|
300 |
-
</li>
|
301 |
|
302 |
<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>
|
303 |
<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>
|
@@ -322,21 +374,21 @@ table.html5formats tr > td:first-child {
|
|
322 |
<?php echo __('Flash Mp3 Maxi Player is a customizable open source audio (mp3 only) flash player. Features include pause/play/stop/file info buttons, scrollable position bar, volume control and color styling options.', 'powerpress'); ?>
|
323 |
</p>
|
324 |
</li>
|
325 |
-
|
326 |
<li><label><input type="radio" name="Player[player]" id="player_simple_flash" value="simple_flash" <?php if( $General['player'] == 'simple_flash' ) echo 'checked'; ?> /> <?php echo __('Simple Flash MP3 Player', 'powerpress'); ?></label>
|
327 |
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_simple_flash" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
328 |
-
</li>
|
329 |
-
<li style="margin-left: 30px; margin-bottom:16px;">
|
330 |
-
<p>
|
331 |
<?php
|
332 |
echo powerpressplayer_build_simpleflash($Audio['simple_flash']);
|
333 |
-
?>
|
334 |
-
</p>
|
335 |
-
<p>
|
336 |
-
<?php echo __('Simple Flash MP3 Player is a free and simple audio (mp3 only) flash player. Features include play/pause and stop buttons.', 'powerpress'); ?>
|
337 |
-
</p>
|
338 |
-
</li>
|
339 |
-
|
340 |
<li><label><input type="radio" name="Player[player]" id="player_audioplay" value="audioplay" <?php if( $General['player'] == 'audioplay' ) echo 'checked'; ?> /> <?php echo __('AudioPlay', 'powerpress'); ?></label>
|
341 |
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_audioplay" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
342 |
</li>
|
@@ -351,7 +403,7 @@ table.html5formats tr > td:first-child {
|
|
351 |
</p>
|
352 |
</li>
|
353 |
|
354 |
-
<li><label><input type="radio" name="Player[player]" id="player_html5audio" value="html5audio" <?php if( $General['player'] == 'html5audio' ) echo 'checked'; ?> /> <?php echo __('HTML5 Audio Player', 'powerpress'); ?>
|
355 |
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_html5audio" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
356 |
</li>
|
357 |
<li style="margin-left: 30px; margin-bottom:16px;">
|
@@ -409,35 +461,35 @@ table.html5formats tr > td:first-child {
|
|
409 |
<p>
|
410 |
<?php echo __('Flow Player Classic is used when HTML5 support is not available.', 'powerpress'); ?>
|
411 |
</p>
|
412 |
-
</li>
|
413 |
-
|
414 |
-
</ul>
|
415 |
-
|
416 |
-
</td>
|
417 |
-
</tr>
|
418 |
</table>
|
419 |
<?php
|
420 |
}
|
421 |
-
?>
|
422 |
-
<h4 style="margin-bottom: 0;"><?php echo __('Click \'Save Changes\' to activate and configure selected player.', 'powerpress'); ?></h4>
|
423 |
-
<?php
|
424 |
-
}
|
425 |
-
else
|
426 |
-
{
|
427 |
-
?>
|
428 |
<h2><?php echo __('Configure Player', 'powerpress'); ?></h2>
|
429 |
<?php if( $type == 'audio' ) { ?>
|
430 |
<p style="margin-bottom: 20px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_player.php&sp=1"); ?>"><?php echo __('Select a different audio player', 'powerpress'); ?></a></strong></p>
|
431 |
-
<?php } else { ?>
|
432 |
-
<p style="margin-bottom: 20px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_videoplayer.php&sp=1"); ?>"><?php echo __('Select a different video player', 'powerpress'); ?></a></strong></p>
|
433 |
<?php
|
434 |
}
|
435 |
-
|
436 |
// Start adding logic here to display options based on the player selected...
|
437 |
if( $type == 'audio' )
|
438 |
-
{
|
439 |
-
switch( $General['player'] )
|
440 |
-
{
|
441 |
case 'audio-player': {
|
442 |
|
443 |
$PlayerSettings = powerpress_get_settings('powerpress_audio-player');
|
@@ -624,23 +676,23 @@ function audio_player_defaults()
|
|
624 |
}
|
625 |
}
|
626 |
//-->
|
627 |
-
</script>
|
628 |
-
<input type="hidden" name="action" value="powerpress-audio-player" />
|
629 |
-
<?php echo __('Configure the 1 pixel out Audio Player', 'powerpress'); ?>
|
630 |
-
|
631 |
-
|
632 |
-
<table class="form-table">
|
633 |
-
|
634 |
-
<tr valign="top">
|
635 |
-
<th scope="row">
|
636 |
-
<?php echo __('Preview of Player', 'powerpress'); ?>
|
637 |
-
</th>
|
638 |
<td><div id="player_preview">
|
639 |
<?php
|
640 |
echo powerpressplayer_build_1pxoutplayer($Audio['audio-player'], array('nodiv'=>true) );
|
641 |
-
?>
|
642 |
-
</div>
|
643 |
-
</td>
|
644 |
</tr>
|
645 |
</table>
|
646 |
|
@@ -657,7 +709,7 @@ function audio_player_defaults()
|
|
657 |
|
658 |
<div id="tab_general" class="powerpress_tab">
|
659 |
<h3><?php echo __('General Settings', 'powerpress'); ?></h3>
|
660 |
-
<table class="form-table">
|
661 |
<tr valign="top">
|
662 |
<th scope="row">
|
663 |
<?php echo __('Page Background Color', 'powerpress'); ?>
|
@@ -670,17 +722,17 @@ function audio_player_defaults()
|
|
670 |
</div>
|
671 |
<small>(<?php echo __('leave blank for transparent', 'powerpress'); ?>)</small>
|
672 |
</td>
|
673 |
-
</tr> <tr valign="top">
|
674 |
-
<th scope="row">
|
675 |
-
<?php echo __('Player Background Color', 'powerpress'); ?>
|
676 |
-
</th>
|
677 |
-
<td>
|
678 |
-
<div class="color_control">
|
679 |
<input type="text" style="width: 100px;" id="bg" name="Player[bg]" class="color_field" value="<?php echo $PlayerSettings['bg']; ?>" maxlength="20" />
|
680 |
-
<img id="bg_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bg']; ?>;" class="color_preview" />
|
681 |
-
</div>
|
682 |
-
</td>
|
683 |
-
</tr>
|
684 |
<tr valign="top">
|
685 |
<th scope="row">
|
686 |
<?php echo __('Width (in pixels)', 'powerpress'); ?>
|
@@ -846,17 +898,17 @@ function audio_player_defaults()
|
|
846 |
</select> <?php echo __('initial volume level (default: 60)', 'powerpress'); ?>
|
847 |
</td>
|
848 |
</tr>
|
849 |
-
|
850 |
-
<tr valign="top">
|
851 |
-
<th scope="row">
|
852 |
-
<?php echo __('Volumn Background Color', 'powerpress'); ?>
|
853 |
-
</th>
|
854 |
-
<td>
|
855 |
-
<div class="color_control">
|
856 |
<input type="text" style="width: 100px;" id="leftbg" name="Player[leftbg]" class="color_field" value="<?php echo $PlayerSettings['leftbg']; ?>" maxlength="20" />
|
857 |
-
<img id="leftbg_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['leftbg']; ?>;" class="color_preview" />
|
858 |
-
</div>
|
859 |
-
</td>
|
860 |
</tr>
|
861 |
<tr valign="top">
|
862 |
<th scope="row">
|
@@ -942,11 +994,11 @@ function audio_player_defaults()
|
|
942 |
</td>
|
943 |
</tr>
|
944 |
|
945 |
-
</table>
|
946 |
</div> <!-- end tab -->
|
947 |
-
</div> <!-- end tab wrapper -->
|
948 |
|
949 |
-
<?php
|
950 |
}; break;
|
951 |
case 'simple_flash': { ?>
|
952 |
<table class="form-table">
|
@@ -972,13 +1024,13 @@ function audio_player_defaults()
|
|
972 |
</td>
|
973 |
</tr>
|
974 |
</table>
|
975 |
-
<?php }; break;
|
976 |
-
|
977 |
case 'flashmp3-maxi': {
|
978 |
-
//get settings for Flash MP3 Maxi player
|
979 |
$PlayerSettings = powerpress_get_settings('powerpress_flashmp3-maxi');
|
980 |
|
981 |
-
//set array values for dropdown lists
|
982 |
$autoload = array('always'=>'Always','never'=>'Never','autohide'=>'Auto Hide');
|
983 |
$volume = array('0'=>'0','25'=>'25','50'=>'50','75'=>'75','100'=>'100','125'=>'125','150'=>'150','175'=>'175','200'=>'200');
|
984 |
|
@@ -1100,23 +1152,23 @@ function audio_player_defaults()
|
|
1100 |
}
|
1101 |
}
|
1102 |
//-->
|
1103 |
-
</script>
|
1104 |
<input type="hidden" name="action" value="powerpress-flashmp3-maxi" />
|
1105 |
-
<p><?php echo __('Configure Flash Mp3 Maxi Player', 'powerpress'); ?></p>
|
1106 |
-
<table class="form-table">
|
1107 |
-
|
1108 |
-
<tr valign="top">
|
1109 |
-
<th scope="row">
|
1110 |
-
<?php echo __('Preview of Player', 'powerpress'); ?>
|
1111 |
-
</th>
|
1112 |
-
<td>
|
1113 |
<div id="player_preview"></div>
|
1114 |
|
1115 |
<script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?>3rdparty/maxi_player/generator.js"></script>
|
1116 |
<input type="hidden" id="gen_mp3" name="gen_mp3" value="<?php echo $Audio['flashmp3-maxi']; ?>" />
|
1117 |
|
1118 |
-
|
1119 |
-
</td>
|
1120 |
</tr>
|
1121 |
</table>
|
1122 |
|
@@ -1133,35 +1185,35 @@ function audio_player_defaults()
|
|
1133 |
|
1134 |
<div id="tab_general" class="powerpress_tab">
|
1135 |
<h3><?php echo __('General Settings', 'powerpress'); ?></h3>
|
1136 |
-
<table class="form-table">
|
1137 |
<tr valign="top">
|
1138 |
<td colspan="2">
|
1139 |
|
1140 |
<?php echo __('leave blank for default values', 'powerpress'); ?>
|
1141 |
</td>
|
1142 |
</tr>
|
1143 |
-
<tr valign="top">
|
1144 |
-
<th scope="row">
|
1145 |
-
<?php echo __('Player Gradient Color Top', 'powerpress'); ?>
|
1146 |
-
</th>
|
1147 |
-
<td>
|
1148 |
-
<div class="color_control">
|
1149 |
<input type="text" style="width: 100px;" id="bgcolor1" name="Player[bgcolor1]" class="color_field" value="<?php echo $PlayerSettings['bgcolor1']; ?>" maxlength="20" />
|
1150 |
-
<img id="bgcolor1_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor1']; ?>;" class="color_preview" />
|
1151 |
-
</div>
|
1152 |
-
</td>
|
1153 |
-
</tr>
|
1154 |
-
<tr valign="top">
|
1155 |
-
<th scope="row">
|
1156 |
-
<?php echo __('Player Gradient Color Bottom', 'powerpress'); ?>
|
1157 |
-
</th>
|
1158 |
-
<td>
|
1159 |
-
<div class="color_control">
|
1160 |
<input type="text" style="width: 100px;" id="bgcolor2" name="Player[bgcolor2]" class="color_field" value="<?php echo $PlayerSettings['bgcolor2']; ?>" maxlength="20" />
|
1161 |
-
<img id="bgcolor2_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor2']; ?>;" class="color_preview" />
|
1162 |
-
</div>
|
1163 |
-
</td>
|
1164 |
-
</tr>
|
1165 |
<tr valign="top">
|
1166 |
<th scope="row">
|
1167 |
<?php echo __('Background Color', 'powerpress'); ?>
|
@@ -1175,44 +1227,44 @@ function audio_player_defaults()
|
|
1175 |
<small><?php echo __('leave blank for transparent', 'powerpress'); ?></small>
|
1176 |
</td>
|
1177 |
</tr>
|
1178 |
-
<tr valign="top">
|
1179 |
-
<th scope="row">
|
1180 |
-
<?php echo __('Text Color', 'powerpress'); ?>
|
1181 |
-
</th>
|
1182 |
-
<td>
|
1183 |
-
<div class="color_control">
|
1184 |
<input type="text" style="width: 100px;" id="textcolor" name="Player[textcolor]" class="color_field" value="<?php echo $PlayerSettings['textcolor']; ?>" maxlength="20" />
|
1185 |
-
<img id="textcolor_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['textcolor']; ?>;" class="color_preview" />
|
1186 |
-
</div>
|
1187 |
-
</td>
|
1188 |
-
</tr>
|
1189 |
-
|
1190 |
-
<tr valign="top">
|
1191 |
-
<th scope="row">
|
1192 |
-
<?php echo __('Player Height (in pixels)', 'powerpress'); ?>
|
1193 |
-
</th>
|
1194 |
-
<td>
|
1195 |
-
<div class="color_control">
|
1196 |
-
<input type="text" style="width: 50px;" id="player_height" name="Player[height]" value="<?php echo $PlayerSettings['height']; ?>" maxlength="20" />
|
1197 |
-
</div>
|
1198 |
-
</td>
|
1199 |
-
</tr>
|
1200 |
-
<tr valign="top">
|
1201 |
-
<th scope="row">
|
1202 |
-
<?php echo __('Player Width (in pixels)', 'powerpress'); ?>
|
1203 |
-
</th>
|
1204 |
-
<td>
|
1205 |
-
<div class="color_control">
|
1206 |
-
<input type="text" style="width: 50px;" id="player_width" name="Player[width]" value="<?php echo $PlayerSettings['width']; ?>" maxlength="20" />
|
1207 |
-
</div>
|
1208 |
-
</td>
|
1209 |
</tr>
|
1210 |
</table>
|
1211 |
</div>
|
1212 |
|
1213 |
<div id="tab_buttons" class="powerpress_tab">
|
1214 |
<h3><?php echo __('Button Settings', 'powerpress'); ?></h3>
|
1215 |
-
<table class="form-table">
|
1216 |
<tr valign="top">
|
1217 |
<th scope="row">
|
1218 |
<?php echo __('Button Color', 'powerpress'); ?>
|
@@ -1245,42 +1297,42 @@ function audio_player_defaults()
|
|
1245 |
</div>
|
1246 |
</td>
|
1247 |
</tr>
|
1248 |
-
<tr valign="top">
|
1249 |
-
<th scope="row">
|
1250 |
-
<?php echo __('Show Stop Button', 'powerpress'); ?>
|
1251 |
-
</th>
|
1252 |
-
<td>
|
1253 |
-
<div class="color_control">
|
1254 |
<select style="width: 100px;" id="showstop" name="Player[showstop]">
|
1255 |
<?php
|
1256 |
$options = array( '1'=>__('Yes', 'powerpress'), '0'=>__('No', 'powerpress') );
|
1257 |
powerpress_print_options( $options, $PlayerSettings['showstop']);
|
1258 |
-
?>
|
1259 |
-
</select>
|
1260 |
-
</div>
|
1261 |
-
</td>
|
1262 |
-
</tr>
|
1263 |
-
<tr valign="top">
|
1264 |
-
<th scope="row">
|
1265 |
-
<?php echo __('Show Info', 'powerpress'); ?>
|
1266 |
-
</th>
|
1267 |
-
<td>
|
1268 |
-
<div class="color_control">
|
1269 |
<select style="width: 100px;" id="showinfo" name="Player[showinfo]">
|
1270 |
<?php
|
1271 |
$options = array( '1'=>__('Yes', 'powerpress'), '0'=>__('No', 'powerpress') );
|
1272 |
powerpress_print_options( $options, $PlayerSettings['showinfo']);
|
1273 |
-
?>
|
1274 |
-
</select>
|
1275 |
-
</div>
|
1276 |
-
</td>
|
1277 |
</tr>
|
1278 |
</table>
|
1279 |
</div>
|
1280 |
|
1281 |
<div id="tab_volume" class="powerpress_tab">
|
1282 |
<h3><?php echo __('Volume Settings', 'powerpress'); ?></h3>
|
1283 |
-
<table class="form-table">
|
1284 |
|
1285 |
<tr valign="top">
|
1286 |
<th scope="row">
|
@@ -1311,25 +1363,25 @@ function audio_player_defaults()
|
|
1311 |
</div>
|
1312 |
</td>
|
1313 |
</tr>
|
1314 |
-
<tr valign="top">
|
1315 |
-
<th scope="row">
|
1316 |
-
<?php echo __('Volume Height (in pixels)', 'powerpress'); ?>
|
1317 |
-
</th>
|
1318 |
-
<td>
|
1319 |
-
<div class="color_control">
|
1320 |
-
<input type="text" style="width: 50px;" id="volumeheight" name="Player[volumeheight]" value="<?php echo $PlayerSettings['volumeheight']; ?>" maxlength="20" />
|
1321 |
-
</div>
|
1322 |
-
</td>
|
1323 |
-
</tr>
|
1324 |
-
<tr valign="top">
|
1325 |
-
<th scope="row">
|
1326 |
-
<?php echo __('Volume Width (in pixels)', 'powerpress'); ?>
|
1327 |
-
</th>
|
1328 |
-
<td>
|
1329 |
-
<div class="color_control">
|
1330 |
-
<input type="text" style="width: 50px;" id="volumewidth" name="Player[volumewidth]" value="<?php echo $PlayerSettings['volumewidth']; ?>" maxlength="20" />
|
1331 |
-
</div>
|
1332 |
-
</td>
|
1333 |
</tr>
|
1334 |
|
1335 |
</table>
|
@@ -1338,7 +1390,7 @@ function audio_player_defaults()
|
|
1338 |
<div id="tab_slider" class="powerpress_tab">
|
1339 |
<h3><?php echo __('Slider Settings', 'powerpress'); ?></h3>
|
1340 |
<table class="form-table">
|
1341 |
-
|
1342 |
<tr valign="top">
|
1343 |
<th scope="row">
|
1344 |
<?php echo __('Show Slider', 'powerpress'); ?>
|
@@ -1435,7 +1487,7 @@ function audio_player_defaults()
|
|
1435 |
</div>
|
1436 |
</td>
|
1437 |
</tr>
|
1438 |
-
|
1439 |
</table>
|
1440 |
</div> <!-- end tab -->
|
1441 |
</div><!-- end tab container -->
|
@@ -1470,10 +1522,10 @@ function audio_player_defaults()
|
|
1470 |
|
1471 |
generator.updatePlayer();
|
1472 |
//-->
|
1473 |
-
</script>
|
1474 |
-
<?php
|
1475 |
-
}; break;
|
1476 |
-
|
1477 |
case 'audioplay': {
|
1478 |
$PlayerSettings = powerpress_get_settings('powerpress_audioplay');
|
1479 |
if( empty($PlayerSettings) ) {
|
@@ -1482,8 +1534,8 @@ function audio_player_defaults()
|
|
1482 |
'buttondir' => 'negative',
|
1483 |
'mode' => 'playpause'
|
1484 |
);
|
1485 |
-
}
|
1486 |
-
?>
|
1487 |
<input type="hidden" name="action" value="powerpress-audioplay" />
|
1488 |
<?php echo __('Configure the AudioPlay Player', 'powerpress'); ?><br clear="all" />
|
1489 |
|
@@ -1501,7 +1553,7 @@ function audio_player_defaults()
|
|
1501 |
?>
|
1502 |
</div>
|
1503 |
</td>
|
1504 |
-
</tr>
|
1505 |
</table>
|
1506 |
|
1507 |
<h2><?php echo __('General Settings', 'powerpress'); ?></h2>
|
@@ -1576,7 +1628,7 @@ function audio_player_defaults()
|
|
1576 |
</tr>
|
1577 |
|
1578 |
</table>
|
1579 |
-
<?php
|
1580 |
}; break;
|
1581 |
case 'html5audio': {
|
1582 |
$SupportUploads = powerpressadmin_support_uploads();
|
@@ -1619,28 +1671,28 @@ function audio_player_defaults()
|
|
1619 |
</table>
|
1620 |
|
1621 |
<?php
|
1622 |
-
}; break;
|
1623 |
-
|
1624 |
default: {
|
1625 |
|
1626 |
if( empty($General['player_width_audio']) )
|
1627 |
-
$General['player_width_audio'] = '';
|
1628 |
-
|
1629 |
-
?>
|
1630 |
-
<p><?php echo __('Configure Flow Player Classic', 'powerpress'); ?></p>
|
1631 |
-
<table class="form-table">
|
1632 |
-
<tr valign="top">
|
1633 |
-
<th scope="row">
|
1634 |
-
<?php echo __('Preview of Player', 'powerpress'); ?>
|
1635 |
-
</th>
|
1636 |
-
<td>
|
1637 |
-
<p>
|
1638 |
<?php
|
1639 |
-
echo powerpressplayer_build_flowplayerclassic( $Audio['default'] );
|
1640 |
-
?>
|
1641 |
-
</p>
|
1642 |
-
</td>
|
1643 |
-
</tr>
|
1644 |
</table>
|
1645 |
|
1646 |
<h2><?php echo __('General Settings', 'powerpress'); ?></h2>
|
@@ -1654,9 +1706,9 @@ function audio_player_defaults()
|
|
1654 |
<?php echo __('Width of Audio mp3 player (leave blank for 320 default)', 'powerpress'); ?>
|
1655 |
</td>
|
1656 |
</tr>
|
1657 |
-
</table>
|
1658 |
-
<?php
|
1659 |
-
} break;
|
1660 |
}
|
1661 |
}
|
1662 |
else // Video
|
@@ -1694,7 +1746,7 @@ function audio_player_defaults()
|
|
1694 |
<td>
|
1695 |
<p>
|
1696 |
<?php
|
1697 |
-
echo powerpressplayer_build_html5video( $Video['
|
1698 |
?>
|
1699 |
</p>
|
1700 |
</td>
|
@@ -1703,6 +1755,39 @@ function audio_player_defaults()
|
|
1703 |
|
1704 |
<?php
|
1705 |
}; break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1706 |
}
|
1707 |
|
1708 |
if( !isset($General['poster_play_image']) )
|
@@ -1744,7 +1829,13 @@ function audio_player_defaults()
|
|
1744 |
<?php echo __('Height of player (leave blank for 225 default)', 'powerpress'); ?>
|
1745 |
</td>
|
1746 |
</tr>
|
1747 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1748 |
<tr valign="top">
|
1749 |
<th scope="row">
|
1750 |
<?php echo __('QuickTime Scale', 'powerpress'); ?></th>
|
@@ -1760,12 +1851,9 @@ function audio_player_defaults()
|
|
1760 |
else
|
1761 |
$scale_options['custom']= __('Custom', 'powerpress');
|
1762 |
|
1763 |
-
|
1764 |
-
|
1765 |
while( list($value,$desc) = each($scale_options) )
|
1766 |
echo "\t<option value=\"$value\"". ($General['player_scale']==$value?' selected':''). ">$desc</option>\n";
|
1767 |
|
1768 |
-
$SupportUploads = powerpressadmin_support_uploads();
|
1769 |
?>
|
1770 |
</select>
|
1771 |
<span id="player_scale_custom" style="display: <?php echo (is_numeric($General['player_scale'])?'inline':'none'); ?>">
|
@@ -1776,7 +1864,9 @@ while( list($value,$desc) = each($scale_options) )
|
|
1776 |
</p>
|
1777 |
</td>
|
1778 |
</tr>
|
1779 |
-
|
|
|
|
|
1780 |
<tr>
|
1781 |
<th scope="row">
|
1782 |
<?php echo __('Default Poster Image', 'powerpress'); ?></th>
|
@@ -1794,12 +1884,21 @@ while( list($value,$desc) = each($scale_options) )
|
|
1794 |
<label for="poster_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="poster_image_file" />
|
1795 |
</div>
|
1796 |
<?php } ?>
|
|
|
|
|
|
|
|
|
1797 |
<p><input name="General[poster_play_image]" type="checkbox" value="1" <?php echo ($General['poster_play_image']?'checked':''); ?> /> <?php echo __('Include play icon over poster image when applicable', 'powerpress'); ?> </p>
|
1798 |
<p><input name="General[poster_image_audio]" type="checkbox" value="1" <?php echo ($General['poster_image_audio']?'checked':''); ?> /> <?php echo __('Use poster image, player width and height above for audio (Flow Player only)', 'powerpress'); ?> </p>
|
|
|
1799 |
</td>
|
1800 |
</tr>
|
1801 |
|
1802 |
-
|
|
|
|
|
|
|
|
|
1803 |
<tr>
|
1804 |
<th scope="row">
|
1805 |
<?php echo __('Play Icon', 'powerpress'); ?></th>
|
@@ -1819,14 +1918,16 @@ while( list($value,$desc) = each($scale_options) )
|
|
1819 |
<?php } ?>
|
1820 |
</td>
|
1821 |
</tr>
|
1822 |
-
|
|
|
|
|
1823 |
</table>
|
1824 |
<?php
|
1825 |
-
}
|
1826 |
-
?>
|
|
|
|
|
|
|
|
|
1827 |
|
1828 |
-
<?php
|
1829 |
-
}
|
1830 |
-
}
|
1831 |
-
|
1832 |
?>
|
1 |
+
<?php
|
2 |
// PowerPress Player settings page
|
3 |
|
4 |
require_once( POWERPRESS_ABSPATH. '/powerpress-player.php'); // Include, if not included already
|
14 |
<?php echo __('Flow Player Classic was chosen as the default player in Blubrry PowerPress because if its backwards compatibility with older versions of Flash and support for both audio and video.', 'powerpress'); ?>
|
15 |
</p>
|
16 |
<?php
|
17 |
+
}
|
18 |
+
|
19 |
+
function powerpressplayer_videojs_info()
|
20 |
+
{
|
21 |
+
$plugin_link = '';
|
22 |
+
|
23 |
+
if( !function_exists('add_videojs_header') && file_exists( WP_PLUGIN_DIR . '/' . 'videojs-html5-video-player-for-wordpress' ) ) // plugin downloaded but not activated...
|
24 |
+
{
|
25 |
+
$plugin_file = 'videojs-html5-video-player-for-wordpress' . '/' . 'video-js.php';
|
26 |
+
$plugin_link = '<a href="' . esc_url(wp_nonce_url(admin_url('plugins.php?plugin_status=active&action=activate&plugin=' . $plugin_file ), 'activate-plugin_' . $plugin_file)) .
|
27 |
+
'"title="' . esc_attr__('Activate Plugin') . '"">' . __('VideoJS - HTML5 Video Player for WordPress plugin', 'powerpress') . '</a>';
|
28 |
+
|
29 |
+
|
30 |
+
} else {
|
31 |
+
$plugin_link = '<a href="'. esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . 'videojs-html5-video-player-for-wordpress' .
|
32 |
+
'&TB_iframe=true&width=600&height=550' ) ) .'" class="thickbox" title="' .
|
33 |
+
esc_attr__('Install Plugin') . '">'. __('VideoJS - HTML5 Video Player for WordPress plugin', 'powerpress') . '</a>';
|
34 |
+
}
|
35 |
+
?>
|
36 |
+
<p>
|
37 |
+
<?php echo __('VideoJS is a HTML5 JavaScript and CSS video player with fallback to Flash. ', 'powerpress'); ?>
|
38 |
+
</p>
|
39 |
+
|
40 |
+
<?php if( $plugin_link ) { ?>
|
41 |
+
<p <?php echo ( function_exists('add_videojs_header') ?'':' style="background-color: #FFFFE0; border: 1px solid #E6DB55; padding: 8px 12px; line-height: 29px; font-weight: bold; font-size: 14px; display:inline;"'); ?>>
|
42 |
+
<?php echo sprintf(__('The %s must be installed and activated in order to enable this feature.', 'powerpress'), $plugin_link ); ?>
|
43 |
+
</p>
|
44 |
+
<?php } ?>
|
45 |
+
<?php
|
46 |
+
}
|
47 |
+
|
48 |
+
function powerpress_admin_players($type='audio')
|
49 |
+
{
|
50 |
$General = powerpress_get_settings('powerpress_general');
|
51 |
|
52 |
if( empty($General['player']) )
|
56 |
$General['video_player'] = '';
|
57 |
if( empty($General['audio_custom_play_button']) )
|
58 |
$General['audio_custom_play_button'] = '';
|
59 |
+
|
60 |
+
$select_player = false;
|
61 |
+
if( isset($_GET['sp']) )
|
62 |
+
$select_player = true;
|
63 |
|
64 |
if( $type == 'video' )
|
65 |
{
|
79 |
$Audio['flashmp3-maxi'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Flash_Maxi_Player.mp3';
|
80 |
$Audio['simple_flash'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Simple_Flash_MP3_Player.mp3';
|
81 |
$Audio['audioplay'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3';
|
82 |
+
$Audio['html5audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/HTML5Audio.mp3';
|
83 |
|
84 |
|
85 |
$Video = array();
|
86 |
$Video['flare-player'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlarePlayer.mp4';
|
87 |
$Video['flow-player-classic'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlowPlayerClassic.flv';
|
88 |
$Video['html5video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/HTML5Video.mp4';
|
89 |
+
$Video['videojs-html5-video-player-for-wordpress'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/videojs.mp4';
|
90 |
/*
|
91 |
<div><
|
92 |
object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="30" height="30">
|
93 |
<PARAM NAME=movie VALUE="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause"><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent><embed src="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause" quality=high wmode=transparent width="30" height="30" align="" TYPE="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object></div><!-- End of generated code -->
|
94 |
*/
|
95 |
|
96 |
+
if( $type == 'video' && function_exists('add_videojs_header') )
|
97 |
+
add_videojs_header();
|
98 |
?>
|
99 |
<link rel="stylesheet" href="<?php echo powerpress_get_root_url(); ?>3rdparty/colorpicker/css/colorpicker.css" type="text/css" />
|
100 |
<script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?>3rdparty/colorpicker/js/colorpicker.js"></script>
|
163 |
//-->
|
164 |
</script>
|
165 |
|
166 |
+
|
167 |
+
<!-- special page styling goes here -->
|
168 |
+
<style type="text/css">
|
169 |
+
div.color_control { display: block; float:left; width: 100%; padding: 0; }
|
170 |
+
div.color_control input { display: inline; float: left; }
|
171 |
+
div.color_control div.color_picker { display: inline; float: left; margin-top: 3px; }
|
172 |
#player_preview { margin-bottom: 0px; height: 50px; margin-top: 8px;}
|
173 |
input#colorpicker-value-input {
|
174 |
width: 60px;
|
204 |
}
|
205 |
table.html5formats tr > td:first-child {
|
206 |
border-left: 1px solid #000000;
|
207 |
+
}
|
208 |
+
</style>
|
209 |
+
<?php
|
210 |
+
|
211 |
+
// mainly 2 pages, first page selects a player, second configures the player, if there are optiosn to configure for that player. If the user is on the second page,
|
212 |
+
// a link should be provided to select a different player.
|
213 |
+
if( $select_player )
|
214 |
+
{
|
215 |
+
?>
|
216 |
+
<input type="hidden" name="action" value="powerpress-select-player" />
|
217 |
+
<h2><?php echo __('Blubrry PowerPress Player Options', 'powerpress'); ?></h2>
|
218 |
<p style="margin-bottom: 0;"><?php echo __('Select the media player you would like to use.', 'powerpress'); ?></p>
|
219 |
|
220 |
<?php
|
241 |
?>
|
242 |
</li>
|
243 |
|
244 |
+
<li><label><input type="radio" name="VideoPlayer[video_player]" id="player_html5video" value="html5video" <?php if( $General['video_player'] == 'html5video' ) echo 'checked'; ?> /> <?php echo __('HTML5 Video Player', 'powerpress'); ?> </label>
|
245 |
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_html5video" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
246 |
</li>
|
247 |
<li style="margin-left: 30px; margin-bottom:16px;">
|
301 |
</p>
|
302 |
</li>
|
303 |
|
304 |
+
<!-- videojs-html5-video-player-for-wordpress -->
|
305 |
+
<li><label><input type="radio" name="VideoPlayer[video_player]" id="player_videojs_html5_video_player_for_wordpress" value="videojs-html5-video-player-for-wordpress" <?php if( $General['video_player'] == 'videojs-html5-video-player-for-wordpress' ) echo 'checked'; ?> <?php echo (function_exists('add_videojs_header')?'':'disabled'); ?> />
|
306 |
+
<?php echo __('VideoJS', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?>
|
307 |
+
<?php if ( function_exists('add_videojs_header') ) { ?>
|
308 |
+
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_videojs_html5_video_player_for_wordpress" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
309 |
+
<?php } ?>
|
310 |
+
</li>
|
311 |
+
<li style="margin-left: 30px; margin-bottom:16px;">
|
312 |
+
<p>
|
313 |
+
<?php
|
314 |
+
if ( function_exists('add_videojs_header') ) {
|
315 |
+
echo powerpressplayer_build_videojs( $Video['videojs-html5-video-player-for-wordpress'] );
|
316 |
+
}
|
317 |
+
?>
|
318 |
+
</p>
|
319 |
+
<?php
|
320 |
+
powerpressplayer_videojs_info();
|
321 |
+
?>
|
322 |
+
</li>
|
323 |
+
|
324 |
+
|
325 |
|
326 |
</ul>
|
327 |
|
332 |
}
|
333 |
else
|
334 |
{
|
335 |
+
?>
|
336 |
+
<table class="form-table">
|
337 |
+
<tr valign="top">
|
338 |
+
<th scope="row"> </th>
|
339 |
+
<td>
|
340 |
+
<ul>
|
341 |
<li><label><input type="radio" name="Player[player]" id="player_default" value="default" <?php if( $General['player'] == 'default' ) echo 'checked'; ?> />
|
342 |
<?php echo __('Flow Player Classic (default)', 'powerpress'); ?></label>
|
343 |
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_default" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
344 |
+
</li>
|
345 |
+
<li style="margin-left: 30px; margin-bottom:16px;">
|
346 |
+
<p>
|
347 |
<?php
|
348 |
+
echo powerpressplayer_build_flowplayerclassic( $Audio['default'] );
|
349 |
+
?>
|
350 |
</p>
|
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>
|
374 |
<?php echo __('Flash Mp3 Maxi Player is a customizable open source audio (mp3 only) flash player. Features include pause/play/stop/file info buttons, scrollable position bar, volume control and color styling options.', 'powerpress'); ?>
|
375 |
</p>
|
376 |
</li>
|
377 |
+
|
378 |
<li><label><input type="radio" name="Player[player]" id="player_simple_flash" value="simple_flash" <?php if( $General['player'] == 'simple_flash' ) echo 'checked'; ?> /> <?php echo __('Simple Flash MP3 Player', 'powerpress'); ?></label>
|
379 |
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_simple_flash" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
380 |
+
</li>
|
381 |
+
<li style="margin-left: 30px; margin-bottom:16px;">
|
382 |
+
<p>
|
383 |
<?php
|
384 |
echo powerpressplayer_build_simpleflash($Audio['simple_flash']);
|
385 |
+
?>
|
386 |
+
</p>
|
387 |
+
<p>
|
388 |
+
<?php echo __('Simple Flash MP3 Player is a free and simple audio (mp3 only) flash player. Features include play/pause and stop buttons.', 'powerpress'); ?>
|
389 |
+
</p>
|
390 |
+
</li>
|
391 |
+
|
392 |
<li><label><input type="radio" name="Player[player]" id="player_audioplay" value="audioplay" <?php if( $General['player'] == 'audioplay' ) echo 'checked'; ?> /> <?php echo __('AudioPlay', 'powerpress'); ?></label>
|
393 |
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_audioplay" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
394 |
</li>
|
403 |
</p>
|
404 |
</li>
|
405 |
|
406 |
+
<li><label><input type="radio" name="Player[player]" id="player_html5audio" value="html5audio" <?php if( $General['player'] == 'html5audio' ) echo 'checked'; ?> /> <?php echo __('HTML5 Audio Player', 'powerpress'); ?> </label>
|
407 |
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_html5audio" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
|
408 |
</li>
|
409 |
<li style="margin-left: 30px; margin-bottom:16px;">
|
461 |
<p>
|
462 |
<?php echo __('Flow Player Classic is used when HTML5 support is not available.', 'powerpress'); ?>
|
463 |
</p>
|
464 |
+
</li>
|
465 |
+
|
466 |
+
</ul>
|
467 |
+
|
468 |
+
</td>
|
469 |
+
</tr>
|
470 |
</table>
|
471 |
<?php
|
472 |
}
|
473 |
+
?>
|
474 |
+
<h4 style="margin-bottom: 0;"><?php echo __('Click \'Save Changes\' to activate and configure selected player.', 'powerpress'); ?></h4>
|
475 |
+
<?php
|
476 |
+
}
|
477 |
+
else
|
478 |
+
{
|
479 |
+
?>
|
480 |
<h2><?php echo __('Configure Player', 'powerpress'); ?></h2>
|
481 |
<?php if( $type == 'audio' ) { ?>
|
482 |
<p style="margin-bottom: 20px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_player.php&sp=1"); ?>"><?php echo __('Select a different audio player', 'powerpress'); ?></a></strong></p>
|
483 |
+
<?php } else { ?>
|
484 |
+
<p style="margin-bottom: 20px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_videoplayer.php&sp=1"); ?>"><?php echo __('Select a different video player', 'powerpress'); ?></a></strong></p>
|
485 |
<?php
|
486 |
}
|
487 |
+
|
488 |
// Start adding logic here to display options based on the player selected...
|
489 |
if( $type == 'audio' )
|
490 |
+
{
|
491 |
+
switch( $General['player'] )
|
492 |
+
{
|
493 |
case 'audio-player': {
|
494 |
|
495 |
$PlayerSettings = powerpress_get_settings('powerpress_audio-player');
|
676 |
}
|
677 |
}
|
678 |
//-->
|
679 |
+
</script>
|
680 |
+
<input type="hidden" name="action" value="powerpress-audio-player" />
|
681 |
+
<?php echo __('Configure the 1 pixel out Audio Player', 'powerpress'); ?>
|
682 |
+
|
683 |
+
|
684 |
+
<table class="form-table">
|
685 |
+
|
686 |
+
<tr valign="top">
|
687 |
+
<th scope="row">
|
688 |
+
<?php echo __('Preview of Player', 'powerpress'); ?>
|
689 |
+
</th>
|
690 |
<td><div id="player_preview">
|
691 |
<?php
|
692 |
echo powerpressplayer_build_1pxoutplayer($Audio['audio-player'], array('nodiv'=>true) );
|
693 |
+
?>
|
694 |
+
</div>
|
695 |
+
</td>
|
696 |
</tr>
|
697 |
</table>
|
698 |
|
709 |
|
710 |
<div id="tab_general" class="powerpress_tab">
|
711 |
<h3><?php echo __('General Settings', 'powerpress'); ?></h3>
|
712 |
+
<table class="form-table">
|
713 |
<tr valign="top">
|
714 |
<th scope="row">
|
715 |
<?php echo __('Page Background Color', 'powerpress'); ?>
|
722 |
</div>
|
723 |
<small>(<?php echo __('leave blank for transparent', 'powerpress'); ?>)</small>
|
724 |
</td>
|
725 |
+
</tr> <tr valign="top">
|
726 |
+
<th scope="row">
|
727 |
+
<?php echo __('Player Background Color', 'powerpress'); ?>
|
728 |
+
</th>
|
729 |
+
<td>
|
730 |
+
<div class="color_control">
|
731 |
<input type="text" style="width: 100px;" id="bg" name="Player[bg]" class="color_field" value="<?php echo $PlayerSettings['bg']; ?>" maxlength="20" />
|
732 |
+
<img id="bg_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bg']; ?>;" class="color_preview" />
|
733 |
+
</div>
|
734 |
+
</td>
|
735 |
+
</tr>
|
736 |
<tr valign="top">
|
737 |
<th scope="row">
|
738 |
<?php echo __('Width (in pixels)', 'powerpress'); ?>
|
898 |
</select> <?php echo __('initial volume level (default: 60)', 'powerpress'); ?>
|
899 |
</td>
|
900 |
</tr>
|
901 |
+
|
902 |
+
<tr valign="top">
|
903 |
+
<th scope="row">
|
904 |
+
<?php echo __('Volumn Background Color', 'powerpress'); ?>
|
905 |
+
</th>
|
906 |
+
<td>
|
907 |
+
<div class="color_control">
|
908 |
<input type="text" style="width: 100px;" id="leftbg" name="Player[leftbg]" class="color_field" value="<?php echo $PlayerSettings['leftbg']; ?>" maxlength="20" />
|
909 |
+
<img id="leftbg_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['leftbg']; ?>;" class="color_preview" />
|
910 |
+
</div>
|
911 |
+
</td>
|
912 |
</tr>
|
913 |
<tr valign="top">
|
914 |
<th scope="row">
|
994 |
</td>
|
995 |
</tr>
|
996 |
|
997 |
+
</table>
|
998 |
</div> <!-- end tab -->
|
999 |
+
</div> <!-- end tab wrapper -->
|
1000 |
|
1001 |
+
<?php
|
1002 |
}; break;
|
1003 |
case 'simple_flash': { ?>
|
1004 |
<table class="form-table">
|
1024 |
</td>
|
1025 |
</tr>
|
1026 |
</table>
|
1027 |
+
<?php }; break;
|
1028 |
+
|
1029 |
case 'flashmp3-maxi': {
|
1030 |
+
//get settings for Flash MP3 Maxi player
|
1031 |
$PlayerSettings = powerpress_get_settings('powerpress_flashmp3-maxi');
|
1032 |
|
1033 |
+
//set array values for dropdown lists
|
1034 |
$autoload = array('always'=>'Always','never'=>'Never','autohide'=>'Auto Hide');
|
1035 |
$volume = array('0'=>'0','25'=>'25','50'=>'50','75'=>'75','100'=>'100','125'=>'125','150'=>'150','175'=>'175','200'=>'200');
|
1036 |
|
1152 |
}
|
1153 |
}
|
1154 |
//-->
|
1155 |
+
</script>
|
1156 |
<input type="hidden" name="action" value="powerpress-flashmp3-maxi" />
|
1157 |
+
<p><?php echo __('Configure Flash Mp3 Maxi Player', 'powerpress'); ?></p>
|
1158 |
+
<table class="form-table">
|
1159 |
+
|
1160 |
+
<tr valign="top">
|
1161 |
+
<th scope="row">
|
1162 |
+
<?php echo __('Preview of Player', 'powerpress'); ?>
|
1163 |
+
</th>
|
1164 |
+
<td>
|
1165 |
<div id="player_preview"></div>
|
1166 |
|
1167 |
<script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?>3rdparty/maxi_player/generator.js"></script>
|
1168 |
<input type="hidden" id="gen_mp3" name="gen_mp3" value="<?php echo $Audio['flashmp3-maxi']; ?>" />
|
1169 |
|
1170 |
+
|
1171 |
+
</td>
|
1172 |
</tr>
|
1173 |
</table>
|
1174 |
|
1185 |
|
1186 |
<div id="tab_general" class="powerpress_tab">
|
1187 |
<h3><?php echo __('General Settings', 'powerpress'); ?></h3>
|
1188 |
+
<table class="form-table">
|
1189 |
<tr valign="top">
|
1190 |
<td colspan="2">
|
1191 |
|
1192 |
<?php echo __('leave blank for default values', 'powerpress'); ?>
|
1193 |
</td>
|
1194 |
</tr>
|
1195 |
+
<tr valign="top">
|
1196 |
+
<th scope="row">
|
1197 |
+
<?php echo __('Player Gradient Color Top', 'powerpress'); ?>
|
1198 |
+
</th>
|
1199 |
+
<td>
|
1200 |
+
<div class="color_control">
|
1201 |
<input type="text" style="width: 100px;" id="bgcolor1" name="Player[bgcolor1]" class="color_field" value="<?php echo $PlayerSettings['bgcolor1']; ?>" maxlength="20" />
|
1202 |
+
<img id="bgcolor1_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor1']; ?>;" class="color_preview" />
|
1203 |
+
</div>
|
1204 |
+
</td>
|
1205 |
+
</tr>
|
1206 |
+
<tr valign="top">
|
1207 |
+
<th scope="row">
|
1208 |
+
<?php echo __('Player Gradient Color Bottom', 'powerpress'); ?>
|
1209 |
+
</th>
|
1210 |
+
<td>
|
1211 |
+
<div class="color_control">
|
1212 |
<input type="text" style="width: 100px;" id="bgcolor2" name="Player[bgcolor2]" class="color_field" value="<?php echo $PlayerSettings['bgcolor2']; ?>" maxlength="20" />
|
1213 |
+
<img id="bgcolor2_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor2']; ?>;" class="color_preview" />
|
1214 |
+
</div>
|
1215 |
+
</td>
|
1216 |
+
</tr>
|
1217 |
<tr valign="top">
|
1218 |
<th scope="row">
|
1219 |
<?php echo __('Background Color', 'powerpress'); ?>
|
1227 |
<small><?php echo __('leave blank for transparent', 'powerpress'); ?></small>
|
1228 |
</td>
|
1229 |
</tr>
|
1230 |
+
<tr valign="top">
|
1231 |
+
<th scope="row">
|
1232 |
+
<?php echo __('Text Color', 'powerpress'); ?>
|
1233 |
+
</th>
|
1234 |
+
<td>
|
1235 |
+
<div class="color_control">
|
1236 |
<input type="text" style="width: 100px;" id="textcolor" name="Player[textcolor]" class="color_field" value="<?php echo $PlayerSettings['textcolor']; ?>" maxlength="20" />
|
1237 |
+
<img id="textcolor_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['textcolor']; ?>;" class="color_preview" />
|
1238 |
+
</div>
|
1239 |
+
</td>
|
1240 |
+
</tr>
|
1241 |
+
|
1242 |
+
<tr valign="top">
|
1243 |
+
<th scope="row">
|
1244 |
+
<?php echo __('Player Height (in pixels)', 'powerpress'); ?>
|
1245 |
+
</th>
|
1246 |
+
<td>
|
1247 |
+
<div class="color_control">
|
1248 |
+
<input type="text" style="width: 50px;" id="player_height" name="Player[height]" value="<?php echo $PlayerSettings['height']; ?>" maxlength="20" />
|
1249 |
+
</div>
|
1250 |
+
</td>
|
1251 |
+
</tr>
|
1252 |
+
<tr valign="top">
|
1253 |
+
<th scope="row">
|
1254 |
+
<?php echo __('Player Width (in pixels)', 'powerpress'); ?>
|
1255 |
+
</th>
|
1256 |
+
<td>
|
1257 |
+
<div class="color_control">
|
1258 |
+
<input type="text" style="width: 50px;" id="player_width" name="Player[width]" value="<?php echo $PlayerSettings['width']; ?>" maxlength="20" />
|
1259 |
+
</div>
|
1260 |
+
</td>
|
1261 |
</tr>
|
1262 |
</table>
|
1263 |
</div>
|
1264 |
|
1265 |
<div id="tab_buttons" class="powerpress_tab">
|
1266 |
<h3><?php echo __('Button Settings', 'powerpress'); ?></h3>
|
1267 |
+
<table class="form-table">
|
1268 |
<tr valign="top">
|
1269 |
<th scope="row">
|
1270 |
<?php echo __('Button Color', 'powerpress'); ?>
|
1297 |
</div>
|
1298 |
</td>
|
1299 |
</tr>
|
1300 |
+
<tr valign="top">
|
1301 |
+
<th scope="row">
|
1302 |
+
<?php echo __('Show Stop Button', 'powerpress'); ?>
|
1303 |
+
</th>
|
1304 |
+
<td>
|
1305 |
+
<div class="color_control">
|
1306 |
<select style="width: 100px;" id="showstop" name="Player[showstop]">
|
1307 |
<?php
|
1308 |
$options = array( '1'=>__('Yes', 'powerpress'), '0'=>__('No', 'powerpress') );
|
1309 |
powerpress_print_options( $options, $PlayerSettings['showstop']);
|
1310 |
+
?>
|
1311 |
+
</select>
|
1312 |
+
</div>
|
1313 |
+
</td>
|
1314 |
+
</tr>
|
1315 |
+
<tr valign="top">
|
1316 |
+
<th scope="row">
|
1317 |
+
<?php echo __('Show Info', 'powerpress'); ?>
|
1318 |
+
</th>
|
1319 |
+
<td>
|
1320 |
+
<div class="color_control">
|
1321 |
<select style="width: 100px;" id="showinfo" name="Player[showinfo]">
|
1322 |
<?php
|
1323 |
$options = array( '1'=>__('Yes', 'powerpress'), '0'=>__('No', 'powerpress') );
|
1324 |
powerpress_print_options( $options, $PlayerSettings['showinfo']);
|
1325 |
+
?>
|
1326 |
+
</select>
|
1327 |
+
</div>
|
1328 |
+
</td>
|
1329 |
</tr>
|
1330 |
</table>
|
1331 |
</div>
|
1332 |
|
1333 |
<div id="tab_volume" class="powerpress_tab">
|
1334 |
<h3><?php echo __('Volume Settings', 'powerpress'); ?></h3>
|
1335 |
+
<table class="form-table">
|
1336 |
|
1337 |
<tr valign="top">
|
1338 |
<th scope="row">
|
1363 |
</div>
|
1364 |
</td>
|
1365 |
</tr>
|
1366 |
+
<tr valign="top">
|
1367 |
+
<th scope="row">
|
1368 |
+
<?php echo __('Volume Height (in pixels)', 'powerpress'); ?>
|
1369 |
+
</th>
|
1370 |
+
<td>
|
1371 |
+
<div class="color_control">
|
1372 |
+
<input type="text" style="width: 50px;" id="volumeheight" name="Player[volumeheight]" value="<?php echo $PlayerSettings['volumeheight']; ?>" maxlength="20" />
|
1373 |
+
</div>
|
1374 |
+
</td>
|
1375 |
+
</tr>
|
1376 |
+
<tr valign="top">
|
1377 |
+
<th scope="row">
|
1378 |
+
<?php echo __('Volume Width (in pixels)', 'powerpress'); ?>
|
1379 |
+
</th>
|
1380 |
+
<td>
|
1381 |
+
<div class="color_control">
|
1382 |
+
<input type="text" style="width: 50px;" id="volumewidth" name="Player[volumewidth]" value="<?php echo $PlayerSettings['volumewidth']; ?>" maxlength="20" />
|
1383 |
+
</div>
|
1384 |
+
</td>
|
1385 |
</tr>
|
1386 |
|
1387 |
</table>
|
1390 |
<div id="tab_slider" class="powerpress_tab">
|
1391 |
<h3><?php echo __('Slider Settings', 'powerpress'); ?></h3>
|
1392 |
<table class="form-table">
|
1393 |
+
|
1394 |
<tr valign="top">
|
1395 |
<th scope="row">
|
1396 |
<?php echo __('Show Slider', 'powerpress'); ?>
|
1487 |
</div>
|
1488 |
</td>
|
1489 |
</tr>
|
1490 |
+
|
1491 |
</table>
|
1492 |
</div> <!-- end tab -->
|
1493 |
</div><!-- end tab container -->
|
1522 |
|
1523 |
generator.updatePlayer();
|
1524 |
//-->
|
1525 |
+
</script>
|
1526 |
+
<?php
|
1527 |
+
}; break;
|
1528 |
+
|
1529 |
case 'audioplay': {
|
1530 |
$PlayerSettings = powerpress_get_settings('powerpress_audioplay');
|
1531 |
if( empty($PlayerSettings) ) {
|
1534 |
'buttondir' => 'negative',
|
1535 |
'mode' => 'playpause'
|
1536 |
);
|
1537 |
+
}
|
1538 |
+
?>
|
1539 |
<input type="hidden" name="action" value="powerpress-audioplay" />
|
1540 |
<?php echo __('Configure the AudioPlay Player', 'powerpress'); ?><br clear="all" />
|
1541 |
|
1553 |
?>
|
1554 |
</div>
|
1555 |
</td>
|
1556 |
+
</tr>
|
1557 |
</table>
|
1558 |
|
1559 |
<h2><?php echo __('General Settings', 'powerpress'); ?></h2>
|
1628 |
</tr>
|
1629 |
|
1630 |
</table>
|
1631 |
+
<?php
|
1632 |
}; break;
|
1633 |
case 'html5audio': {
|
1634 |
$SupportUploads = powerpressadmin_support_uploads();
|
1671 |
</table>
|
1672 |
|
1673 |
<?php
|
1674 |
+
}; break;
|
1675 |
+
|
1676 |
default: {
|
1677 |
|
1678 |
if( empty($General['player_width_audio']) )
|
1679 |
+
$General['player_width_audio'] = '';
|
1680 |
+
|
1681 |
+
?>
|
1682 |
+
<p><?php echo __('Configure Flow Player Classic', 'powerpress'); ?></p>
|
1683 |
+
<table class="form-table">
|
1684 |
+
<tr valign="top">
|
1685 |
+
<th scope="row">
|
1686 |
+
<?php echo __('Preview of Player', 'powerpress'); ?>
|
1687 |
+
</th>
|
1688 |
+
<td>
|
1689 |
+
<p>
|
1690 |
<?php
|
1691 |
+
echo powerpressplayer_build_flowplayerclassic( $Audio['default'] );
|
1692 |
+
?>
|
1693 |
+
</p>
|
1694 |
+
</td>
|
1695 |
+
</tr>
|
1696 |
</table>
|
1697 |
|
1698 |
<h2><?php echo __('General Settings', 'powerpress'); ?></h2>
|
1706 |
<?php echo __('Width of Audio mp3 player (leave blank for 320 default)', 'powerpress'); ?>
|
1707 |
</td>
|
1708 |
</tr>
|
1709 |
+
</table>
|
1710 |
+
<?php
|
1711 |
+
} break;
|
1712 |
}
|
1713 |
}
|
1714 |
else // Video
|
1746 |
<td>
|
1747 |
<p>
|
1748 |
<?php
|
1749 |
+
echo powerpressplayer_build_html5video( $Video['html5video'] );
|
1750 |
?>
|
1751 |
</p>
|
1752 |
</td>
|
1755 |
|
1756 |
<?php
|
1757 |
}; break;
|
1758 |
+
case 'videojs-html5-video-player-for-wordpress': {
|
1759 |
+
?>
|
1760 |
+
<p><?php echo __('Configure VideoJS', 'powerpress'); ?></p>
|
1761 |
+
<table class="form-table">
|
1762 |
+
<tr valign="top">
|
1763 |
+
<th scope="row">
|
1764 |
+
<?php echo __('Preview of Player', 'powerpress'); ?>
|
1765 |
+
</th>
|
1766 |
+
<td>
|
1767 |
+
<p>
|
1768 |
+
<?php
|
1769 |
+
echo powerpressplayer_build_videojs( $Video['videojs-html5-video-player-for-wordpress'] );
|
1770 |
+
?>
|
1771 |
+
</p>
|
1772 |
+
</td>
|
1773 |
+
</tr>
|
1774 |
+
</table>
|
1775 |
+
<h3><?php echo __('VideoJS Settings', 'powerpress'); ?></h3>
|
1776 |
+
<table class="form-table">
|
1777 |
+
<tr valign="top">
|
1778 |
+
<th scope="row">
|
1779 |
+
<?php echo __('VideoJS CSS Class', 'powerpress'); ?>
|
1780 |
+
</th>
|
1781 |
+
<td>
|
1782 |
+
<p>
|
1783 |
+
<input type="text" name="General[videojs_css_class]" style="width: 150px;" value="<?php echo ( empty($General['videojs_css_class']) ?'':htmlspecialchars($General['videojs_css_class']) ); ?>" />
|
1784 |
+
<?php echo __('Apply specific CSS styling to your Video JS player.', 'powerpress'); ?>
|
1785 |
+
</p>
|
1786 |
+
</td>
|
1787 |
+
</tr>
|
1788 |
+
</table>
|
1789 |
+
<?php
|
1790 |
+
}; break;
|
1791 |
}
|
1792 |
|
1793 |
if( !isset($General['poster_play_image']) )
|
1829 |
<?php echo __('Height of player (leave blank for 225 default)', 'powerpress'); ?>
|
1830 |
</td>
|
1831 |
</tr>
|
1832 |
+
<?php
|
1833 |
+
$SupportUploads = powerpressadmin_support_uploads();
|
1834 |
+
|
1835 |
+
// Play icon, only applicable to HTML5/FlowPlayerClassic
|
1836 |
+
if( in_array($General['video_player'], array('flow-player-classic','html5video') ) )
|
1837 |
+
{
|
1838 |
+
?>
|
1839 |
<tr valign="top">
|
1840 |
<th scope="row">
|
1841 |
<?php echo __('QuickTime Scale', 'powerpress'); ?></th>
|
1851 |
else
|
1852 |
$scale_options['custom']= __('Custom', 'powerpress');
|
1853 |
|
|
|
|
|
1854 |
while( list($value,$desc) = each($scale_options) )
|
1855 |
echo "\t<option value=\"$value\"". ($General['player_scale']==$value?' selected':''). ">$desc</option>\n";
|
1856 |
|
|
|
1857 |
?>
|
1858 |
</select>
|
1859 |
<span id="player_scale_custom" style="display: <?php echo (is_numeric($General['player_scale'])?'inline':'none'); ?>">
|
1864 |
</p>
|
1865 |
</td>
|
1866 |
</tr>
|
1867 |
+
<?php
|
1868 |
+
}
|
1869 |
+
?>
|
1870 |
<tr>
|
1871 |
<th scope="row">
|
1872 |
<?php echo __('Default Poster Image', 'powerpress'); ?></th>
|
1884 |
<label for="poster_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="poster_image_file" />
|
1885 |
</div>
|
1886 |
<?php } ?>
|
1887 |
+
<?php
|
1888 |
+
if( in_array($General['video_player'], array('flow-player-classic','html5video') ) )
|
1889 |
+
{
|
1890 |
+
?>
|
1891 |
<p><input name="General[poster_play_image]" type="checkbox" value="1" <?php echo ($General['poster_play_image']?'checked':''); ?> /> <?php echo __('Include play icon over poster image when applicable', 'powerpress'); ?> </p>
|
1892 |
<p><input name="General[poster_image_audio]" type="checkbox" value="1" <?php echo ($General['poster_image_audio']?'checked':''); ?> /> <?php echo __('Use poster image, player width and height above for audio (Flow Player only)', 'powerpress'); ?> </p>
|
1893 |
+
<?php } ?>
|
1894 |
</td>
|
1895 |
</tr>
|
1896 |
|
1897 |
+
<?php
|
1898 |
+
// Play icon, only applicable to HTML5/FlowPlayerClassic
|
1899 |
+
if( in_array($General['video_player'], array('flow-player-classic','html5video') ) )
|
1900 |
+
{
|
1901 |
+
?>
|
1902 |
<tr>
|
1903 |
<th scope="row">
|
1904 |
<?php echo __('Play Icon', 'powerpress'); ?></th>
|
1918 |
<?php } ?>
|
1919 |
</td>
|
1920 |
</tr>
|
1921 |
+
<?php
|
1922 |
+
}
|
1923 |
+
?>
|
1924 |
</table>
|
1925 |
<?php
|
1926 |
+
}
|
1927 |
+
?>
|
1928 |
+
|
1929 |
+
<?php
|
1930 |
+
}
|
1931 |
+
}
|
1932 |
|
|
|
|
|
|
|
|
|
1933 |
?>
|
powerpressadmin.php
CHANGED
@@ -112,22 +112,47 @@ function powerpress_admin_init()
|
|
112 |
if( file_exists($upload_path . $filename ) )
|
113 |
{
|
114 |
$filenameParts = pathinfo($filename);
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
|
|
|
|
119 |
}
|
120 |
|
121 |
// Check the image...
|
122 |
-
|
123 |
-
if( $ImageData && ( $ImageData[2] == IMAGETYPE_JPEG || $ImageData[2] == IMAGETYPE_PNG ) && $ImageData[0] == $ImageData[1] ) // Just check that it is an image, the correct image type and that the image is square
|
124 |
{
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
}
|
133 |
|
@@ -296,7 +321,10 @@ function powerpress_admin_init()
|
|
296 |
{
|
297 |
if( !$General )
|
298 |
$General = array();
|
299 |
-
|
|
|
|
|
|
|
300 |
$General['custom_feeds'][$FeedSlug] = $Feed['title'];
|
301 |
}
|
302 |
}
|
@@ -342,6 +370,14 @@ function powerpress_admin_init()
|
|
342 |
$General['episode_box_author'] = 0;
|
343 |
if( !isset($General['episode_box_explicit'] ) )
|
344 |
$General['episode_box_explicit'] = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
if( !isset($General['feed_links']) )
|
346 |
$General['feed_links'] = 0;
|
347 |
|
@@ -466,7 +502,14 @@ function powerpress_admin_init()
|
|
466 |
if( !isset($Feed['enhance_itunes_summary']) )
|
467 |
$Feed['enhance_itunes_summary'] = false;
|
468 |
if( !isset($Feed['itunes_author_post']) )
|
469 |
-
$Feed['itunes_author_post'] = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
|
471 |
$Feed = powerpress_stripslashes($Feed);
|
472 |
if( $Category )
|
@@ -911,6 +954,50 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
|
|
911 |
// Special case fields, if they are empty, we can delete them., this will keep the Settings array uncluttered
|
912 |
if( isset($Settings['feed_links']) && $Settings['feed_links'] == 0 ) // If set to default value, no need to save it in the database
|
913 |
unset($Settings['feed_links']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
914 |
|
915 |
update_option($field, $Settings);
|
916 |
}
|
@@ -1229,9 +1316,18 @@ function powerpress_edit_post($post_ID, $post)
|
|
1229 |
// iTunes Explicit
|
1230 |
if( isset($Powerpress['explicit']) && trim($Powerpress['explicit']) != '' )
|
1231 |
$ToSerialize['explicit'] = $Powerpress['explicit'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1232 |
// iTunes Block (FUTURE USE)
|
1233 |
-
if( isset($Powerpress['block']) &&
|
1234 |
-
$ToSerialize['block'] =
|
1235 |
// Player Embed
|
1236 |
if( isset($Powerpress['embed']) && trim($Powerpress['embed']) != '' )
|
1237 |
$ToSerialize['embed'] = stripslashes($Powerpress['embed']); // we have to strip slahes if they are present befure we serialize the data
|
@@ -1299,6 +1395,19 @@ function powerpress_edit_post($post_ID, $post)
|
|
1299 |
}
|
1300 |
} // Loop through posted episodes...
|
1301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1302 |
if( !empty($GeneralSettings['metamarks']) )
|
1303 |
{
|
1304 |
require_once(POWERPRESS_ABSPATH .'/powerpressadmin-metamarks.php');
|
@@ -1810,6 +1919,7 @@ function powerpress_send_to_poster_image(url)
|
|
1810 |
powerpress_url = '<?php echo powerpress_get_root_url(); ?>';
|
1811 |
//-->
|
1812 |
</script>
|
|
|
1813 |
<?php
|
1814 |
}
|
1815 |
}
|
@@ -1898,6 +2008,12 @@ function powerpress_metamarks_addrow_ajax()
|
|
1898 |
}
|
1899 |
add_action('wp_ajax_powerpress_metamarks_addrow', 'powerpress_metamarks_addrow_ajax');
|
1900 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1901 |
|
1902 |
function powerpress_cat_row_actions($actions, $object)
|
1903 |
{
|
@@ -3168,6 +3284,10 @@ function powerpressadmin_new()
|
|
3168 |
return '<sup style="color: #CC0000; font-weight: bold;">'. __('new!', 'powerpress') .'</sup>';
|
3169 |
}
|
3170 |
|
|
|
|
|
|
|
|
|
3171 |
|
3172 |
function powerpressadmin_community_news($items=3)
|
3173 |
{
|
112 |
if( file_exists($upload_path . $filename ) )
|
113 |
{
|
114 |
$filenameParts = pathinfo($filename);
|
115 |
+
if( !empty($filenameParts['extension']) ) {
|
116 |
+
do {
|
117 |
+
$filename_no_ext = substr($filenameParts['basename'], 0, (strlen($filenameParts['extension'])+1) * -1 );
|
118 |
+
$filename = sprintf('%s-%03d.%s', $filename_no_ext, rand(0, 999), $filenameParts['extension'] );
|
119 |
+
} while( file_exists($upload_path . $filename ) );
|
120 |
+
}
|
121 |
}
|
122 |
|
123 |
// Check the image...
|
124 |
+
if( file_exists($temp) )
|
|
|
125 |
{
|
126 |
+
$ImageData = @getimagesize($temp);
|
127 |
+
|
128 |
+
if( $ImageData )
|
129 |
+
{
|
130 |
+
if( ( $ImageData[2] == IMAGETYPE_JPEG || $ImageData[2] == IMAGETYPE_PNG ) && $ImageData[0] == $ImageData[1] && $ImageData[0] >= 1400 && $ImageData['channels'] == 3 ) // Just check that it is an image, the correct image type and that the image is square
|
131 |
+
{
|
132 |
+
move_uploaded_file($temp, $upload_path . $filename);
|
133 |
+
$Feed['itunes_image'] = $upload_url . $filename;
|
134 |
+
if( !empty($_POST['itunes_image_checkbox_as_rss']) )
|
135 |
+
{
|
136 |
+
$Feed['rss2_image'] = $upload_url . $filename;
|
137 |
+
}
|
138 |
+
}
|
139 |
+
else if( $ImageData['channels'] != 3 )
|
140 |
+
{
|
141 |
+
powerpress_page_message_add_error( __('Invalid iTunes image', 'powerpress') .': ' . htmlspecialchars($_FILES['itunes_image_file']['name']) .' - '. __('Image must be in RGB color space (CMYK is not supported).', 'powerprss') );
|
142 |
+
}
|
143 |
+
else if( $ImageData[0] != $ImageData[1] || $ImageData[0] < 1400 )
|
144 |
+
{
|
145 |
+
powerpress_page_message_add_error( __('Invalid iTunes image', 'powerpress') .': ' . htmlspecialchars($_FILES['itunes_image_file']['name']) .' - '. __('Image must be square 1400 x 1400 pixels or larger.', 'powerprss') );
|
146 |
+
}
|
147 |
+
else
|
148 |
+
{
|
149 |
+
powerpress_page_message_add_error( __('Invalid iTunes image', 'powerpress') .': ' . htmlspecialchars($_FILES['itunes_image_file']['name']) );
|
150 |
+
}
|
151 |
+
}
|
152 |
+
else
|
153 |
+
{
|
154 |
+
powerpress_page_message_add_error( __('Invalid iTunes image', 'powerpress') .': ' . htmlspecialchars($_FILES['itunes_image_file']['name']) );
|
155 |
+
}
|
156 |
}
|
157 |
}
|
158 |
|
321 |
{
|
322 |
if( !$General )
|
323 |
$General = array();
|
324 |
+
if( !empty($GeneralSettingsTemp['custom_feeds']) )
|
325 |
+
$General['custom_feeds'] = $GeneralSettingsTemp['custom_feeds'];
|
326 |
+
else
|
327 |
+
$General['custom_feeds'] = array();
|
328 |
$General['custom_feeds'][$FeedSlug] = $Feed['title'];
|
329 |
}
|
330 |
}
|
370 |
$General['episode_box_author'] = 0;
|
371 |
if( !isset($General['episode_box_explicit'] ) )
|
372 |
$General['episode_box_explicit'] = 0;
|
373 |
+
if( !isset($General['episode_box_order'] ) )
|
374 |
+
$General['episode_box_order'] = 0;
|
375 |
+
|
376 |
+
if( !isset($General['episode_box_feature_in_itunes'] ) )
|
377 |
+
$General['episode_box_feature_in_itunes'] = 0;
|
378 |
+
else
|
379 |
+
$General['episode_box_order'] = 0;
|
380 |
+
|
381 |
if( !isset($General['feed_links']) )
|
382 |
$General['feed_links'] = 0;
|
383 |
|
502 |
if( !isset($Feed['enhance_itunes_summary']) )
|
503 |
$Feed['enhance_itunes_summary'] = false;
|
504 |
if( !isset($Feed['itunes_author_post']) )
|
505 |
+
$Feed['itunes_author_post'] = false;
|
506 |
+
|
507 |
+
if( !isset($Feed['itunes_block']) )
|
508 |
+
$Feed['itunes_block'] = false;
|
509 |
+
if( !isset($Feed['itunes_complete']) )
|
510 |
+
$Feed['itunes_complete'] = false;
|
511 |
+
if( !isset($Feed['maximize_feed']) )
|
512 |
+
$Feed['maximize_feed'] = false;
|
513 |
|
514 |
$Feed = powerpress_stripslashes($Feed);
|
515 |
if( $Category )
|
954 |
// Special case fields, if they are empty, we can delete them., this will keep the Settings array uncluttered
|
955 |
if( isset($Settings['feed_links']) && $Settings['feed_links'] == 0 ) // If set to default value, no need to save it in the database
|
956 |
unset($Settings['feed_links']);
|
957 |
+
|
958 |
+
// We can unset settings that are set to their defaults to save database size...
|
959 |
+
if( $field == 'powerpress_general' )
|
960 |
+
{
|
961 |
+
if( isset($Settings['episode_box_embed'] ) && $Settings['episode_box_embed'] == 0 )
|
962 |
+
unset($Settings['episode_box_embed']);
|
963 |
+
if( isset($Settings['embed_replace_player'] ) && $Settings['embed_replace_player'] == 0 )
|
964 |
+
unset($Settings['embed_replace_player']);
|
965 |
+
if( isset($Settings['episode_box_no_player'] ) && $Settings['episode_box_no_player'] == 0 )
|
966 |
+
unset($Settings['episode_box_no_player']);
|
967 |
+
if( isset($Settings['episode_box_no_links'] ) && $Settings['episode_box_no_links'] == 0 )
|
968 |
+
unset($Settings['episode_box_no_links']);
|
969 |
+
if( isset($Settings['episode_box_no_player_and_links'] ) && $Settings['episode_box_no_player_and_links'] == 0 )
|
970 |
+
unset($Settings['episode_box_no_player_and_links']);
|
971 |
+
if( isset($Settings['episode_box_cover_image'] ) && $Settings['episode_box_cover_image'] == 0 )
|
972 |
+
unset($Settings['episode_box_cover_image']);
|
973 |
+
if( isset($Settings['episode_box_player_size'] ) && $Settings['episode_box_player_size'] == 0 )
|
974 |
+
unset($Settings['episode_box_player_size']);
|
975 |
+
if( isset($Settings['episode_box_keywords'] ) && $Settings['episode_box_keywords'] == 0 )
|
976 |
+
unset($Settings['episode_box_keywords']);
|
977 |
+
if( isset($Settings['episode_box_subtitle'] ) && $Settings['episode_box_subtitle'] == 0 )
|
978 |
+
unset($Settings['episode_box_subtitle']);
|
979 |
+
if( isset($Settings['episode_box_summary'] ) && $Settings['episode_box_summary'] == 0 )
|
980 |
+
unset($Settings['episode_box_summary']);
|
981 |
+
if( isset($Settings['episode_box_author'] ) && $Settings['episode_box_author'] == 0 )
|
982 |
+
unset($Settings['episode_box_author']);
|
983 |
+
if( isset($Settings['episode_box_explicit'] ) && $Settings['episode_box_explicit'] == 0 )
|
984 |
+
unset($Settings['episode_box_explicit']);
|
985 |
+
if( isset($Settings['episode_box_order'] ) && $Settings['episode_box_order'] == 0 )
|
986 |
+
unset($Settings['episode_box_order']);
|
987 |
+
if( isset($Settings['episode_box_feature_in_itunes'] ) && $Settings['episode_box_feature_in_itunes'] == 0 )
|
988 |
+
unset($Settings['episode_box_feature_in_itunes']);
|
989 |
+
if( isset($Settings['videojs_css_class']) && empty($Settings['videojs_css_class']) )
|
990 |
+
unset($Settings['videojs_css_class']);
|
991 |
+
}
|
992 |
+
else // Feed or player settings...
|
993 |
+
{
|
994 |
+
if( isset($Settings['itunes_block'] ) && $Settings['itunes_block'] == 0 )
|
995 |
+
unset($Settings['itunes_block']);
|
996 |
+
if( isset($Settings['itunes_complete'] ) && $Settings['itunes_complete'] == 0 )
|
997 |
+
unset($Settings['itunes_complete']);
|
998 |
+
if( isset($Settings['maximize_feed'] ) && $Settings['maximize_feed'] == 0 )
|
999 |
+
unset($Settings['maximize_feed']);
|
1000 |
+
}
|
1001 |
|
1002 |
update_option($field, $Settings);
|
1003 |
}
|
1316 |
// iTunes Explicit
|
1317 |
if( isset($Powerpress['explicit']) && trim($Powerpress['explicit']) != '' )
|
1318 |
$ToSerialize['explicit'] = $Powerpress['explicit'];
|
1319 |
+
// iTunes CC
|
1320 |
+
if( isset($Powerpress['cc']) && trim($Powerpress['cc']) != '' )
|
1321 |
+
$ToSerialize['cc'] = $Powerpress['cc'];
|
1322 |
+
// order
|
1323 |
+
if( isset($Powerpress['order']) && trim($Powerpress['order']) != '' )
|
1324 |
+
$ToSerialize['order'] = $Powerpress['order'];
|
1325 |
+
// always
|
1326 |
+
if( isset($Powerpress['always']) && trim($Powerpress['always']) != '' )
|
1327 |
+
$ToSerialize['always'] = $Powerpress['always'];
|
1328 |
// iTunes Block (FUTURE USE)
|
1329 |
+
if( isset($Powerpress['block']) && $Powerpress['block'] == '1' )
|
1330 |
+
$ToSerialize['block'] = 1;
|
1331 |
// Player Embed
|
1332 |
if( isset($Powerpress['embed']) && trim($Powerpress['embed']) != '' )
|
1333 |
$ToSerialize['embed'] = stripslashes($Powerpress['embed']); // we have to strip slahes if they are present befure we serialize the data
|
1395 |
}
|
1396 |
} // Loop through posted episodes...
|
1397 |
|
1398 |
+
// Check for PowerpressFeature for each channel...
|
1399 |
+
if( !empty($_POST['PowerpressFeature']) )
|
1400 |
+
{
|
1401 |
+
$FeatureEpisodes = array();
|
1402 |
+
$PowerpressFeature = $_POST['PowerpressFeature'];
|
1403 |
+
while( list($feed_slug,$Powerpress) = each($PowerpressFeature) )
|
1404 |
+
{
|
1405 |
+
$FeatureEpisodes[ $feed_slug ] = $post_ID;
|
1406 |
+
}
|
1407 |
+
|
1408 |
+
powerpress_save_settings( $FeatureEpisodes, 'powerpress_itunes_featured');
|
1409 |
+
}
|
1410 |
+
|
1411 |
if( !empty($GeneralSettings['metamarks']) )
|
1412 |
{
|
1413 |
require_once(POWERPRESS_ABSPATH .'/powerpressadmin-metamarks.php');
|
1919 |
powerpress_url = '<?php echo powerpress_get_root_url(); ?>';
|
1920 |
//-->
|
1921 |
</script>
|
1922 |
+
<link rel="stylesheet" href="<?php echo powerpress_get_root_url(); ?>css/dashboard.css" type="text/css" media="screen" />
|
1923 |
<?php
|
1924 |
}
|
1925 |
}
|
2008 |
}
|
2009 |
add_action('wp_ajax_powerpress_metamarks_addrow', 'powerpress_metamarks_addrow_ajax');
|
2010 |
|
2011 |
+
function powerpress_dashboard_dismiss_ajax()
|
2012 |
+
{
|
2013 |
+
require_once(POWERPRESS_ABSPATH .'/powerpressadmin-dashboard.php');
|
2014 |
+
powerpress_dashboard_dismiss();
|
2015 |
+
}
|
2016 |
+
add_action('wp_ajax_powerpress_dashboard_dismiss', 'powerpress_dashboard_dismiss_ajax');
|
2017 |
|
2018 |
function powerpress_cat_row_actions($actions, $object)
|
2019 |
{
|
3284 |
return '<sup style="color: #CC0000; font-weight: bold;">'. __('new!', 'powerpress') .'</sup>';
|
3285 |
}
|
3286 |
|
3287 |
+
function powerpressadmin_notice($updated_message)
|
3288 |
+
{
|
3289 |
+
return '<sup style="color: #CC0000; font-weight: bold;">'. htmlspecialchars($updated_message) .'</sup>';
|
3290 |
+
}
|
3291 |
|
3292 |
function powerpressadmin_community_news($items=3)
|
3293 |
{
|
readme.txt
CHANGED
@@ -2,25 +2,29 @@
|
|
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: 3.0
|
5 |
-
Tested up to: 3.3.
|
6 |
-
Stable tag:
|
7 |
|
8 |
Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
-
Blubrry PowerPress brings the essential features for podcasting to WordPress. Developed by podcasters for podcasters, PowerPress offers full iTunes support,
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
= Key Features =
|
17 |
- HTML5 video support: Add both mp4 and webm media to each episode for maximum platform compatibility
|
18 |
- Full iTunes Support: Adds iTunes compliant podcast feeds to your WordPress blog.
|
19 |
- Integrated HTML5 and Flash Media Players: Audio/video web players with embed support from sites such as YouTube and Ustream.tv.
|
20 |
- Media Modifiers: Easily add, modify and remove podcasts form blog posts and pages.
|
21 |
- Migration tools: Quickly migrate from PodPress, Blogger or Movable Type without losing episodes.
|
22 |
- Multi-podcast support: Create separate podcasts by category (category casting) or by media format (Podcast Channels).
|
23 |
-
- Supported Media Formats: mp3, m4a, mp4, m4v, webm, ogg, oga, ogv, wma, ra, mp4a, m4v, mp4v, mpg, asf, avi, wmv, flv, swf, mov, divx, 3gp, midi, wav, aa, pdf, torrent, m4b, m4r.
|
24 |
- *Media Statistics: Get FREE Blubrry Media Statistics from your WordPress dashboard.
|
25 |
* Languages supported: English, Danish, French, Simplified Chinese ([Want to translate PowerPress?](http://www.blubrry.com/powerpress_translate/))
|
26 |
|
@@ -32,6 +36,7 @@ iTunes can make up between 50 and 95 percent of a podcaster's audience. PowerPre
|
|
32 |
* iTunes compliant podcast feeds: The appropriate tags are added to your feeds so your iTunes listing looks great.
|
33 |
* Optimized iTunes Summary: Converts your blog post content to a format suited for viewing in iTunes ([learn more](http://help.blubrry.com/blubrry-powerpress/powerpress-settings/enhanced-itunes-summary/))
|
34 |
* Upload iTunes Artwork: Upload and change your iTunes artwork directly from within PowerPress settings.
|
|
|
35 |
|
36 |
= Integrated Media Players =
|
37 |
Blubrry PowerPress includes extensive web player options to display your podcast audio and video in your web pages.
|
@@ -42,7 +47,7 @@ Blubrry PowerPress includes extensive web player options to display your podcast
|
|
42 |
* Place the player exactly where you want by adding the [powerpress] shortcode tag directly in your post content.
|
43 |
* Add video embeds from sites such as YouTube, Viddler, Blip.tv and Ustream.tv.
|
44 |
* Provides download, play in new window and embed links.
|
45 |
-
* Formats supported: mp3, m4v, mp4, m4a, webm, ogg, ogv, oga, wma, mov, pdf, swf, avi, mpeg and more.
|
46 |
|
47 |
= Integrates with Blubrry's Services =
|
48 |
Make your life easier by adding our FREE or paid services to streamline your podcast productivity.
|
@@ -72,22 +77,13 @@ Want more? Check out the advanced features.
|
|
72 |
|
73 |
**Custom Post Types feature requires a separate plugin to manage custom post types.
|
74 |
|
75 |
-
= Migrating from PodPress =
|
76 |
-
We made it easy to
|
77 |
-
|
78 |
-
* Install and enable PowerPress
|
79 |
-
* Configure the "PodPress Episodes" setting in PowerPress to "Include in Posts and Feeds"
|
80 |
-
* Disable PodPress
|
81 |
-
|
82 |
-
PowerPress will continue where PodPress left off by including your previously created PodPress episodes in your feeds and web pages.
|
83 |
-
|
84 |
-
= Migrating from plugin "Podcasting" =
|
85 |
-
We made it easy to migrate from plugin "Podcasting" to PowerPress.
|
86 |
|
87 |
* Install and enable PowerPress
|
88 |
-
* Disable plugin
|
89 |
|
90 |
-
PowerPress will continue where plugin
|
91 |
|
92 |
= Need Help? =
|
93 |
. . . or have some ideas that could improve the plugin?
|
@@ -97,6 +93,8 @@ PowerPress will continue where plugin "Podcasting" left off by including your pr
|
|
97 |
* Blubrry [PowerPress Documentation](http://help.blubrry.com/blubrry-powerpress/)
|
98 |
* Check out [PodcastFAQ.com](http://www.podcastfaq.com/) - everything you need to know about podcasting
|
99 |
|
|
|
|
|
100 |
|
101 |
== Frequently Asked Questions ==
|
102 |
|
@@ -146,6 +144,29 @@ To install Blubrry PowerPress manually, follow these steps:
|
|
146 |
* PowerPress 3.0 is not compatible with WordPress 2.8.x and 2.9.x. Please upgrade to WordPress 3.0 or newer to install PowerPress.
|
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 |
= 3.0.1 =
|
150 |
* Released on 3/9/2012
|
151 |
* Fixed bug with lines 318 and 312 of powerpress.php when Feed Discovery option is enabled but custom podcast channels are not activated.
|
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: 3.0
|
5 |
+
Tested up to: 3.3.2
|
6 |
+
Stable tag: 4.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 |
|
10 |
== Description ==
|
11 |
|
12 |
+
Blubrry PowerPress brings the essential features for podcasting to WordPress. Developed by podcasters for podcasters, PowerPress offers full iTunes support, web audio/video media players and more.
|
13 |
|
14 |
+
= PowerPress 4.0 includes the latest iTunes Specifications! =
|
15 |
+
PowerPress 4.0 includes all of the latest [Apple iTunes podcasting specifications](http://www.powerpresspodcast.com/2012/05/10/itunes-podcasting-specifications-changed-may-2012-what-that-means-for-podcasting/). Don't be left behind, upgrade to PowerPress 4.0 today!
|
16 |
+
|
17 |
+
= Currently Using PodPress? =
|
18 |
+
Switching to PowerPress is seamless, just enable PowerPress then disable PodPress and you're done! Switching plugins is that easy!
|
19 |
|
20 |
+
= PowerPress Key Features =
|
21 |
- HTML5 video support: Add both mp4 and webm media to each episode for maximum platform compatibility
|
22 |
- Full iTunes Support: Adds iTunes compliant podcast feeds to your WordPress blog.
|
23 |
- Integrated HTML5 and Flash Media Players: Audio/video web players with embed support from sites such as YouTube and Ustream.tv.
|
24 |
- Media Modifiers: Easily add, modify and remove podcasts form blog posts and pages.
|
25 |
- Migration tools: Quickly migrate from PodPress, Blogger or Movable Type without losing episodes.
|
26 |
- Multi-podcast support: Create separate podcasts by category (category casting) or by media format (Podcast Channels).
|
27 |
+
- Supported Media Formats: mp3, m4a, mp4, m4v, webm, ogg, oga, ogv, wma, ra, mp4a, m4v, mp4v, mpg, asf, avi, wmv, flv, swf, mov, divx, 3gp, midi, wav, aa, pdf, torrent, m4b, m4r, epub.
|
28 |
- *Media Statistics: Get FREE Blubrry Media Statistics from your WordPress dashboard.
|
29 |
* Languages supported: English, Danish, French, Simplified Chinese ([Want to translate PowerPress?](http://www.blubrry.com/powerpress_translate/))
|
30 |
|
36 |
* iTunes compliant podcast feeds: The appropriate tags are added to your feeds so your iTunes listing looks great.
|
37 |
* Optimized iTunes Summary: Converts your blog post content to a format suited for viewing in iTunes ([learn more](http://help.blubrry.com/blubrry-powerpress/powerpress-settings/enhanced-itunes-summary/))
|
38 |
* Upload iTunes Artwork: Upload and change your iTunes artwork directly from within PowerPress settings.
|
39 |
+
* iTunes podcasting specifications fully supported.
|
40 |
|
41 |
= Integrated Media Players =
|
42 |
Blubrry PowerPress includes extensive web player options to display your podcast audio and video in your web pages.
|
47 |
* Place the player exactly where you want by adding the [powerpress] shortcode tag directly in your post content.
|
48 |
* Add video embeds from sites such as YouTube, Viddler, Blip.tv and Ustream.tv.
|
49 |
* Provides download, play in new window and embed links.
|
50 |
+
* Formats supported: mp3, m4v, mp4, m4a, webm, ogg, ogv, oga, wma, mov, pdf, swf, avi, mpeg, epub and more.
|
51 |
|
52 |
= Integrates with Blubrry's Services =
|
53 |
Make your life easier by adding our FREE or paid services to streamline your podcast productivity.
|
77 |
|
78 |
**Custom Post Types feature requires a separate plugin to manage custom post types.
|
79 |
|
80 |
+
= Migrating from PodPress or "Podcasting Plugin by TSG"? =
|
81 |
+
We made it easy to switch to PowerPress.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
* Install and enable PowerPress
|
84 |
+
* Disable previous podcasting plugin
|
85 |
|
86 |
+
PowerPress will continue where plugin your old plugin left off by including your previously created episodes in your feeds and web pages.
|
87 |
|
88 |
= Need Help? =
|
89 |
. . . or have some ideas that could improve the plugin?
|
93 |
* Blubrry [PowerPress Documentation](http://help.blubrry.com/blubrry-powerpress/)
|
94 |
* Check out [PodcastFAQ.com](http://www.podcastfaq.com/) - everything you need to know about podcasting
|
95 |
|
96 |
+
*PowerPress is developed and maintained by [Blubrry](http://www.blubrry.com), a podcasting company and community providing tools and resources for podcasters to measure, monetize, publish and host podcasts. Although we'd like you to become a member of [Blubrry](http://www.blubrry.com/createaccount.php), **no membership is required** to use this free open source podcasting plugin.*
|
97 |
+
|
98 |
|
99 |
== Frequently Asked Questions ==
|
100 |
|
144 |
* PowerPress 3.0 is not compatible with WordPress 2.8.x and 2.9.x. Please upgrade to WordPress 3.0 or newer to install PowerPress.
|
145 |
* 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/)
|
146 |
|
147 |
+
|
148 |
+
= 4.0 =
|
149 |
+
* Released on 5/11/2012
|
150 |
+
* New iTunes image requirements updated throughout plugin. RGB 1400x1400 jpg is recommended.
|
151 |
+
* Feed Episode Maximizer feature added, only applies to podcast channel feeds.
|
152 |
+
* Added VideoJS video player option, requires "VideoJS - HTML5 Video Player for WordPress" plugin to be installed and activated.
|
153 |
+
* Enhanced support for uploading RSS/iTunes images, the iTunes image upload now checks for 1400x1400 or larger jpg/png image in RGB color space.
|
154 |
+
* Notice message regarding new iTunes image requirements added to dashboard.
|
155 |
+
* Added .epub to list of file content types supported.
|
156 |
+
* iTunes image can now also be used as the RSS image.
|
157 |
+
* Additional information added to powerpress shortcode documentation.
|
158 |
+
* iTunes block episode feature added, requires following define in wp-config.php: `define("POWERPRESS_NOT_SUPPORTED", true);`
|
159 |
+
* iTunes block feed feature added, requires following define in wp-config.php: `define("POWERPRESS_NOT_SUPPORTED", true);`
|
160 |
+
* iTunes complete feed feature added, requires following define in wp-config.php: `define("POWERPRESS_NOT_SUPPORTED", true);`
|
161 |
+
* iTunes order episode feature added.
|
162 |
+
* Feature Episode in iTunes option added, allows you to put specific episode at the top of your iTunes podcast directory listing.
|
163 |
+
* ref=Nofollow tags added to play in new window, download and embed links.
|
164 |
+
* Fixed warning message when metamark's default row is removed and does not exist upon saving.
|
165 |
+
* Increased the performance of the podcast only and podcast channel feeds.
|
166 |
+
* Removed "new" from no longer new features.
|
167 |
+
* iTunes default image updated to 1400 x 1400.
|
168 |
+
|
169 |
+
|
170 |
= 3.0.1 =
|
171 |
* Released on 3/9/2012
|
172 |
* Fixed bug with lines 318 and 312 of powerpress.php when Feed Discovery option is enabled but custom podcast channels are not activated.
|