PowerPress Podcasting plugin by Blubrry - Version 5.0

Version Description

= * Released on 08/27/2013 * Advanced Mode added (Was an old feature in PowerPress 1.0 that was removed since 2.0, now it's back!) * Default Mode with 3 Simple Steps added! * Taxonomy Podcasting added (feature sponsored by AfterBuzzTV.com) * Post Type Podcasting added * MediaElement.js HTML5/CSS Audio and Video player added. You must have WordPress 3.6+ to use this player. * Embed player will now use the MediaElement.js player when selected * We now allow images that are 300x300 as the itunes image, but a warning is printed at the top of the page. * Fixed bug where settings saved message did not always appear at the top of the pages. * Added define POWERPRESS_NO_PODCAST_FEED, if set to true in wp-config, PowerPress will not add the default podcast feed with slug name 'podcast'. For users who exclusively want a page or category called 'podcast'. NOTE: There will be no podcast only feed provided by default when this define is set, use at your own risk. * iTunes and RSS image settings moved to "Artwork" tab. * New iTunes Episode image option added to both the Artwork tab as well as the Episode Entry Box (Thanks Robin Brinkler and Daniel Lewis for suggesting the features) * jQuery based watermark replaced with HTML5 placeholder values, the jquery.watermark.js is no longer packaged with PowerPress. * Fixed bug with Feed Episode Maximizer RSS having the invalid characters when used with WordPRess 3.6. * Feed Episode Maximizer is no longer experimental, we've successfully used the feature on a number of podcasts without issue for over a year now. * Player width for audio and video can now use a percentage, ideal for resposive sites. * player.js script is now always enqueued with other WordPress scripts. If you have player issues, please update your theme! * Added link to settings from the plugins management screen, should help folks who are new to PowerPress find settings quickly.

Download this release

Release Info

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

Code changes from version 4.0.9 to 5.0

3rdparty/jquery.watermark.min.js DELETED
@@ -1,8 +0,0 @@
1
- /*
2
- Watermark v3.1.1 (January 10, 2011) plugin for jQuery
3
- http://jquery-watermark.googlecode.com/
4
- Copyright (c) 2009-2011 Todd Northrop
5
- http://www.speednet.biz/
6
- Dual licensed under the MIT or GPL Version 2 licenses.
7
- */
8
- (function(b,j,y){var p="function",k="password",d="maxLength",g="type",a="",c=true,o="placeholder",e=false,w="watermark",l=w,i="watermarkClass",t="watermarkFocus",n="watermarkSubmit",r="watermarkMaxLength",h="watermarkPassword",f="watermarkText",m=/\r/g,v=":data("+l+")",q=":text,:password,:search,textarea",s=["Page_ClientValidate"],u=e,x=o in document.createElement("input");b.watermark=b.watermark||{version:"3.1.1",runOnce:c,options:{className:w,useNative:c,hideBeforeUnload:c},hide:function(a){b(a).filter(v).each(function(){b.watermark._hide(b(this))})},_hide:function(b,q){var o=b[0],p=(o.value||a).replace(m,a),l=b.data(f)||a,n=b.data(r)||0,k=b.data(i);if(l.length&&p==l){o.value=a;if(b.data(h))if((b.attr(g)||a)==="text"){var e=b.data(h)||[],c=b.parent()||[];if(e.length&&c.length){c[0].removeChild(b[0]);c[0].appendChild(e[0]);b=e}}if(n){b.attr(d,n);b.removeData(r)}if(q){b.attr("autocomplete","off");j.setTimeout(function(){b.select()},1)}}k&&b.removeClass(k)},show:function(a){b(a).filter(v).each(function(){b.watermark._show(b(this))})},_show:function(e){var p=e[0],v=(p.value||a).replace(m,a),j=e.data(f)||a,q=e.attr(g)||a,s=e.data(i);if((v.length==0||v==j)&&!e.data(t)){u=c;if(e.data(h))if(q===k){var o=e.data(h)||[],n=e.parent()||[];if(o.length&&n.length){n[0].removeChild(e[0]);n[0].appendChild(o[0]);e=o;e.attr(d,j.length);p=e[0]}}if(q==="text"||q==="search"){var l=e.attr(d)||0;if(l>0&&j.length>l){e.data(r,l);e.attr(d,j.length)}}s&&e.addClass(s);p.value=j}else b.watermark._hide(e)},hideAll:function(){if(u){b.watermark.hide(q);u=e}},showAll:function(){b.watermark.show(q)}};b.fn.watermark=b.fn.watermark||function(s,r){var u="string";if(!this.length)return this;var w=e,v=typeof s===u;if(v)s=s.replace(m,a);if(typeof r==="object"){w=typeof r.className===u;r=b.extend({},b.watermark.options,r)}else if(typeof r===u){w=c;r=b.extend({},b.watermark.options,{className:r})}else r=b.watermark.options;if(typeof r.useNative!==p)r.useNative=r.useNative?function(){return c}:function(){return e};return this.each(function(){var z="dragleave",y="dragenter",B=this,e=b(B);if(!e.is(q))return;if(e.data(l)){if(v||w){b.watermark._hide(e);v&&e.data(f,s);w&&e.data(i,r.className)}}else{if(x&&r.useNative.call(B,e)&&(e.attr("tagName")||a)!=="TEXTAREA"){v&&e.attr(o,s);return}e.data(f,v?s:a);e.data(i,r.className);e.data(l,1);if((e.attr(g)||a)===k){var C=e.wrap("<span>").parent(),p=b(C.html().replace(/type=["']?password["']?/i,'type="text"'));p.data(f,e.data(f));p.data(i,e.data(i));p.data(l,1);p.attr(d,s.length);p.focus(function(){b.watermark._hide(p,c)}).bind(y,function(){b.watermark._hide(p)}).bind("dragend",function(){j.setTimeout(function(){p.blur()},1)});e.blur(function(){b.watermark._show(e)}).bind(z,function(){b.watermark._show(e)});p.data(h,e);e.data(h,p)}else e.focus(function(){e.data(t,1);b.watermark._hide(e,c)}).blur(function(){e.data(t,0);b.watermark._show(e)}).bind(y,function(){b.watermark._hide(e)}).bind(z,function(){b.watermark._show(e)}).bind("dragend",function(){j.setTimeout(function(){b.watermark._show(e)},1)}).bind("drop",function(d){var c=e[0],b=d.originalEvent.dataTransfer.getData("Text");if((c.value||a).replace(m,a).replace(b,a)===e.data(f))c.value=b;e.focus()});if(B.form){var u=B.form,A=b(u);if(!A.data(n)){A.submit(b.watermark.hideAll);if(u.submit){A.data(n,u.submit);u.submit=function(c,a){return function(){var d=a.data(n);b.watermark.hideAll();if(d.apply)d.apply(c,Array.prototype.slice.call(arguments));else d()}}(u,A)}else{A.data(n,1);u.submit=function(a){return function(){b.watermark.hideAll();delete a.submit;a.submit()}}(u)}}}}b.watermark._show(e)})};if(b.watermark.runOnce){b.watermark.runOnce=e;b.extend(b.expr[":"],{search:function(b){return"search"===(b.type||a)},data:function(c,d,a){return!!b.data(c,a[3])}});(function(c){b.fn.val=function(){var d=this;if(!d.length)return arguments.length?d:y;if(!arguments.length)if(d.data(l)){var e=(d[0].value||a).replace(m,a);return e===(d.data(f)||a)?a:e}else return c.apply(d,arguments);else{c.apply(d,arguments);b.watermark.show(d);return d}}})(b.fn.val);s.length&&b(function(){for(var a,c,d=s.length-1;d>=0;d--){a=s[d];c=j[a];if(typeof c===p)j[a]=function(a){return function(){b.watermark.hideAll();return a.apply(null,Array.prototype.slice.call(arguments))}}(c)}});b(j).bind("beforeunload",function(){b.watermark.options.hideBeforeUnload&&b.watermark.hideAll()})}})(jQuery,window);
 
 
 
 
 
 
 
 
css/admin.css CHANGED
@@ -1,7 +1,8 @@
1
  /* admin.css */
2
-
3
- .powerpress-notice {
4
- margin-top: 10px;
 
5
  margin-bottom: 10px;
6
  line-height: 29px;
7
  font-size: 12px;
@@ -9,7 +10,9 @@
9
  border-style: solid;
10
  font-weight: bold;
11
  }
12
- .powerpress-error {
 
 
13
  margin-top: 10px;
14
  margin-bottom: 10px;
15
  line-height: 29px;
@@ -17,9 +20,10 @@
17
  border-width: 1px;
18
  border-style: solid;
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
  }
@@ -185,3 +189,185 @@ padding-bottom: 15px;
185
  padding: 0;
186
  }
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /* admin.css */
2
+ .powerpress-notice,
3
+ div.powerpress-notice,
4
+ .wrap div.powerpress-notice {
5
+ margin-top: 20px;
6
  margin-bottom: 10px;
7
  line-height: 29px;
8
  font-size: 12px;
10
  border-style: solid;
11
  font-weight: bold;
12
  }
13
+ .powerpress-error,
14
+ div.powerpress-error,
15
+ .wrap div.powerpress-error {
16
  margin-top: 10px;
17
  margin-bottom: 10px;
18
  line-height: 29px;
20
  border-width: 1px;
21
  border-style: solid;
22
  font-weight: bold;
23
+ margin-top: 20px;
24
  }
25
  #powerpress_settings {
26
+ background-image:url(http://images.blubrry.com/powerpress/blubrry_logo5.png);
27
  background-repeat: no-repeat;
28
  background-position: bottom right;
29
  }
189
  padding: 0;
190
  }
191
 
192
+ #powerpress_settings label.powerpress-normal-font {
193
+ font-size: 11px;
194
+ }
195
+ #powerpress_admin_header {
196
+ vertical-align: text-bottom;
197
+ }
198
+ #powerpress_admin_header h2 {
199
+ /* float: left; */
200
+ display: inline-block;
201
+ }
202
+ #powerpress_admin_header .powerpress-mode {
203
+ margin-left: 14px;
204
+ display: inline-block;
205
+ color: #FF6600;
206
+ font-size: 15px;
207
+ font-weight: bold;
208
+ }
209
+
210
+ #powerpress_steps {
211
+ margin: 60px 0 40px;
212
+ }
213
+ .powerpress-required {
214
+ font-size: 90%;
215
+ color: #CC0000;
216
+ margin-left: 12px;
217
+ }
218
+
219
+ .powerpress-step {
220
+ display: inline-block;
221
+ float: left;
222
+ width: 200px;
223
+ height: 170px;
224
+ border-right: 1px solid #ECECEC;
225
+ margin-left: 10px;
226
+ margin-right: 0;
227
+ text-align: top;
228
+ position: relative;
229
+ padding-top: 10px;
230
+ }
231
+ #powerpress_steps h3 {
232
+ color: #CCCCCC;
233
+ margin: 0;
234
+ font-size: 24px;
235
+ top: -16px;
236
+ left: 0;
237
+ position: absolute;
238
+ }
239
+ #powerpress_steps p {
240
+ font-size: 20px;
241
+ margin: 20px 4px;
242
+ color: #CCCCCC;
243
+ line-height:120%
244
+ }
245
+ #powerpress_steps a {
246
+ color: #CCCCCC;
247
+ }
248
+ #powerpreess_step_1 {
249
+ background-image: url('../images/DownArrow.png');
250
+ background-repeat:no-repeat;
251
+ background-position: 6px bottom;
252
+ }
253
+
254
+ #powerpress_steps .active-step h3 {
255
+ color: #337EC9;
256
+
257
+ }
258
+ #powerpress_steps .active-step p,
259
+ #powerpress_steps .active-step a {
260
+ color: #787878;
261
+
262
+ }
263
+
264
+ #powerpress_steps>:first-child {
265
+ margin-left: 0;
266
+ }
267
+ .powerpress-step-complete {
268
+ position: absolute;
269
+ bottom: 0;
270
+ right: 0;
271
+ height: 46px;
272
+ width: 150px;
273
+ }
274
+ .powerpress-step-complete-box {
275
+ border: 1px solid #CCCCCC;
276
+ width: 24px;
277
+ height: 24px;
278
+ display: inline-block;
279
+ position: absolute;
280
+ bottom: -2px;
281
+ right: 20px;
282
+ }
283
+ .powerpress-step-completed {
284
+ background-image: url('../images/Check.png');
285
+ background-repeat:no-repeat;
286
+ background-position: right 2px;
287
+ }
288
+
289
+ .blubrry-services {
290
+ color: #337EC9;
291
+ font-size: 18px;
292
+ line-height: 1.2;
293
+ }
294
+ .blubrry-services p {
295
+ margin: 0 70px 0 0;
296
+ padding: 0;
297
+ }
298
+ .blubrry-services strong {
299
+ color: #FF6600;
300
+ font-weight: normal;
301
+ }
302
+ .blubrry-services p.top-lines {
303
+ margin-right: 0;
304
+ }
305
+ .blubrry-services a {
306
+ color: #FF6600;
307
+ font-size: 20px;
308
+ line-height: 2;
309
+ }
310
+ .blubrry-services .blubrry-hosting,
311
+ .blubrry-services .blubrry-stats {
312
+ float: left;
313
+ width: 230px;
314
+ height: 140px;
315
+ background-color: #ECECEC;
316
+ padding: 10px;
317
+ margin-top: 10px;
318
+ }
319
+ .blubrry-services .blubrry-stats {
320
+ background-image: url('../images/StatsIcon.png');
321
+ background-repeat:no-repeat;
322
+ background-position: bottom right;
323
+ }
324
+
325
+ .blubrry-services .blubrry-hosting {
326
+ margin-right: 50px;
327
+ background-image: url('../images/BlubrryIcon.png');
328
+ background-repeat:no-repeat;
329
+ background-position: bottom right;
330
+ }
331
+
332
+
333
+ @media screen and (min-width: 1px) and (max-width: 819px) {
334
+ .powerpress-step {
335
+ width: 170px;
336
+ }
337
+ #powerpress_steps p {
338
+ font-size: 16px;
339
+ margin: 20px 4px;
340
+ }
341
+ .powerpress-step-complete {
342
+ width: 125px;
343
+ }
344
+ .powerpress-step-complete p {
345
+ padding-top: 5px;
346
+ }
347
+ .blubrry-services .blubrry-hosting {
348
+ margin-right: 20px;
349
+ }
350
+ }
351
+ @media screen and (min-width: 1px) and (max-width: 729px) {
352
+ .powerpress-step {
353
+ width: 130px;
354
+ }
355
+ #powerpreess_step_1 {
356
+ background-position: 1px bottom;
357
+ }
358
+ #powerpress_steps p {
359
+ margin: 10px 4px;
360
+ }
361
+ .powerpress-step-complete {
362
+ width: 110px;
363
+ }
364
+ #powerpress_steps .powerpress-step-complete p {
365
+ padding-top: 20px;
366
+ font-size: 12px;
367
+ }
368
+ .blubrry-services .blubrry-hosting {
369
+ margin-right: 10px;
370
+ }
371
+ }
372
+
373
+
feed-podcast.php CHANGED
@@ -123,7 +123,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
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
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 powerpress_format_itunes_value( get_the_excerpt(), 'description' ); ?></description>
127
  <?php rss_enclosure(); ?>
128
  <?php do_action('rss2_item'); ?>
129
  <?php
images/Check.png ADDED
Binary file
images/DownArrow.png ADDED
Binary file
images/StatsIcon.png ADDED
Binary file
images/blubrryIcon.png ADDED
Binary file
powerpress-mejs.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+
3
+ jQuery(document).ready(function($) {
4
+
5
+ if( jQuery.fn.mediaelementplayer ) {
6
+ jQuery('.powerpress-mejs-audio, .powerpress-mejs-video').mediaelementplayer();
7
+
8
+ jQuery('.mejs-play button, .mejs-overlay-play').click( function(e) {
9
+
10
+ var container = jQuery(this).closest('.mejs-container');
11
+ var html5player = container.find('video,audio');
12
+ if( html5player.attr('src') )
13
+ {
14
+
15
+ //alert( html5player.attr('id') );
16
+ //var mejsplayer = window[ html5player.attr('id') ];
17
+ var srcTmp = html5player.attr('src');
18
+ if( srcTmp.indexOf('#') != -1 ) {
19
+
20
+ var tmp = srcTmp.replace(/^[^#]*#/, '');
21
+ if( tmp != srcTmp ) {
22
+ // Stop the play from happening in this event
23
+ e.preventDefault();
24
+ var mejsplayer = jQuery(html5player)[0];
25
+ if( mejsplayer ) {
26
+ alert( mejsplayer );
27
+ mejsplayer.setAttribute('src', tmp);
28
+ mejsplayer.load();
29
+ setTimeout( function(){ mejsplayer.play(); }, 900 );
30
+ return false;
31
+ }
32
+ }
33
+ }
34
+ }
35
+ });
36
+ }
37
+ });
38
+
39
+ }(jQuery));
powerpress-player.php CHANGED
@@ -38,6 +38,8 @@ function powerpressplayer_init($GeneralSettings)
38
  if( isset($_GET['powerpress_embed']) )
39
  {
40
  $player = ( !empty($_GET['powerpress_player']) ? $_GET['powerpress_player'] : 'default' );
 
 
41
  powerpress_do_embed($player, $_GET['powerpress_embed'], !empty($GeneralSettings['process_podpress']) );
42
  }
43
 
@@ -47,21 +49,33 @@ function powerpressplayer_init($GeneralSettings)
47
  add_shortcode('display_podcast', 'powerpress_shortcode_handler');
48
  }
49
 
50
- if( defined('POWERPRESS_ENQUEUE_SCRIPTS') )
 
 
 
 
 
 
 
 
 
 
 
51
  {
52
- // include what's needed for each plaer
53
- wp_enqueue_script( 'powerpress-player', powerpress_get_root_url() .'player.js');
 
 
 
54
  }
55
 
56
- /*
57
- if( !empty($GeneralSettings['display_player_disable_mobile']) && powerpress_is_mobile_client() )
58
  {
59
- // Remove all known filters for player embeds...
60
- remove_filter('powerpress_player', 'powerpressplayer_player_audio', 10, 3);
61
- remove_filter('powerpress_player', 'powerpressplayer_player_video', 10, 3);
62
- remove_filter('powerpress_player', 'powerpressplayer_player_other', 10, 3);
63
  }
64
- */
65
  }
66
 
67
 
@@ -189,182 +203,6 @@ if( !defined('PODCASTING_VERSION') )
189
  add_shortcode('podcast', 'powerpress_shortcode_handler');
190
  }
191
 
192
-
193
-
194
-
195
- function powerpress_player_filter($content, $media_url, $ExtraData = array() )
196
- {
197
- global $g_powerpress_player_id;
198
- if( !isset($g_powerpress_player_id) )
199
- $g_powerpress_player_id = rand(0, 10000);
200
- else
201
- $g_powerpress_player_id++;
202
-
203
- // Very important setting, we need to know if the media should auto play or not...
204
- $autoplay = false; // (default)
205
- if( isset($ExtraData['autoplay']) && $ExtraData['autoplay'] )
206
- $autoplay = true;
207
- $cover_image = '';
208
- if( $ExtraData['image'] )
209
- $cover_image = $ExtraData['image'];
210
-
211
- // Based on $ExtraData, we can determine which type of player to handle here...
212
- $Settings = get_option('powerpress_general');
213
- $player_width = 400;
214
- $player_height = 225;
215
- if( isset($Settings['player_width']) && $Settings['player_width'] )
216
- $player_width = $Settings['player_width'];
217
- if( isset($Settings['player_height']) && $Settings['player_height'] )
218
- $player_height = $Settings['player_height'];
219
-
220
- // Used with some types
221
- //$content_type = powerpress_get_contenttype($media_url);
222
-
223
- $parts = pathinfo($media_url);
224
- // Hack to use the audio/mp3 content type to set extension to mp3, some folks use tinyurl.com to mp3 files which remove the file extension...
225
- // This hack only covers mp3s.
226
- if( isset($EpisodeData['type']) && $EpisodeData['type'] == 'audio/mpeg' && $parts['extension'] != 'mp3' )
227
- $parts['extension'] = 'mp3';
228
-
229
- $ogg_video = false; // Extra securty make sure it is definitely set to video
230
- switch( strtolower($parts['extension']) )
231
- {
232
- // Quicktime old formats:
233
- case 'm4a':
234
- case 'avi':
235
- case 'mpg':
236
- case 'mpeg':
237
-
238
- case 'm4b':
239
- case 'm4r':
240
- case 'qt':
241
- case 'mov': {
242
-
243
- $GeneralSettings = get_option('powerpress_general');
244
- if( !isset($GeneralSettings['player_scale']) )
245
- $GeneralSettings['player_scale'] = 'tofit';
246
-
247
- // If there is no cover image specified, lets use the default...
248
- if( $cover_image == '' )
249
- $cover_image = powerpress_get_root_url() . 'play_video_default.jpg';
250
-
251
- if( $autoplay )
252
- {
253
- $content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'"></div>'.PHP_EOL;
254
- $content .= '<script type="text/javascript"><!--'.PHP_EOL;
255
- $content .= "powerpress_embed_quicktime('powerpress_player_{$g_powerpress_player_id}', '{$media_url}', {$player_width}, {$player_height}, '{$GeneralSettings['player_scale']}');\n";
256
- $content .= "//-->\n";
257
- $content .= "</script>\n";
258
- }
259
- else
260
- {
261
- $content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">'.PHP_EOL;
262
- $content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="';
263
- $content .= "return powerpress_embed_quicktime('powerpress_player_{$g_powerpress_player_id}', '{$media_url}', {$player_width}, {$player_height}, '{$GeneralSettings['player_scale']}' );";
264
- $content .= '">';
265
- $content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" />';
266
- $content .= '</a>';
267
- $content .= "</div>\n";
268
- }
269
-
270
- }; break;
271
-
272
- // Windows Media:
273
- case 'wma':
274
- case 'wmv':
275
- case 'asf': {
276
-
277
- $content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">';
278
- $firefox = (stristr($_SERVER['HTTP_USER_AGENT'], 'firefox') !== false );
279
-
280
- if( (!$cover_image && !$firefox ) || $autoplay ) // if we don't have a cover image or we're supposed to auto play the media anyway...
281
- {
282
- $content .= '<object id="winplayer" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'. $player_width .'" height="'. $player_height .'" standby="..." type="application/x-oleobject">';
283
- $content .= ' <param name="url" value="'. $media_url .'" />';
284
- $content .= ' <param name="AutoStart" value="'. ($autoplay?'true':'false') .'" />';
285
- $content .= ' <param name="AutoSize" value="true" />';
286
- $content .= ' <param name="AllowChangeDisplaySize" value="true" />';
287
- $content .= ' <param name="standby" value="Media is loading..." />';
288
- $content .= ' <param name="AnimationAtStart" value="true" />';
289
- $content .= ' <param name="scale" value="aspect" />';
290
- $content .= ' <param name="ShowControls" value="true" />';
291
- $content .= ' <param name="ShowCaptioning" value="false" />';
292
- $content .= ' <param name="ShowDisplay" value="false" />';
293
- $content .= ' <param name="ShowStatusBar" value="false" />';
294
- $content .= ' <embed type="application/x-mplayer2" src="'. $media_url .'" width="'. $player_width .'" height="'. $player_height .'" scale="ASPECT" autostart="'. ($autoplay?'1':'0') .'" ShowDisplay="0" ShowStatusBar="0" autosize="1" AnimationAtStart="1" AllowChangeDisplaySize="1" ShowControls="1"></embed>';
295
- $content .= '</object>';
296
- }
297
- else
298
- {
299
- if( $cover_image == '' )
300
- $cover_image = powerpress_get_root_url() . 'play_video_default.jpg';
301
-
302
- $content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="';
303
- $content .= "return powerpress_embed_winplayer('powerpress_player_{$g_powerpress_player_id}', '{$media_url}', {$player_width}, {$player_height} );";
304
- $content .= '">';
305
- $content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" />';
306
- $content .= '</a>';
307
- }
308
-
309
- if( $firefox )
310
- {
311
- $content .= '<p style="font-size: 85%;margin-top:0;">'. __('Best viewed with', 'powerpress');
312
- $content .= ' <a href="http://support.mozilla.com/en-US/kb/Using+the+Windows+Media+Player+plugin+with+Firefox#Installing_the_plugin" target="_blank">';
313
- $content .= __('Windows Media Player plugin for Firefox', 'powerpress') .'</a></p>';
314
- }
315
-
316
- $content .= "</div>\n";
317
-
318
- }; break;
319
-
320
- // Flash:
321
- case 'swf': {
322
-
323
- // If there is no cover image specified, lets use the default...
324
- if( $cover_image == '' )
325
- $cover_image = powerpress_get_root_url() . 'play_video_default.jpg';
326
-
327
- $content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">';
328
- if( !$autoplay )
329
- {
330
- $content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="';
331
- $content .= "return powerpress_embed_swf('powerpress_player_{$g_powerpress_player_id}', '{$media_url}', {$player_width}, {$player_height} );";
332
- $content .= '">';
333
- $content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" />';
334
- $content .= '</a>';
335
- }
336
- $content .= "</div>\n";
337
- if( $autoplay )
338
- {
339
- $content .= '<script type="text/javascript"><!--'.PHP_EOL;
340
- $content .= "powerpress_embed_swf('powerpress_player_{$g_powerpress_player_id}', '{$media_url}', {$player_width}, {$player_height} );\n";
341
- $content .= "//-->\n";
342
- $content .= "</script>\n";
343
- }
344
-
345
- }; break;
346
-
347
- // Default, just display the play image. If it is set for auto play, then we don't wnat to open a new window, otherwise we want to open this in a new window..
348
- default: {
349
-
350
- if( $cover_image == '' )
351
- $cover_image = powerpress_get_root_url() . 'play_video_default.jpg';
352
-
353
- $content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">';
354
- $content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'"'. ($autoplay?'':' target="_blank"') .'>';
355
- $content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" />';
356
- $content .= '</a>';
357
- $content .= "</div>\n";
358
-
359
- }; break;
360
- }
361
-
362
- return $content;
363
- }
364
-
365
- //add_filter('powerpress_player', 'powerpress_player_filter', 10, 3);
366
-
367
-
368
  /*
369
  // Everything in $ExtraData except post_id
370
  */
@@ -399,12 +237,25 @@ function powerpress_generate_embed($player, $EpisodeData) // $post_id, $feed_slu
399
  }
400
 
401
  $extension = powerpressplayer_get_extension($EpisodeData['url']);
402
- if( ($extension == 'mp3' || $extension == 'm4a') && empty($Settings['poster_image_audio']) )
403
  {
404
- $height = 24; // Hack for audio to only include the player without the poster art
405
- $width = 320;
406
- if( !empty($GeneralSettings['player_width_audio']) )
407
- $width = $GeneralSettings['player_width_audio'];
 
 
 
 
 
 
 
 
 
 
 
 
 
408
  }
409
  }
410
 
@@ -420,12 +271,15 @@ function powerpress_generate_embed($player, $EpisodeData) // $post_id, $feed_slu
420
  $embed .= ' height="'. $height .'"';
421
  $embed .= ' src="'. $url .'"';
422
  $embed .= ' frameborder="0" scrolling="no"';
 
 
423
  $embed .= '></iframe>';
424
  return $embed;
425
  }
426
 
427
  function powerpressplayer_build_embed($player, $media_url, $EpisodeData = array() )
428
  {
 
429
  if( !$player )
430
  return '';
431
 
@@ -476,6 +330,21 @@ function powerpressplayer_build_embed($player, $media_url, $EpisodeData = array(
476
  if( !empty($EpisodeData['height']) && is_numeric($EpisodeData['height']) )
477
  $height = $EpisodeData['height'];
478
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
479
  }; break;
480
  default: { // Other players are currently not supported
481
  return '';
@@ -489,6 +358,8 @@ function powerpressplayer_build_embed($player, $media_url, $EpisodeData = array(
489
 
490
  $url .= '&amp;powerpress_player='.$player;
491
  $embed .= '<iframe';
 
 
492
  $embed .= ' class="powerpress-player-embed"';
493
  $embed .= ' width="'. $width .'"';
494
  $embed .= ' height="'. $height .'"';
@@ -499,30 +370,72 @@ function powerpressplayer_build_embed($player, $media_url, $EpisodeData = array(
499
  }
500
 
501
 
502
- function powerpressplayer_in_embed($player, $media_url, $EpisodeData = array())
503
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  $content = '';
505
- $content .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'. PHP_EOL;
506
  $content .= '<html xmlns="http://www.w3.org/1999/xhtml">'. PHP_EOL;
507
  $content .= '<head>'. PHP_EOL;
508
  $content .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'. PHP_EOL;
509
  $content .= '<title>'. __('Blubrry PowerPress Player', 'powerpress') .'</title>'. PHP_EOL;
510
  $content .= '<meta name="robots" content="noindex" />'. PHP_EOL;
511
- $content .= '<script type="text/javascript" src="'. powerpress_get_root_url() .'player.js"></script>'. PHP_EOL;
 
512
  // Include jQuery for convenience
513
- $content .= '<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>'. PHP_EOL;
 
 
 
 
 
 
514
  $content .= '<script language="javascript" type="text/javascript"><!--'. PHP_EOL;
515
  $content .= 'powerpress_url = \''. powerpress_get_root_url() .'\''. PHP_EOL;
516
  $content .= 'jQuery(document).ready(function($) {'. PHP_EOL;
517
- $content .= ' powerpress_resize_player();'. PHP_EOL;
518
  $content .= ' $(window).resize(function() {'. PHP_EOL;
519
  $content .= ' powerpress_resize_player();'. PHP_EOL;
520
  $content .= ' });'. PHP_EOL;
521
 
522
  $content .= '});'. PHP_EOL;
 
 
 
 
 
 
 
523
  $content .= 'function powerpress_resize_player() {'. PHP_EOL;
524
- $content .= ' jQuery(\'video\').css(\'width\', jQuery(window).width() );'. PHP_EOL;
525
- $content .= ' jQuery(\'video\').css(\'height\', jQuery(window).height() );'. PHP_EOL;
 
 
 
 
 
 
 
 
526
  $content .= ' jQuery(\'.powerpress_player .powerpress-player-poster\').css(\'width\', jQuery(window).width() );'. PHP_EOL;
527
  $content .= ' jQuery(\'.powerpress_player .powerpress-player-poster\').css(\'height\', jQuery(window).height() );'. PHP_EOL;
528
  $content .= ' jQuery(\'.powerpress_player .powerpress-player-play-image\').css(\'bottom\', Math.floor( (jQuery(window).height()/2)-30)+\'px\');'. PHP_EOL;
@@ -554,7 +467,7 @@ function powerpressplayer_in_embed($player, $media_url, $EpisodeData = array())
554
  }
555
 
556
  $content .= '<style type="text/css" media="screen">' . PHP_EOL;
557
- $content .= ' body { font-size: 13px; font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0; } img { border: 0; }' . PHP_EOL;
558
  $content .= '</style>' . PHP_EOL;
559
  $content .= '</head>'. PHP_EOL;
560
  $content .= '<body>'. PHP_EOL;
@@ -575,6 +488,14 @@ function powerpressplayer_in_embed($player, $media_url, $EpisodeData = array())
575
  case 'html5video': {
576
  $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
577
  }; break;
 
 
 
 
 
 
 
 
578
  default: {
579
  $content .= '<strong>'. __('Player Not Available', 'powerpress') .'</strong>';
580
  };
@@ -582,7 +503,7 @@ function powerpressplayer_in_embed($player, $media_url, $EpisodeData = array())
582
 
583
  $content .= '</body>'. PHP_EOL;
584
  $content .= '</html>'. PHP_EOL;
585
- return $content;
586
  }
587
 
588
 
@@ -608,9 +529,11 @@ function powerpressplayer_player_audio($content, $media_url, $EpisodeData = arra
608
  case 'mp3':
609
  {
610
  $Settings = get_option('powerpress_general');
611
- if( !isset($Settings['player']) )
 
 
612
  $Settings['player'] = 'default';
613
-
614
  switch( $Settings['player'] )
615
  {
616
  case 'default':
@@ -632,6 +555,9 @@ function powerpressplayer_player_audio($content, $media_url, $EpisodeData = arra
632
  case 'html5audio': {
633
  $content .= powerpressplayer_build_html5audio($media_url, $EpisodeData);
634
  }; break;
 
 
 
635
  }
636
 
637
  }; break;
@@ -641,7 +567,9 @@ function powerpressplayer_player_audio($content, $media_url, $EpisodeData = arra
641
  if( empty($Settings['m4a']) || $Settings['m4a'] != 'use_players' )
642
  break;
643
 
644
- if( !isset($Settings['player']) )
 
 
645
  $Settings['player'] = 'default';
646
 
647
  switch( $Settings['player'] )
@@ -653,6 +581,9 @@ function powerpressplayer_player_audio($content, $media_url, $EpisodeData = arra
653
  case 'html5audio': {
654
  $content .= powerpressplayer_build_html5audio($media_url, $EpisodeData);
655
  }; break;
 
 
 
656
  default: {
657
  $content .= powerpressplayer_build_playimageaudio($media_url, true);
658
  };
@@ -665,7 +596,19 @@ function powerpressplayer_player_audio($content, $media_url, $EpisodeData = arra
665
  return $content; // Ogg is handled as video
666
  }
667
  case 'oga': {
668
- $content .= powerpressplayer_build_html5audio($media_url, $EpisodeData);
 
 
 
 
 
 
 
 
 
 
 
 
669
  }; break;
670
  }
671
 
@@ -693,7 +636,9 @@ function powerpressplayer_player_video($content, $media_url, $EpisodeData = arra
693
  case 'webm':
694
  case 'ogv': { // Use native player when possible
695
  $Settings = get_option('powerpress_general');
696
- if( !isset($Settings['video_player']) )
 
 
697
  $Settings['video_player'] = 'html5video';
698
 
699
  // HTML5 Video as an embed
@@ -702,6 +647,9 @@ function powerpressplayer_player_video($content, $media_url, $EpisodeData = arra
702
  case 'videojs-html5-video-player-for-wordpress': {
703
  $content .= powerpressplayer_build_videojs($media_url, $EpisodeData);
704
  }; break;
 
 
 
705
  default: {
706
  $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
707
  }; break;
@@ -712,10 +660,11 @@ function powerpressplayer_player_video($content, $media_url, $EpisodeData = arra
712
  case 'mp4':
713
  // Okay, lets see if we we have a player setup to handle this
714
  {
715
-
716
  $Settings = get_option('powerpress_general');
717
- if( !isset($Settings['video_player']) )
718
- $Settings['video_player'] = 'html5video';
 
 
719
 
720
  switch( $Settings['video_player'] )
721
  {
@@ -731,6 +680,9 @@ function powerpressplayer_player_video($content, $media_url, $EpisodeData = arra
731
  // HTML5 Video as an embed
732
  $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
733
  }; break;
 
 
 
734
  }
735
  }; break;
736
  }
@@ -1024,36 +976,36 @@ function powerpressplayer_embedable($media_url, $ExtraData = array())
1024
 
1025
  $extension = powerpressplayer_get_extension($media_url);
1026
  $player = false;
1027
- if( preg_match('/(mp3|m4a|mp4|m4v|webm|ogg|ogv)/i', $extension ) )
1028
  {
1029
  $GeneralSettings = get_option('powerpress_general');
1030
  if( empty($GeneralSettings['podcast_embed']) )
1031
  return false;
1032
- if( !isset($GeneralSettings['player']) )
 
 
1033
  $GeneralSettings['player'] = 'default';
1034
- if( !isset($GeneralSettings['video_player']) )
 
 
 
1035
  $GeneralSettings['video_player'] = 'flow-player-classic';
1036
 
1037
  switch( $extension )
1038
  {
1039
  case 'mp3':
 
1040
  case 'm4a': {
1041
- //if( $GeneralSettings['player'] == 'default' )
1042
- // $player = $GeneralSettings['player'];
1043
- $player = 'default';
1044
  }; break;
1045
  case 'mp4':
1046
- case 'm4v': {
1047
- //if( $GeneralSettings['video_player'] == 'flow-player-classic' || $GeneralSettings['video_player'] == 'html5video' )
1048
- // $player = $GeneralSettings['video_player'];
1049
- $player = 'html5video';
1050
- }; break;
1051
  case 'webm':
1052
  case 'ogg':
1053
  case 'ogv': {
1054
- //if( $GeneralSettings['video_player'] == 'html5video' )
1055
- // $player = $GeneralSettings['video_player'];
1056
- $player = 'html5video';
1057
  }; break;
1058
  }
1059
  }
@@ -1132,7 +1084,9 @@ function powerpress_do_pinw($pinw, $process_podpress)
1132
  $EpisodeData = powerpress_get_enclosure_data_podpress($post_id);
1133
  }
1134
 
1135
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
 
 
1136
  ?>
1137
  <html xmlns="http://www.w3.org/1999/xhtml">
1138
  <head>
@@ -1141,19 +1095,42 @@ function powerpress_do_pinw($pinw, $process_podpress)
1141
  <meta name="robots" content="noindex" />
1142
  <?php
1143
 
1144
- if( defined('POWERPRESS_ENQUEUE_SCRIPTS') )
1145
- wp_enqueue_script( 'powerpress-player', powerpress_get_root_url() .'player.js');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1146
 
1147
- wp_head();
1148
  ?>
1149
  <style type="text/css">
1150
- body { font-size: 13px; font-family: Arial, Helvetica, sans-serif; }
1151
  </style>
1152
  </head>
1153
  <body>
1154
  <div style="margin: 5px;">
1155
  <?php
1156
- $GeneralSettings = get_option('powerpress_general');
1157
  if( !$EpisodeData )
1158
  {
1159
  echo '<p>'. __('Unable to retrieve media information.', 'powerpress') .'</p>';
@@ -1193,7 +1170,7 @@ function powerpress_do_embed($player, $embed, $process_podpress)
1193
  }
1194
 
1195
  // Embeds are only available for the following players
1196
- echo powerpressplayer_in_embed($player, $EpisodeData['url'], $EpisodeData);
1197
  exit;
1198
  }
1199
 
@@ -1299,6 +1276,70 @@ function powerpressplayer_build_html5video($media_url, $EpisodeData=array(), $em
1299
  return $content;
1300
  }
1301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1302
  /*
1303
  HTTML 5 Audio Player
1304
  */
@@ -1315,8 +1356,6 @@ function powerpressplayer_build_html5audio($media_url, $EpisodeData=array(), $em
1315
  $content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">'.PHP_EOL;
1316
  $content .= '<audio controls="controls"';
1317
  $content .=' src="'. $media_url .'"';
1318
- if( $cover_image )
1319
- $content .= ' poster="'. $cover_image .'"';
1320
  if( $autoplay )
1321
  $content .= ' autoplay="autoplay"';
1322
  else
@@ -1358,6 +1397,46 @@ function powerpressplayer_build_html5audio($media_url, $EpisodeData=array(), $em
1358
  return $content;
1359
  }
1360
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1361
  /*
1362
  HTTML 5 Mobile Player
1363
  */
@@ -1381,7 +1460,12 @@ function powerpressplayer_build_html5mobile($media_url, $EpisodeData)
1381
  case 'ogg':
1382
  case 'ogv': {
1383
  // Video
1384
- if( $html5 )
 
 
 
 
 
1385
  $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
1386
  else
1387
  $content .= powerpressplayer_build_playimage($media_url, $EpisodeData, true);
@@ -1390,7 +1474,12 @@ function powerpressplayer_build_html5mobile($media_url, $EpisodeData)
1390
  case 'm4a':
1391
  case 'oga': {
1392
  // Audio
1393
- if( $html5 )
 
 
 
 
 
1394
  $content .= powerpressplayer_build_html5audio($media_url, $EpisodeData);
1395
  else
1396
  $content .= powerpressplayer_build_playimageaudio($media_url, true);
@@ -1969,6 +2058,4 @@ function powerpressplayer_build_videojs($media_url, $EpisodeData = array())
1969
  return $content;
1970
  }
1971
 
1972
-
1973
-
1974
  ?>
38
  if( isset($_GET['powerpress_embed']) )
39
  {
40
  $player = ( !empty($_GET['powerpress_player']) ? $_GET['powerpress_player'] : 'default' );
41
+ if( empty($_GET['powerpress_player']) && version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
42
+ $player = 'mediaelement-audio';
43
  powerpress_do_embed($player, $_GET['powerpress_embed'], !empty($GeneralSettings['process_podpress']) );
44
  }
45
 
49
  add_shortcode('display_podcast', 'powerpress_shortcode_handler');
50
  }
51
 
52
+
53
+ // include what's needed for each plaer
54
+ wp_enqueue_script( 'powerpress-player', powerpress_get_root_url() .'player.js');
55
+
56
+
57
+ $enqueue_mejs = false;
58
+ if( !isset($GeneralSettings['player']) || !isset($GeneralSettings['video_player']) )
59
+ {
60
+ if( version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
61
+ $enqueue_mejs = true;
62
+ }
63
+ else if( !empty($GeneralSettings['player']) && $GeneralSettings['player'] == 'mediaelement-audio' )
64
  {
65
+ $enqueue_mejs = true;
66
+ }
67
+ else if( !empty($GeneralSettings['video_player']) && $GeneralSettings['video_player'] == 'mediaelement-video' )
68
+ {
69
+ $enqueue_mejs = true;
70
  }
71
 
72
+ if( $enqueue_mejs )
 
73
  {
74
+ wp_enqueue_style('mediaelement');
75
+ wp_enqueue_style('wp-mediaelement');
76
+ wp_enqueue_script('mediaelement');
77
+ wp_enqueue_script( 'powerpress-mejs', powerpress_get_root_url() .'powerpress-mejs.js');
78
  }
 
79
  }
80
 
81
 
203
  add_shortcode('podcast', 'powerpress_shortcode_handler');
204
  }
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  /*
207
  // Everything in $ExtraData except post_id
208
  */
237
  }
238
 
239
  $extension = powerpressplayer_get_extension($EpisodeData['url']);
240
+ if( $player == 'mediaelement-audio' )
241
  {
242
+ if( $extension == 'mp3' || $extension == 'm4a' || $extension == 'oga')
243
+ {
244
+ $height = 30; // Hack for audio to only include the player without the poster art
245
+ $width = 320;
246
+ if( !empty($GeneralSettings['player_width_audio']) )
247
+ $width = $GeneralSettings['player_width_audio'];
248
+ }
249
+ }
250
+ else if ( $player == 'default' )
251
+ {
252
+ if( ($extension == 'mp3' || $extension == 'm4a' ) && empty($Settings['poster_image_audio']) )
253
+ {
254
+ $height = 24; // Hack for audio to only include the player without the poster art
255
+ $width = 320;
256
+ if( !empty($GeneralSettings['player_width_audio']) )
257
+ $width = $GeneralSettings['player_width_audio'];
258
+ }
259
  }
260
  }
261
 
271
  $embed .= ' height="'. $height .'"';
272
  $embed .= ' src="'. $url .'"';
273
  $embed .= ' frameborder="0" scrolling="no"';
274
+ if($extension != 'mp3' && $extension != 'm4a' && $extension != 'oga')
275
+ $embed .= ' webkitAllowFullScreen mozallowfullscreen allowFullScreen';
276
  $embed .= '></iframe>';
277
  return $embed;
278
  }
279
 
280
  function powerpressplayer_build_embed($player, $media_url, $EpisodeData = array() )
281
  {
282
+ return ''; // This function does not do anything at this time.
283
  if( !$player )
284
  return '';
285
 
330
  if( !empty($EpisodeData['height']) && is_numeric($EpisodeData['height']) )
331
  $height = $EpisodeData['height'];
332
 
333
+ }; break;
334
+ case 'mediaelement-audio': {
335
+
336
+ $PlayerSettings = get_option('powerpress_mediaelement');
337
+ $height = 20;
338
+ $width = 200;
339
+ if( !empty($PlayerSettings['width']) && is_numeric($PlayerSettings['width']) )
340
+ $width = $PlayerSettings['width'];
341
+ if( !empty($PlayerSettings['height']) && is_numeric($PlayerSettings['height']) )
342
+ $height = $PlayerSettings['height'];
343
+ if( !empty($EpisodeData['width']) && is_numeric($EpisodeData['width']) )
344
+ $width = $EpisodeData['width'];
345
+ if( !empty($EpisodeData['height']) && is_numeric($EpisodeData['height']) )
346
+ $height = $EpisodeData['height'];
347
+
348
  }; break;
349
  default: { // Other players are currently not supported
350
  return '';
358
 
359
  $url .= '&amp;powerpress_player='.$player;
360
  $embed .= '<iframe';
361
+ if( 1 )
362
+ $embed .= ' webkitAllowFullScreen mozallowfullscreen allowFullScreen';
363
  $embed .= ' class="powerpress-player-embed"';
364
  $embed .= ' width="'. $width .'"';
365
  $embed .= ' height="'. $height .'"';
370
  }
371
 
372
 
373
+ function do_powerpressplayer_embed($player, $media_url, $EpisodeData = array())
374
  {
375
+ // Includde the stuff we need...
376
+ switch( $player )
377
+ {
378
+ case 'mejs-a':
379
+ case 'mejs-v':
380
+ case 'mediaelement-audio':
381
+ case 'mediaelement-video': {
382
+ // Enqueue stuff for mediaelements
383
+
384
+ wp_enqueue_style('mediaelement');
385
+ wp_enqueue_style('wp-mediaelement');
386
+ wp_enqueue_script('mediaelement');
387
+ //wp_enqueue_script( 'powerpress-mejs', powerpress_get_root_url() .'powerpress-mejs.js');
388
+ }; break;
389
+ default: {
390
+ //wp_enqueue_script('jquery');
391
+ }; break;
392
+ }
393
+ wp_enqueue_script('jquery');
394
+
395
  $content = '';
396
+ $content .= '<!DOCTYPE html>'. PHP_EOL;
397
  $content .= '<html xmlns="http://www.w3.org/1999/xhtml">'. PHP_EOL;
398
  $content .= '<head>'. PHP_EOL;
399
  $content .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'. PHP_EOL;
400
  $content .= '<title>'. __('Blubrry PowerPress Player', 'powerpress') .'</title>'. PHP_EOL;
401
  $content .= '<meta name="robots" content="noindex" />'. PHP_EOL;
402
+ // $content .= '<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>'. PHP_EOL;
403
+ echo $content;
404
  // Include jQuery for convenience
405
+
406
+ wp_print_styles();
407
+ wp_print_scripts();
408
+
409
+ $content = '';
410
+ $content .= '<script type="text/javascript" src="'. powerpress_get_root_url() .'player.js"></script>'. PHP_EOL;
411
+
412
  $content .= '<script language="javascript" type="text/javascript"><!--'. PHP_EOL;
413
  $content .= 'powerpress_url = \''. powerpress_get_root_url() .'\''. PHP_EOL;
414
  $content .= 'jQuery(document).ready(function($) {'. PHP_EOL;
415
+ $content .= ' powerpress_load_player();'. PHP_EOL;
416
  $content .= ' $(window).resize(function() {'. PHP_EOL;
417
  $content .= ' powerpress_resize_player();'. PHP_EOL;
418
  $content .= ' });'. PHP_EOL;
419
 
420
  $content .= '});'. PHP_EOL;
421
+
422
+ $content .= 'function powerpress_load_player() {'. PHP_EOL;
423
+ $content .= ' jQuery(\'.powerpress-mejs-audio, .powerpress-mejs-video\').css(\'width\', jQuery(window).width() );'. PHP_EOL;
424
+ $content .= ' jQuery(\'.powerpress-mejs-audio, .powerpress-mejs-video\').css(\'height\', jQuery(window).height() );'. PHP_EOL;
425
+ $content .= ' jQuery(\'.powerpress-mejs-audio, .powerpress-mejs-video\').mediaelementplayer();'.PHP_EOL;
426
+ $content .= '}'. PHP_EOL;
427
+
428
  $content .= 'function powerpress_resize_player() {'. PHP_EOL;
429
+ //$content .= ' var width = jQuery(window).width(); var height = jQuery(window).height();'.PHP_EOL;
430
+ //$content .= ' if( (height * 0.5625) > width ) { alert(\'need to adjust height!\'); }'.PHP_EOL;
431
+ //$content .= ' if( (height * 0.5625) < width ) { width = Math.floor((height * 16)/9); }'.PHP_EOL;
432
+ //$content .= ' $(\'player\')[0].player.media.setPlayerSize( width, height )'.PHP_EOL;
433
+ $content .= ' jQuery(\'.powerpress_player\').css(\'width\', jQuery(window).width() );'. PHP_EOL;
434
+ $content .= ' jQuery(\'.powerpress_player\').css(\'height\', jQuery(window).height() );'. PHP_EOL;
435
+ $content .= ' jQuery(\'.powerpress-mejs-video, .powerpress-mejs-audio\').css(\'width\', jQuery(window).width() );'. PHP_EOL;
436
+ $content .= ' jQuery(\'.powerpress-mejs-video, .powerpress-mejs-audio\').css(\'height\', jQuery(window).height() );'. PHP_EOL;
437
+ //$content .= ' alert(\'Height: \'+ jQuery(window).height() );'. PHP_EOL;
438
+
439
  $content .= ' jQuery(\'.powerpress_player .powerpress-player-poster\').css(\'width\', jQuery(window).width() );'. PHP_EOL;
440
  $content .= ' jQuery(\'.powerpress_player .powerpress-player-poster\').css(\'height\', jQuery(window).height() );'. PHP_EOL;
441
  $content .= ' jQuery(\'.powerpress_player .powerpress-player-play-image\').css(\'bottom\', Math.floor( (jQuery(window).height()/2)-30)+\'px\');'. PHP_EOL;
467
  }
468
 
469
  $content .= '<style type="text/css" media="screen">' . PHP_EOL;
470
+ $content .= ' body { font-size: 13px; font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0; } img { border: 0; } ' . PHP_EOL;
471
  $content .= '</style>' . PHP_EOL;
472
  $content .= '</head>'. PHP_EOL;
473
  $content .= '<body>'. PHP_EOL;
488
  case 'html5video': {
489
  $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
490
  }; break;
491
+ case 'mediaelement-audio':
492
+ case 'mejs-a': {
493
+ $content .= powerpressplayer_build_mediaelementaudio($media_url, $EpisodeData, true);
494
+ }; break;
495
+ case 'mediaelement-video':
496
+ case 'mejs-v': {
497
+ $content .= powerpressplayer_build_mediaelementvideo($media_url, $EpisodeData, true);
498
+ }; break;
499
  default: {
500
  $content .= '<strong>'. __('Player Not Available', 'powerpress') .'</strong>';
501
  };
503
 
504
  $content .= '</body>'. PHP_EOL;
505
  $content .= '</html>'. PHP_EOL;
506
+ echo $content;
507
  }
508
 
509
 
529
  case 'mp3':
530
  {
531
  $Settings = get_option('powerpress_general');
532
+ if( !isset($Settings['player']) && version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
533
+ $Settings['player'] = 'mediaelement-audio';
534
+ else if( !isset($Settings['player']) )
535
  $Settings['player'] = 'default';
536
+
537
  switch( $Settings['player'] )
538
  {
539
  case 'default':
555
  case 'html5audio': {
556
  $content .= powerpressplayer_build_html5audio($media_url, $EpisodeData);
557
  }; break;
558
+ case 'mediaelement-audio': {
559
+ $content .= powerpressplayer_build_mediaelementaudio($media_url, $EpisodeData);
560
+ }; break;
561
  }
562
 
563
  }; break;
567
  if( empty($Settings['m4a']) || $Settings['m4a'] != 'use_players' )
568
  break;
569
 
570
+ if( !isset($Settings['player']) && version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
571
+ $Settings['player'] = 'mediaelement-audio';
572
+ else if( !isset($Settings['player']) )
573
  $Settings['player'] = 'default';
574
 
575
  switch( $Settings['player'] )
581
  case 'html5audio': {
582
  $content .= powerpressplayer_build_html5audio($media_url, $EpisodeData);
583
  }; break;
584
+ case 'mediaelement-audio': {
585
+ $content .= powerpressplayer_build_mediaelementaudio($media_url, $EpisodeData);
586
+ }; break;
587
  default: {
588
  $content .= powerpressplayer_build_playimageaudio($media_url, true);
589
  };
596
  return $content; // Ogg is handled as video
597
  }
598
  case 'oga': {
599
+ if( !isset($Settings['player']) && version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
600
+ $Settings['player'] = 'mediaelement-audio';
601
+
602
+ switch( $Settings['player'] )
603
+ {
604
+ case 'mediaelement-audio': {
605
+ $content .= powerpressplayer_build_mediaelementaudio($media_url, $EpisodeData);
606
+ }; break;
607
+ case 'html5audio':
608
+ default: {
609
+ $content .= powerpressplayer_build_html5audio($media_url, $EpisodeData);
610
+ }
611
+ }
612
  }; break;
613
  }
614
 
636
  case 'webm':
637
  case 'ogv': { // Use native player when possible
638
  $Settings = get_option('powerpress_general');
639
+ if( !isset($Settings['video_player']) && version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
640
+ $Settings['video_player'] = 'mediaelement-video';
641
+ else if( !isset($Settings['video_player']) )
642
  $Settings['video_player'] = 'html5video';
643
 
644
  // HTML5 Video as an embed
647
  case 'videojs-html5-video-player-for-wordpress': {
648
  $content .= powerpressplayer_build_videojs($media_url, $EpisodeData);
649
  }; break;
650
+ case 'mediaelement-video': {
651
+ $content .= powerpressplayer_build_mediaelementvideo($media_url, $EpisodeData);
652
+ }; break;
653
  default: {
654
  $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
655
  }; break;
660
  case 'mp4':
661
  // Okay, lets see if we we have a player setup to handle this
662
  {
 
663
  $Settings = get_option('powerpress_general');
664
+ if( !isset($Settings['video_player']) && version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
665
+ $Settings['video_player'] = 'mediaelement-video';
666
+ else if( !isset($Settings['video_player']) )
667
+ $Settings['video_player'] = 'default';
668
 
669
  switch( $Settings['video_player'] )
670
  {
680
  // HTML5 Video as an embed
681
  $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
682
  }; break;
683
+ case 'mediaelement-video': {
684
+ $content .= powerpressplayer_build_mediaelementvideo($media_url, $EpisodeData);
685
+ }; break;
686
  }
687
  }; break;
688
  }
976
 
977
  $extension = powerpressplayer_get_extension($media_url);
978
  $player = false;
979
+ if( preg_match('/(mp3|m4a|oga|mp4|m4v|webm|ogg|ogv)/i', $extension ) )
980
  {
981
  $GeneralSettings = get_option('powerpress_general');
982
  if( empty($GeneralSettings['podcast_embed']) )
983
  return false;
984
+ if( !isset($GeneralSettings['player']) && version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
985
+ $GeneralSettings['player'] = 'mediaelement-audio';
986
+ else if( !isset($GeneralSettings['player']) )
987
  $GeneralSettings['player'] = 'default';
988
+
989
+ if( !isset($GeneralSettings['video_player']) && version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
990
+ $GeneralSettings['video_player'] = 'mediaelement-video';
991
+ else if( !isset($GeneralSettings['video_player']) )
992
  $GeneralSettings['video_player'] = 'flow-player-classic';
993
 
994
  switch( $extension )
995
  {
996
  case 'mp3':
997
+ case 'oga':
998
  case 'm4a': {
999
+ if( in_array( $GeneralSettings['player'], array('mediaelement-audio', 'flow-player-classic') ) )
1000
+ $player = $GeneralSettings['player'];
 
1001
  }; break;
1002
  case 'mp4':
1003
+ case 'm4v':
 
 
 
 
1004
  case 'webm':
1005
  case 'ogg':
1006
  case 'ogv': {
1007
+ if( in_array( $GeneralSettings['video_player'], array('mediaelement-video', 'html5video', 'flow-player-classic') ) )
1008
+ $player = $GeneralSettings['video_player'];
 
1009
  }; break;
1010
  }
1011
  }
1084
  $EpisodeData = powerpress_get_enclosure_data_podpress($post_id);
1085
  }
1086
 
1087
+ $GeneralSettings = get_option('powerpress_general');
1088
+
1089
+ echo '<!DOCTYPE html>'; // HTML5!
1090
  ?>
1091
  <html xmlns="http://www.w3.org/1999/xhtml">
1092
  <head>
1095
  <meta name="robots" content="noindex" />
1096
  <?php
1097
 
1098
+ wp_enqueue_script( 'powerpress-player', powerpress_get_root_url() .'player.js');
1099
+
1100
+ if( version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
1101
+ {
1102
+ $include_mejs = false;
1103
+ if( empty($GeneralSettings['player']) || empty($GeneralSettings['video_player']) )
1104
+ {
1105
+ $include_mejs = true;
1106
+ }
1107
+ else if( !empty($GeneralSettings['player']) && ($GeneralSettings['player'] == 'mediaelement-audio' || $GeneralSettings['video_player'] == 'mediaelement-video' ) )
1108
+ {
1109
+ $include_mejs = true;
1110
+ }
1111
+
1112
+ if( $include_mejs )
1113
+ {
1114
+ wp_enqueue_style('mediaelement');
1115
+ wp_enqueue_style('wp-mediaelement');
1116
+ wp_enqueue_script('mediaelement');
1117
+ wp_enqueue_script( 'powerpress-mejs', powerpress_get_root_url() .'powerpress-mejs.js');
1118
+ }
1119
+ }
1120
+
1121
+ wp_print_styles();
1122
+ wp_print_scripts();
1123
 
1124
+ //wp_head();
1125
  ?>
1126
  <style type="text/css">
1127
+ body { font-size: 13px; font-family: Arial, Helvetica, sans-serif; /* width: 100%; min-height: 100%; } html { height: 100%; */ }
1128
  </style>
1129
  </head>
1130
  <body>
1131
  <div style="margin: 5px;">
1132
  <?php
1133
+
1134
  if( !$EpisodeData )
1135
  {
1136
  echo '<p>'. __('Unable to retrieve media information.', 'powerpress') .'</p>';
1170
  }
1171
 
1172
  // Embeds are only available for the following players
1173
+ do_powerpressplayer_embed($player, $EpisodeData['url'], $EpisodeData);
1174
  exit;
1175
  }
1176
 
1276
  return $content;
1277
  }
1278
 
1279
+ /*
1280
+ MediaElement.js Video Player
1281
+ */
1282
+ function powerpressplayer_build_mediaelementvideo($media_url, $EpisodeData=array(), $embed = false )
1283
+ {
1284
+ $player_id = powerpressplayer_get_next_id();
1285
+ $cover_image = '';
1286
+ $player_width = 400;
1287
+ $player_height = 225;
1288
+ $autoplay = false;
1289
+ // Global Settings
1290
+ $Settings = get_option('powerpress_general');
1291
+ if( !empty($Settings['player_width']) )
1292
+ $player_width = $Settings['player_width'];
1293
+ if( !empty($Settings['player_height']) )
1294
+ $player_height = $Settings['player_height'];
1295
+ if( !empty($Settings['poster_image']) )
1296
+ $cover_image = $Settings['poster_image'];
1297
+ // Episode Settings
1298
+ if( !empty($EpisodeData['image']) )
1299
+ $cover_image = $EpisodeData['image'];
1300
+ if( !empty($EpisodeData['width']) )
1301
+ $player_width = $EpisodeData['width'];
1302
+ if( !empty($EpisodeData['height']) )
1303
+ $player_height = $EpisodeData['height'];
1304
+ if( !empty($EpisodeData['autoplay']) )
1305
+ $autoplay = true;
1306
+
1307
+
1308
+
1309
+
1310
+ $content = '';
1311
+
1312
+ $content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">'.PHP_EOL;
1313
+ $content .= '<video class="powerpress-mejs-video" width="'. $player_width .'" height="'. $player_height .'" controls="controls"';
1314
+ if( $cover_image )
1315
+ $content .= ' poster="'. $cover_image .'"';
1316
+ if( $autoplay )
1317
+ $content .= ' autoplay="autoplay"';
1318
+ else
1319
+ $content .= ' preload="none"';
1320
+ $content .= '>'.PHP_EOL;
1321
+ $content_type = powerpress_get_contenttype($media_url);
1322
+
1323
+ // Prevent pre-loading in certain browsers
1324
+ $media_url_src = $media_url;
1325
+ if( preg_match('/msie|webkit|applecoremedia/i', $_SERVER['HTTP_USER_AGENT']) && !preg_match('/chrome/i', $_SERVER['HTTP_USER_AGENT']) ) {
1326
+ $media_url_src = '#'.$media_url;
1327
+ }
1328
+
1329
+ $content .='<source src="'. $media_url_src .'" type="'. $content_type .'" />';
1330
+
1331
+ if( !empty($EpisodeData['webm_src']) )
1332
+ {
1333
+ $EpisodeData['webm_src'] = powerpress_add_flag_to_redirect_url($EpisodeData['webm_src'], 'p');
1334
+ $content .='<source src="'. $EpisodeData['webm_src'] .'" type="video/webm" />';
1335
+ }
1336
+
1337
+ $content .= powerpressplayer_build_playimage($media_url, $EpisodeData);
1338
+ $content .= '</video>'.PHP_EOL;
1339
+ $content .= '</div>'.PHP_EOL;
1340
+ return $content;
1341
+ }
1342
+
1343
  /*
1344
  HTTML 5 Audio Player
1345
  */
1356
  $content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">'.PHP_EOL;
1357
  $content .= '<audio controls="controls"';
1358
  $content .=' src="'. $media_url .'"';
 
 
1359
  if( $autoplay )
1360
  $content .= ' autoplay="autoplay"';
1361
  else
1397
  return $content;
1398
  }
1399
 
1400
+ /*
1401
+ MediaElement.js Audio Player
1402
+ */
1403
+ function powerpressplayer_build_mediaelementaudio($media_url, $EpisodeData=array(), $embed = false )
1404
+ {
1405
+ $player_id = powerpressplayer_get_next_id();
1406
+ $autoplay = false;
1407
+ // Episode Settings
1408
+ if( !empty($EpisodeData['autoplay']) )
1409
+ $autoplay = true;
1410
+ $content = '';
1411
+
1412
+
1413
+ $content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">'.PHP_EOL;
1414
+ $content .= '<audio class="powerpress-mejs-audio" controls="controls"';
1415
+
1416
+ // Prevent pre-loading in certain browsers
1417
+ $media_url_src = $media_url;
1418
+ if( preg_match('/msie|webkit|applecoremedia/i', $_SERVER['HTTP_USER_AGENT']) && !preg_match('/chrome/i', $_SERVER['HTTP_USER_AGENT']) ) {
1419
+ $media_url_src = '#'.$media_url;
1420
+ }
1421
+
1422
+ $content .=' src="'. $media_url_src .'"';
1423
+ //if( $cover_image ) // Audio does not have a coverart image (not yet anyway)
1424
+ // $content .= ' poster="'. $cover_image .'"';
1425
+ if( $autoplay )
1426
+ $content .= ' autoplay="autoplay"';
1427
+ else
1428
+ $content .= ' preload="none"';
1429
+ $content .= '>'.PHP_EOL;
1430
+
1431
+
1432
+ $content .= powerpressplayer_build_playimageaudio($media_url);
1433
+ $content .= '</audio>'.PHP_EOL;
1434
+ $content .= '</div>'.PHP_EOL;
1435
+
1436
+
1437
+ return $content;
1438
+ }
1439
+
1440
  /*
1441
  HTTML 5 Mobile Player
1442
  */
1460
  case 'ogg':
1461
  case 'ogv': {
1462
  // Video
1463
+ $Settings = get_option('powerpress_general');
1464
+
1465
+ // MEJS is not ready for mobile, using native HTML5 performs more efficiently at this point. Someday though we will be able to use MEJS for mobile.
1466
+ if( false && $html5 && !empty($Settings['video_player']) && $Settings['video_player'] == 'mediaelement-video' )
1467
+ $content .= powerpressplayer_build_mediaelementvideo($media_url, $EpisodeData);
1468
+ else if( $html5 )
1469
  $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
1470
  else
1471
  $content .= powerpressplayer_build_playimage($media_url, $EpisodeData, true);
1474
  case 'm4a':
1475
  case 'oga': {
1476
  // Audio
1477
+ $Settings = get_option('powerpress_general');
1478
+
1479
+ // MEJS is not ready for mobile, using native HTML5 performs more efficiently at this point. Someday though we will be able to use MEJS for mobile.
1480
+ if( false && $html5 && !empty($Settings['player']) && $Settings['player'] == 'mediaelement-audio' )
1481
+ $content .= powerpressplayer_build_mediaelementaudio($media_url, $EpisodeData);
1482
+ else if( $html5 )
1483
  $content .= powerpressplayer_build_html5audio($media_url, $EpisodeData);
1484
  else
1485
  $content .= powerpressplayer_build_playimageaudio($media_url, true);
2058
  return $content;
2059
  }
2060
 
 
 
2061
  ?>
powerpress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="http://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> 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.9
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Change Log:
@@ -11,8 +11,7 @@ Change Log:
11
 
12
  Contributors:
13
  Angelo Mandato, CIO RawVoice - Plugin founder, architect and lead developer
14
- Pat McSweeny, Developer for RawVoice - Developed initial version (v0.1.0) of plugin
15
- Jerry Stephens, Way of the Geek (http://wayofthegeek.org/) - Contributed initial code fix for excerpt bug resolved in v0.6.1
16
 
17
  Credits:
18
  getID3(), License: GPL 2.0+ by James Heinrich <info [at] getid3.org> http://www.getid3.org
@@ -33,7 +32,7 @@ if( !function_exists('add_action') )
33
  die("access denied.");
34
 
35
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
36
- define('POWERPRESS_VERSION', '4.0.9' );
37
 
38
  // Translation support:
39
  if ( !defined('POWERPRESS_ABSPATH') )
@@ -80,8 +79,6 @@ if( !defined('POWERPRESS_CAPABILITY_MANAGE_OPTIONS') )
80
  define('POWERPRESS_CAPABILITY_MANAGE_OPTIONS', 'manage_options');
81
  if( !defined('POWERPRESS_CAPABILITY_EDIT_PAGES') )
82
  define('POWERPRESS_CAPABILITY_EDIT_PAGES', 'edit_pages');
83
-
84
- //define('POWERPRESS_ENQUEUE_SCRIPTS', true); // Add this define to your wp-config.php if you want the audio.js enqueued with other plugin scripts in your blog.
85
 
86
  //define('POWERPRESS_ENABLE_HTTPS_MEDIA', true); // Add this define to your wp-config.php if you wnat to allow media URLs that begin with https://
87
 
@@ -319,10 +316,6 @@ function powerpress_header()
319
  if( !isset($Powerpress['player_function']) || $Powerpress['player_function'] > 0 ) // Don't include the player in the header if it is not needed...
320
  {
321
  $PowerpressPluginURL = powerpress_get_root_url();
322
- if( !defined('POWERPRESS_ENQUEUE_SCRIPTS') )
323
- {
324
- echo "<script type=\"text/javascript\" src=\"". powerpress_get_root_url() ."player.js\"></script>\n";
325
- }
326
  ?>
327
  <script type="text/javascript"><!--
328
  <?php
@@ -332,12 +325,12 @@ function powerpress_header()
332
  if( isset($Powerpress['new_window_width']) && $Powerpress['new_window_width'] > 0 )
333
  $new_window_width = $Powerpress['new_window_width'];
334
  else if( isset($Powerpress['new_window_width']) )
335
- $new_window_width = 50;
336
 
337
  if( isset($Powerpress['new_window_height']) && $Powerpress['new_window_height'] > 0 )
338
  $new_window_height = $Powerpress['new_window_height'];
339
  else if( isset($Powerpress['new_window_height']) )
340
- $new_window_height = 20;
341
 
342
  if( empty($Powerpress['new_window_nofactor']) )
343
  {
@@ -424,7 +417,12 @@ function powerpress_rss2_head()
424
  $General = get_option('powerpress_general');
425
 
426
  // We made it this far, lets write stuff to the feed!
427
- echo '<!-- podcast_generator="Blubrry PowerPress/'. POWERPRESS_VERSION .'" -->'.PHP_EOL;
 
 
 
 
 
428
 
429
  // add the itunes:new-feed-url tag to feed
430
  if( powerpress_is_custom_podcast_feed() )
@@ -751,7 +749,7 @@ function powerpress_rss2_item()
751
  echo "\t<itunes:subtitle>". powerpress_format_itunes_value($subtitle, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
752
  else if( $excerpt_no_html )
753
  echo "\t<itunes:subtitle>". powerpress_format_itunes_value($excerpt_no_html, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
754
- else
755
  echo "\t<itunes:subtitle>". powerpress_format_itunes_value($content_no_html, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
756
 
757
  if( empty($powerpress_feed['feed_maximizer_on']) )
@@ -769,6 +767,12 @@ function powerpress_rss2_item()
769
  echo "\t\t<itunes:author>" . esc_html($author) . '</itunes:author>'.PHP_EOL;
770
  else
771
  echo "\t\t<itunes:author>".'NO AUTHOR</itunes:author>'.PHP_EOL;
 
 
 
 
 
 
772
  }
773
 
774
  if( $explicit )
@@ -893,15 +897,30 @@ function powerpress_bloginfo_rss($content, $field = '')
893
  {
894
  if( powerpress_is_custom_podcast_feed() )
895
  {
896
- if( is_category() )
897
  $Feed = get_option('powerpress_cat_feed_'.get_query_var('cat') );
 
898
  else if( is_tax() || is_tag() ) {
899
  global $powerpress_feed;
900
  if( !empty($powerpress_feed['term_taxonomy_id']) )
901
  $Feed = get_option('powerpress_taxonomy_'.$powerpress_feed['term_taxonomy_id'] );
902
  }
903
  else
904
- $Feed = get_option('powerpress_feed_'.get_query_var('feed') );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
905
  //$Feed = true;
906
  if( $Feed )
907
  {
@@ -1148,7 +1167,9 @@ function powerpress_init()
1148
  }
1149
 
1150
  // Add the podcast feeds;
1151
- add_feed('podcast', 'powerpress_do_podcast_feed');
 
 
1152
  if( $GeneralSettings && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) )
1153
  {
1154
  while( list($feed_slug,$feed_title) = each($GeneralSettings['custom_feeds']) )
@@ -1158,6 +1179,22 @@ function powerpress_init()
1158
  }
1159
  }
1160
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1161
 
1162
  if( defined('GAWP_VERSION') )
1163
  {
@@ -1173,13 +1210,17 @@ function powerpress_request($qv)
1173
  {
1174
  $podcast_feed_slug = false;
1175
  if( $qv['feed'] == 'podcast' ) {
1176
- $podcast_feed_slug = 'podcast';
 
 
1177
  } else if( $qv['feed'] == 'rss' || $qv['feed'] == 'rss2' || $qv['feed'] == 'atom' || $qv['feed'] == 'rdf' || $qv['feed'] == 'feed' ) { // 'feed', 'rdf', 'rss', 'rss2', 'atom'
1178
  // Skip
1179
  } else {
1180
  $GeneralSettings = get_option('powerpress_general');
1181
- if( isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) && !empty($GeneralSettings['custom_feeds'][ $qv['feed'] ] ) )
1182
  $podcast_feed_slug = $qv['feed'];
 
 
1183
  }
1184
 
1185
  if( $podcast_feed_slug )
@@ -1263,6 +1304,8 @@ function powerpress_load_general_feed_settings()
1263
 
1264
  if( !empty($GeneralSettings['podcast_embed_in_feed']) )
1265
  $powerpress_feed['podcast_embed_in_feed'] = true;
 
 
1266
  return;
1267
  }
1268
  else if( ( defined('POWERPRESS_TAXONOMY_PODCASTING') || !empty($Powerpress['taxonomy_podcasting']) ) && ( is_tag() || is_tax() ) )
@@ -1304,49 +1347,76 @@ function powerpress_load_general_feed_settings()
1304
 
1305
  if( !empty($GeneralSettings['podcast_embed_in_feed']) )
1306
  $powerpress_feed['podcast_embed_in_feed'] = true;
 
 
1307
  return;
1308
  }
1309
  }
1310
  }
1311
 
1312
  $feed_slug = get_query_var('feed');
1313
-
1314
- if( isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) && isset($GeneralSettings['custom_feeds'][ $feed_slug ] ))
1315
  {
1316
- $FeedCustom = get_option('powerpress_feed_'.$feed_slug); // Get custom feed specific settings
1317
- $Feed = powerpress_merge_empty_feed_settings($FeedCustom, $FeedSettingsBasic);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1318
 
1319
- $powerpress_feed = array();
1320
- $powerpress_feed['is_custom'] = true;
1321
- $powerpress_feed['feed-slug'] = $feed_slug;
1322
- $powerpress_feed['process_podpress'] = ($feed_slug=='podcast'? !empty($GeneralSettings['process_podpress']): false); // We don't touch podpress data for custom feeds
1323
- $powerpress_feed['rss_language'] = ''; // RSS language should be set by WordPress by default
1324
- $powerpress_feed['default_url'] = '';
1325
- if( !empty($powerpress_feed['default_url']) )
1326
- $powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
1327
- $explicit = array("no", "yes", "clean");
1328
- $powerpress_feed['explicit'] ='no';
1329
- if( !empty($Feed['itunes_explicit']) )
1330
- $powerpress_feed['explicit'] = $explicit[ $Feed['itunes_explicit'] ];
1331
- if( !empty($Feed['itunes_talent_name']) )
1332
- $powerpress_feed['itunes_talent_name'] = $Feed['itunes_talent_name'];
1333
- else
1334
- $powerpress_feed['itunes_talent_name'] = get_bloginfo_rss('name');
1335
- $powerpress_feed['enhance_itunes_summary'] = $Feed['enhance_itunes_summary'];
1336
- $powerpress_feed['posts_per_rss'] = false;
1337
- if( !empty($Feed['posts_per_rss']) && is_numeric($Feed['posts_per_rss']) && $Feed['posts_per_rss'] > 0 )
1338
- $powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
1339
- if( !empty($Feed['feed_redirect_url']) )
1340
- $powerpress_feed['feed_redirect_url'] = $Feed['feed_redirect_url'];
1341
- if( !empty($Feed['itunes_author_post'] ) )
1342
- $powerpress_feed['itunes_author_post'] = true;
1343
- if( !empty($Feed['rss_language']) )
1344
- $powerpress_feed['rss_language'] = $Feed['rss_language'];
1345
- if( !empty($GeneralSettings['podcast_embed_in_feed']) )
1346
- $powerpress_feed['podcast_embed_in_feed'] = true;
1347
- if( !empty($Feed['maximize_feed']) )
1348
- $powerpress_feed['maximize_feed'] = true;
1349
- return;
 
 
 
 
 
 
 
1350
  }
1351
 
1352
  if( !isset($FeedSettingsBasic['apply_to']) )
@@ -1402,6 +1472,9 @@ function powerpress_load_general_feed_settings()
1402
  $powerpress_feed['rss_language'] = ''; // Cannot set the language setting in simple mode
1403
  if( !empty($GeneralSettings['podcast_embed_in_feed']) )
1404
  $powerpress_feed['podcast_embed_in_feed'] = true;
 
 
 
1405
  }; break;
1406
  // All other cases we let fall through
1407
  }
@@ -1957,6 +2030,7 @@ function powerpress_trim_itunes_value($value, $tag = 'summary')
1957
 
1958
  switch($tag)
1959
  {
 
1960
  case 'summary': {
1961
  // 4000 character limit
1962
  if( $length > 4000 )
@@ -2434,8 +2508,7 @@ function get_the_powerpress_all_players($slug = false, $no_link=false)
2434
  while( have_posts() )
2435
  {
2436
  the_post();
2437
- //$PostMetaKeys = get_post_custom_keys($post->ID);
2438
- //print_r($PostMetaKeys);
2439
  while( list($null,$feed_slug) = each($ChannelSlugs) )
2440
  {
2441
  // Do we follow the global settings to disable a player?
@@ -2470,7 +2543,6 @@ function get_the_powerpress_all_players($slug = false, $no_link=false)
2470
  if( !isset($EpisodeData['no_links']) && $no_link == false )
2471
  {
2472
  $return .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
2473
- // $return .= powerpress_get_player_links(get_the_ID(), $feed_slug, $EpisodeData );
2474
  }
2475
  }
2476
  reset($ChannelSlugs);
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="http://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> 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: 5.0
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Change Log:
11
 
12
  Contributors:
13
  Angelo Mandato, CIO RawVoice - Plugin founder, architect and lead developer
14
+ See readme.txt for full list of contributors.
 
15
 
16
  Credits:
17
  getID3(), License: GPL 2.0+ by James Heinrich <info [at] getid3.org> http://www.getid3.org
32
  die("access denied.");
33
 
34
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
35
+ define('POWERPRESS_VERSION', '5.0' );
36
 
37
  // Translation support:
38
  if ( !defined('POWERPRESS_ABSPATH') )
79
  define('POWERPRESS_CAPABILITY_MANAGE_OPTIONS', 'manage_options');
80
  if( !defined('POWERPRESS_CAPABILITY_EDIT_PAGES') )
81
  define('POWERPRESS_CAPABILITY_EDIT_PAGES', 'edit_pages');
 
 
82
 
83
  //define('POWERPRESS_ENABLE_HTTPS_MEDIA', true); // Add this define to your wp-config.php if you wnat to allow media URLs that begin with https://
84
 
316
  if( !isset($Powerpress['player_function']) || $Powerpress['player_function'] > 0 ) // Don't include the player in the header if it is not needed...
317
  {
318
  $PowerpressPluginURL = powerpress_get_root_url();
 
 
 
 
319
  ?>
320
  <script type="text/javascript"><!--
321
  <?php
325
  if( isset($Powerpress['new_window_width']) && $Powerpress['new_window_width'] > 0 )
326
  $new_window_width = $Powerpress['new_window_width'];
327
  else if( isset($Powerpress['new_window_width']) )
328
+ $new_window_width = 420;
329
 
330
  if( isset($Powerpress['new_window_height']) && $Powerpress['new_window_height'] > 0 )
331
  $new_window_height = $Powerpress['new_window_height'];
332
  else if( isset($Powerpress['new_window_height']) )
333
+ $new_window_height = 240;
334
 
335
  if( empty($Powerpress['new_window_nofactor']) )
336
  {
417
  $General = get_option('powerpress_general');
418
 
419
  // We made it this far, lets write stuff to the feed!
420
+ echo '<!-- podcast_generator="Blubrry PowerPress/'. POWERPRESS_VERSION .'" ';
421
+ if( isset($General['advanced_mode_2']) && empty($General['advanced_mode_2']) )
422
+ echo 'mode="simple" ';
423
+ else
424
+ echo 'mode="advanced" ';
425
+ echo '-->'.PHP_EOL;
426
 
427
  // add the itunes:new-feed-url tag to feed
428
  if( powerpress_is_custom_podcast_feed() )
749
  echo "\t<itunes:subtitle>". powerpress_format_itunes_value($subtitle, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
750
  else if( $excerpt_no_html )
751
  echo "\t<itunes:subtitle>". powerpress_format_itunes_value($excerpt_no_html, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
752
+ else if( $content_no_html )
753
  echo "\t<itunes:subtitle>". powerpress_format_itunes_value($content_no_html, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
754
 
755
  if( empty($powerpress_feed['feed_maximizer_on']) )
767
  echo "\t\t<itunes:author>" . esc_html($author) . '</itunes:author>'.PHP_EOL;
768
  else
769
  echo "\t\t<itunes:author>".'NO AUTHOR</itunes:author>'.PHP_EOL;
770
+
771
+ // itunes episode image
772
+ if( !empty( $EpisodeData['itunes_image']) )
773
+ echo "\t\t".'<itunes:image href="' . esc_html( str_replace(' ', '+', $EpisodeData['itunes_image']), 'double') . '" />'.PHP_EOL;
774
+ else if( !empty($powerpress_feed['itunes_image']) )
775
+ echo "\t\t".'<itunes:image href="' . esc_html( str_replace(' ', '+', $powerpress_feed['itunes_image']), 'double') . '" />'.PHP_EOL;
776
  }
777
 
778
  if( $explicit )
897
  {
898
  if( powerpress_is_custom_podcast_feed() )
899
  {
900
+ if( is_category() ) {
901
  $Feed = get_option('powerpress_cat_feed_'.get_query_var('cat') );
902
+ }
903
  else if( is_tax() || is_tag() ) {
904
  global $powerpress_feed;
905
  if( !empty($powerpress_feed['term_taxonomy_id']) )
906
  $Feed = get_option('powerpress_taxonomy_'.$powerpress_feed['term_taxonomy_id'] );
907
  }
908
  else
909
+ {
910
+ global $powerpress_feed;
911
+ //var_dump($powerpress_feed);
912
+ if( !empty($powerpress_feed['post_type']) )
913
+ {
914
+ $feed_slug = get_query_var('feed');
915
+ $PostTypeSettingsArray = get_option('powerpress_posttype_'.$powerpress_feed['post_type'] );
916
+ if( !empty($PostTypeSettingsArray[ $feed_slug ]) )
917
+ $Feed = $PostTypeSettingsArray[ $feed_slug ];
918
+ }
919
+ else
920
+ {
921
+ $Feed = get_option('powerpress_feed_'.get_query_var('feed') );
922
+ }
923
+ }
924
  //$Feed = true;
925
  if( $Feed )
926
  {
1167
  }
1168
 
1169
  // Add the podcast feeds;
1170
+ if( !defined('POWERPRESS_NO_PODCAST_FEED') )
1171
+ add_feed('podcast', 'powerpress_do_podcast_feed');
1172
+
1173
  if( $GeneralSettings && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) )
1174
  {
1175
  while( list($feed_slug,$feed_title) = each($GeneralSettings['custom_feeds']) )
1179
  }
1180
  }
1181
 
1182
+ if( !empty($GeneralSettings['posttype_podcasting']) )
1183
+ {
1184
+ // Loop through the posttype podcasting settings and set the feeds for the custom post type slugs...
1185
+ global $wp_rewrite;
1186
+ $FeedSlugPostTypesArray = get_option('powerpress_posttype_podcasting');
1187
+ if( empty($FeedSlugPostTypesArray) )
1188
+ $FeedSlugPostTypesArray = array();
1189
+
1190
+ while( list($feed_slug, $FeedSlugPostTypes) = each($FeedSlugPostTypesArray) )
1191
+ {
1192
+ if ( !in_array($feed_slug, $wp_rewrite->feeds) ) // we need to add this feed name
1193
+ {
1194
+ add_feed($feed_slug, 'powerpress_do_podcast_feed');
1195
+ }
1196
+ }
1197
+ }
1198
 
1199
  if( defined('GAWP_VERSION') )
1200
  {
1210
  {
1211
  $podcast_feed_slug = false;
1212
  if( $qv['feed'] == 'podcast' ) {
1213
+ $GeneralSettings = get_option('powerpress_general');
1214
+ if( empty($GeneralSettings['posttype_podcasting']) )
1215
+ $podcast_feed_slug = 'podcast';
1216
  } else if( $qv['feed'] == 'rss' || $qv['feed'] == 'rss2' || $qv['feed'] == 'atom' || $qv['feed'] == 'rdf' || $qv['feed'] == 'feed' ) { // 'feed', 'rdf', 'rss', 'rss2', 'atom'
1217
  // Skip
1218
  } else {
1219
  $GeneralSettings = get_option('powerpress_general');
1220
+ if( empty($GeneralSettings['posttype_podcasting']) && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) && !empty($GeneralSettings['custom_feeds'][ $qv['feed'] ] ) )
1221
  $podcast_feed_slug = $qv['feed'];
1222
+
1223
+
1224
  }
1225
 
1226
  if( $podcast_feed_slug )
1304
 
1305
  if( !empty($GeneralSettings['podcast_embed_in_feed']) )
1306
  $powerpress_feed['podcast_embed_in_feed'] = true;
1307
+ if( !empty($Feed['episode_itunes_image']) && !empty($Feed['itunes_image']) )
1308
+ $powerpress_feed['itunes_image'] = $Feed['itunes_image'];
1309
  return;
1310
  }
1311
  else if( ( defined('POWERPRESS_TAXONOMY_PODCASTING') || !empty($Powerpress['taxonomy_podcasting']) ) && ( is_tag() || is_tax() ) )
1347
 
1348
  if( !empty($GeneralSettings['podcast_embed_in_feed']) )
1349
  $powerpress_feed['podcast_embed_in_feed'] = true;
1350
+ if( !empty($Feed['episode_itunes_image']) && !empty($Feed['itunes_image']) )
1351
+ $powerpress_feed['itunes_image'] = $Feed['itunes_image'];
1352
  return;
1353
  }
1354
  }
1355
  }
1356
 
1357
  $feed_slug = get_query_var('feed');
1358
+ // Are we dealing with a custom podcast channel or a custom post type podcast feed...
1359
+ if( !empty($GeneralSettings['posttype_podcasting']) || !empty($GeneralSettings['custom_feeds'][ $feed_slug ]) )
1360
  {
1361
+ $Feed = false;
1362
+ if( !empty($GeneralSettings['posttype_podcasting']) )
1363
+ {
1364
+ $post_type = get_query_var('post_type');
1365
+ //$post_type = get_post_type();
1366
+
1367
+ // Get the settings for this podcast post type
1368
+ $PostTypeSettingsArray = get_option('powerpress_posttype_'. $post_type);
1369
+ if( !empty($PostTypeSettingsArray[ $feed_slug ]) )
1370
+ {
1371
+ $FeedCustom = $PostTypeSettingsArray[ $feed_slug ];
1372
+ $Feed = powerpress_merge_empty_feed_settings($FeedCustom, $FeedSettingsBasic);
1373
+ $Feed['post_type'] = $post_type;
1374
+ }
1375
+ }
1376
+ if( empty($Feed) && !empty($GeneralSettings['custom_feeds'][ $feed_slug ]) )
1377
+ {
1378
+ $FeedCustom = get_option('powerpress_feed_'.$feed_slug); // Get custom feed specific settings
1379
+ $Feed = powerpress_merge_empty_feed_settings($FeedCustom, $FeedSettingsBasic);
1380
+ }
1381
 
1382
+ if( $Feed )
1383
+ {
1384
+ $powerpress_feed = array();
1385
+ $powerpress_feed['is_custom'] = true;
1386
+ $powerpress_feed['feed-slug'] = $feed_slug;
1387
+ if( !empty($Feed['post_type']) )
1388
+ $powerpress_feed['post_type'] = $Feed['post_type'];
1389
+ $powerpress_feed['process_podpress'] = ($feed_slug=='podcast'? !empty($GeneralSettings['process_podpress']): false); // We don't touch podpress data for custom feeds
1390
+ $powerpress_feed['rss_language'] = ''; // RSS language should be set by WordPress by default
1391
+ $powerpress_feed['default_url'] = '';
1392
+ if( !empty($powerpress_feed['default_url']) )
1393
+ $powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
1394
+ $explicit = array("no", "yes", "clean");
1395
+ $powerpress_feed['explicit'] ='no';
1396
+ if( !empty($Feed['itunes_explicit']) )
1397
+ $powerpress_feed['explicit'] = $explicit[ $Feed['itunes_explicit'] ];
1398
+ if( !empty($Feed['itunes_talent_name']) )
1399
+ $powerpress_feed['itunes_talent_name'] = $Feed['itunes_talent_name'];
1400
+ else
1401
+ $powerpress_feed['itunes_talent_name'] = get_bloginfo_rss('name');
1402
+ $powerpress_feed['enhance_itunes_summary'] = $Feed['enhance_itunes_summary'];
1403
+ $powerpress_feed['posts_per_rss'] = false;
1404
+ if( !empty($Feed['posts_per_rss']) && is_numeric($Feed['posts_per_rss']) && $Feed['posts_per_rss'] > 0 )
1405
+ $powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
1406
+ if( !empty($Feed['feed_redirect_url']) )
1407
+ $powerpress_feed['feed_redirect_url'] = $Feed['feed_redirect_url'];
1408
+ if( !empty($Feed['itunes_author_post'] ) )
1409
+ $powerpress_feed['itunes_author_post'] = true;
1410
+ if( !empty($Feed['rss_language']) )
1411
+ $powerpress_feed['rss_language'] = $Feed['rss_language'];
1412
+ if( !empty($GeneralSettings['podcast_embed_in_feed']) )
1413
+ $powerpress_feed['podcast_embed_in_feed'] = true;
1414
+ if( !empty($Feed['maximize_feed']) )
1415
+ $powerpress_feed['maximize_feed'] = true;
1416
+ if( !empty($Feed['episode_itunes_image']) && !empty($Feed['itunes_image']) )
1417
+ $powerpress_feed['itunes_image'] = $Feed['itunes_image'];
1418
+ return;
1419
+ }
1420
  }
1421
 
1422
  if( !isset($FeedSettingsBasic['apply_to']) )
1472
  $powerpress_feed['rss_language'] = ''; // Cannot set the language setting in simple mode
1473
  if( !empty($GeneralSettings['podcast_embed_in_feed']) )
1474
  $powerpress_feed['podcast_embed_in_feed'] = true;
1475
+ if( !empty($Feed['episode_itunes_image']) && !empty($Feed['itunes_image']) )
1476
+ $powerpress_feed['itunes_image'] = $Feed['itunes_image'];
1477
+
1478
  }; break;
1479
  // All other cases we let fall through
1480
  }
2030
 
2031
  switch($tag)
2032
  {
2033
+ case 'description':
2034
  case 'summary': {
2035
  // 4000 character limit
2036
  if( $length > 4000 )
2508
  while( have_posts() )
2509
  {
2510
  the_post();
2511
+
 
2512
  while( list($null,$feed_slug) = each($ChannelSlugs) )
2513
  {
2514
  // Do we follow the global settings to disable a player?
2543
  if( !isset($EpisodeData['no_links']) && $no_link == false )
2544
  {
2545
  $return .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
 
2546
  }
2547
  }
2548
  reset($ChannelSlugs);
powerpressadmin-basic.php CHANGED
@@ -2,11 +2,24 @@
2
 
3
  function powerpress_admin_basic()
4
  {
 
 
 
5
  $General = powerpress_get_settings('powerpress_general');
6
  $General = powerpress_default_settings($General, 'basic');
 
 
7
 
8
  $FeedSettings = powerpress_get_settings('powerpress_feed');
9
  $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
 
 
 
 
 
 
 
 
10
  ?>
11
  <script type="text/javascript"><!--
12
  function CheckRedirect(obj)
@@ -36,6 +49,12 @@ function SelectEmbedField(checked)
36
 
37
  jQuery(document).ready(function($) {
38
 
 
 
 
 
 
 
39
  jQuery('#episode_box_player_links_options').change(function () {
40
 
41
  var objectChecked = jQuery('#episode_box_player_links_options').attr('checked');
@@ -97,14 +116,23 @@ jQuery(document).ready(function($) {
97
  $("#episode_box_order").removeAttr("disabled");
98
  }
99
  });
 
100
  } );
101
  //-->
102
  </script>
103
 
104
  <input type="hidden" name="action" value="powerpress-save-settings" />
 
 
 
105
  <input type="hidden" id="save_tab_pos" name="tab" value="<?php echo (empty($_POST['tab'])?0:$_POST['tab']); ?>" />
106
 
107
- <h2><?php echo __('Blubrry PowerPress Settings', 'powerpress'); ?></h2>
 
 
 
 
 
108
 
109
  <div id="powerpress_settings_page" class="powerpress_tabbed_content">
110
  <ul class="powerpress_settings_tabs">
@@ -114,7 +142,7 @@ jQuery(document).ready(function($) {
114
  <li><a href="#tab3"><span><?php echo htmlspecialchars(__('Media Appearance', 'powerpress')); ?></span></a></li>
115
  <li><a href="#tab4"><span><?php echo htmlspecialchars(__('Feeds', 'powerpress')); ?></span></a></li>
116
  <li><a href="#tab5"><span><?php echo htmlspecialchars(__('iTunes', 'powerpress')); ?></span></a></li>
117
- <li><a href="#tab6"><span><?php echo htmlspecialchars(__('T.V.', 'powerpress')); ?></span></a></li>
118
  </ul>
119
 
120
  <div id="tab0" class="powerpress_tab">
@@ -144,20 +172,21 @@ jQuery(document).ready(function($) {
144
  <div id="tab4" class="powerpress_tab">
145
  <?php
146
  powerpressadmin_edit_feed_general($FeedSettings, $General);
147
- powerpressadmin_edit_feed_settings($FeedSettings, $General);
 
148
  ?>
149
  </div>
150
 
151
  <div id="tab5" class="powerpress_tab">
152
  <?php
153
- powerpressadmin_edit_itunes_general($General);
154
- powerpressadmin_edit_itunes_feed($FeedSettings, $General);
155
  ?>
156
  </div>
157
 
158
  <div id="tab6" class="powerpress_tab">
159
  <?php
160
- powerpressadmin_edit_tv($FeedSettings);
161
  ?>
162
  </div>
163
 
@@ -165,6 +194,13 @@ jQuery(document).ready(function($) {
165
  <div class="clear"></div>
166
 
167
  <?php
 
 
 
 
 
 
 
168
  $ChannelsCheckbox = '';
169
  if( !empty($General['custom_feeds']) )
170
  $ChannelsCheckbox = ' onclick="alert(\''. __('You must delete all of the Podcast Channels to disable this option.', 'powerpress') .'\');return false;"';
@@ -178,7 +214,7 @@ jQuery(document).ready(function($) {
178
  <div>
179
  <input type="checkbox" name="NULL[player_options]" value="1" checked disabled />
180
  <strong><?php echo __('Audio Player Options', 'powerpress'); ?></strong> -
181
- <?php echo __('Select from 6 different web based audio players.', 'powerpress'); ?>
182
  <span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_player.php'); ?>"><?php echo __('configure audio player', 'powerpress'); ?></a>)</span>
183
 
184
 
@@ -186,7 +222,7 @@ jQuery(document).ready(function($) {
186
  <div>
187
  <input type="checkbox" name="NULL[video_player_options]" value="1" checked disabled />
188
  <strong><?php echo __('Video Player Options', 'powerpress'); ?></strong> -
189
- <?php echo __('Select from 2 different web based video players.', 'powerpress'); ?>
190
  <span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_videoplayer.php'); ?>"><?php echo __('configure video player', 'powerpress'); ?></a>)</span>
191
 
192
  </div>
@@ -203,7 +239,7 @@ jQuery(document).ready(function($) {
203
  <div>
204
  <input type="checkbox" name="General[cat_casting]" value="1" <?php echo ( !empty($General['cat_casting']) ?' checked':''); echo $CategoryCheckbox; ?> />
205
  <strong><?php echo __('Category Podcasting', 'powerpress'); ?></strong> -
206
- <?php echo __('Manage category podcast feeds.', 'powerpress'); ?>
207
  <?php if( empty($General['cat_casting']) ) { ?>
208
  <span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
209
  <?php } else { ?>
@@ -216,7 +252,29 @@ jQuery(document).ready(function($) {
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>
219
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  </div>
221
  </div>
222
  </div>
@@ -330,7 +388,6 @@ function powerpressadmin_edit_entry_options($General)
330
  <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'); ?>
331
  (<?php echo __('Customize player width and height on a per episode basis', 'powerpress'); ?>)</p>
332
 
333
- <em><strong><?php echo __('USE THE ITUNES FIELDS BELOW AT YOUR OWN RISK.', 'powerpress'); ?></strong></em>
334
  <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'); ?>
335
  (<?php echo __('Leave unchecked to use your blog post tags', 'powerpress'); ?>)</p>
336
  <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'); ?>
@@ -340,17 +397,20 @@ function powerpressadmin_edit_entry_options($General)
340
  <p style="margin-top: 15px;"><input id="episode_box_author" class="episode_box_option" name="General[episode_box_author]" type="checkbox" value="1"<?php if( !empty($General['episode_box_author']) ) echo ' checked'; ?> /> <?php echo __('iTunes Author Field', 'powerpress'); ?>
341
  (<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
342
  <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'); ?>
343
- (<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
 
 
 
344
 
345
- <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(); ?>
346
  (<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
347
 
348
- <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(); ?>
349
  (<?php echo __('Override the default ordering of episodes on the iTunes podcast directory', 'powerpress'); ?>)</p>
350
  <em><strong><?php echo __('If conflicting values are present the iTunes directory will use the default ordering.', 'powerpress'); ?></strong></em><br />
351
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
352
 
353
- <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(); ?>
354
  (<?php echo __('Display selected episode at top of your iTunes Directory listing', 'powerpress'); ?>)</p>
355
  <em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
356
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
@@ -574,7 +634,7 @@ while( list($value,$desc) = each($options) )
574
  }
575
 
576
 
577
- function powerpressadmin_edit_itunes_general($General, $FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
578
  {
579
  // Set default settings (if not set)
580
  if( $FeedSettings )
@@ -584,76 +644,51 @@ function powerpressadmin_edit_itunes_general($General, $FeedSettings = false, $f
584
  }
585
  if( !isset($General['itunes_url']) )
586
  $General['itunes_url'] = '';
587
-
 
 
 
 
588
 
589
- $OpenSSLSupport = extension_loaded('openssl');
590
- if( !$OpenSSLSupport && function_exists('curl_version') )
591
- {
592
- $curl_info = curl_version();
593
- $OpenSSLSupport = ($curl_info['features'] & CURL_VERSION_SSL );
594
- }
595
-
596
- if( $OpenSSLSupport == false )
597
- {
598
  ?>
599
- <div class="error powerpress-error"><?php echo __('Ping iTunes requires OpenSSL in PHP. Please refer to your php.ini to enable the php_openssl module.', 'powerpress'); ?></div>
600
- <?php } // End if !$OpenSSLSupport ?>
601
-
602
  <h3><?php echo __('iTunes Listing Information', 'powerpress'); ?></h3>
603
  <table class="form-table">
604
  <tr valign="top">
605
  <th scope="row"><?php echo __('iTunes Subscription URL', 'powerpress'); ?></th>
606
  <td>
607
- <?php
608
- if( $FeedSettings ) {
609
- ?>
610
  <input type="text" style="width: 80%;" name="Feed[itunes_url]" value="<?php echo $FeedSettings['itunes_url']; ?>" maxlength="250" />
611
- <?php } else { ?>
612
- <input type="text" style="width: 80%;" name="General[itunes_url]" value="<?php echo $General['itunes_url']; ?>" maxlength="250" />
613
- <?php } ?>
614
  <p><?php echo sprintf(__('e.g. %s', 'powerpress'), 'http://itunes.apple.com/podcast/title-of-podcast/id<strong>000000000</strong>'); ?></p>
615
 
616
- <p><?php echo sprintf(__('You may use the older style Subscription URL: %s', 'powerpress'), 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=<strong>000000000</strong>'); ?></p>
617
-
618
  <p><?php echo sprintf( __('Click the following link to %s.', 'powerpress'), '<a href="https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast" target="_blank">'. __('Publish a Podcast on iTunes', 'powerpress') .'</a>'); ?>
619
  <?php echo __('iTunes will email your Subscription URL to the <em>iTunes Email</em> entered below when your podcast is accepted into the iTunes Directory.', 'powerpress'); ?>
620
  </p>
621
  <p>
622
  <?php echo __('Recommended feed to submit to iTunes: ', 'powerpress'); ?>
623
  <?php
624
- if( $cat_ID )
625
- {
626
- echo get_category_feed_link($cat_ID);
627
- }
628
- else
629
  {
630
- echo get_feed_link($feed_slug);
 
 
 
 
 
 
 
 
 
 
 
 
 
631
  }
632
- ?>
633
- </p>
634
-
635
- </td>
636
- </tr>
637
- </table>
638
 
639
- <!-- start advanced features -->
640
- <table class="form-table">
641
- <tr valign="top">
642
- <th scope="row">
643
-
644
- <?php echo __('Update iTunes Listing', 'powerpress'); ?></th>
645
- <td>
646
- <p style="margin-top: 5px;"><?php echo __('This option is no longer available.', 'powerpress'); ?>
647
- <?php echo __('Learn more:', 'powerpress'); ?> <a href="http://blog.blubrry.com/2011/02/11/apple-drops-itunes-podcast-directory-update-listing-ping-functionality/" target="_blank"><?php echo __('Apple Drops iTunes Podcast Directory Update Listing/Ping (pingPodcast) Function', 'powerpress'); ?></a>
648
  </p>
649
-
650
  </td>
651
  </tr>
652
  </table>
653
- <!-- end advanced features -->
654
- <?php
655
-
656
- ?>
657
  <?php
658
  } // end itunes general
659
 
@@ -671,82 +706,83 @@ function powerpressadmin_edit_blubrry_services($General)
671
 
672
  ?>
673
  <h3><?php echo __('Integrate Blubrry Services', 'powerpress'); ?> &nbsp; <span style="color: #CC0000; font-size: 11px;"><?php echo __('optional', 'powerpress'); ?></span></h3>
674
- <p style="margin-bottom: 0;">
675
- <?php echo __('Add Blubrry Media Statistics to your WordPress dashboard.','powerpress'); ?>
676
- </p>
677
- <p style="margin-top: 5px;">
678
- <?php echo __('Blubrry Media Hosting users can also quickly upload and publish media directly from their blog.','powerpress'); ?>
679
- </p>
680
-
681
  <div style="margin-left: 40px;">
682
- <p>
683
- <?php echo __('Have an account on Blubrry.com?','powerpress'); ?>
684
- </p>
685
- <p style="font-size: 110%;">
686
- <strong><a href="<?php echo admin_url(); echo wp_nonce_url( "admin.php?action=powerpress-jquery-account", 'powerpress-jquery-account'); ?>&amp;KeepThis=true&amp;TB_iframe=true&amp;width=600&amp;height=400&amp;modal=true" target="_blank" class="thickbox" style="color: #3D517E;"><?php echo __('Click here to configure Blubrry Statistics and Hosting services', 'powerpress'); ?></a></strong>
687
  </p>
688
- <p style="margin-left: 40px;">
689
- <input name="StatsInDashboard" type="checkbox" value="1"<?php if( $StatsInDashboard == true ) echo ' checked'; ?> />
690
- <?php echo __('Display Blubrry Media Statistics in your dashboard', 'powerpress'); ?>
691
- </p>
692
- <p style="margin-bottom: 0;">
693
- <?php echo __('Don\'t have an account at Blubrry.com?','powerpress'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
694
  </p>
695
- <p style="margin-top: 5px;">
696
- <?php
697
- echo sprintf(__('%s offers an array of services to media creators including a %s %s. Our %s, which includes U.S. downloads, trending, exporting, is available for $5 month. Need a reliable place to host your media? %s media hosting packages start at $12. %s', 'powerpress'),
698
- '<a href="http://www.blubrry.com/" target="_blank">Blubrry.com</a>',
699
- '<strong style="color: #CC0000;">'.__('FREE','powerpress').'</strong>',
700
- '<a href="http://create.blubrry.com/resources/podcast-media-download-statistics/basic-statistics/" target="_blank">'. __('Basic Stats Service', 'powerpress') .'</a>',
701
- '<a href="http://create.blubrry.com/resources/podcast-media-download-statistics/" target="_blank">'. __('Premium Media Statistics', 'powerpress') .'</a>',
702
- '<a href="http://create.blubrry.com/resources/podcast-media-hosting/" target="_blank" style="text-decoration: none;">'. __('Blubrry Media Hosting', 'powerpress') .'</a>',
703
- '<a href="http://create.blubrry.com/resources/podcast-media-hosting/" target="_blank">'. __('Learn More', 'powerpress') .'</a>'
704
- );
 
 
705
  ?>
706
  </p>
707
- </div>
708
-
709
- <?php /* ?>
710
- <p>
711
- <?php //echo sprintf(
712
- __('Adds %s to your blog\'s %s plus features for %s users to quickly upload and publish media directly from their blog.', 'powerpress'),
713
- '<a href="http://create.blubrry.com/resources/podcast-media-download-statistics/" target="_blank">'. __('Blubrry Media Statistics', 'powerpress') .'</a>',
714
- '<a href="'. admin_url('admin.php') .'">'. __('WordPress Dashboard', 'powerpress') .'</a>',
715
- '<a href="https://secure.blubrry.com/podcast-publishing-premium-with-hosting/" target="_blank">'. __('Blubrry Media Hosting', 'powerpress') .'</a>' );
716
  ?>
717
- </p>
718
- <p>
719
- <em><?php echo __('Note: <b>No membership or service is required</b> to use this free open source podcasting plugin.', 'powerpress'); ?></em>
720
- </p>
721
- <table class="form-table">
722
- <tr valign="top">
723
- <th scope="row">
724
- <?php echo __('Blubrry Services', 'powerpress'); ?>*
725
- </th>
726
- <td>
727
- <p style="margin-top: 5px;"><span id="service_mode"><?php echo $ModeDesc; ?></span> (<strong><a href="<?php echo admin_url(); echo wp_nonce_url( "admin.php?action=powerpress-jquery-account", 'powerpress-jquery-account'); ?>&amp;KeepThis=true&amp;TB_iframe=true&amp;width=600&amp;height=400&amp;modal=true" target="_blank" class="thickbox" style="color: #3D517E;"><?php echo __('Click here to configure Blubrry Services', 'powerpress'); ?></a></strong>)</p>
728
- </td>
729
- </tr>
730
-
731
- <tr valign="top">
732
- <th scope="row">
733
- <?php echo __('Dashboard Integration', 'powerpress'); ?>
734
- </th>
735
- <td>
736
- <p style="margin-top: 5px;"><input name="StatsInDashboard" type="checkbox" value="1"<?php if( $StatsInDashboard == true ) echo ' checked'; ?> />
737
- <?php echo __('Display Statistics in WordPress Dashboard', 'powerpress'); ?></p>
738
- </td>
739
- </tr>
740
- </table>
741
- <p>
742
- *<em>The Blubrry basic statistics service is FREE. Our
743
- <a href="https://secure.blubrry.com/podcast-statistics-premium/" target="_blank">Premium Statistics Service</a>,
744
- which includes U.S. downloads, trending and exporting, is available for $5 month. Blubrry
745
- <a href="https://secure.blubrry.com/podcast-publishing-premium-with-hosting/" target="_blank">Media Hosting</a>
746
- packages start at $12.</em>
747
- </p>
748
  <?php
749
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
750
  }
751
 
752
  function powerpressadmin_edit_media_statistics($General)
@@ -757,94 +793,74 @@ function powerpressadmin_edit_media_statistics($General)
757
  $General['redirect2'] = '';
758
  if( !isset($General['redirect3']) )
759
  $General['redirect3'] = '';
 
 
 
 
760
  ?>
761
- <h3><?php echo __('Media Statistics', 'powerpress'); ?> &nbsp; <span style="color: #CC0000; font-size: 11px;"><?php echo __('optional', 'powerpress'); ?></span></h3>
762
- <div style="margin-left: 40px;">
763
- <p>
764
- <?php echo __('Enter your Redirect URL issued by your media statistics service provider below.', 'powerpress'); ?>
765
- </p>
 
766
 
767
- <div style="position: relative; margin-left: 40px; padding-bottom: 10px;">
768
- <table class="form-table">
769
- <tr valign="top">
770
- <th scope="row">
771
- <?php echo __('Redirect URL 1', 'powerpress'); ?>
772
- </th>
773
- <td>
774
- <input type="text" style="width: 60%;" name="General[redirect1]" value="<?php echo $General['redirect1']; ?>" onChange="return CheckRedirect(this);" maxlength="250" />
775
- </td>
776
- </tr>
777
- </table>
778
- <?php if( empty($General['redirect2']) && empty($General['redirect3']) ) { ?>
779
- <div style="position: absolute;bottom: -2px;left: -40px;" id="powerpress_redirect2_showlink">
780
- <a href="javascript:void();" onclick="javascript:document.getElementById('powerpress_redirect2_table').style.display='block';document.getElementById('powerpress_redirect2_showlink').style.display='none';return false;"><?php echo __('Add Another Redirect', 'powerpress'); ?></a>
 
 
781
  </div>
782
- <?php } ?>
783
- </div>
784
 
785
 
786
- <div id="powerpress_redirect2_table" style="position: relative;<?php if( empty($General['redirect2']) && empty($General['redirect3']) ) echo 'display:none;'; ?> margin-left: 40px; padding-bottom: 10px;">
787
- <table class="form-table">
788
- <tr valign="top">
789
- <th scope="row">
790
- <?php echo __('Redirect URL 2', 'powerpress'); ?>
791
- </th>
792
- <td>
793
- <input type="text" style="width: 60%;" name="General[redirect2]" value="<?php echo $General['redirect2']; ?>" onblur="return CheckRedirect(this);" maxlength="250" />
794
- </td>
795
- </tr>
796
- </table>
797
- <?php if( $General['redirect3'] == '' ) { ?>
798
- <div style="position: absolute;bottom: -2px;left: -40px;" id="powerpress_redirect3_showlink">
799
- <a href="javascript:void();" onclick="javascript:document.getElementById('powerpress_redirect3_table').style.display='block';document.getElementById('powerpress_redirect3_showlink').style.display='none';return false;"><?php echo __('Add Another Redirect', 'powerpress'); ?></a>
 
 
800
  </div>
801
- <?php } ?>
802
- </div>
803
 
804
- <div id="powerpress_redirect3_table" style="<?php if( empty($General['redirect3']) ) echo 'display:none;'; ?> margin-left: 40px;">
805
- <table class="form-table">
806
- <tr valign="top">
807
- <th scope="row">
808
- <?php echo __('Redirect URL 3', 'powerpress'); ?>
809
- </th>
810
- <td>
811
- <input type="text" style="width: 60%;" name="General[redirect3]" value="<?php echo $General['redirect3']; ?>" onblur="return CheckRedirect(this);" maxlength="250" />
812
- </td>
813
- </tr>
814
- </table>
815
- </div>
816
  <style type="text/css">
817
  #TB_window {
818
  border: solid 1px #3D517E;
819
  }
820
  </style>
821
-
822
- <p>
823
- <?php echo __('Need a media statistics provider?', 'powerpress'); ?>
824
- <a href="https://secure.blubrry.com/podcast-statistics-premium/" target="_blank" style="text-decoration: none;">
825
- <?php
826
- echo sprintf( __('Blubrry.com offers %s access to the best statistics!', 'powerpress'),
827
- '<strong style="color: #CC0000;">'.__('FREE', 'powerpress').'</strong>' );
828
- ?>
829
- </a>
830
- </p>
831
-
832
- <div id="blubrry_stats_box">
833
- <div style="font-family: Arial, Helvetica, sans-serif; border: solid 1px #ADDA13; background-color:#DFF495;padding:10px; margin-top:10px; position: relative;">
834
- <p style="font-size: 14px; margin-top: 0;">
835
- <?php echo __('Blubrry brings you the most all-inclusive digital media statistics service available. Gain unsurpassed insights into your audience. Find out who is linking to you, listener-base demographics and geographical data with worldwide mapping. Try us! You\'ll find our custom reports and daily email summaries are info you can trust, track and build your media program on.', 'powerpress'); ?>
836
- </p>
837
- <p style="font-size: 14px;">
838
- <?php echo sprintf(__('* Get %s Media Statistics by taking a few minutes and adding your podcast to Blubrry.com. What\'s the catch? Nothing! For many, our free service is all you will need. But if you\'re looking to further your abilities with media download information, we hope you consider upgrading to our paid Premium Statistics Service.', 'powerpress'),
839
- '<strong style="color: #990000;">'. __('FREE', 'powerpress') .'</strong>'
840
- ); ?>
841
- </p>
842
-
843
- <div style="text-align: center; font-size: 24px; font-weight: normal; margin-bottom: 8px;"><a href="http://www.blubrry.com/addpodcast.php?feed=<?php echo urlencode(get_feed_link('podcast')); ?>" target="_blank" style="color: #3D517E;"><?php echo __('Sign Up Now!', 'powerpress'); ?></a></div>
844
- <div style="font-size: 85%; position: absolute; bottom: 4px; right: 8px;"><i><?php echo __('* some restrictions apply', 'powerpress'); ?> <a href="http://create.blubrry.com/resources/podcast-media-download-statistics/" target="_blank"><?php echo __('learn more', 'powerpress'); ?></a></i></div>
845
- </div>
846
  </div>
847
- </div>
848
  <?php
849
  }
850
 
@@ -884,10 +900,10 @@ function powerpressadmin_appearance($General=false)
884
 
885
  ?>
886
 
 
 
887
  <h3><?php echo __('Media Appearance Settings', 'powerpress'); ?></h3>
888
-
889
  <div id="enable_presentation_settings">
890
-
891
  <table class="form-table">
892
  <tr valign="top">
893
  <th scope="row">&nbsp; </th>
@@ -911,13 +927,17 @@ function powerpressadmin_appearance($General=false)
911
  </tr>
912
  </table>
913
  </div>
 
 
 
 
914
 
915
- <div id="presentation_settings"<?php if($General['disable_appearance']) echo ' style="display: none;"'; ?>><!-- start presentation settings -->
916
  <h3><?php echo __('Blog Posts and Pages', 'powerpress'); ?></h3>
917
 
 
918
  <table class="form-table">
919
  <tr valign="top">
920
- <th scope="row"><?php echo __('Display Media & Links', 'powerpress'); ?></th>
921
  <td>
922
  <ul>
923
  <li><label><input type="radio" name="General[display_player]" value="1" <?php if( $General['display_player'] == 1 ) echo 'checked'; ?> /> <?php echo __('Below page content', 'powerpress'); ?></label> (<?php echo __('default', 'powerpress'); ?>)</li>
@@ -943,7 +963,11 @@ function powerpressadmin_appearance($General=false)
943
  <p><input name="General[display_player_excerpt]" type="checkbox" value="1" <?php if( !empty($General['display_player_excerpt']) ) echo 'checked '; ?>/> <?php echo __('Display media / links in:', 'powerpress'); ?> <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" title="<?php echo __('WordPress Excerpts', 'powerpress'); ?>" target="_blank"><?php echo __('WordPress Excerpts', 'powerpress'); ?></a> (<?php echo __('e.g. search results', 'powerpress'); ?>)</p>
944
  </td>
945
  </tr>
 
946
 
 
 
 
947
  <tr valign="top">
948
  <th scope="row">
949
  <?php echo __('PowerPress Shortcode', 'powerpress'); ?></th>
@@ -999,12 +1023,12 @@ function powerpressadmin_appearance($General=false)
999
  <p style="margin-left: 35px;">
1000
  <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'); ?>
1001
  </p>
1002
- <p><?php echo __('Embed option uses Flow Player Classic for audio and HTML5 Video player for video.', 'powerpress'); ?></p>
1003
  </td>
1004
  </tr>
1005
  </table>
1006
-
1007
-
1008
 
1009
 
1010
  <table class="form-table">
@@ -1025,14 +1049,16 @@ while( list($value,$desc) = each($linkoptions) )
1025
  <p style="margin-top: 5px;">
1026
  <?php echo __('Use this option if you are having problems with the players not appearing on some or all of your pages.', 'powerpress'); ?>
1027
  </p>
 
1028
  <p style="margin-top: 20px; margin-bottom:0;">
1029
  <?php echo __('If the above option fixes the player issues, then you most likely have a conflicting theme or plugin activated. You can verify your theme is not causing the problem by testing your site using the default WordPress twentyelevent or twentytwelve theme. For plugins, disable them one by one until the player re-appears, which indicates the last plugin deactivated caused the conflict.', 'powerpress'); ?>
1030
  </p>
 
1031
  </td>
1032
  </tr>
1033
  </table>
1034
 
1035
-
1036
  <!-- start advanced features -->
1037
  <div id="new_window_settings" style="display: <?php echo ( $General['player_function']==1 || $General['player_function']==3 ?'block':'none'); ?>">
1038
  <h3><?php echo __('Play in New Window Settings', 'powerpress'); ?></h3>
@@ -1072,7 +1098,7 @@ while( list($value,$desc) = each($linkoptions) )
1072
 
1073
  </table>
1074
  </div>
1075
- <!-- end advanced features -->
1076
 
1077
  <h3><?php echo __('Media Format Settings', 'powerpress'); ?></h3>
1078
  <table class="form-table">
@@ -1092,10 +1118,10 @@ while( list($value,$desc) = each($linkoptions) )
1092
  </td>
1093
  </tr>
1094
  </table>
1095
-
1096
-
1097
  </div>
1098
  <!-- end presentation settings -->
 
 
1099
  <?php
1100
  } // End powerpress_admin_appearance()
1101
 
@@ -1175,4 +1201,92 @@ function powerpressadmin_edit_tv($FeedSettings = false, $feed_slug='podcast', $c
1175
  <?php
1176
  }
1177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1178
  ?>
2
 
3
  function powerpress_admin_basic()
4
  {
5
+ $FeedAttribs = array('type'=>'general', 'feed_slug'=>'', 'category_id'=>0, 'term_taxonomy_id'=>0, 'term_id'=>0, 'taxonomy_type'=>'', 'post_type'=>'');
6
+ // feed_slug = channel
7
+
8
  $General = powerpress_get_settings('powerpress_general');
9
  $General = powerpress_default_settings($General, 'basic');
10
+ if( !isset($General['advanced_mode_2']) )
11
+ $General['advanced_mode_2'] = true;
12
 
13
  $FeedSettings = powerpress_get_settings('powerpress_feed');
14
  $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
15
+
16
+ $CustomFeed = get_option('powerpress_feed_'.'podcast'); // Get the custom podcast feed settings saved in the database
17
+ if( $CustomFeed ) // If they enabled custom podast channels...
18
+ {
19
+ $FeedSettings = powerpress_merge_empty_feed_settings($CustomFeed, $FeedSettings);
20
+ $FeedAttribs['channel_podcast'] = true;
21
+ }
22
+
23
  ?>
24
  <script type="text/javascript"><!--
25
  function CheckRedirect(obj)
49
 
50
  jQuery(document).ready(function($) {
51
 
52
+ jQuery('#powerpress_advanced_mode_button').click( function(event) {
53
+ event.preventDefault();
54
+ jQuery('#powerpress_advanced_mode').val('0');
55
+ jQuery(this).closest("form").submit();
56
+ });
57
+
58
  jQuery('#episode_box_player_links_options').change(function () {
59
 
60
  var objectChecked = jQuery('#episode_box_player_links_options').attr('checked');
116
  $("#episode_box_order").removeAttr("disabled");
117
  }
118
  });
119
+
120
  } );
121
  //-->
122
  </script>
123
 
124
  <input type="hidden" name="action" value="powerpress-save-settings" />
125
+
126
+
127
+ <input type="hidden" id="powerpress_advanced_mode" name="General[advanced_mode_2]" value="1" />
128
  <input type="hidden" id="save_tab_pos" name="tab" value="<?php echo (empty($_POST['tab'])?0:$_POST['tab']); ?>" />
129
 
130
+ <div id="powerpress_admin_header">
131
+ <h2><?php echo __('Blubrry PowerPress Settings', 'powerpress'); ?></h2>
132
+ <span class="powerpress-mode"><?php echo __('Advanced Mode', 'powerpress'); ?>
133
+ &nbsp; <a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_basic.php&mode=simple"); ?>" id="powerpress_advanced_mode_button" class="button-primary"><?php echo __('Switch to simplified Default Mode', 'powerpress'); ?></a>
134
+ </span>
135
+ </div>
136
 
137
  <div id="powerpress_settings_page" class="powerpress_tabbed_content">
138
  <ul class="powerpress_settings_tabs">
142
  <li><a href="#tab3"><span><?php echo htmlspecialchars(__('Media Appearance', 'powerpress')); ?></span></a></li>
143
  <li><a href="#tab4"><span><?php echo htmlspecialchars(__('Feeds', 'powerpress')); ?></span></a></li>
144
  <li><a href="#tab5"><span><?php echo htmlspecialchars(__('iTunes', 'powerpress')); ?></span></a></li>
145
+ <li><a href="#tab6"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
146
  </ul>
147
 
148
  <div id="tab0" class="powerpress_tab">
172
  <div id="tab4" class="powerpress_tab">
173
  <?php
174
  powerpressadmin_edit_feed_general($FeedSettings, $General);
175
+ powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs);
176
+ powerpressadmin_edit_tv($FeedSettings);
177
  ?>
178
  </div>
179
 
180
  <div id="tab5" class="powerpress_tab">
181
  <?php
182
+ powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs);
183
+ powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
184
  ?>
185
  </div>
186
 
187
  <div id="tab6" class="powerpress_tab">
188
  <?php
189
+ powerpressadmin_edit_artwork($FeedSettings, $General);
190
  ?>
191
  </div>
192
 
194
  <div class="clear"></div>
195
 
196
  <?php
197
+
198
+ powerpressadmin_advanced_options($General);
199
+ }
200
+
201
+ function powerpressadmin_advanced_options($General)
202
+ {
203
+ // Break the bottom section here out into it's own function
204
  $ChannelsCheckbox = '';
205
  if( !empty($General['custom_feeds']) )
206
  $ChannelsCheckbox = ' onclick="alert(\''. __('You must delete all of the Podcast Channels to disable this option.', 'powerpress') .'\');return false;"';
214
  <div>
215
  <input type="checkbox" name="NULL[player_options]" value="1" checked disabled />
216
  <strong><?php echo __('Audio Player Options', 'powerpress'); ?></strong> -
217
+ <?php echo __('Select from 7 different web based audio players.', 'powerpress'); ?>
218
  <span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_player.php'); ?>"><?php echo __('configure audio player', 'powerpress'); ?></a>)</span>
219
 
220
 
222
  <div>
223
  <input type="checkbox" name="NULL[video_player_options]" value="1" checked disabled />
224
  <strong><?php echo __('Video Player Options', 'powerpress'); ?></strong> -
225
+ <?php echo __('Select from 4 different web based video players.', 'powerpress'); ?>
226
  <span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_videoplayer.php'); ?>"><?php echo __('configure video player', 'powerpress'); ?></a>)</span>
227
 
228
  </div>
239
  <div>
240
  <input type="checkbox" name="General[cat_casting]" value="1" <?php echo ( !empty($General['cat_casting']) ?' checked':''); echo $CategoryCheckbox; ?> />
241
  <strong><?php echo __('Category Podcasting', 'powerpress'); ?></strong> -
242
+ <?php echo __('Manage podcasting for specific categories.', 'powerpress'); ?>
243
  <?php if( empty($General['cat_casting']) ) { ?>
244
  <span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
245
  <?php } else { ?>
252
  <?php echo __('Add additional meta information to your media for syndication.', 'powerpress'); ?>
253
  <?php echo powerpress_help_link('http://www.powerpresspodcast.com/metamarks/'); ?>
254
  <span style="font-size: 85%;">(<?php echo __('feature will appear in episode entry box', 'powerpress'); ?>)</span>
255
+ </div>
256
+
257
+
258
+ <div>
259
+ <input type="checkbox" name="General[taxonomy_podcasting]" value="1" <?php echo ( !empty($General['taxonomy_podcasting']) ?' checked':''); ?> />
260
+ <strong><?php echo __('Taxonomy Podcasting', 'powerpress'); ?></strong> <?php echo powerpressadmin_new(); ?>
261
+ <span style="font-size: 14px;">(<?php echo __('Feature sponsored by', 'powerpress'); ?> <a href="http://afterbuzztv.com/" target="_blank">AfterBuzzTV.com</a>)</span> -
262
+ <?php echo __('Manage podcasting for specific taxonomies.', 'powerpress'); ?>
263
+ <?php if( empty($General['taxonomy_podcasting']) ) { ?>
264
+ <span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
265
+ <?php } else { ?>
266
+ <span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php'); ?>"><?php echo __('configure taxonomy podcasting', 'powerpress'); ?></a>)</span>
267
+ <?php } ?>
268
+ </div>
269
+ <div>
270
+ <input type="checkbox" name="General[posttype_podcasting]" value="1" <?php echo ( !empty($General['posttype_podcasting']) ?' checked':''); ?> />
271
+ <strong><?php echo __('Post Type Podcasting', 'powerpress'); ?></strong> <?php echo powerpressadmin_new(); ?> -
272
+ <?php echo __('Manage multiple media files and/or formats to specific post types.', 'powerpress'); ?>
273
+ <?php if( empty($General['posttype_podcasting']) ) { ?>
274
+ <span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
275
+ <?php } else { ?>
276
+ <span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_posttypefeeds.php'); ?>"><?php echo __('configure post type podcasting', 'powerpress'); ?></a>)</span>
277
+ <?php } ?>
278
  </div>
279
  </div>
280
  </div>
388
  <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'); ?>
389
  (<?php echo __('Customize player width and height on a per episode basis', 'powerpress'); ?>)</p>
390
 
 
391
  <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'); ?>
392
  (<?php echo __('Leave unchecked to use your blog post tags', 'powerpress'); ?>)</p>
393
  <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'); ?>
397
  <p style="margin-top: 15px;"><input id="episode_box_author" class="episode_box_option" name="General[episode_box_author]" type="checkbox" value="1"<?php if( !empty($General['episode_box_author']) ) echo ' checked'; ?> /> <?php echo __('iTunes Author Field', 'powerpress'); ?>
398
  (<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
399
  <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'); ?>
400
+ (<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
401
+
402
+ <p style="margin-top: 15px;"><label><input id="episode_box_explicit" class="episode_box_option" name="General[episode_box_itunes_image]" type="checkbox" value="1"<?php if( !empty($General['episode_box_itunes_image']) ) echo ' checked'; ?> /> <?php echo __('iTunes Episode Image Field', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?>
403
+ (<?php echo __('Leave unchecked to use the image embedded into your media files.', 'powerpress'); ?>)</p>
404
 
405
+ <p style="margin-top: 15px;"><label><input id="episode_box_closed_captioned" class="episode_box_option" name="General[episode_box_closed_captioned]" type="checkbox" value="1"<?php if( !empty($General['episode_box_closed_captioned']) ) echo ' checked'; ?> /> <?php echo __('iTunes Closed Captioned', 'powerpress'); ?></label>
406
  (<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
407
 
408
+ <p style="margin-top: 15px;"><label><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'); ?></label>
409
  (<?php echo __('Override the default ordering of episodes on the iTunes podcast directory', 'powerpress'); ?>)</p>
410
  <em><strong><?php echo __('If conflicting values are present the iTunes directory will use the default ordering.', 'powerpress'); ?></strong></em><br />
411
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
412
 
413
+ <p style="margin-top: 15px;"><label><input id="episode_box_feature_in_itunes" class="episode_box_option" name="General[episode_box_feature_in_itunes]" type="checkbox" value="1"<?php if( !empty($General['episode_box_feature_in_itunes']) ) echo ' checked'; ?> /> <?php echo __('Feature Episode in iTunes', 'powerpress'); ?></label>
414
  (<?php echo __('Display selected episode at top of your iTunes Directory listing', 'powerpress'); ?>)</p>
415
  <em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
416
  <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
634
  }
635
 
636
 
637
+ function powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs = array() )
638
  {
639
  // Set default settings (if not set)
640
  if( $FeedSettings )
644
  }
645
  if( !isset($General['itunes_url']) )
646
  $General['itunes_url'] = '';
647
+ else if( !isset($FeedSettings['itunes_url']) )
648
+ $FeedSettings['itunes_url'] = $General['itunes_url'];
649
+
650
+ $feed_slug = $FeedAttribs['feed_slug'];
651
+ $cat_ID = $FeedAttribs['category_id'];
652
 
 
 
 
 
 
 
 
 
 
653
  ?>
 
 
 
654
  <h3><?php echo __('iTunes Listing Information', 'powerpress'); ?></h3>
655
  <table class="form-table">
656
  <tr valign="top">
657
  <th scope="row"><?php echo __('iTunes Subscription URL', 'powerpress'); ?></th>
658
  <td>
 
 
 
659
  <input type="text" style="width: 80%;" name="Feed[itunes_url]" value="<?php echo $FeedSettings['itunes_url']; ?>" maxlength="250" />
 
 
 
660
  <p><?php echo sprintf(__('e.g. %s', 'powerpress'), 'http://itunes.apple.com/podcast/title-of-podcast/id<strong>000000000</strong>'); ?></p>
661
 
 
 
662
  <p><?php echo sprintf( __('Click the following link to %s.', 'powerpress'), '<a href="https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast" target="_blank">'. __('Publish a Podcast on iTunes', 'powerpress') .'</a>'); ?>
663
  <?php echo __('iTunes will email your Subscription URL to the <em>iTunes Email</em> entered below when your podcast is accepted into the iTunes Directory.', 'powerpress'); ?>
664
  </p>
665
  <p>
666
  <?php echo __('Recommended feed to submit to iTunes: ', 'powerpress'); ?>
667
  <?php
668
+
669
+ switch( $FeedAttribs['type'] )
 
 
 
670
  {
671
+ case 'ttid':
672
+ case 'category': {
673
+ echo get_category_feed_link($cat_ID);
674
+ }; break;
675
+ case 'channel': {
676
+ echo get_feed_link($feed_slug);
677
+ }; break;
678
+ case 'post_type': {
679
+ $url = get_post_type_archive_feed_link($post_type, $feed_slug);
680
+ }; break;
681
+ case 'general':
682
+ default: {
683
+ echo get_feed_link('podcast');
684
+ }
685
  }
 
 
 
 
 
 
686
 
687
+ ?>
 
 
 
 
 
 
 
 
688
  </p>
 
689
  </td>
690
  </tr>
691
  </table>
 
 
 
 
692
  <?php
693
  } // end itunes general
694
 
706
 
707
  ?>
708
  <h3><?php echo __('Integrate Blubrry Services', 'powerpress'); ?> &nbsp; <span style="color: #CC0000; font-size: 11px;"><?php echo __('optional', 'powerpress'); ?></span></h3>
709
+ <ul><li><ul>
710
+ <li style="margin-left: 30px; font-size:115%;"><?php echo sprintf(__('Track your podcast downloads with Blubrry\'s <a href="%s" target="_blank">FREE Basic Statistics</a> or <a href="%s" target="_blank">Professional Media Statistics</a>.','powerpress'), 'http://create.blubrry.com/resources/podcast-media-download-statistics/basic-statistics/', 'http://create.blubrry.com/resources/podcast-media-download-statistics/'); ?></li>
711
+ <li style="margin-left: 30px; font-size:115%;"><?php echo sprintf(__('Upload and publish podcast media directly from your blog with <a href="%s" target="_blank">Blubrry Media Hosting</a>.','powerpress'), 'http://create.blubrry.com/resources/podcast-media-hosting/'); ?></li>
712
+ </ul></li></ul>
 
 
 
713
  <div style="margin-left: 40px;">
714
+ <p style="font-size: 125%;">
715
+ <strong><a class="button-primary thickbox" href="<?php echo admin_url(); echo wp_nonce_url( "admin.php?action=powerpress-jquery-account", 'powerpress-jquery-account'); ?>&amp;KeepThis=true&amp;TB_iframe=true&amp;width=600&amp;height=400&amp;modal=true" target="_blank"><?php echo __('Click here to configure Blubrry Statistics and Hosting services', 'powerpress'); ?></a></strong>
 
 
 
716
  </p>
717
+ <?php
718
+ if( !empty($General['blubrry_program_keyword']) )
719
+ {
720
+ // Check that the redirect is in the settings...
721
+ $RedirectURL = 'http://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
722
+ $Error = true;
723
+ if( stristr($General['redirect1'], $RedirectURL ) )
724
+ $Error = false;
725
+ else if( stristr($General['redirect2'], $RedirectURL ) )
726
+ $Error = false;
727
+ else if( stristr($General['redirect3'], $RedirectURL ) )
728
+ $Error = false;
729
+ if( $Error )
730
+ {
731
+ ?>
732
+ <p style="font-weight: bold; color: #CC0000;">
733
+ <?php
734
+ echo __('Statistics are not implemented correctly on this blog. Please click the button above to re-configure your services.', 'powerpress');
735
+ ?>
736
  </p>
737
+ <?php
738
+ }
739
+ else
740
+ {
741
+ ?>
742
+ <p style="font-weight: bold;">
743
+ <img src="<?php echo powerpress_get_root_url(); ?>images/Check.png" style="width: 25px; height: 20px;" />
744
+ <?php
745
+ if( empty($General['blubrry_hosting']) )
746
+ echo __('Blubrry Statistics Enabled!', 'powerpress');
747
+ else
748
+ echo __('Blubrry Statistics and Media Hosting Enabled!', 'powerpress');
749
  ?>
750
  </p>
751
+ <?php
752
+ }
753
+
754
+ if( empty($General['blubrry_hosting']) )
755
+ {
 
 
 
 
756
  ?>
757
+ <p>
758
+ <?php echo __('Recently upgraded to Blubrry Hosting?', 'powerpress'); ?>
759
+ <a class="thickbox" href="<?php echo admin_url(); echo wp_nonce_url( "admin.php?action=powerpress-jquery-account", 'powerpress-jquery-account'); ?>&amp;KeepThis=true&amp;TB_iframe=true&amp;width=600&amp;height=400&amp;modal=true" target="_blank"><?php echo __('Click here to enter your account information.', 'powerpress'); ?></a>
760
+ </p>
761
+ <?php
762
+ }
763
+ }
764
+ ?>
765
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
766
  <?php
767
+ if( empty($General['blubrry_hosting']) ) // Not signed up for hosting?
768
+ {
769
+ ?>
770
+ <div class="blubrry-services">
771
+ <div class="blubrry-hosting">
772
+ <p class="top-lines"><?php echo __('Need a reliable host for your podcast media?', 'powerpress'); ?></p>
773
+ <p><?php echo __('Blubrry Media Hosting packages start at $12.', 'powerpress'); ?></p>
774
+ <p><a href="http://create.blubrry.com/resources/podcast-media-hosting/" target="_blank"><?php echo __('Learn More', 'powerpress'); ?></a></p>
775
+ </div>
776
+ <div class="blubrry-stats">
777
+ <p class="top-lines"><?php echo __('Measure your audience for <strong>free</strong> and add more detailed', 'powerpress'); ?></p>
778
+ <p><?php echo __('reporting for only $5 per month.', 'powerpress'); ?></p>
779
+ <p>&nbsp;</p>
780
+ <p><a href="http://create.blubrry.com/resources/podcast-media-download-statistics/" target="_blank"><?php echo __('Learn More', 'powerpress'); ?></a></p>
781
+ </div>
782
+ <div class="clear"></div>
783
+ </div>
784
+ <?php
785
+ } // end not signed up for hosting
786
  }
787
 
788
  function powerpressadmin_edit_media_statistics($General)
793
  $General['redirect2'] = '';
794
  if( !isset($General['redirect3']) )
795
  $General['redirect3'] = '';
796
+
797
+ $StatsIntegrationURL = false;
798
+ if( !empty($General['blubrry_program_keyword']) )
799
+ $StatsIntegrationURL = 'http://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
800
  ?>
801
+ <div id="blubrry_stats_settings">
802
+ <h3><?php echo __('Media Statistics', 'powerpress'); ?></span></h3>
803
+ <div style="margin-left: 40px;">
804
+ <p>
805
+ <?php echo __('Enter your Redirect URL issued by your media statistics service provider below.', 'powerpress'); ?>
806
+ </p>
807
 
808
+ <div style="position: relative; margin-left: 40px; padding-bottom: 10px;">
809
+ <table class="form-table">
810
+ <tr valign="top">
811
+ <th scope="row">
812
+ <?php echo __('Redirect URL 1', 'powerpress'); ?>
813
+ </th>
814
+ <td>
815
+ <input type="text" style="width: 60%;" name="<?php if( stristr($General['redirect1'], $StatsIntegrationURL) ) echo 'NULL[redirect1]'; else echo 'General[redirect1]'; ?>" value="<?php echo $General['redirect1']; ?>" onChange="return CheckRedirect(this);" maxlength="250" <?php if( stristr($General['redirect1'], $StatsIntegrationURL) ) { echo ' readOnly="readOnly"'; $StatsIntegrationURL = false; } ?> />
816
+ </td>
817
+ </tr>
818
+ </table>
819
+ <?php if( empty($General['redirect2']) && empty($General['redirect3']) ) { ?>
820
+ <div style="position: absolute;bottom: -2px;left: -40px;" id="powerpress_redirect2_showlink">
821
+ <a href="javascript:void();" onclick="javascript:document.getElementById('powerpress_redirect2_table').style.display='block';document.getElementById('powerpress_redirect2_showlink').style.display='none';return false;"><?php echo __('Add Another Redirect', 'powerpress'); ?></a>
822
+ </div>
823
+ <?php } ?>
824
  </div>
 
 
825
 
826
 
827
+ <div id="powerpress_redirect2_table" style="position: relative;<?php if( empty($General['redirect2']) && empty($General['redirect3']) ) echo 'display:none;'; ?> margin-left: 40px; padding-bottom: 10px;">
828
+ <table class="form-table">
829
+ <tr valign="top">
830
+ <th scope="row">
831
+ <?php echo __('Redirect URL 2', 'powerpress'); ?>
832
+ </th>
833
+ <td>
834
+ <input type="text" style="width: 60%;" name="<?php if( stristr($General['redirect2'], $StatsIntegrationURL) ) echo 'NULL[redirect2]'; else echo 'General[redirect2]'; ?>" value="<?php echo $General['redirect2']; ?>" onblur="return CheckRedirect(this);" maxlength="250" <?php if( stristr($General['redirect2'], $StatsIntegrationURL) ) { echo ' readOnly="readOnly"'; $StatsIntegrationURL = false; } ?> />
835
+ </td>
836
+ </tr>
837
+ </table>
838
+ <?php if( $General['redirect3'] == '' ) { ?>
839
+ <div style="position: absolute;bottom: -2px;left: -40px;" id="powerpress_redirect3_showlink">
840
+ <a href="javascript:void();" onclick="javascript:document.getElementById('powerpress_redirect3_table').style.display='block';document.getElementById('powerpress_redirect3_showlink').style.display='none';return false;"><?php echo __('Add Another Redirect', 'powerpress'); ?></a>
841
+ </div>
842
+ <?php } ?>
843
  </div>
 
 
844
 
845
+ <div id="powerpress_redirect3_table" style="<?php if( empty($General['redirect3']) ) echo 'display:none;'; ?> margin-left: 40px;">
846
+ <table class="form-table">
847
+ <tr valign="top">
848
+ <th scope="row">
849
+ <?php echo __('Redirect URL 3', 'powerpress'); ?>
850
+ </th>
851
+ <td>
852
+ <input type="text" style="width: 60%;" name="<?php if( stristr($General['redirect3'], $StatsIntegrationURL) ) echo 'NULL[redirect3]'; else echo 'General[redirect3]'; ?>" value="<?php echo $General['redirect3']; ?>" onblur="return CheckRedirect(this);" maxlength="250" <?php if( stristr($General['redirect3'], $StatsIntegrationURL) ) echo ' readOnly="readOnly"'; ?> />
853
+ </td>
854
+ </tr>
855
+ </table>
856
+ </div>
857
  <style type="text/css">
858
  #TB_window {
859
  border: solid 1px #3D517E;
860
  }
861
  </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
862
  </div>
863
+ </div><!-- end blubrry_stats_settings -->
864
  <?php
865
  }
866
 
900
 
901
  ?>
902
 
903
+ <!-- start advanced features -->
904
+ <?php if( !empty($General['advanced_mode_2']) ) { ?>
905
  <h3><?php echo __('Media Appearance Settings', 'powerpress'); ?></h3>
 
906
  <div id="enable_presentation_settings">
 
907
  <table class="form-table">
908
  <tr valign="top">
909
  <th scope="row">&nbsp; </th>
927
  </tr>
928
  </table>
929
  </div>
930
+ <div id="presentation_settings"<?php if($General['disable_appearance']) echo ' style="display: none;"'; ?>>
931
+ <!-- start presentation settings -->
932
+ <!-- end advanced features -->
933
+ <?php } ?>
934
 
 
935
  <h3><?php echo __('Blog Posts and Pages', 'powerpress'); ?></h3>
936
 
937
+
938
  <table class="form-table">
939
  <tr valign="top">
940
+ <th scope="row"><?php echo htmlspecialchars(__('Display Media & Links', 'powerpress')); ?></th>
941
  <td>
942
  <ul>
943
  <li><label><input type="radio" name="General[display_player]" value="1" <?php if( $General['display_player'] == 1 ) echo 'checked'; ?> /> <?php echo __('Below page content', 'powerpress'); ?></label> (<?php echo __('default', 'powerpress'); ?>)</li>
963
  <p><input name="General[display_player_excerpt]" type="checkbox" value="1" <?php if( !empty($General['display_player_excerpt']) ) echo 'checked '; ?>/> <?php echo __('Display media / links in:', 'powerpress'); ?> <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" title="<?php echo __('WordPress Excerpts', 'powerpress'); ?>" target="_blank"><?php echo __('WordPress Excerpts', 'powerpress'); ?></a> (<?php echo __('e.g. search results', 'powerpress'); ?>)</p>
964
  </td>
965
  </tr>
966
+ </table>
967
 
968
+ <?php if( !empty($General['advanced_mode_2']) ) { ?>
969
+ <!-- start advanced features -->
970
+ <table class="form-table">
971
  <tr valign="top">
972
  <th scope="row">
973
  <?php echo __('PowerPress Shortcode', 'powerpress'); ?></th>
1023
  <p style="margin-left: 35px;">
1024
  <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'); ?>
1025
  </p>
1026
+ <p><?php echo __('Embed option works with the MediaElement.js Media Player for audio and video, Flow Player Classic for audio and HTML5 Video player for video.', 'powerpress'); ?></p>
1027
  </td>
1028
  </tr>
1029
  </table>
1030
+ <!-- end advanced features -->
1031
+ <?php } ?>
1032
 
1033
 
1034
  <table class="form-table">
1049
  <p style="margin-top: 5px;">
1050
  <?php echo __('Use this option if you are having problems with the players not appearing on some or all of your pages.', 'powerpress'); ?>
1051
  </p>
1052
+ <?php if( !empty($General['advanced_mode_2']) ) { ?>
1053
  <p style="margin-top: 20px; margin-bottom:0;">
1054
  <?php echo __('If the above option fixes the player issues, then you most likely have a conflicting theme or plugin activated. You can verify your theme is not causing the problem by testing your site using the default WordPress twentyelevent or twentytwelve theme. For plugins, disable them one by one until the player re-appears, which indicates the last plugin deactivated caused the conflict.', 'powerpress'); ?>
1055
  </p>
1056
+ <?php } ?>
1057
  </td>
1058
  </tr>
1059
  </table>
1060
 
1061
+ <?php if( !empty($General['advanced_mode_2']) ) { ?>
1062
  <!-- start advanced features -->
1063
  <div id="new_window_settings" style="display: <?php echo ( $General['player_function']==1 || $General['player_function']==3 ?'block':'none'); ?>">
1064
  <h3><?php echo __('Play in New Window Settings', 'powerpress'); ?></h3>
1098
 
1099
  </table>
1100
  </div>
1101
+
1102
 
1103
  <h3><?php echo __('Media Format Settings', 'powerpress'); ?></h3>
1104
  <table class="form-table">
1118
  </td>
1119
  </tr>
1120
  </table>
 
 
1121
  </div>
1122
  <!-- end presentation settings -->
1123
+ <!-- end advanced features -->
1124
+ <?php } ?>
1125
  <?php
1126
  } // End powerpress_admin_appearance()
1127
 
1201
  <?php
1202
  }
1203
 
1204
+ function powerpressadmin_edit_artwork($FeedSettings, $General)
1205
+ {
1206
+ $SupportUploads = powerpressadmin_support_uploads();
1207
+ ?>
1208
+ <h3><?php echo __('Artwork and Images', 'powerpress'); ?></h3>
1209
+
1210
+ <table class="form-table">
1211
+ <tr valign="top">
1212
+ <th scope="row">
1213
+ <?php echo __('iTunes Image', 'powerpress'); ?>
1214
+ <span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
1215
+ </th>
1216
+ <td>
1217
+ <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" />
1218
+ <a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
1219
+
1220
+ <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
1221
+ </p>
1222
+
1223
+ <p><strong><?php echo __('A square image that is 1400 x 1400 pixels in .jpg format for the web (72ppi) is recommended.', 'powerpress'); ?></strong></p>
1224
+
1225
+ <p>
1226
+ <?php echo __('This image is for your listing on the iTunes podcast directory and may also be used by other directories like 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'); ?>
1227
+ </p>
1228
+
1229
+ <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'); ?>
1230
+ <?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/contact/">'. __('iTunes Support', 'powerpress') .'</a>'); ?></p>
1231
+ <?php if( $SupportUploads ) { ?>
1232
+
1233
+ <p><label class="powerpress-normal-font"><input name="itunes_image_checkbox" type="checkbox" onchange="powerpress_show_field('itunes_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?></label> &nbsp;
1234
+ <span style="font-size:85%;">(<?php echo __('Using this option should update your image on iTunes within 24 hours', 'powerpress'); ?>)</span>
1235
+ </p>
1236
+ <div style="display:none" id="itunes_image_upload">
1237
+ <label for="itunes_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="itunes_image_file" /><br />
1238
+ <?php if( !empty($General['advanced_mode_2']) ) { ?>
1239
+ <div style="margin-left: 85px;"><label class="powerpress-normal-font"><input name="itunes_image_checkbox_as_rss" type="checkbox" value="1" onchange="powerpress_show_field('rss_image_upload_container', !this.checked)" /> <?php echo __('Also use as RSS image', 'powerpress'); ?></label></div>
1240
+ <?php } else { ?>
1241
+ <input type="hidden" name="itunes_image_checkbox_as_rss" value="1" />
1242
+ <?php } ?>
1243
+ </div>
1244
+ <?php } ?>
1245
+ </td>
1246
+ </tr>
1247
+ </table>
1248
+
1249
+
1250
+ <?php if( !empty($General['advanced_mode_2']) ) { ?>
1251
+ <table class="form-table">
1252
+ <tr valign="top">
1253
+ <th scope="row">
1254
+ <?php echo __('iTunes Episode Image', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></th>
1255
+ <td>
1256
+
1257
+ <p><label><input type="checkbox" name="Feed[episode_itunes_image]" value="1" <?php if( !empty($FeedSettings['episode_itunes_image']) ) echo 'checked '; ?>/> <?php echo __('Use iTunes image above', 'powerpress'); ?></label></p>
1258
+ <p><?php echo __('Use the program iTunes image above as your iTunes episode image.', 'powerpress'); ?></p>
1259
+ <p><?php echo __('NOTE: You must still save artwork into your media files to guarantee your artwork is displayed during playback.', 'powerpress'); ?></p>
1260
+ </td>
1261
+ </tr>
1262
+
1263
+ <tr valign="top">
1264
+ <th scope="row">
1265
+ <?php echo __('RSS2 Image', 'powerpress'); ?> <br />
1266
+ <span style="font-size: 85%; margin-left: 5px;"><?php echo __('Recommendation: Use iTunes image', 'powerpress'); ?></span>
1267
+ </th>
1268
+ <td>
1269
+ <input type="text" id="rss2_image" name="Feed[rss2_image]" style="width: 60%;" value="<?php echo ( !empty($FeedSettings['rss2_image'])? $FeedSettings['rss2_image']:''); ?>" maxlength="250" />
1270
+ <a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
1271
+
1272
+ <p><?php echo __('Place the URL to the RSS image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> http://mysite.com/images/rss.jpg</p>
1273
+
1274
+ <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>
1275
+ <p><strong><?php echo __('A square image that is 300 x 300 pixel or larger in .jpg format is recommended.', 'powerpress'); ?></strong></p>
1276
+
1277
+ <?php if( $SupportUploads ) { ?>
1278
+ <div id="rss_image_upload_container">
1279
+ <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>
1280
+ <div style="display:none" id="rss_image_upload">
1281
+ <label for="rss2_image"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="rss2_image_file" />
1282
+ </div>
1283
+ </div>
1284
+ <?php } ?>
1285
+ </td>
1286
+ </tr>
1287
+ </table>
1288
+ <?php
1289
+ }
1290
+ }
1291
+
1292
  ?>
powerpressadmin-categoryfeeds.php CHANGED
@@ -49,18 +49,7 @@ function powerpress_admin_categoryfeeds()
49
  <thead>
50
  <tr>
51
  <?php
52
- if( function_exists('print_column_headers') )
53
- {
54
- print_column_headers('powerpressadmin_categoryfeeds');
55
- }
56
- else
57
- {
58
- ?>
59
- <th scope="col" id="name" class="manage-column column-name"><?php echo __('Category Name', 'powerpress'); ?></th>
60
- <th scope="col" id="feed-slug" class="manage-column column-feed-slug"><?php echo __('Slug', 'powerpress'); ?></th>
61
- <th scope="col" id="url" class="manage-column column-url"><?php echo __('Feed URL', 'powerpress'); ?></th>
62
- <?php
63
- }
64
  ?>
65
  </tr>
66
  </thead>
49
  <thead>
50
  <tr>
51
  <?php
52
+ print_column_headers('powerpressadmin_categoryfeeds');
 
 
 
 
 
 
 
 
 
 
 
53
  ?>
54
  </tr>
55
  </thead>
powerpressadmin-dashboard.php CHANGED
@@ -245,6 +245,7 @@ function powerpress_dashboard_notice_message($notice_id, $message)
245
 
246
  function powerpress_feed_text_limit( $text, $limit, $finish = '&hellip;') {
247
  if( strlen( $text ) > $limit ) {
 
248
  $text = substr( $text, 0, $limit );
249
  $text = substr( $text, 0, - ( strlen( strrchr( $text,' ') ) ) );
250
  $text .= $finish;
245
 
246
  function powerpress_feed_text_limit( $text, $limit, $finish = '&hellip;') {
247
  if( strlen( $text ) > $limit ) {
248
+ //$text = (function_exists('mb_substr')?mb_substr($text, 0, $limit):substr($text, 0, $limit) );
249
  $text = substr( $text, 0, $limit );
250
  $text = substr( $text, 0, - ( strlen( strrchr( $text,' ') ) ) );
251
  $text .= $finish;
powerpressadmin-defaults.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ function powerpressadmin_default_steps($FeedSettings, $General, $Step = 0)
5
+ {
6
+ ?>
7
+ <div id="powerpress_steps">
8
+ <div class="powerpress-step active-step" id="powerpreess_step_1">
9
+ <h3><?php echo __('Step 1', 'powerpress'); ?></h3>
10
+ <p>
11
+ <?php echo __('Fill out the settings on this page', 'powerpress'); ?>
12
+ </p>
13
+ <?php powerpressadmin_complete_check($Step >= 1); ?>
14
+ </div>
15
+ <div class="powerpress-step<?php echo ($Step >= 1? ' active-step':''); ?>">
16
+ <h3><?php echo __('Step 2', 'powerpress'); ?></h3>
17
+ <p>
18
+ <a href="http://create.blubrry.com/resources/powerpress/using-powerpress/creating-your-first-episode-with-powerpress/" target="_blank"><?php echo __('Create a blog post with an episode', 'powerpress'); ?></a>
19
+ </p>
20
+ <p><a href="http://create.blubrry.com/resources/" target="_blank"><?php echo __('Need Help?', 'powerpress'); ?></a>
21
+ </p>
22
+ <?php powerpressadmin_complete_check($Step >= 2); ?>
23
+ </div>
24
+ <div class="powerpress-step<?php echo ($Step >= 2? ' active-step':''); ?>">
25
+ <h3><?php echo __('Step 3', 'powerpress'); ?></h3>
26
+ <p>
27
+ <a href="http://create.blubrry.com/manual/podcast-promotion/submit-podcast-to-itunes/?podcast-feed=<?php echo urlencode(get_feed_link('podcast')); ?>" target="_blank"><?php echo __('Submit your feed to iTunes and other podcast directories', 'powerpress'); ?></a>
28
+ </p>
29
+ <?php powerpressadmin_complete_check($Step == 3); ?>
30
+ </div>
31
+ <div class="clear"></div>
32
+ </div>
33
+ <?php
34
+
35
+ }
36
+
37
+ function powerpressadmin_complete_check($checked=false)
38
+ {
39
+ ?>
40
+ <div class="powerpress-step-complete<?php echo ($checked?' powerpress-step-completed':''); ?>">
41
+ <p>complete
42
+ <span class="powerpress-step-complete-box">&nbsp;</span>
43
+ </p>
44
+ </div>
45
+ <?php
46
+ }
47
+
48
+ function powerpress_admin_defaults()
49
+ {
50
+ $FeedAttribs = array('type'=>'general', 'feed_slug'=>'', 'category_id'=>0, 'term_taxonomy_id'=>0, 'term_id'=>0, 'taxonomy_type'=>'', 'post_type'=>'');
51
+
52
+ $General = powerpress_get_settings('powerpress_general');
53
+ $General = powerpress_default_settings($General, 'basic');
54
+
55
+ $FeedSettings = powerpress_get_settings('powerpress_feed');
56
+ $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
57
+
58
+ $Step = 0;
59
+ if( !empty($FeedSettings['itunes_cat_1']) && !empty($FeedSettings['email']) && !empty($FeedSettings['itunes_image']) )
60
+ $Step = 1;
61
+
62
+ $episode_total = 0;
63
+ if( $Step == 1 )
64
+ {
65
+ $episode_total = powerpress_admin_episodes_per_feed('podcast');
66
+ if( $episode_total > 0 )
67
+ $Step = 2;
68
+ }
69
+
70
+ if( $Step == 2 && !empty($FeedSettings['itunes_url']) )
71
+ $Step = 3;
72
+
73
+ ?>
74
+ <script type="text/javascript"><!--
75
+
76
+
77
+ jQuery(document).ready(function($) {
78
+ jQuery('#powerpress_advanced_mode_button').click( function(event) {
79
+ event.preventDefault();
80
+ jQuery('#powerpress_advanced_mode').val('1');
81
+ jQuery(this).closest("form").submit();
82
+ } );
83
+ } );
84
+ //-->
85
+ </script>
86
+ <input type="hidden" name="action" value="powerpress-save-defaults" />
87
+ <input type="hidden" id="powerpress_advanced_mode" name="General[advanced_mode_2]" value="0" />
88
+
89
+ <div id="powerpress_admin_header">
90
+ <h2><?php echo __('Blubrry PowerPress Settings', 'powerpress'); ?></h2>
91
+ <span class="powerpress-mode"><?php echo __('Default Mode', 'powerpress'); ?>
92
+ &nbsp; <a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_basic.php&mode=advanced"); ?>" id="powerpress_advanced_mode_button" class="button-primary"><?php echo __('Switch to Advanced Mode', 'powerpress'); ?></a>
93
+ </span>
94
+ </div>
95
+
96
+ <?php
97
+
98
+ powerpressadmin_default_steps($FeedSettings, $General, $Step);
99
+
100
+ powerpressadmin_edit_blubrry_services($General);
101
+ ?>
102
+ <h3><?php echo __('Podcast Settings', 'powerpress'); ?></h3>
103
+ <table class="form-table">
104
+ <tr valign="top">
105
+ <th scope="row">
106
+ <?php echo __('Program Title', 'powerpress'); ?>
107
+ </th>
108
+ <td>
109
+ <input type="text" name="Feed[title]"style="width: 60%;" value="<?php echo $FeedSettings['title']; ?>" maxlength="250" />
110
+ (<?php echo __('leave blank to use blog title', 'powerpress'); ?>)
111
+ <p><?php echo __('Blog title:', 'powerpress') .' '. get_bloginfo_rss('name'); ?></p>
112
+ </td>
113
+ </tr>
114
+ </table>
115
+ <?php
116
+ if( $Step > 1 ) // Only display if we have episdoes in the feed!
117
+ powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs);
118
+ // iTunes settings (in simple mode of course)
119
+ powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
120
+
121
+ powerpressadmin_edit_artwork($FeedSettings, $General);
122
+ powerpressadmin_appearance($General);
123
+ powerpressadmin_advanced_options($General);
124
+ }
125
+
126
+
127
+ ?>
powerpressadmin-editfeed.php CHANGED
@@ -138,13 +138,13 @@ function powerpress_admin_capabilities()
138
 
139
 
140
  // powerpressadmin_editfeed.php
141
- // function powerpress_admin_editfeed($feed_slug=false, $cat_ID = false, $term_taxonomy_id = false)
142
- function powerpress_admin_editfeed($type='', $type_value = '')
143
  {
144
  $SupportUploads = powerpressadmin_support_uploads();
145
  $General = powerpress_get_settings('powerpress_general');
146
- $FeedAttribs = array('type'=>$type, 'channel'=>'', 'category_id'=>0, 'term_taxonomy_id'=>0, 'term_id'=>0, 'taxonomy_type'=>'', 'post_type'=>'');
147
- $feed_slug=false; $cat_ID = false; $term_taxonomy_id = false;
 
148
 
149
  $FeedTitle = __('Feed Settings', 'powerpress');
150
 
@@ -152,7 +152,7 @@ function powerpress_admin_editfeed($type='', $type_value = '')
152
  {
153
  case 'channel': {
154
  $feed_slug = $type_value;
155
- $FeedAttribs['channel'] = $type_value;
156
  $FeedSettings = powerpress_get_settings('powerpress_feed_'.$feed_slug);
157
  if( !$FeedSettings )
158
  {
@@ -168,6 +168,7 @@ function powerpress_admin_editfeed($type='', $type_value = '')
168
 
169
  $FeedTitle = sprintf( 'Podcast Settings for Channel: %s', $General['custom_feeds'][$feed_slug]);
170
  echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
 
171
 
172
  }; break;
173
  case 'category': {
@@ -179,6 +180,7 @@ function powerpress_admin_editfeed($type='', $type_value = '')
179
  $category = get_category_to_edit($cat_ID);
180
  $FeedTitle = sprintf( __('Podcast Settings for Category: %s', 'powerpress'), htmlspecialchars($category->name) );
181
  echo sprintf('<input type="hidden" name="cat" value="%s" />', $cat_ID);
 
182
 
183
  }; break;
184
  case 'ttid': {
@@ -203,23 +205,30 @@ function powerpress_admin_editfeed($type='', $type_value = '')
203
  $FeedTitle = sprintf( __('Podcast Settings for Taxonomy Term: %s', 'powerpress'), 'Term ID '.htmlspecialchars($term_taxonomy_id));
204
  }
205
  echo sprintf('<input type="hidden" name="ttid" value="%s" />', $term_taxonomy_id);
 
206
 
207
  }; break;
208
  case 'post_type': {
209
 
210
  $FeedAttribs['post_type'] = $type_value;
211
- $FeedSettings = powerpress_get_settings('powerpress_post_type_'.$FeedAttribs['post_type']);
212
- $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
 
 
 
213
 
214
  //$category = get_category_to_edit($cat_ID);
215
- $PostTypeTitle = 'TODO';
216
- $FeedTitle = sprintf( __('Podcast Settings for Post Type: %s', 'powerpress'), htmlspecialchars($PostTypeTitle) );
217
- echo sprintf('<input type="hidden" name="post_type" value="%s" />', $FeedAttribs['post_type']);
 
 
218
 
219
  }; break;
220
  default: {
221
  $FeedSettings = powerpress_get_settings('powerpress_feed');
222
  $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
 
223
  }; break;
224
  }
225
 
@@ -236,12 +245,11 @@ function powerpress_admin_editfeed($type='', $type_value = '')
236
  <ul class="powerpress_settings_tabs">
237
  <li><a href="#feed_tab_feed"><span><?php echo htmlspecialchars(__('Feed Settings', 'powerpress')); ?></span></a></li>
238
  <li><a href="#feed_tab_itunes"><span><?php echo htmlspecialchars(__('iTunes Settings', 'powerpress')); ?></span></a></li>
239
- <li><a href="#feed_tab_tv"><span><?php echo htmlspecialchars(__('T.V.', 'powerpress')); ?></span></a></li>
240
- <?php if( $feed_slug ) { ?>
241
  <li><a href="#feed_tab_appearance"><span><?php echo htmlspecialchars(__('Media Appearance', 'powerpress')); ?></span></a></li>
242
- <li><a href="#feed_tab_other"><span><?php echo htmlspecialchars(__('Other Settings', 'powerpress')); ?></span></a></li>
243
  <?php } ?>
244
- <?php if( in_array($FeedAttribs['type'], array('category', 'ttid', 'post_type') ) ) { ?>
245
  <li><a href="#feed_tab_other"><span><?php echo htmlspecialchars(__('Other Settings', 'powerpress')); ?></span></a></li>
246
  <?php } ?>
247
  </ul>
@@ -249,24 +257,24 @@ function powerpress_admin_editfeed($type='', $type_value = '')
249
 
250
  <div id="feed_tab_feed" class="powerpress_tab">
251
  <?php
252
- //powerpressadmin_edit_feed_general($FeedSettings, $General);
253
- //powerpressadmin_edit_feed_settings($FeedSettings, $General);
254
- powerpressadmin_edit_feed_settings($FeedSettings, $General, $cat_ID, $feed_slug, $FeedAttribs );
 
255
  ?>
256
  </div>
257
 
258
  <div id="feed_tab_itunes" class="powerpress_tab">
259
  <?php
260
- //powerpressadmin_edit_itunes_general($General);
261
  if( $feed_slug != 'podcast' )
262
- powerpressadmin_edit_itunes_general($General, $FeedSettings, $feed_slug, $cat_ID);
263
- powerpressadmin_edit_itunes_feed($FeedSettings, $General, $feed_slug, $cat_ID, $FeedAttribs);
264
  ?>
265
  </div>
266
 
267
- <div id="feed_tab_tv" class="powerpress_tab">
268
  <?php
269
- powerpressadmin_edit_tv($FeedSettings, $feed_slug);
270
  ?>
271
  </div>
272
 
@@ -280,7 +288,7 @@ function powerpress_admin_editfeed($type='', $type_value = '')
280
 
281
  <div id="feed_tab_other" class="powerpress_tab">
282
  <?php
283
- powerpressadmin_edit_basics_feed($General, $FeedSettings, $feed_slug)
284
  ?>
285
  </div>
286
  <?php } ?>
@@ -297,14 +305,6 @@ function powerpress_admin_editfeed($type='', $type_value = '')
297
  <div class="clear"></div>
298
  <?php
299
 
300
-
301
-
302
-
303
- //if( !$cat_ID && !$feed_slug )
304
- // powerpressadmin_edit_feed_general($FeedSettings, $General);
305
-
306
-
307
-
308
 
309
  }
310
 
@@ -431,7 +431,7 @@ function powerpressadmin_edit_feed_general($FeedSettings, $General)
431
  <?php
432
  }
433
 
434
- function powerpressadmin_edit_feed_settings($FeedSettings, $General, $cat_ID = false, $feed_slug = false, $FeedAttribs = array() )
435
  {
436
  $SupportUploads = powerpressadmin_support_uploads();
437
  if( !isset($FeedSettings['posts_per_rss']) )
@@ -455,16 +455,18 @@ function powerpressadmin_edit_feed_settings($FeedSettings, $General, $cat_ID = f
455
  $feed_link = get_term_feed_link($FeedAttribs['term_taxonomy_id'], $FeedAttribs['taxonomy_type'], 'rss2');
456
  }; break;
457
  case 'post_type': {
458
- $feed_link = get_post_type_archive_feed_link($FeedAttribs['post_type'], 'podcast');
459
  }; break;
460
  case 'channel': {
461
- $feed_link = get_feed_link($FeedAttribs['channel']);
462
  }; break;
463
  default: {
464
- $feed_link = get_feed_link();
465
  }; break;
466
  }
467
 
 
 
468
  if( $FeedAttribs['type'] == 'channel' && !empty($FeedAttribs['type']) )
469
  {
470
  ?>
@@ -488,12 +490,12 @@ function powerpressadmin_edit_feed_settings($FeedSettings, $General, $cat_ID = f
488
  }
489
  ?>
490
  <h3><?php echo __('Feed Settings', 'powerpress'); ?></h3>
 
 
 
491
  <table class="form-table">
492
 
493
- <?php
494
- if( !empty($FeedAttribs['type']) )
495
- {
496
- ?>
497
  <tr valign="top">
498
  <th scope="row">
499
  <?php echo __('Feed Title', 'powerpress'); ?>
@@ -515,6 +517,9 @@ if( !empty($FeedAttribs['type']) )
515
  <?php } ?>
516
  </td>
517
  </tr>
 
 
 
518
  <tr valign="top">
519
  <th scope="row">
520
  <?php echo __('Feed Description', 'powerpress'); ?>
@@ -529,6 +534,10 @@ if( !empty($FeedAttribs['type']) )
529
  </td>
530
  </tr>
531
 
 
 
 
 
532
  <tr valign="top">
533
  <th scope="row">
534
  <?php echo __('Feed Landing Page URL', 'powerpress'); ?> <br />
@@ -573,7 +582,7 @@ else
573
  </td>
574
  </tr>
575
 
576
- <?php } // End $feed_slug ?>
577
 
578
  <tr valign="top">
579
  <th scope="row">
@@ -589,7 +598,7 @@ else
589
  </tr>
590
 
591
  <?php
592
- if( $feed_slug )
593
  {
594
  ?>
595
  <tr valign="top">
@@ -599,43 +608,13 @@ else
599
  <td>
600
  <input type="checkbox" name="Feed[maximize_feed]" value="1" <?php if( !empty($FeedSettings['maximize_feed']) ) echo 'checked'; ?> />
601
  <?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'); ?>
602
-
603
- <p style="margin-top: 0px; margin-bottomd: 0;"><?php echo powerpressadmin_notice( __('This feature is experimental, use at your own risk.', 'powerpress') ); ?></p>
604
-
605
-
606
  <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>
607
  </td>
608
  </tr>
609
  <?php
610
  }
611
  ?>
612
- <tr valign="top">
613
- <th scope="row">
614
- <?php echo __('RSS2 Image', 'powerpress'); ?> <br />
615
- <span style="font-size: 85%; margin-left: 5px;"><?php echo __('Recommendation: Use iTunes image', 'powerpress'); ?></span>
616
- </th>
617
- <td>
618
- <input type="text" id="rss2_image" name="Feed[rss2_image]" style="width: 60%;" value="<?php echo ( !empty($FeedSettings['rss2_image'])? $FeedSettings['rss2_image']:''); ?>" maxlength="250" />
619
- <a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
620
-
621
- <p><?php echo __('Place the URL to the RSS image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> http://mysite.com/images/rss.jpg</p>
622
-
623
- <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>
624
- <p><strong><?php echo __('A square image that is 300 x 300 pixel or larger in .jpg format is recommended.', 'powerpress'); ?></strong></p>
625
-
626
- <?php if( $SupportUploads ) { ?>
627
- <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>
628
- <div style="display:none" id="rss_image_upload">
629
- <label for="rss2_image"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="rss2_image_file" />
630
- </div>
631
- <?php } ?>
632
- <div>
633
- <?php echo powerpressadmin_notice( __('Note: Do not forget to configure your iTunes image in the next tab, which may be used as your RSS image as well.', 'powerpress') ); ?>
634
- </div>
635
- </td>
636
- </tr>
637
 
638
- <!-- start advanced features -->
639
  <tr valign="top">
640
  <th scope="row">
641
 
@@ -672,7 +651,7 @@ if( isset($Languages[ $rss_language ]) )
672
  </td>
673
  </tr>
674
  <!-- end advanced features -->
675
-
676
  </table>
677
 
678
  <!-- Location and frequency information -->
@@ -682,6 +661,8 @@ if( isset($Languages[ $rss_language ]) )
682
  if( !isset($FeedSettings['frequency']) )
683
  $FeedSettings['frequency'] = '';
684
  ?>
 
 
685
  <h3><?php echo __('Basic Show Information', 'powerpress'); ?></h3>
686
  <div id="rawvoice_basic_options">
687
  <table class="form-table">
@@ -701,7 +682,9 @@ if( isset($Languages[ $rss_language ]) )
701
  </tr>
702
  </table>
703
  </div>
 
704
  <?php
 
705
  }
706
 
707
 
@@ -866,6 +849,9 @@ function powerpress_default_premium_label(event)
866
  }
867
 
868
  // Podcast Channels and Custom Post Types...
 
 
 
869
  ?>
870
  <h3><?php echo __('Custom Post Types', 'powerpress'); ?></h3>
871
  <p>
@@ -881,7 +867,7 @@ function powerpress_default_premium_label(event)
881
  <select name="Feed[custom_post_type]" class="bpp_input_med">
882
  <?php
883
 
884
- $post_types = powerpress_admin_get_post_types_by_capability_type('post');
885
  $custom_post_type = '';
886
  if( !empty($FeedSettings['custom_post_type']) )
887
  $custom_post_type = $FeedSettings['custom_post_type'];
@@ -899,7 +885,7 @@ function powerpress_default_premium_label(event)
899
 
900
  if( defined('POWERPRESS_CUSTOM_CAPABILITY_TYPE') )
901
  {
902
- $post_types = powerpress_admin_get_post_types_by_capability_type( POWERPRESS_CUSTOM_CAPABILITY_TYPE );
903
  if( !empty($post_types) )
904
  {
905
  while( list($index,$value) = each($post_types) )
@@ -922,7 +908,7 @@ function powerpress_default_premium_label(event)
922
  </tr>
923
  </table>
924
  <?php
925
-
926
  } // else if channel
927
  }
928
 
@@ -937,7 +923,7 @@ function powerpressadmin_edit_appearance_feed($General, $FeedSettings, $feed_sl
937
  <?php echo __('Disable Player', 'powerpress'); ?>
938
  </th>
939
  <td>
940
- <input name="DisablePlayerFor" type="checkbox" <?php if( isset($General['disable_player'][$feed_slug]) ) echo 'checked '; ?> value="1" /> <?php echo __('Do not display web player or links for this podcast channel.', 'powerpress'); ?>
941
  <input type="hidden" name="UpdateDisablePlayer" value="<?php echo $feed_slug; ?>" />
942
  </td>
943
  </tr>
@@ -946,8 +932,11 @@ function powerpressadmin_edit_appearance_feed($General, $FeedSettings, $feed_sl
946
 
947
  }
948
 
949
- function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $feed_slug=false, $cat_ID=false, $FeedAttribs = array() )
950
  {
 
 
 
951
  $SupportUploads = powerpressadmin_support_uploads();
952
  if( !isset($FeedSettings['itunes_subtitle']) )
953
  $FeedSettings['itunes_subtitle'] = '';
@@ -972,20 +961,13 @@ function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $feed_slug=fa
972
  if( !isset($FeedSettings['itunes_new_feed_url']) )
973
  $FeedSettings['itunes_new_feed_url'] = '';
974
 
975
- ?>
976
- <h3><?php echo __('iTunes Feed Settings', 'powerpress'); ?></h3>
977
-
978
- <?php
979
  $AdvancediTunesSettings = !empty($FeedSettings['itunes_summary']);
980
  if( !empty($FeedSettings['itunes_subtitle']) )
981
  $AdvancediTunesSettings = true;
982
-
983
- if( !$AdvancediTunesSettings ) {
984
  ?>
985
- <div style="margin-left: 230px; margin-bottom: 10px; font-weight: bold;"><a href="#" onclick="document.getElementById('advanced_itunes_settings').style.display='block';return false;"><?php echo __('Show Advanced iTunes Settings', 'powerpress'); ?></a></div>
986
- <?php } ?>
987
- <!-- start advanced features -->
988
- <div id="advanced_itunes_settings" <?php echo ($AdvancediTunesSettings?'':'style="display: none;"'); ?>>
989
  <table class="form-table">
990
  <tr valign="top">
991
  <th scope="row">
@@ -1007,6 +989,9 @@ function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $feed_slug=fa
1007
  </td>
1008
  </tr>
1009
 
 
 
 
1010
  <tr valign="top">
1011
  <th scope="row">
1012
 
@@ -1034,8 +1019,7 @@ function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $feed_slug=fa
1034
  </td>
1035
  </tr>
1036
  </table>
1037
- </div>
1038
- <!-- end advanced features -->
1039
 
1040
  <table class="form-table">
1041
  <tr valign="top">
@@ -1047,10 +1031,14 @@ function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $feed_slug=fa
1047
  <p><?php echo __('Enter up to 12 keywords separated by commas.', 'powerpress'); ?></p>
1048
  </td>
1049
  </tr>
 
 
 
1050
 
1051
  <tr valign="top">
1052
  <th scope="row">
1053
  <?php echo __('iTunes Category', 'powerpress'); ?>
 
1054
  </th>
1055
  <td>
1056
  <select name="Feed[itunes_cat_1]" class="bpp_input_med">
@@ -1145,45 +1133,11 @@ while( list($value,$desc) = each($explicit) )
1145
  </select>
1146
  </td>
1147
  </tr>
1148
-
1149
- <tr valign="top">
1150
- <th scope="row">
1151
- <?php echo __('iTunes Image', 'powerpress'); ?>
1152
- </th>
1153
- <td>
1154
- <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" />
1155
- <a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
1156
-
1157
- <p><?php echo powerpressadmin_notice( __('iTunes image specifications changed in May, 2012', 'powerpress') ); ?></p>
1158
- <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
1159
- </p>
1160
-
1161
- <p><strong><?php echo __('A square image that is 1400 x 1400 pixels in .jpg format for the web (72ppi) is recommended.', 'powerpress'); ?></strong></p>
1162
-
1163
- <p>
1164
- <?php echo __('This image is for your listing on the iTunes podcast directory and may also be used by other directories like 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'); ?>
1165
- </p>
1166
-
1167
- <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'); ?>
1168
- <?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>
1169
- <?php if( $SupportUploads ) { ?>
1170
-
1171
- <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'); ?> &nbsp;
1172
- <span style="font-size:85%;">(<?php echo __('Using this option should update your image on iTunes within 24 hours', 'powerpress'); ?>)</span>
1173
- </p>
1174
- <div style="display:none" id="itunes_image_upload">
1175
- <label for="itunes_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="itunes_image_file" /><br />
1176
- <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>
1177
- </div>
1178
- <?php } ?>
1179
- </td>
1180
- </tr>
1181
-
1182
-
1183
  <!-- start advanced features -->
1184
  <tr valign="top">
1185
  <th scope="row">
1186
- <?php echo __('iTunes Talent Name', 'powerpress'); ?> <br />
1187
  </th>
1188
  <td>
1189
  <input type="text" name="Feed[itunes_talent_name]" class="bpp_input_med" value="<?php echo $FeedSettings['itunes_talent_name']; ?>" maxlength="250" /><br />
@@ -1192,19 +1146,23 @@ while( list($value,$desc) = each($explicit) )
1192
  </td>
1193
  </tr>
1194
  <!-- end advanced features -->
1195
-
1196
 
1197
  <tr valign="top">
1198
  <th scope="row">
1199
- <?php echo __('iTunes Email', 'powerpress'); ?>
 
1200
  </th>
1201
  <td>
1202
  <input type="text" name="Feed[email]" class="bpp_input_med" value="<?php echo $FeedSettings['email']; ?>" maxlength="250" />
1203
  <div>(<?php echo __('iTunes will email this address when your podcast is accepted into the iTunes Directory.', 'powerpress'); ?>)</div>
1204
  </td>
1205
  </tr>
 
1206
 
 
1207
  <!-- start advanced features -->
 
1208
  <tr valign="top">
1209
  <th scope="row" >
1210
 
@@ -1278,7 +1236,6 @@ while( list($value,$desc) = each($explicit) )
1278
  </td>
1279
  </tr>
1280
  </table>
1281
- <!-- end advanced features -->
1282
  <?php if( defined('POWERPRESS_NOT_SUPPORTED') ) { // start powerpress not supported features ?>
1283
  <fieldset style="border: 1px dashed #333333;">
1284
  <legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php echo __('Features Not Supported by PowerPress', 'powerpress'); ?></legend>
@@ -1332,7 +1289,6 @@ while( list($value,$desc) = each($explicit) )
1332
  </div>
1333
 
1334
  </div>
1335
- <!-- start advanced features -->
1336
  <div id="permanent_itunes_settings">
1337
  <table class="form-table">
1338
 
@@ -1359,6 +1315,8 @@ while( list($value,$desc) = each($explicit) )
1359
  </div>
1360
  </fieldset>
1361
  <?php } // End PowerPress not supported features ?>
 
 
1362
  <?php
1363
  }
1364
 
138
 
139
 
140
  // powerpressadmin_editfeed.php
141
+ function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = false)
 
142
  {
143
  $SupportUploads = powerpressadmin_support_uploads();
144
  $General = powerpress_get_settings('powerpress_general');
145
+ $FeedAttribs = array('type'=>$type, 'feed_slug'=>'', 'category_id'=>0, 'term_taxonomy_id'=>0, 'term_id'=>0, 'taxonomy_type'=>'', 'post_type'=>'');
146
+ $cat_ID = false; $term_taxonomy_id = false;
147
+
148
 
149
  $FeedTitle = __('Feed Settings', 'powerpress');
150
 
152
  {
153
  case 'channel': {
154
  $feed_slug = $type_value;
155
+ $FeedAttribs['feed_slug'] = $type_value;
156
  $FeedSettings = powerpress_get_settings('powerpress_feed_'.$feed_slug);
157
  if( !$FeedSettings )
158
  {
168
 
169
  $FeedTitle = sprintf( 'Podcast Settings for Channel: %s', $General['custom_feeds'][$feed_slug]);
170
  echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
171
+ echo '<input type="hidden" name="action" value="powerpress-save-channel" />';
172
 
173
  }; break;
174
  case 'category': {
180
  $category = get_category_to_edit($cat_ID);
181
  $FeedTitle = sprintf( __('Podcast Settings for Category: %s', 'powerpress'), htmlspecialchars($category->name) );
182
  echo sprintf('<input type="hidden" name="cat" value="%s" />', $cat_ID);
183
+ echo '<input type="hidden" name="action" value="powerpress-save-category" />';
184
 
185
  }; break;
186
  case 'ttid': {
205
  $FeedTitle = sprintf( __('Podcast Settings for Taxonomy Term: %s', 'powerpress'), 'Term ID '.htmlspecialchars($term_taxonomy_id));
206
  }
207
  echo sprintf('<input type="hidden" name="ttid" value="%s" />', $term_taxonomy_id);
208
+ echo '<input type="hidden" name="action" value="powerpress-save-ttid" />';
209
 
210
  }; break;
211
  case 'post_type': {
212
 
213
  $FeedAttribs['post_type'] = $type_value;
214
+ $FeedAttribs['feed_slug'] = $feed_slug;
215
+ $FeedSettingsArray = powerpress_get_settings('powerpress_posttype_'.$FeedAttribs['post_type']);
216
+ if( !is_array($FeedSettingsArray[ $feed_slug ]) )
217
+ $FeedSettingsArray[ $feed_slug ] = array();
218
+ $FeedSettings = powerpress_default_settings($FeedSettingsArray[ $feed_slug ], 'editfeed_custom');
219
 
220
  //$category = get_category_to_edit($cat_ID);
221
+ $PostTypeTitle = $FeedAttribs['post_type']; // TODO: Get readable title of post type
222
+ $FeedTitle = sprintf( __('Podcast Settings for Post Type %s with slug %s', 'powerpress'), htmlspecialchars($PostTypeTitle) , htmlspecialchars($feed_slug));
223
+ echo sprintf('<input type="hidden" name="podcast_post_type" value="%s" />', $FeedAttribs['post_type']);
224
+ echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
225
+ echo '<input type="hidden" name="action" value="powerpress-save-post_type" />';
226
 
227
  }; break;
228
  default: {
229
  $FeedSettings = powerpress_get_settings('powerpress_feed');
230
  $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
231
+ echo '<input type="hidden" name="action" value="powerpress-save-settings" />';
232
  }; break;
233
  }
234
 
245
  <ul class="powerpress_settings_tabs">
246
  <li><a href="#feed_tab_feed"><span><?php echo htmlspecialchars(__('Feed Settings', 'powerpress')); ?></span></a></li>
247
  <li><a href="#feed_tab_itunes"><span><?php echo htmlspecialchars(__('iTunes Settings', 'powerpress')); ?></span></a></li>
248
+ <li><a href="#feed_tab_artwork"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
249
+ <?php if( in_array($FeedAttribs['type'], array('post_type', 'channel') ) ) { ?>
250
  <li><a href="#feed_tab_appearance"><span><?php echo htmlspecialchars(__('Media Appearance', 'powerpress')); ?></span></a></li>
 
251
  <?php } ?>
252
+ <?php if( in_array($FeedAttribs['type'], array('category', 'ttid', 'post_type', 'channel') ) ) { ?>
253
  <li><a href="#feed_tab_other"><span><?php echo htmlspecialchars(__('Other Settings', 'powerpress')); ?></span></a></li>
254
  <?php } ?>
255
  </ul>
257
 
258
  <div id="feed_tab_feed" class="powerpress_tab">
259
  <?php
260
+ powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs );
261
+ if( !empty($General['advanced_mode_2']) ) {
262
+ powerpressadmin_edit_tv($FeedSettings, $feed_slug);
263
+ }
264
  ?>
265
  </div>
266
 
267
  <div id="feed_tab_itunes" class="powerpress_tab">
268
  <?php
 
269
  if( $feed_slug != 'podcast' )
270
+ powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs);
271
+ powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
272
  ?>
273
  </div>
274
 
275
+ <div id="feed_tab_artwork" class="powerpress_tab">
276
  <?php
277
+ powerpressadmin_edit_artwork($FeedSettings, $General);
278
  ?>
279
  </div>
280
 
288
 
289
  <div id="feed_tab_other" class="powerpress_tab">
290
  <?php
291
+ powerpressadmin_edit_basics_feed($General, $FeedSettings, $feed_slug, $cat_ID, $FeedAttribs);
292
  ?>
293
  </div>
294
  <?php } ?>
305
  <div class="clear"></div>
306
  <?php
307
 
 
 
 
 
 
 
 
 
308
 
309
  }
310
 
431
  <?php
432
  }
433
 
434
+ function powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs = array() )
435
  {
436
  $SupportUploads = powerpressadmin_support_uploads();
437
  if( !isset($FeedSettings['posts_per_rss']) )
455
  $feed_link = get_term_feed_link($FeedAttribs['term_taxonomy_id'], $FeedAttribs['taxonomy_type'], 'rss2');
456
  }; break;
457
  case 'post_type': {
458
+ $feed_link = get_post_type_archive_feed_link($FeedAttribs['post_type'], $FeedAttribs['feed_slug']);
459
  }; break;
460
  case 'channel': {
461
+ $feed_link = get_feed_link($FeedAttribs['feed_slug']);
462
  }; break;
463
  default: {
464
+ $feed_link = get_feed_link('podcast');
465
  }; break;
466
  }
467
 
468
+ $cat_ID = $FeedAttribs['category_id'];
469
+
470
  if( $FeedAttribs['type'] == 'channel' && !empty($FeedAttribs['type']) )
471
  {
472
  ?>
490
  }
491
  ?>
492
  <h3><?php echo __('Feed Settings', 'powerpress'); ?></h3>
493
+ <?php if( $FeedAttribs['type'] == 'general' ) { ?>
494
+ <p><?php echo __('Feed settings below only apply to the podcast only feed:', 'powerpress'); ?> <?php echo get_feed_link('podcast'); ?></p>
495
+ <?php } ?>
496
  <table class="form-table">
497
 
498
+
 
 
 
499
  <tr valign="top">
500
  <th scope="row">
501
  <?php echo __('Feed Title', 'powerpress'); ?>
517
  <?php } ?>
518
  </td>
519
  </tr>
520
+
521
+ <?php if( !empty($General['advanced_mode_2']) ) { ?>
522
+ <!-- start advanced features -->
523
  <tr valign="top">
524
  <th scope="row">
525
  <?php echo __('Feed Description', 'powerpress'); ?>
534
  </td>
535
  </tr>
536
 
537
+ <?php
538
+ if( $FeedAttribs['type'] != 'general' ) // All types exept general settings
539
+ {
540
+ ?>
541
  <tr valign="top">
542
  <th scope="row">
543
  <?php echo __('Feed Landing Page URL', 'powerpress'); ?> <br />
582
  </td>
583
  </tr>
584
 
585
+ <?php } // End not general settings ?>
586
 
587
  <tr valign="top">
588
  <th scope="row">
598
  </tr>
599
 
600
  <?php
601
+ if( in_array($FeedAttribs['type'], array('channel', 'general')) )
602
  {
603
  ?>
604
  <tr valign="top">
608
  <td>
609
  <input type="checkbox" name="Feed[maximize_feed]" value="1" <?php if( !empty($FeedSettings['maximize_feed']) ) echo 'checked'; ?> />
610
  <?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'); ?>
 
 
 
 
611
  <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>
612
  </td>
613
  </tr>
614
  <?php
615
  }
616
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
617
 
 
618
  <tr valign="top">
619
  <th scope="row">
620
 
651
  </td>
652
  </tr>
653
  <!-- end advanced features -->
654
+ <?php } ?>
655
  </table>
656
 
657
  <!-- Location and frequency information -->
661
  if( !isset($FeedSettings['frequency']) )
662
  $FeedSettings['frequency'] = '';
663
  ?>
664
+ <?php if( !empty($General['advanced_mode_2']) ) { ?>
665
+ <!-- start advanced features -->
666
  <h3><?php echo __('Basic Show Information', 'powerpress'); ?></h3>
667
  <div id="rawvoice_basic_options">
668
  <table class="form-table">
682
  </tr>
683
  </table>
684
  </div>
685
+ <!-- end advanced features -->
686
  <?php
687
+ }
688
  }
689
 
690
 
849
  }
850
 
851
  // Podcast Channels and Custom Post Types...
852
+
853
+ if( $FeedAttribs['type'] == 'channel' )
854
+ {
855
  ?>
856
  <h3><?php echo __('Custom Post Types', 'powerpress'); ?></h3>
857
  <p>
867
  <select name="Feed[custom_post_type]" class="bpp_input_med">
868
  <?php
869
 
870
+ $post_types = powerpress_admin_get_post_types('post');
871
  $custom_post_type = '';
872
  if( !empty($FeedSettings['custom_post_type']) )
873
  $custom_post_type = $FeedSettings['custom_post_type'];
885
 
886
  if( defined('POWERPRESS_CUSTOM_CAPABILITY_TYPE') )
887
  {
888
+ $post_types = powerpress_admin_get_post_types( POWERPRESS_CUSTOM_CAPABILITY_TYPE );
889
  if( !empty($post_types) )
890
  {
891
  while( list($index,$value) = each($post_types) )
908
  </tr>
909
  </table>
910
  <?php
911
+ }
912
  } // else if channel
913
  }
914
 
923
  <?php echo __('Disable Player', 'powerpress'); ?>
924
  </th>
925
  <td>
926
+ <input name="DisablePlayerFor" type="checkbox" <?php if( isset($General['disable_player'][$feed_slug]) ) echo 'checked '; ?> value="1" /> <?php echo __('Do not display web player or links for this podcast.', 'powerpress'); ?>
927
  <input type="hidden" name="UpdateDisablePlayer" value="<?php echo $feed_slug; ?>" />
928
  </td>
929
  </tr>
932
 
933
  }
934
 
935
+ function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs = array() )
936
  {
937
+ $feed_slug = $FeedAttribs['feed_slug'];
938
+ $cat_ID = $FeedAttribs['category_id'];
939
+
940
  $SupportUploads = powerpressadmin_support_uploads();
941
  if( !isset($FeedSettings['itunes_subtitle']) )
942
  $FeedSettings['itunes_subtitle'] = '';
961
  if( !isset($FeedSettings['itunes_new_feed_url']) )
962
  $FeedSettings['itunes_new_feed_url'] = '';
963
 
 
 
 
 
964
  $AdvancediTunesSettings = !empty($FeedSettings['itunes_summary']);
965
  if( !empty($FeedSettings['itunes_subtitle']) )
966
  $AdvancediTunesSettings = true;
967
+
 
968
  ?>
969
+
970
+ <h3><?php echo __('iTunes Settings', 'powerpress'); ?></h3>
 
 
971
  <table class="form-table">
972
  <tr valign="top">
973
  <th scope="row">
989
  </td>
990
  </tr>
991
 
992
+ <?php
993
+ if( !empty($General['advanced_mode_2']) ) {
994
+ ?>
995
  <tr valign="top">
996
  <th scope="row">
997
 
1019
  </td>
1020
  </tr>
1021
  </table>
1022
+
 
1023
 
1024
  <table class="form-table">
1025
  <tr valign="top">
1031
  <p><?php echo __('Enter up to 12 keywords separated by commas.', 'powerpress'); ?></p>
1032
  </td>
1033
  </tr>
1034
+ <?php
1035
+ } // end advanced mode
1036
+ ?>
1037
 
1038
  <tr valign="top">
1039
  <th scope="row">
1040
  <?php echo __('iTunes Category', 'powerpress'); ?>
1041
+ <span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
1042
  </th>
1043
  <td>
1044
  <select name="Feed[itunes_cat_1]" class="bpp_input_med">
1133
  </select>
1134
  </td>
1135
  </tr>
1136
+ <?php if( !empty($General['advanced_mode_2']) ) { ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1137
  <!-- start advanced features -->
1138
  <tr valign="top">
1139
  <th scope="row">
1140
+ <?php echo __('iTunes Talent Name', 'powerpress'); ?>
1141
  </th>
1142
  <td>
1143
  <input type="text" name="Feed[itunes_talent_name]" class="bpp_input_med" value="<?php echo $FeedSettings['itunes_talent_name']; ?>" maxlength="250" /><br />
1146
  </td>
1147
  </tr>
1148
  <!-- end advanced features -->
1149
+ <?php } ?>
1150
 
1151
  <tr valign="top">
1152
  <th scope="row">
1153
+ <?php echo __('iTunes Email', 'powerpress'); ?>
1154
+ <span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
1155
  </th>
1156
  <td>
1157
  <input type="text" name="Feed[email]" class="bpp_input_med" value="<?php echo $FeedSettings['email']; ?>" maxlength="250" />
1158
  <div>(<?php echo __('iTunes will email this address when your podcast is accepted into the iTunes Directory.', 'powerpress'); ?>)</div>
1159
  </td>
1160
  </tr>
1161
+ </table>
1162
 
1163
+ <?php if( !empty($General['advanced_mode_2']) ) { ?>
1164
  <!-- start advanced features -->
1165
+ <table class="form-table">
1166
  <tr valign="top">
1167
  <th scope="row" >
1168
 
1236
  </td>
1237
  </tr>
1238
  </table>
 
1239
  <?php if( defined('POWERPRESS_NOT_SUPPORTED') ) { // start powerpress not supported features ?>
1240
  <fieldset style="border: 1px dashed #333333;">
1241
  <legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php echo __('Features Not Supported by PowerPress', 'powerpress'); ?></legend>
1289
  </div>
1290
 
1291
  </div>
 
1292
  <div id="permanent_itunes_settings">
1293
  <table class="form-table">
1294
 
1315
  </div>
1316
  </fieldset>
1317
  <?php } // End PowerPress not supported features ?>
1318
+ <!-- end advanced features -->
1319
+ <?php } // end other advanced options ?>
1320
  <?php
1321
  }
1322
 
powerpressadmin-jquery.php CHANGED
@@ -1,16 +1,8 @@
1
  <?php
2
  // jQuery specific functions and code go here..
3
 
4
- // Credits:
5
- /*
6
- FOLDER ICON provided by Silk icon set 1.3 by Mark James link: http://www.famfamfam.com/lab/icons/silk/
7
- */
8
-
9
  function powerpress_add_blubrry_redirect($program_keyword)
10
  {
11
- if( !strstr(POWERPRESS_BLUBRRY_API_URL, 'api.blubrry.com' ) )
12
- return;
13
-
14
  $Settings = powerpress_get_settings('powerpress_general');
15
  $RedirectURL = 'http://media.blubrry.com/'.$program_keyword;
16
  $NewSettings = array();
@@ -21,16 +13,11 @@ function powerpress_add_blubrry_redirect($program_keyword)
21
  for( $x = 1; $x <= 3; $x++ )
22
  {
23
  $field = sprintf('redirect%d', $x);
24
- if( $Settings[$field] == '' )
25
- {
26
- $NewSettings[$field] = $RedirectURL.'/';
27
- break;
28
- }
29
- else if( stristr($Settings[$field], $RedirectURL ) )
30
- {
31
- return; // Redirect already implemented
32
- }
33
  }
 
 
34
  if( count($NewSettings) > 0 )
35
  powerpress_save_settings($NewSettings);
36
  }
@@ -160,7 +147,7 @@ function powerpress_admin_jquery_init()
160
  exit;
161
  }
162
 
163
- if( !isset($Settings['blubrry_auth']) || $Settings['blubrry_auth'] == '' || !isset($Settings['blubrry_hosting']) || $Settings['blubrry_hosting'] == 0 )
164
  {
165
  powerpress_admin_jquery_header( __('Select Media', 'powerpress') );
166
  ?>
@@ -390,7 +377,7 @@ function DeleteMedia(File)
390
  $Password = $_POST['Password'];
391
  $SaveSettings = $_POST['Settings'];
392
  $Password = powerpress_stripslashes($Password);
393
- $General = powerpress_stripslashes($SaveSettings);
394
 
395
  $Save = false;
396
  $Close = false;
@@ -408,16 +395,12 @@ function DeleteMedia(File)
408
  else
409
  {
410
  $Programs = array();
411
- //if( isset($_POST['ChangePassword']) )
412
- //{
413
- // $Settings['blubrry_program_keyword'] = ''; // Reset the program keyword stored
414
 
415
  // Anytime we change the password we need to test it...
416
  $auth = base64_encode( $SaveSettings['blubrry_username'] . ':' . $Password );
417
- if( $SaveSettings['blubrry_hosting'] == 0 )
418
- $api_url = sprintf('%s/stats/index.json', rtrim(POWERPRESS_BLUBRRY_API_URL, '/') );
419
- else
420
- $api_url = sprintf('%s/media/index.json', rtrim(POWERPRESS_BLUBRRY_API_URL, '/') );
421
  $api_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'?'. POWERPRESS_BLUBRRY_API_QSA:'');
422
  $json_data = powerpress_remote_fopen($api_url, $auth);
423
  if( $json_data )
@@ -450,7 +433,10 @@ function DeleteMedia(File)
450
  {
451
  // Get all the programs for this user...
452
  while( list($null,$row) = each($results) )
 
453
  $Programs[ $row['program_keyword'] ] = $row['program_title'];
 
 
454
 
455
  if( count($Programs) > 0 )
456
  {
@@ -459,10 +445,11 @@ function DeleteMedia(File)
459
  if( !empty($SaveSettings['blubrry_program_keyword']) )
460
  {
461
  powerpress_add_blubrry_redirect($SaveSettings['blubrry_program_keyword']);
 
462
  $Save = true;
463
  $Close = true;
464
  }
465
- else if( isset($SaveSettings['blubrry_program_keyword']) )
466
  {
467
  $Error = __('You must select a program to continue.', 'powerpress');
468
  }
@@ -470,6 +457,7 @@ function DeleteMedia(File)
470
  {
471
  list($keyword, $title) = each($Programs);
472
  $SaveSettings['blubrry_program_keyword'] = $keyword;
 
473
  powerpress_add_blubrry_redirect($keyword);
474
  $Close = true;
475
  $Save = true;
@@ -479,7 +467,6 @@ function DeleteMedia(File)
479
  $Error = __('Please select your podcast program to continue.', 'powerpress');
480
  $Step = 2;
481
  $Settings['blubrry_username'] = $SaveSettings['blubrry_username'];
482
- $Settings['blubrry_hosting'] = $SaveSettings['blubrry_hosting'];
483
  }
484
  }
485
  else
@@ -523,8 +510,19 @@ function DeleteMedia(File)
523
  <h2><?php echo __('Blubrry Services Integration', 'powerpress'); ?></h2>
524
  <p style="text-align: center;"><strong><?php echo __('Settings Saved Successfully!', 'powerpress'); ?></strong></p>
525
  <p style="text-align: center;">
526
- <a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_basic.php"); ?>" target="_top"><?php echo __('Close', 'powerpress'); ?></a>
527
  </p>
 
 
 
 
 
 
 
 
 
 
 
528
  <?php
529
  powerpress_admin_jquery_footer();
530
  exit;
@@ -567,10 +565,6 @@ function DeleteMedia(File)
567
  if( $Programs == false )
568
  $Programs = array();
569
 
570
- // If we have programs to select from, then we're at step 2
571
- //if( count($Programs) )
572
- // $Step = 2;
573
-
574
  powerpress_admin_jquery_header( __('Blubrry Services Integration', 'powerpress') );
575
  powerpress_page_message_print();
576
  ?>
@@ -588,20 +582,13 @@ function DeleteMedia(File)
588
  <label for="password_password"><?php echo __('Blubrry Password', 'powerpress'); ?></label>
589
  <input type="password" id="password_password" name="Password" value="" />
590
  </p>
591
- <p><strong><?php echo __('Select Blubrry Services', 'powerpress'); ?></strong></p>
592
- <p style="margin-left: 20px; margin-bottom: 0px;margin-top: 0px;">
593
- <input type="radio" name="Settings[blubrry_hosting]" value="0" <?php echo ($Settings['blubrry_hosting']==0?'checked':''); ?> /> <?php echo __('Statistics Integration only', 'powerpress'); ?>
594
- </p>
595
- <p style="margin-left: 20px; margin-top: 0px;">
596
- <input type="radio" name="Settings[blubrry_hosting]" value="1" <?php echo ($Settings['blubrry_hosting']==1?'checked':''); ?> /> <?php echo __('Statistics and Hosting Integration (Requires Blubrry Hosting Account)', 'powerpress'); ?>
597
- </p>
598
  <?php } else { ?>
599
  <input type="hidden" name="Settings[blubrry_username]" value="<?php echo htmlspecialchars($Settings['blubrry_username']); ?>" />
600
  <input type="hidden" name="Password" value="<?php echo htmlspecialchars($Password); ?>" />
601
  <input type="hidden" name="Settings[blubrry_hosting]" value="<?php echo $Settings['blubrry_hosting']; ?>" />
602
  <p>
603
- <label><?php echo __('Blubrry Program Keyword', 'powerpress'); ?></label>
604
- <select name="Settings[blubrry_program_keyword]">
605
  <option value=""><?php echo __('Select Program', 'powerpress'); ?></option>
606
  <?php
607
  while( list($value,$desc) = each($Programs) )
@@ -611,9 +598,9 @@ while( list($value,$desc) = each($Programs) )
611
  </p>
612
  <?php } ?>
613
  <p>
614
- <input type="submit" name="Remove" value="Remove" style="float: right;" onclick="return confirm('<?php echo __('Remove Blubrry Services Integration, are you sure?', 'powerpress'); ?>');" />
615
  <input type="submit" name="Save" value="<?php echo __('Save', 'powerpress'); ?>" />
616
  <input type="button" name="Cancel" value="<?php echo __('Cancel', 'powerpress'); ?>" onclick="self.parent.tb_remove();" />
 
617
  </p>
618
  </div>
619
  </form>
@@ -647,7 +634,6 @@ while( list($value,$desc) = each($Programs) )
647
  if( empty($Settings['blubrry_auth']) )
648
  $Settings['blubrry_auth'] = '';
649
 
650
-
651
  if( $Settings['blubrry_hosting'] == 0 )
652
  {
653
  $Error = __('This feature is available to Blubrry Hosting users only.','powerpress');
1
  <?php
2
  // jQuery specific functions and code go here..
3
 
 
 
 
 
 
4
  function powerpress_add_blubrry_redirect($program_keyword)
5
  {
 
 
 
6
  $Settings = powerpress_get_settings('powerpress_general');
7
  $RedirectURL = 'http://media.blubrry.com/'.$program_keyword;
8
  $NewSettings = array();
13
  for( $x = 1; $x <= 3; $x++ )
14
  {
15
  $field = sprintf('redirect%d', $x);
16
+ if( !empty($Settings[$field]) && !stristr($Settings[$field], 'podtrac.com') )
17
+ $NewSettings[$field] = '';
 
 
 
 
 
 
 
18
  }
19
+ $NewSettings['redirect1'] = $RedirectURL.'/';
20
+
21
  if( count($NewSettings) > 0 )
22
  powerpress_save_settings($NewSettings);
23
  }
147
  exit;
148
  }
149
 
150
+ if( empty($Settings['blubrry_auth']) || empty($Settings['blubrry_hosting']) )
151
  {
152
  powerpress_admin_jquery_header( __('Select Media', 'powerpress') );
153
  ?>
377
  $Password = $_POST['Password'];
378
  $SaveSettings = $_POST['Settings'];
379
  $Password = powerpress_stripslashes($Password);
380
+ $SaveSettings = powerpress_stripslashes($SaveSettings);
381
 
382
  $Save = false;
383
  $Close = false;
395
  else
396
  {
397
  $Programs = array();
398
+ $ProgramHosting = array();
 
 
399
 
400
  // Anytime we change the password we need to test it...
401
  $auth = base64_encode( $SaveSettings['blubrry_username'] . ':' . $Password );
402
+ $api_url = sprintf('%s/service/index.json', rtrim(POWERPRESS_BLUBRRY_API_URL, '/') );
403
+
 
 
404
  $api_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'?'. POWERPRESS_BLUBRRY_API_QSA:'');
405
  $json_data = powerpress_remote_fopen($api_url, $auth);
406
  if( $json_data )
433
  {
434
  // Get all the programs for this user...
435
  while( list($null,$row) = each($results) )
436
+ {
437
  $Programs[ $row['program_keyword'] ] = $row['program_title'];
438
+ $ProgramHosting[ $row['program_keyword'] ] = $row['hosting'];
439
+ }
440
 
441
  if( count($Programs) > 0 )
442
  {
445
  if( !empty($SaveSettings['blubrry_program_keyword']) )
446
  {
447
  powerpress_add_blubrry_redirect($SaveSettings['blubrry_program_keyword']);
448
+ $SaveSettings['blubrry_hosting'] = $ProgramHosting[ $SaveSettings['blubrry_program_keyword'] ];
449
  $Save = true;
450
  $Close = true;
451
  }
452
+ else if( isset($SaveSettings['blubrry_program_keyword']) ) // Present but empty
453
  {
454
  $Error = __('You must select a program to continue.', 'powerpress');
455
  }
457
  {
458
  list($keyword, $title) = each($Programs);
459
  $SaveSettings['blubrry_program_keyword'] = $keyword;
460
+ $SaveSettings['blubrry_hosting'] = $ProgramHosting[ $keyword ];
461
  powerpress_add_blubrry_redirect($keyword);
462
  $Close = true;
463
  $Save = true;
467
  $Error = __('Please select your podcast program to continue.', 'powerpress');
468
  $Step = 2;
469
  $Settings['blubrry_username'] = $SaveSettings['blubrry_username'];
 
470
  }
471
  }
472
  else
510
  <h2><?php echo __('Blubrry Services Integration', 'powerpress'); ?></h2>
511
  <p style="text-align: center;"><strong><?php echo __('Settings Saved Successfully!', 'powerpress'); ?></strong></p>
512
  <p style="text-align: center;">
513
+ <a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_basic.php"); ?>" onclick="self.parent.tb_remove(); return false;" target="_top"><?php echo __('Close', 'powerpress'); ?></a>
514
  </p>
515
+ <script type="text/javascript"><!--
516
+
517
+ jQuery(document).ready(function($) {
518
+ // Upload loading, check the parent window for #blubrry_stats_settings div
519
+ if( jQuery('#blubrry_stats_settings',parent.document).length )
520
+ {
521
+ jQuery('#blubrry_stats_settings',parent.document).html('');
522
+ }
523
+ });
524
+
525
+ // --></script>
526
  <?php
527
  powerpress_admin_jquery_footer();
528
  exit;
565
  if( $Programs == false )
566
  $Programs = array();
567
 
 
 
 
 
568
  powerpress_admin_jquery_header( __('Blubrry Services Integration', 'powerpress') );
569
  powerpress_page_message_print();
570
  ?>
582
  <label for="password_password"><?php echo __('Blubrry Password', 'powerpress'); ?></label>
583
  <input type="password" id="password_password" name="Password" value="" />
584
  </p>
 
 
 
 
 
 
 
585
  <?php } else { ?>
586
  <input type="hidden" name="Settings[blubrry_username]" value="<?php echo htmlspecialchars($Settings['blubrry_username']); ?>" />
587
  <input type="hidden" name="Password" value="<?php echo htmlspecialchars($Password); ?>" />
588
  <input type="hidden" name="Settings[blubrry_hosting]" value="<?php echo $Settings['blubrry_hosting']; ?>" />
589
  <p>
590
+ <label for="blubrry_program_keyword"><?php echo __('Select Blubrry Program', 'powerpress'); ?></label>
591
+ <select id="blubrry_program_keyword" name="Settings[blubrry_program_keyword]">
592
  <option value=""><?php echo __('Select Program', 'powerpress'); ?></option>
593
  <?php
594
  while( list($value,$desc) = each($Programs) )
598
  </p>
599
  <?php } ?>
600
  <p>
 
601
  <input type="submit" name="Save" value="<?php echo __('Save', 'powerpress'); ?>" />
602
  <input type="button" name="Cancel" value="<?php echo __('Cancel', 'powerpress'); ?>" onclick="self.parent.tb_remove();" />
603
+ <input type="submit" name="Remove" value="Remove" style="float: right;" onclick="return confirm('<?php echo __('Remove Blubrry Services Integration, are you sure?', 'powerpress'); ?>');" />
604
  </p>
605
  </div>
606
  </form>
634
  if( empty($Settings['blubrry_auth']) )
635
  $Settings['blubrry_auth'] = '';
636
 
 
637
  if( $Settings['blubrry_hosting'] == 0 )
638
  {
639
  $Error = __('This feature is available to Blubrry Hosting users only.','powerpress');
powerpressadmin-metabox.php CHANGED
@@ -262,9 +262,9 @@ function powerpress_meta_box($object, $box)
262
  <div style="margin-bottom: 4px;">
263
  <input id="powerpress_set_duration_1_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][set_duration]" value="1" type="radio" <?php echo ($GeneralSettings['set_duration']==1?'checked':''); ?> />
264
  <?php echo __('Specify', 'powerpress').': '; ?>
265
- <input id="powerpress_duration_hh_<?php echo $FeedSlug; ?>" class="powerpress-duration-hh" name="Powerpress[<?php echo $FeedSlug; ?>][duration_hh]" maxlength="2" value="<?php echo $DurationHH; ?>" style="width: 24px; font-size: 90%; text-align: right;" onchange="javascript:jQuery('#powerpress_set_duration_1_<?php echo $FeedSlug; ?>').attr('checked', true);" /><strong>:</strong>
266
- <input id="powerpress_duration_mm_<?php echo $FeedSlug; ?>" class="powerpress-duration-mm" name="Powerpress[<?php echo $FeedSlug; ?>][duration_mm]" maxlength="2" value="<?php echo $DurationMM; ?>" style="width: 24px; font-size: 90%; text-align: right;" onchange="javascript:jQuery('#powerpress_set_duration_1_<?php echo $FeedSlug; ?>').attr('checked', true);" /><strong>:</strong>
267
- <input id="powerpress_duration_ss_<?php echo $FeedSlug; ?>" class="powerpress-duration-ss" name="Powerpress[<?php echo $FeedSlug; ?>][duration_ss]" maxlength="10" value="<?php echo $DurationSS; ?>" style="width: 24px; font-size: 90%; text-align: right;" onchange="javascript:jQuery('#powerpress_set_duration_1_<?php echo $FeedSlug; ?>').attr('checked', true);" />
268
  </div>
269
  <div>
270
  <input id="powerpress_set_duration_2_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][set_duration]" value="-1" type="radio" <?php echo ($GeneralSettings['set_duration']==-1?'checked':''); ?> />
@@ -288,10 +288,9 @@ function powerpress_meta_box($object, $box)
288
  $form_action_url = admin_url("media-upload.php?type=powerpress_image&tab=type&post_id={$object->ID}&powerpress_feed={$FeedSlug}&TB_iframe=true&width=450&height=200");
289
  ?>
290
  <div class="powerpress_row">
291
- <label for "Powerpress[<?php echo $FeedSlug; ?>][image]"><?php echo __('Poster Image', 'powerpress'); ?></label>
292
  <div class="powerpress_row_content">
293
  <input id="powerpress_image_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][image]" value="<?php echo htmlspecialchars($CoverImage); ?>" style="width: 70%; font-size: 90%;" size="250" />
294
- <a href="<?php echo $form_action_url; ?>" class="thickbox powerpress-image-browser" id="powerpress_image_browser_<?php echo $FeedSlug; ?>" title="<?php echo __('Select Poster Image', 'powerpress'); ?>"><img src="images/media-button-image.gif" /></a>
295
  </div>
296
  <div class="powerpress_row_content">
297
  <em><?php echo __('Poster image for video (m4v, mp4, ogv, webm, etc..). e.g. http://example.com/path/to/image.jpg', 'powerpress'); ?></em>
@@ -307,9 +306,9 @@ function powerpress_meta_box($object, $box)
307
  <div class="powerpress_row">
308
  <label><?php echo __('Player Size', 'powerpress'); ?></label>
309
  <div class="powerpress_row_content">
310
- <input id="powerpress_player_width_<?php echo $FeedSlug; ?>" class="powerpress-player-width" name="Powerpress[<?php echo $FeedSlug; ?>][width]" value="<?php echo htmlspecialchars($Width); ?>" style="width: 50px; font-size: 90%;" size="5" />
311
  x
312
- <input id="powerpress_player_height_<?php echo $FeedSlug; ?>" class="powerpress-player-height" name="Powerpress[<?php echo $FeedSlug; ?>][height]" value="<?php echo htmlspecialchars($Height); ?>" style="width: 50px; font-size: 90%;" size="5" />
313
  </div>
314
  </div>
315
  <?php
@@ -320,7 +319,7 @@ function powerpress_meta_box($object, $box)
320
  {
321
  ?>
322
  <div class="powerpress_row">
323
- <label for "Powerpress[<?php echo $FeedSlug; ?>][embed]"><?php echo __('Media Embed', 'powerpress'); ?></label>
324
  <div class="powerpress_row_content">
325
  <textarea class="powerpress-embed" id="powerpress_embed_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][embed]" style="width: 90%; height: 80px; font-size: 90%;" onfocus="this.select();"><?php echo htmlspecialchars($Embed); ?></textarea>
326
  </div>
@@ -332,7 +331,7 @@ function powerpress_meta_box($object, $box)
332
  {
333
  ?>
334
  <div class="powerpress_row">
335
- <label for "Powerpress[<?php echo $FeedSlug; ?>][keywords]"><?php echo __('iTunes Keywords', 'powerpress'); ?></label>
336
  <div class="powerpress_row_content">
337
  <input id="powerpress_keywords_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][keywords]" value="<?php echo htmlspecialchars($iTunesKeywords); ?>" style="width: 90%; font-size: 90%;" size="250" />
338
  </div>
@@ -347,7 +346,7 @@ function powerpress_meta_box($object, $box)
347
  {
348
  ?>
349
  <div class="powerpress_row">
350
- <label for "Powerpress[<?php echo $FeedSlug; ?>][subtitle]"><?php echo __('iTunes Subtitle', 'powerpress'); ?></label>
351
  <div class="powerpress_row_content">
352
  <input id="powerpress_subtitle_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][subtitle]" value="<?php echo htmlspecialchars($iTunesSubtitle); ?>" style="width: 90%; font-size: 90%;" size="250" />
353
  </div>
@@ -362,7 +361,7 @@ function powerpress_meta_box($object, $box)
362
  {
363
  ?>
364
  <div class="powerpress_row">
365
- <label for "Powerpress[<?php echo $FeedSlug; ?>][summary]"><?php echo __('iTunes Summary', 'powerpress'); ?></label>
366
  <div class="powerpress_row_content">
367
  <textarea id="powerpress_summary_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][summary]" style="width: 90%; height: 80px; font-size: 90%;"><?php echo htmlspecialchars($iTunesSummary); ?></textarea>
368
  </div>
@@ -377,7 +376,7 @@ function powerpress_meta_box($object, $box)
377
  {
378
  ?>
379
  <div class="powerpress_row">
380
- <label for "Powerpress[<?php echo $FeedSlug; ?>][author]"><?php echo __('iTunes Author', 'powerpress'); ?></label>
381
  <div class="powerpress_row_content">
382
  <input id="powerpress_author_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][author]" value="<?php echo htmlspecialchars($iTunesAuthor); ?>" style="width: 60%; font-size: 90%;" size="250" />
383
  </div>
@@ -392,7 +391,7 @@ function powerpress_meta_box($object, $box)
392
  {
393
  ?>
394
  <div class="powerpress_row">
395
- <label for "Powerpress[<?php echo $FeedSlug; ?>][explicit]"><?php echo __('iTunes Explicit', 'powerpress'); ?></label>
396
  <div class="powerpress_row_content">
397
  <select id="powerpress_explicit_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][explicit]" style="width: 220px;">
398
  <?php
@@ -412,7 +411,7 @@ while( list($value,$desc) = each($explicit_array) )
412
  {
413
  ?>
414
  <div class="powerpress_row">
415
- <label for "Powerpress[<?php echo $FeedSlug; ?>][cc]"><?php echo __('iTunes CC', 'powerpress'); ?></label>
416
  <div class="powerpress_row_content">
417
  <select id="powerpress_cc_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][cc]" style="width: 220px;">
418
  <?php
@@ -432,7 +431,7 @@ unset($cc_array);
432
  {
433
  ?>
434
  <div class="powerpress_row">
435
- <label for "Powerpress[<?php echo $FeedSlug; ?>][order]"><?php echo __('iTunes Order', 'powerpress'); ?></label>
436
  <div class="powerpress_row_content">
437
  <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" />
438
  </div>
@@ -448,7 +447,7 @@ unset($cc_array);
448
  $FeaturedChecked = true; }
449
  ?>
450
  <div class="powerpress_row">
451
- <label for "PowerpressFeature[<?php echo $FeedSlug; ?>]"><?php echo __('Feature Episode', 'powerpress'); ?></label>
452
  <div class="powerpress_row_content">
453
  <input type="checkbox" id="powerpress_feature_<?php echo $FeedSlug; ?>" name="PowerpressFeature[<?php echo $FeedSlug; ?>]" value="1" <?php echo ($FeaturedChecked?'checked':''); ?> />
454
  <?php echo __('Episode will appear at the top of your episode list in the iTunes directory.', 'powerpress'); ?>
@@ -461,7 +460,7 @@ unset($cc_array);
461
  {
462
  ?>
463
  <div class="powerpress_row">
464
- <label for "Powerpress[<?php echo $FeedSlug; ?>][block]"><?php echo __('iTunes Block', 'powerpress'); ?></label>
465
  <div class="powerpress_row_content">
466
  <select id="powerpress_block_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][block]" style="width: 220px;">
467
  <?php
@@ -477,6 +476,21 @@ unset($block_array);
477
  <?php
478
  }
479
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  // Added filter for other plugins to add fields on a per podcast feed slug basis
481
  echo apply_filters('powerpress_metabox', '', $object, $FeedSlug);
482
  ?>
262
  <div style="margin-bottom: 4px;">
263
  <input id="powerpress_set_duration_1_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][set_duration]" value="1" type="radio" <?php echo ($GeneralSettings['set_duration']==1?'checked':''); ?> />
264
  <?php echo __('Specify', 'powerpress').': '; ?>
265
+ <input id="powerpress_duration_hh_<?php echo $FeedSlug; ?>" class="powerpress-duration-hh" placeholder="HH" name="Powerpress[<?php echo $FeedSlug; ?>][duration_hh]" maxlength="2" value="<?php echo $DurationHH; ?>" style="width: 24px; font-size: 90%; text-align: right;" onchange="javascript:jQuery('#powerpress_set_duration_1_<?php echo $FeedSlug; ?>').attr('checked', true);" /><strong>:</strong>
266
+ <input id="powerpress_duration_mm_<?php echo $FeedSlug; ?>" class="powerpress-duration-mm" placeholder="MM" name="Powerpress[<?php echo $FeedSlug; ?>][duration_mm]" maxlength="2" value="<?php echo $DurationMM; ?>" style="width: 24px; font-size: 90%; text-align: right;" onchange="javascript:jQuery('#powerpress_set_duration_1_<?php echo $FeedSlug; ?>').attr('checked', true);" /><strong>:</strong>
267
+ <input id="powerpress_duration_ss_<?php echo $FeedSlug; ?>" class="powerpress-duration-ss" placeholder="SS" name="Powerpress[<?php echo $FeedSlug; ?>][duration_ss]" maxlength="10" value="<?php echo $DurationSS; ?>" style="width: 24px; font-size: 90%; text-align: right;" onchange="javascript:jQuery('#powerpress_set_duration_1_<?php echo $FeedSlug; ?>').attr('checked', true);" />
268
  </div>
269
  <div>
270
  <input id="powerpress_set_duration_2_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][set_duration]" value="-1" type="radio" <?php echo ($GeneralSettings['set_duration']==-1?'checked':''); ?> />
288
  $form_action_url = admin_url("media-upload.php?type=powerpress_image&tab=type&post_id={$object->ID}&powerpress_feed={$FeedSlug}&TB_iframe=true&width=450&height=200");
289
  ?>
290
  <div class="powerpress_row">
291
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][image]"><?php echo __('Poster Image', 'powerpress'); ?></label>
292
  <div class="powerpress_row_content">
293
  <input id="powerpress_image_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][image]" value="<?php echo htmlspecialchars($CoverImage); ?>" style="width: 70%; font-size: 90%;" size="250" />
 
294
  </div>
295
  <div class="powerpress_row_content">
296
  <em><?php echo __('Poster image for video (m4v, mp4, ogv, webm, etc..). e.g. http://example.com/path/to/image.jpg', 'powerpress'); ?></em>
306
  <div class="powerpress_row">
307
  <label><?php echo __('Player Size', 'powerpress'); ?></label>
308
  <div class="powerpress_row_content">
309
+ <input id="powerpress_player_width_<?php echo $FeedSlug; ?>" class="powerpress-player-width" placeholder="<?php echo htmlspecialchars(__('Width', 'powerpress')); ?>" name="Powerpress[<?php echo $FeedSlug; ?>][width]" value="<?php echo htmlspecialchars($Width); ?>" style="width: 50px; font-size: 90%;" size="5" />
310
  x
311
+ <input id="powerpress_player_height_<?php echo $FeedSlug; ?>" class="powerpress-player-height" placeholder="<?php echo htmlspecialchars(__('Height', 'powerpress')); ?>" name="Powerpress[<?php echo $FeedSlug; ?>][height]" value="<?php echo htmlspecialchars($Height); ?>" style="width: 50px; font-size: 90%;" size="5" />
312
  </div>
313
  </div>
314
  <?php
319
  {
320
  ?>
321
  <div class="powerpress_row">
322
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][embed]"><?php echo __('Media Embed', 'powerpress'); ?></label>
323
  <div class="powerpress_row_content">
324
  <textarea class="powerpress-embed" id="powerpress_embed_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][embed]" style="width: 90%; height: 80px; font-size: 90%;" onfocus="this.select();"><?php echo htmlspecialchars($Embed); ?></textarea>
325
  </div>
331
  {
332
  ?>
333
  <div class="powerpress_row">
334
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][keywords]"><?php echo __('iTunes Keywords', 'powerpress'); ?></label>
335
  <div class="powerpress_row_content">
336
  <input id="powerpress_keywords_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][keywords]" value="<?php echo htmlspecialchars($iTunesKeywords); ?>" style="width: 90%; font-size: 90%;" size="250" />
337
  </div>
346
  {
347
  ?>
348
  <div class="powerpress_row">
349
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][subtitle]"><?php echo __('iTunes Subtitle', 'powerpress'); ?></label>
350
  <div class="powerpress_row_content">
351
  <input id="powerpress_subtitle_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][subtitle]" value="<?php echo htmlspecialchars($iTunesSubtitle); ?>" style="width: 90%; font-size: 90%;" size="250" />
352
  </div>
361
  {
362
  ?>
363
  <div class="powerpress_row">
364
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][summary]"><?php echo __('iTunes Summary', 'powerpress'); ?></label>
365
  <div class="powerpress_row_content">
366
  <textarea id="powerpress_summary_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][summary]" style="width: 90%; height: 80px; font-size: 90%;"><?php echo htmlspecialchars($iTunesSummary); ?></textarea>
367
  </div>
376
  {
377
  ?>
378
  <div class="powerpress_row">
379
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][author]"><?php echo __('iTunes Author', 'powerpress'); ?></label>
380
  <div class="powerpress_row_content">
381
  <input id="powerpress_author_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][author]" value="<?php echo htmlspecialchars($iTunesAuthor); ?>" style="width: 60%; font-size: 90%;" size="250" />
382
  </div>
391
  {
392
  ?>
393
  <div class="powerpress_row">
394
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][explicit]"><?php echo __('iTunes Explicit', 'powerpress'); ?></label>
395
  <div class="powerpress_row_content">
396
  <select id="powerpress_explicit_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][explicit]" style="width: 220px;">
397
  <?php
411
  {
412
  ?>
413
  <div class="powerpress_row">
414
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][cc]"><?php echo __('iTunes CC', 'powerpress'); ?></label>
415
  <div class="powerpress_row_content">
416
  <select id="powerpress_cc_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][cc]" style="width: 220px;">
417
  <?php
431
  {
432
  ?>
433
  <div class="powerpress_row">
434
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][order]"><?php echo __('iTunes Order', 'powerpress'); ?></label>
435
  <div class="powerpress_row_content">
436
  <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" />
437
  </div>
447
  $FeaturedChecked = true; }
448
  ?>
449
  <div class="powerpress_row">
450
+ <label for="PowerpressFeature[<?php echo $FeedSlug; ?>]"><?php echo __('Feature Episode', 'powerpress'); ?></label>
451
  <div class="powerpress_row_content">
452
  <input type="checkbox" id="powerpress_feature_<?php echo $FeedSlug; ?>" name="PowerpressFeature[<?php echo $FeedSlug; ?>]" value="1" <?php echo ($FeaturedChecked?'checked':''); ?> />
453
  <?php echo __('Episode will appear at the top of your episode list in the iTunes directory.', 'powerpress'); ?>
460
  {
461
  ?>
462
  <div class="powerpress_row">
463
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][block]"><?php echo __('iTunes Block', 'powerpress'); ?></label>
464
  <div class="powerpress_row_content">
465
  <select id="powerpress_block_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][block]" style="width: 220px;">
466
  <?php
476
  <?php
477
  }
478
 
479
+ if( !empty($GeneralSettings['episode_box_itunes_image']) || !empty($ExtraData['itunes_image']) )
480
+ {
481
+ if( empty($ExtraData['itunes_image']) )
482
+ $ExtraData['itunes_image'] = '';
483
+
484
+ ?>
485
+ <div class="powerpress_row">
486
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][itunes_image]"><?php echo __('iTunes Image', 'powerpress'); ?></label>
487
+ <div class="powerpress_row_content">
488
+ <input id="powerpress_itunes_image_<?php echo $FeedSlug; ?>" placeholder="<?php echo htmlspecialchars(__('e.g. http://example.com/path/to/image.jpg', 'powerpress')); ?>" name="Powerpress[<?php echo $FeedSlug; ?>][itunes_image]" value="<?php echo htmlspecialchars($ExtraData['itunes_image']); ?>" style="width: 70%; font-size: 90%;" size="250" />
489
+ </div>
490
+ </div>
491
+ <?php
492
+ }
493
+
494
  // Added filter for other plugins to add fields on a per podcast feed slug basis
495
  echo apply_filters('powerpress_metabox', '', $object, $FeedSlug);
496
  ?>
powerpressadmin-metamarks.php CHANGED
@@ -107,14 +107,7 @@
107
  <script language="javascript"><!--
108
 
109
  jQuery(document).ready(function($) {
110
- if (jQuery(".pp-metamark-position").length > 0) {
111
- jQuery(".pp-metamark-position").watermark('<?php echo __('Position', 'powerpress'); ?>', {className: 'powerpress-watermark'}); }
112
- if (jQuery(".pp-metamark-duration").length > 0) {
113
- jQuery(".pp-metamark-duration").watermark('<?php echo __('Duration', 'powerpress'); ?>', {className: 'powerpress-watermark'}); }
114
- if (jQuery(".pp-metamark-link").length > 0) {
115
- jQuery(".pp-metamark-link").watermark('<?php echo __('Link', 'powerpress'); ?>', {className: 'powerpress-watermark'}); }
116
- if (jQuery(".pp-metamark-value").length > 0) {
117
- jQuery(".pp-metamark-value").watermark('<?php echo __('Value', 'powerpress'); ?>', {className: 'powerpress-watermark'}); }
118
  });
119
 
120
  function powerpress_metamarks_addrow(FeedSlug)
@@ -140,10 +133,6 @@ function powerpress_metamarks_addrow(FeedSlug)
140
  echo "\t\t\t\talert(response);\n";
141
  ?>
142
  jQuery('#powerpress_metamarks_block_'+ FeedSlug ).append( response );
143
- jQuery(".pp-metamark-position").watermark('<?php echo __('Position', 'powerpress'); ?>', {className: 'powerpress-watermark'});
144
- jQuery(".pp-metamark-duration").watermark('<?php echo __('Duration', 'powerpress'); ?>', {className: 'powerpress-watermark'});
145
- jQuery(".pp-metamark-link").watermark('<?php echo __('Link', 'powerpress'); ?>', {className: 'powerpress-watermark'});
146
- jQuery(".pp-metamark-value").watermark('<?php echo __('Value', 'powerpress'); ?>', {className: 'powerpress-watermark'});
147
  },
148
  error: function(objAJAXRequest, strError) {
149
 
@@ -260,10 +249,10 @@ function powerpress_metamarks_deleterow(div)
260
  $html .= '<select class="pp-metamark-type" type="text" name="MetaMarks['.$feed_slug.']['.$next_row.'][type]" style="width: 18%;">';
261
  $html .= powerpress_print_options( array(''=>'Select Type')+ $MarkTypes, $data['type'], true);
262
  $html .= '</select>';
263
- $html .= '<input class="pp-metamark-position" type="text" name="MetaMarks['.$feed_slug.']['.$next_row.'][position]" value="' .htmlspecialchars($data['position']) .'" style="width: 10%;" />';
264
- $html .= '<input class="pp-metamark-duration" type="text" name="MetaMarks['.$feed_slug.']['.$next_row.'][duration]" value="' .htmlspecialchars($data['duration']) .'" style="width: 10%;" />';
265
- $html .= '<input class="pp-metamark-link" type="text" name="MetaMarks['.$feed_slug.']['.$next_row.'][link]" value="' .htmlspecialchars($data['link']) .'" style="width: 25%;" />';
266
- $html .= '<textarea class="pp-metamark-value" name="MetaMarks['.$feed_slug.']['.$next_row.'][value]" style="width: 35%;">' .htmlspecialchars($data['value']) .'</textarea>';
267
 
268
  $html .= '<div class="pp-metamark-delete"><a href="#" onclick="return powerpress_metamarks_deleterow(\'powerpress_metamarks_row_'. $feed_slug .'_'. $next_row .'\');" title="'. __('Delete', 'powerpress') .'">';
269
  $html .= '</a></div>';
107
  <script language="javascript"><!--
108
 
109
  jQuery(document).ready(function($) {
110
+
 
 
 
 
 
 
 
111
  });
112
 
113
  function powerpress_metamarks_addrow(FeedSlug)
133
  echo "\t\t\t\talert(response);\n";
134
  ?>
135
  jQuery('#powerpress_metamarks_block_'+ FeedSlug ).append( response );
 
 
 
 
136
  },
137
  error: function(objAJAXRequest, strError) {
138
 
249
  $html .= '<select class="pp-metamark-type" type="text" name="MetaMarks['.$feed_slug.']['.$next_row.'][type]" style="width: 18%;">';
250
  $html .= powerpress_print_options( array(''=>'Select Type')+ $MarkTypes, $data['type'], true);
251
  $html .= '</select>';
252
+ $html .= '<input class="pp-metamark-position" type="text" name="MetaMarks['.$feed_slug.']['.$next_row.'][position]" value="' .htmlspecialchars($data['position']) .'" placeholder="'. htmlspecialchars(__('Position', 'powerpress')) .'" style="width: 10%;" />';
253
+ $html .= '<input class="pp-metamark-duration" type="text" name="MetaMarks['.$feed_slug.']['.$next_row.'][duration]" value="' .htmlspecialchars($data['duration']) .'" placeholder="'. htmlspecialchars(__('Duration', 'powerpress')) .'" style="width: 10%;" />';
254
+ $html .= '<input class="pp-metamark-link" type="text" name="MetaMarks['.$feed_slug.']['.$next_row.'][link]" value="' .htmlspecialchars($data['link']) .'" placeholder="'. htmlspecialchars(__('Link', 'powerpress')) .'" style="width: 25%;" />';
255
+ $html .= '<textarea class="pp-metamark-value" name="MetaMarks['.$feed_slug.']['.$next_row.'][value]" style="width: 35%;" placeholder="'. htmlspecialchars(__('Value', 'powerpress')) .'">' .htmlspecialchars($data['value']) .'</textarea>';
256
 
257
  $html .= '<div class="pp-metamark-delete"><a href="#" onclick="return powerpress_metamarks_deleterow(\'powerpress_metamarks_row_'. $feed_slug .'_'. $next_row .'\');" title="'. __('Delete', 'powerpress') .'">';
258
  $html .= '</a></div>';
powerpressadmin-mode.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- // powerpressadmin-mode.php
3
-
4
- function powerpress_admin_mode()
5
- {
6
- ?>
7
-
8
-
9
- <input type="hidden" name="action" value="powerpress-save-mode" />
10
- <h2><?php echo __('Welcome to Blubrry PowerPress', 'powerpress'); ?></h2>
11
-
12
- <p style="margin-bottom: 0;">
13
- <?php echo __('Welcome to Blubrry PowerPress. In order to give each user the best experience, we designed two modes; Simple and Advanced. Please select the mode that is most appropriate for your needs.', 'powerpress'); ?>
14
- </p>
15
-
16
- <table class="form-table">
17
- <tr valign="top">
18
- <th scope="row"><?php echo __('Select Mode', 'powerpress'); ?></th>
19
- <td>
20
-
21
- <p><input name="General[advanced_mode]" type="radio" value="0" /> <strong><?php echo __('Simple Mode', 'powerpress'); ?></strong></p>
22
- <p><?php echo __('Simple Mode is intended for podcasters who are just starting out and feel a bit intimidated by all of the possible options and settings. This mode is perfect for someone who is recording in one format (e.g. mp3) and wants to keep things simple.', 'powerpress'); ?></p>
23
- <ul><li><?php echo __('Features Include', 'powerpress').':'; ?><ul>
24
- <li><?php echo __('Only the bare essential settings', 'powerpress'); ?></li>
25
- <li><?php echo __('Important feed and iTunes settings', 'powerpress'); ?></li>
26
- <li><?php echo __('Player and download links added to bottom of episode posts', 'powerpress'); ?></li>
27
- </ul></li></ul>
28
-
29
- <p><input name="General[advanced_mode]" type="radio" value="1" /> <strong><?php echo __('Advanced Mode', 'powerpress'); ?></strong></p>
30
- <p><?php echo __('Advanced Mode gives you all of the features packaged in Blubrry PowerPress. This mode is perfect for someone who may want to distribute multiple versions of their podcast, customize the web player and download links, or import data from a previous podcasting platform.', 'powerpress'); ?></p>
31
- <ul><li><?php echo __('Features Include', 'powerpress').':'; ?><ul>
32
- <li><em><?php echo __('Advanced Settings', 'powerpress'); ?></em> - <?php echo __('Tweak additional settings.', 'powerpress'); ?></li>
33
- <li><em><?php echo __('Presentation Settings', 'powerpress'); ?></em> - <?php echo __('Customize web player and media download links', 'powerpress'); ?></li>
34
- <li><em><?php echo __('Extensive Feed Settings', 'powerpress'); ?></em> - <?php echo __('Tweak all available feed settings', 'powerpress'); ?></li>
35
- </ul></li></ul>
36
-
37
- </td>
38
- </tr>
39
-
40
- </table>
41
- <p class="submit">
42
- <input type="submit" name="Submit" id="powerpress_save_button" class="button-primary" value="<?php echo __('Set Mode and Continue', 'powerpress'); ?>" />
43
- </p>
44
-
45
- <!-- start footer -->
46
- <?php
47
- }
48
-
49
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
powerpressadmin-player-page.php CHANGED
@@ -3,15 +3,24 @@
3
 
4
  require_once( POWERPRESS_ABSPATH. '/powerpress-player.php'); // Include, if not included already
5
 
6
- function powerpressplayer_flowplayer_info()
7
  {
8
  ?>
9
  <p>
10
- <?php echo __('Flow Player Classic is an open source flash player that supports both audio (mp3 and m4a) and video (mp4, m4v and flv) media files. It includes all the necessary features for playback including a play/pause button, scrollable position bar, ellapsed time, total time, mute button and volume control.', 'powerpress'); ?>
11
  </p>
12
 
13
  <p>
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
  }
@@ -49,11 +58,16 @@ function powerpress_admin_players($type='audio')
49
  {
50
  $General = powerpress_get_settings('powerpress_general');
51
 
52
- if( empty($General['player']) )
53
  $General['player'] = 'default';
54
-
55
- if( empty($General['video_player']) )
 
 
56
  $General['video_player'] = '';
 
 
 
57
  if( empty($General['audio_custom_play_button']) )
58
  $General['audio_custom_play_button'] = '';
59
 
@@ -80,6 +94,7 @@ function powerpress_admin_players($type='audio')
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/html5.mp3';
 
83
 
84
 
85
  $Video = array();
@@ -87,6 +102,8 @@ function powerpress_admin_players($type='audio')
87
  $Video['flow-player-classic'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/flow.mp4';
88
  $Video['html5video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/html5.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">
@@ -226,6 +243,25 @@ table.html5formats tr > td:first-child {
226
  <th scope="row">&nbsp;</th>
227
  <td>
228
  <ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  <li><label><input type="radio" name="VideoPlayer[video_player]" id="player_flow_player_classic_player" value="flow-player-classic" <?php if( $General['video_player'] == 'flow-player-classic' ) echo 'checked'; ?> />
230
  <?php echo __('Flow Player Classic', 'powerpress'); ?></label>
231
  <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_flow_player_classic_player" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
@@ -271,7 +307,7 @@ table.html5formats tr > td:first-child {
271
  </tr>
272
  <tr>
273
  <td><i><?php echo __('Firefox', 'powerpress'); ?></i></td>
274
- <td>-</td>
275
  <td><strong>4.0+</strong></td>
276
  <td><strong>3.5+</strong></td>
277
  </tr>
@@ -338,8 +374,29 @@ table.html5formats tr > td:first-child {
338
  <th scope="row">&nbsp;</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;">
@@ -359,47 +416,7 @@ table.html5formats tr > td:first-child {
359
  <?php echo powerpressplayer_build_1pxoutplayer( $Audio['audio-player'] ); ?>
360
  </p>
361
  <p>
362
- <?php echo __('1 Pixel Out Audio Player is a popular customizable audio (mp3 only) flash player. Features include an animated play/pause button, scrollable position bar, ellapsed/remaining time, volume control and color styling options.', 'powerpress'); ?>
363
- </p>
364
- </li>
365
-
366
- <li><label><input type="radio" name="Player[player]" id="player_flashmp3_maxi" value="flashmp3-maxi" <?php if( $General['player'] == 'flashmp3-maxi' ) echo 'checked'; ?> /> <?php echo __('Mp3 Player Maxi', 'powerpress'); ?></label>
367
- <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_flashmp3_maxi" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
368
- </li>
369
- <li style="margin-left: 30px; margin-bottom:16px;">
370
- <p>
371
- <?php echo powerpressplayer_build_flashmp3maxi( $Audio['flashmp3-maxi'] ); ?>
372
- </p>
373
- <p>
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>
395
- <li style="margin-left: 30px; margin-bottom:16px;">
396
- <p>
397
- <?php
398
- echo powerpressplayer_build_audioplay($Audio['audioplay']);
399
- ?>
400
- </p>
401
- <p>
402
- <?php echo __('AudioPlay is one button freeware audio (mp3 only) flash player. Features include a play/stop or play/pause button available in two sizes in either black or white.', 'powerpress'); ?>
403
  </p>
404
  </li>
405
 
@@ -463,6 +480,52 @@ table.html5formats tr > td:first-child {
463
  </p>
464
  </li>
465
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
466
  </ul>
467
 
468
  </td>
@@ -816,7 +879,7 @@ function audio_player_defaults()
816
  $options = array( 'yes'=>__('Yes', 'powerpress'), 'no'=>__('No', 'powerpress') );
817
  powerpress_print_options( $options, $PlayerSettings['remaining']);
818
  ?>
819
- </select> <?php echo __('if yes, shows remaining track time rather than ellapsed time (default: no)', 'powerpress'); ?></div>
820
  </td>
821
  </tr>
822
 
@@ -1670,6 +1733,38 @@ function audio_player_defaults()
1670
  </tr>
1671
  </table>
1672
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1673
  <?php
1674
  }; break;
1675
 
@@ -1788,6 +1883,26 @@ function audio_player_defaults()
1788
  </table>
1789
  <?php
1790
  }; break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1791
  }
1792
 
1793
  if( !isset($General['poster_play_image']) )
@@ -1815,7 +1930,7 @@ function audio_player_defaults()
1815
  <?php echo __('Player Width', 'powerpress'); ?>
1816
  </th>
1817
  <td>
1818
- <input type="text" name="General[player_width]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['player_width']; ?>" maxlength="4" />
1819
  <?php echo __('Width of player (leave blank for 400 default)', 'powerpress'); ?>
1820
  </td>
1821
  </tr>
@@ -1825,7 +1940,7 @@ function audio_player_defaults()
1825
  <?php echo __('Player Height', 'powerpress'); ?>
1826
  </th>
1827
  <td>
1828
- <input type="text" name="General[player_height]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['player_height']; ?>" maxlength="4" />
1829
  <?php echo __('Height of player (leave blank for 225 default)', 'powerpress'); ?>
1830
  </td>
1831
  </tr>
3
 
4
  require_once( POWERPRESS_ABSPATH. '/powerpress-player.php'); // Include, if not included already
5
 
6
+ function powerpressplayer_mediaelement_info()
7
  {
8
  ?>
9
  <p>
10
+ <?php echo __('MediaElement.js is an open source HTML5 audio and video player that supports both audio (mp3, m4a and oga) and video (mp4, m4v, webm, ogv and flv) media files. It includes all the necessary features for playback including a play/pause button, scroll-able position bar, elapsed time, total time, mute button and volume control.', 'powerpress'); ?>
11
  </p>
12
 
13
  <p>
14
+ <?php echo __('MediaElement.js is the default player in Blubrry PowerPress because it is HTML and CSS based, meets accessibility standards including WebVTT, and will play in any browser using either HTML5, Flash or Silverlight for playback.', 'powerpress'); ?>
15
+ </p>
16
+ <?php
17
+ }
18
+
19
+ function powerpressplayer_flowplayer_info()
20
+ {
21
+ ?>
22
+ <p>
23
+ <?php echo __('Flow Player Classic is an open source flash player that supports both audio (mp3 and m4a) and video (mp4, m4v and flv) media files. It includes all the necessary features for playback including a play/pause button, scroll-able position bar, elapsed time, total time, mute button and volume control.', 'powerpress'); ?>
24
  </p>
25
  <?php
26
  }
58
  {
59
  $General = powerpress_get_settings('powerpress_general');
60
 
61
+ if( version_compare($GLOBALS['wp_version'], '3.6-beta', '<') && empty($General['player']) )
62
  $General['player'] = 'default';
63
+ else if( empty($General['player']) )
64
+ $General['player'] = 'mediaelement-audio';
65
+
66
+ if( version_compare($GLOBALS['wp_version'], '3.6-beta', '<') && empty($General['player']) )
67
  $General['video_player'] = '';
68
+ else if( empty($General['video_player']) )
69
+ $General['video_player'] = 'mediaelement-video';
70
+
71
  if( empty($General['audio_custom_play_button']) )
72
  $General['audio_custom_play_button'] = '';
73
 
94
  $Audio['simple_flash'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Simple_Flash_MP3_Player.mp3';
95
  $Audio['audioplay'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3';
96
  $Audio['html5audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/html5.mp3';
97
+ $Audio['mediaelement-audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/MediaElement_audio.mp3';
98
 
99
 
100
  $Video = array();
102
  $Video['flow-player-classic'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/flow.mp4';
103
  $Video['html5video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/html5.mp4';
104
  $Video['videojs-html5-video-player-for-wordpress'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/videojs.mp4';
105
+ $Video['mediaelement-video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/MediaElement_video.mp4';
106
+ //$Video['mediaelement-video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/videojs.mp4';
107
  /*
108
  <div><
109
  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">
243
  <th scope="row">&nbsp;</th>
244
  <td>
245
  <ul>
246
+ <?php
247
+ if( version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
248
+ {
249
+ ?>
250
+ <li><label><input type="radio" name="VideoPlayer[video_player]" id="player_mediaelement_video" value="mediaelement-video" <?php if( $General['video_player'] == 'mediaelement-video' ) echo 'checked'; ?> />
251
+ <?php echo __('MediaElement.js Media Player (default)', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?>
252
+ <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_mediaelement_video" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
253
+ </li>
254
+ <li style="margin-left: 30px; margin-bottom:16px;">
255
+ <p>
256
+ <?php
257
+ echo powerpressplayer_build_mediaelementvideo( $Video['mediaelement-video'] );
258
+ ?>
259
+ </p>
260
+ <?php powerpressplayer_mediaelement_info(); ?>
261
+ </li>
262
+ <?php
263
+ }
264
+ ?>
265
  <li><label><input type="radio" name="VideoPlayer[video_player]" id="player_flow_player_classic_player" value="flow-player-classic" <?php if( $General['video_player'] == 'flow-player-classic' ) echo 'checked'; ?> />
266
  <?php echo __('Flow Player Classic', 'powerpress'); ?></label>
267
  <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_flow_player_classic_player" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
307
  </tr>
308
  <tr>
309
  <td><i><?php echo __('Firefox', 'powerpress'); ?></i></td>
310
+ <td><strong>22.0+</strong></td>
311
  <td><strong>4.0+</strong></td>
312
  <td><strong>3.5+</strong></td>
313
  </tr>
374
  <th scope="row">&nbsp;</th>
375
  <td>
376
  <ul>
377
+
378
+ <?php
379
+ if( version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
380
+ {
381
+ ?>
382
+ <li><label><input type="radio" name="Player[player]" id="player_mediaelement_audio" value="mediaelement-audio" <?php if( $General['player'] == 'mediaelement-audio' ) echo 'checked'; ?> />
383
+ <?php echo __('MediaElement.js Media Player (default)', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?>
384
+ <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_mediaelement_audio" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
385
+ </li>
386
+ <li style="margin-left: 30px; margin-bottom:16px;">
387
+ <p>
388
+ <?php
389
+ echo powerpressplayer_build_mediaelementaudio( $Audio['mediaelement-audio'] );
390
+ ?>
391
+ </p>
392
+ <?php powerpressplayer_mediaelement_info(); ?>
393
+ </li>
394
+ <?php
395
+ }
396
+ ?>
397
+
398
  <li><label><input type="radio" name="Player[player]" id="player_default" value="default" <?php if( $General['player'] == 'default' ) echo 'checked'; ?> />
399
+ <?php echo __('Flow Player Classic', 'powerpress'); ?></label>
400
  <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>
401
  </li>
402
  <li style="margin-left: 30px; margin-bottom:16px;">
416
  <?php echo powerpressplayer_build_1pxoutplayer( $Audio['audio-player'] ); ?>
417
  </p>
418
  <p>
419
+ <?php echo __('1 Pixel Out Audio Player is a popular customizable audio (mp3 only) flash player. Features include an animated play/pause button, scroll-able position bar, elapsed/remaining time, volume control and color styling options.', 'powerpress'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
420
  </p>
421
  </li>
422
 
480
  </p>
481
  </li>
482
 
483
+ <li>
484
+ <div class="updated fade powerpress-notice inline">
485
+ <?php echo __('NOTICE: Due to limited use, the players below (Mp3 Player Maxi, Simple Flash MP3 Player, and AudioPlay) will be moved to a separate plugin starting with PowerPress version 6.0.', 'powerpress'); ?>
486
+ </div>
487
+ </li>
488
+
489
+ <li><label><input type="radio" name="Player[player]" id="player_flashmp3_maxi" value="flashmp3-maxi" <?php if( $General['player'] == 'flashmp3-maxi' ) echo 'checked'; ?> /> <?php echo __('Mp3 Player Maxi', 'powerpress'); ?></label>
490
+ <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_flashmp3_maxi" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
491
+ </li>
492
+ <li style="margin-left: 30px; margin-bottom:16px;">
493
+ <p>
494
+ <?php echo powerpressplayer_build_flashmp3maxi( $Audio['flashmp3-maxi'] ); ?>
495
+ </p>
496
+ <p>
497
+ <?php echo __('Flash Mp3 Maxi Player is a customizable open source audio (mp3 only) flash player. Features include pause/play/stop/file info buttons, scroll-able position bar, volume control and color styling options.', 'powerpress'); ?>
498
+ </p>
499
+ </li>
500
+
501
+ <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>
502
+ <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>
503
+ </li>
504
+ <li style="margin-left: 30px; margin-bottom:16px;">
505
+ <p>
506
+ <?php
507
+ echo powerpressplayer_build_simpleflash($Audio['simple_flash']);
508
+ ?>
509
+ </p>
510
+ <p>
511
+ <?php echo __('Simple Flash MP3 Player is a free and simple audio (mp3 only) flash player. Features include play/pause and stop buttons.', 'powerpress'); ?>
512
+ </p>
513
+ </li>
514
+
515
+ <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>
516
+ <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>
517
+ </li>
518
+ <li style="margin-left: 30px; margin-bottom:16px;">
519
+ <p>
520
+ <?php
521
+ echo powerpressplayer_build_audioplay($Audio['audioplay']);
522
+ ?>
523
+ </p>
524
+ <p>
525
+ <?php echo __('AudioPlay is one button freeware audio (mp3 only) flash player. Features include a play/stop or play/pause button available in two sizes in either black or white.', 'powerpress'); ?>
526
+ </p>
527
+ </li>
528
+
529
  </ul>
530
 
531
  </td>
879
  $options = array( 'yes'=>__('Yes', 'powerpress'), 'no'=>__('No', 'powerpress') );
880
  powerpress_print_options( $options, $PlayerSettings['remaining']);
881
  ?>
882
+ </select> <?php echo __('if yes, shows remaining track time rather than elapsed time (default: no)', 'powerpress'); ?></div>
883
  </td>
884
  </tr>
885
 
1733
  </tr>
1734
  </table>
1735
 
1736
+ <?php
1737
+ }; break;
1738
+
1739
+ case 'mediaelement-audio': {
1740
+ $SupportUploads = powerpressadmin_support_uploads();
1741
+ // TODO!
1742
+ ?>
1743
+ <p><?php echo __('Configure MediaElement.js Audio Player', 'powerpress'); ?></p>
1744
+ <table class="form-table">
1745
+ <tr valign="top">
1746
+ <th scope="row">
1747
+ <?php echo __('Preview of Player', 'powerpress'); ?>
1748
+ </th>
1749
+ <td><p>
1750
+ <?php
1751
+ // TODO
1752
+ echo powerpressplayer_build_mediaelementaudio($Audio['mediaelement-audio']);
1753
+ ?>
1754
+ </p>
1755
+ </td>
1756
+ </tr>
1757
+
1758
+ <tr valign="top">
1759
+ <th scope="row">
1760
+ &nbsp;
1761
+ </th>
1762
+ <td>
1763
+ <p><?php echo __('MediaElement.js Player has no additional settings at this time.', 'powerpress'); ?></p>
1764
+ </td>
1765
+ </tr>
1766
+ </table>
1767
+
1768
  <?php
1769
  }; break;
1770
 
1883
  </table>
1884
  <?php
1885
  }; break;
1886
+ case 'mediaelement-video': {
1887
+ ?>
1888
+ <p><?php echo __('Configure MediaElement.js Video Player', 'powerpress'); ?></p>
1889
+ <table class="form-table">
1890
+ <tr valign="top">
1891
+ <th scope="row">
1892
+ <?php echo __('Preview of Player', 'powerpress'); ?>
1893
+ </th>
1894
+ <td>
1895
+ <p>
1896
+ <?php
1897
+ echo powerpressplayer_build_mediaelementvideo( $Video['mediaelement-video'] );
1898
+ ?>
1899
+ </p>
1900
+ </td>
1901
+ </tr>
1902
+ </table>
1903
+
1904
+ <?php
1905
+ }; break;
1906
  }
1907
 
1908
  if( !isset($General['poster_play_image']) )
1930
  <?php echo __('Player Width', 'powerpress'); ?>
1931
  </th>
1932
  <td>
1933
+ <input type="text" name="General[player_width]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9%]/g, '');" value="<?php echo $General['player_width']; ?>" maxlength="4" />
1934
  <?php echo __('Width of player (leave blank for 400 default)', 'powerpress'); ?>
1935
  </td>
1936
  </tr>
1940
  <?php echo __('Player Height', 'powerpress'); ?>
1941
  </th>
1942
  <td>
1943
+ <input type="text" name="General[player_height]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9%]/g, '');" value="<?php echo $General['player_height']; ?>" maxlength="4" />
1944
  <?php echo __('Height of player (leave blank for 225 default)', 'powerpress'); ?>
1945
  </td>
1946
  </tr>
powerpressadmin-player.php CHANGED
@@ -2,18 +2,25 @@
2
  // PowerPress Player administration
3
 
4
 
5
- // Handle post processing here for the players page.
6
  function powerpress_admin_players_init()
7
  {
8
  //wp_enqueue_script('jquery');
9
  //echo "powerpres player init";
10
 
 
 
 
 
 
 
 
11
  $Settings = false; // Important, never remove this
12
  $Step = 1;
13
 
14
- $action = (isset($_GET['action'])?$_GET['action']: (isset($_POST['action'])?$_POST['action']:false) );
15
- //$type = (isset($_GET['type'])?$_GET['type']: (isset($_POST['type'])?$_POST['type']:'audio') );
16
-
17
  if( !$action )
18
  return;
19
 
@@ -51,16 +58,23 @@ function powerpress_admin_players_init()
51
  powerpress_save_settings($SaveSettings, 'powerpress_audioplay');
52
  powerpress_page_message_add_notice( __('AudioPlay settings saved successfully.', 'powerpress') );
53
  }; break;
 
 
 
 
 
 
 
54
  }
55
- }
56
-
57
- // add_action('init', 'powerpress_admin_players_init');
58
-
59
- function powerpress_admin_page_videoplayer_error()
60
- {
61
-
62
- }
63
-
64
-
65
-
66
  ?>
2
  // PowerPress Player administration
3
 
4
 
5
+ // Handle post processing here for the players page.
6
  function powerpress_admin_players_init()
7
  {
8
  //wp_enqueue_script('jquery');
9
  //echo "powerpres player init";
10
 
11
+
12
+ wp_enqueue_style('mediaelement');
13
+ wp_enqueue_style('wp-mediaelement');
14
+ wp_enqueue_script('mediaelement');
15
+ // wp_enqueue_script( 'wp-mediaelement' );
16
+ wp_enqueue_script( 'powerpress-mejs', powerpress_get_root_url() .'powerpress-mejs.js');
17
+
18
  $Settings = false; // Important, never remove this
19
  $Step = 1;
20
 
21
+ $action = (isset($_GET['action'])?$_GET['action']: (isset($_POST['action'])?$_POST['action']:false) );
22
+ //$type = (isset($_GET['type'])?$_GET['type']: (isset($_POST['type'])?$_POST['type']:'audio') );
23
+
24
  if( !$action )
25
  return;
26
 
58
  powerpress_save_settings($SaveSettings, 'powerpress_audioplay');
59
  powerpress_page_message_add_notice( __('AudioPlay settings saved successfully.', 'powerpress') );
60
  }; break;
61
+ //TODO: PowerPress 5.0
62
+ //case 'powerpress-mediaelement':
63
+ //{
64
+ // $SaveSettings = $_POST['Player'];
65
+ // powerpress_save_settings($SaveSettings, 'powerpress_mediaelement');
66
+ // powerpress_page_message_add_notice( __('MediaElement.js settings saved successfully.', 'powerpress') );
67
+ //}; break;
68
  }
69
+ }
70
+
71
+ // add_action('init', 'powerpress_admin_players_init');
72
+
73
+ function powerpress_admin_page_videoplayer_error()
74
+ {
75
+
76
+ }
77
+
78
+
79
+
80
  ?>
powerpressadmin-posttypefeeds.php ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if( !function_exists('add_action') )
4
+ die("access denied.");
5
+
6
+ function powerpress_admin_posttypefeeds_columns($data=array())
7
+ {
8
+ $data['name'] = __('Feed Title', 'powerpress');
9
+ $data['post-type'] = __('Post Type', 'powerpress');
10
+ $data['feed-slug'] = __('Slug', 'powerpress');
11
+ $data['url'] = __('Feed URL', 'powerpress');
12
+ return $data;
13
+ }
14
+
15
+ add_filter('manage_powerpressadmin_posttypefeeds_columns', 'powerpress_admin_posttypefeeds_columns');
16
+
17
+ function powerpress_admin_posttypefeeds()
18
+ {
19
+ $General = powerpress_get_settings('powerpress_general');
20
+ $post_types = powerpress_admin_get_post_types(false);
21
+
22
+ ?>
23
+ <h2><?php echo __('Post Type Podcasting', 'powerpress'); ?></h2>
24
+ <p>
25
+ <?php echo __('Post Type Podcasting adds custom podcast settings to specific Post Type feeds.', 'powerpress'); ?>
26
+ </p>
27
+ <style type="text/css">
28
+ .column-url {
29
+ width: 40%;
30
+ }
31
+ .column-name {
32
+ width: 30%;
33
+ }
34
+ .column-feed-slug {
35
+ width: 15%;
36
+ }
37
+ .column-post-type {
38
+ width: 15%;
39
+ }
40
+ .column-episode-count {
41
+ width: 15%;
42
+ }
43
+ .category-list {
44
+ width: 100%;
45
+ }
46
+ .form-field select {
47
+ width: 95%;
48
+ }
49
+ </style>
50
+ <div id="col-container">
51
+
52
+ <div id="col-right">
53
+ <table class="widefat fixed" cellspacing="0">
54
+ <thead>
55
+ <tr>
56
+ <?php
57
+ print_column_headers('powerpressadmin_posttypefeeds');
58
+ ?>
59
+ </tr>
60
+ </thead>
61
+
62
+ <tfoot>
63
+ <tr>
64
+ <?php
65
+ print_column_headers('powerpressadmin_posttypefeeds', false);
66
+ ?>
67
+ </tr>
68
+ </tfoot>
69
+ <tbody>
70
+ <?php
71
+
72
+ $count = 0;
73
+ while( list($null, $post_type) = each($post_types) )
74
+ {
75
+ $PostTypeSettingsArray = get_option('powerpress_posttype_'. $post_type );
76
+ if( !$PostTypeSettingsArray )
77
+ continue;
78
+
79
+ while( list($feed_slug, $PostTypeSettings) = each($PostTypeSettingsArray) )
80
+ {
81
+ $feed_title = ( !empty($PostTypeSettings['title']) ? $PostTypeSettings['title'] : '(blank)');
82
+ // $post_type
83
+ // $feed_slug
84
+
85
+
86
+ //global $wpdb;
87
+
88
+ // var_dump($term_info);
89
+
90
+ //$category = get_category_to_edit($cat_ID);
91
+
92
+
93
+ $columns = powerpress_admin_posttypefeeds_columns();
94
+ $hidden = array();
95
+
96
+ if( $count % 2 == 0 )
97
+ echo '<tr valign="middle" class="alternate">';
98
+ else
99
+ echo '<tr valign="middle">';
100
+
101
+ $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_posttypefeeds.php&amp;action=powerpress-editposttypefeed&amp;feed_slug='. $feed_slug .'&podcast_post_type='.$post_type) ;
102
+
103
+ $url = get_post_type_archive_feed_link($post_type, $feed_slug);
104
+ $short_url = str_replace('http://', '', $url);
105
+ $short_url = str_replace('www.', '', $short_url);
106
+ if (strlen($short_url) > 35)
107
+ $short_url = substr($short_url, 0, 32).'...';
108
+
109
+ foreach($columns as $column_name=>$column_display_name) {
110
+ $class = "class=\"column-$column_name\"";
111
+
112
+ switch($column_name) {
113
+ case 'feed-slug': {
114
+
115
+ echo "<td $class>{$feed_slug}";
116
+ echo "</td>";
117
+
118
+ }; break;
119
+ case 'name': {
120
+
121
+ echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'.$feed_title.'</a></strong><br />';
122
+ $actions = array();
123
+ $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
124
+ $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_posttypefeeds.php&amp;action=powerpress-delete-posttype-feed&amp;podcast_post_type={$post_type}&amp;feed_slug={$feed_slug}", 'powerpress-delete-posttype-feed-'.$post_type .'_'.$feed_slug) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for Post Type '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), $feed_title )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
125
+ $action_count = count($actions);
126
+ $i = 0;
127
+ echo '<div class="row-actions">';
128
+ foreach ( $actions as $action => $linkaction ) {
129
+ ++$i;
130
+ ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
131
+ echo '<span class="'.$action.'">'.$linkaction.$sep .'</span>';
132
+ }
133
+ echo '</div>';
134
+ echo '</td>';
135
+
136
+ }; break;
137
+
138
+ case 'url': {
139
+
140
+ echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">$short_url</a>";
141
+ echo '<div class="row-actions">';
142
+ echo '<span class="'.$action .'"><a href="http://www.feedvalidator.org/check.cgi?url='. urlencode( str_replace('&amp;', '&', $url) ) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
143
+ echo '</div>';
144
+ echo "</td>";
145
+
146
+ }; break;
147
+
148
+ case 'episode-count': {
149
+
150
+ echo "<td $class>$episode_total";
151
+ echo "</td>";
152
+
153
+ }; break;
154
+ case 'post-type': {
155
+ echo "<td $class>$post_type";
156
+ echo "</td>";
157
+ }; break;
158
+ default: {
159
+
160
+ }; break;
161
+ }
162
+ }
163
+ echo "\n </tr>\n";
164
+ $count++;
165
+ }
166
+ }
167
+ ?>
168
+ </tbody>
169
+ </table>
170
+ </div> <!-- col-right -->
171
+
172
+ <div id="col-left">
173
+ <div class="col-wrap">
174
+ <div class="form-wrap">
175
+ <h3><?php echo __('Add Podcasting to a custom Post Type', 'powerpress'); ?></h3>
176
+ <input type="hidden" name="action" value="powerpress-addposttypefeed" />
177
+
178
+
179
+ <div class="form-field form-required">
180
+ <label for="powerpress_post_type_select"><?php echo __('Post Type', 'powerpress'); ?></label>
181
+ <select id="powerpress_post_type_select" name="podcast_post_type" style="width: 95%;">
182
+ <option value=""><?php echo __('Select Post Type', 'powerpress'); ?></option>
183
+ <?php
184
+
185
+
186
+
187
+ reset($post_types);
188
+ while( list($null,$post_type) = each($post_types) ) {
189
+ if( $post_type == 'post' )
190
+ continue;
191
+
192
+ $post_type = htmlspecialchars($post_type);
193
+
194
+ echo "\t<option value=\"$post_type\">$post_type</option>\n";
195
+ }
196
+ ?>
197
+ </select>
198
+ </div>
199
+
200
+ <div class="form-field form-required">
201
+ <label for="feed_title"><?php echo __('Feed Title', 'powerpress') ?></label>
202
+ <input name="feed_title" id="feed_title" type="text" value="" size="100" />
203
+ </div>
204
+
205
+ <div class="form-field">
206
+ <label for="feed_slug"><?php echo __('Feed Slug', 'powerpress') ?></label>
207
+ <input name="feed_slug" id="feed_slug" type="text" value="" size="40" />
208
+ <p><?php echo __('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'powerpress'); ?></p>
209
+ </div>
210
+ <?php
211
+ wp_nonce_field('powerpress-add-posttype-feed');
212
+ ?>
213
+ <p class="submit"><input type="submit" class="button" name="add_podcasting" value="<?php echo __('Add Podcasting to Post Type', 'powerpress'); ?>" /> </p>
214
+
215
+
216
+ </div>
217
+ </div>
218
+
219
+ </div> <!-- col-left -->
220
+
221
+ </div> <!-- col-container -->
222
+
223
+ <?php
224
+ }
225
+ ?>
powerpressadmin-taxonomyfeeds.php ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if( !function_exists('add_action') )
4
+ die("access denied.");
5
+
6
+ function powerpress_admin_taxonomyfeeds_columns($data=array())
7
+ {
8
+ $data['name'] = __('Term Name', 'powerpress');
9
+ $data['taxonomy'] = __('Taxonomy', 'powerpress');
10
+ $data['feed-slug'] = __('Slug', 'powerpress');
11
+ $data['url'] = __('Feed URL', 'powerpress');
12
+ return $data;
13
+ }
14
+
15
+ add_filter('manage_powerpressadmin_taxonomyfeeds_columns', 'powerpress_admin_taxonomyfeeds_columns');
16
+
17
+ function powerpress_admin_taxonomyfeeds()
18
+ {
19
+ $General = powerpress_get_settings('powerpress_general');
20
+
21
+ ?>
22
+ <h2><?php echo __('Taxonomy Podcasting', 'powerpress'); ?></h2>
23
+ <p>
24
+ <?php echo __('Taxonomy Podcasting adds custom podcast settings to specific taxonomy feeds.', 'powerpress'); ?>
25
+ </p>
26
+ <style type="text/css">
27
+ .column-url {
28
+ width: 40%;
29
+ }
30
+ .column-name {
31
+ width: 30%;
32
+ }
33
+ .column-feed-slug {
34
+ width: 15%;
35
+ }
36
+ .column-episode-count {
37
+ width: 15%;
38
+ }
39
+ .category-list {
40
+ width: 100%;
41
+ }
42
+ .form-field select {
43
+ width: 95%;
44
+ }
45
+ </style>
46
+ <div id="col-container">
47
+
48
+ <div id="col-right">
49
+ <table class="widefat fixed" cellspacing="0">
50
+ <thead>
51
+ <tr>
52
+ <?php
53
+ print_column_headers('powerpressadmin_taxonomyfeeds');
54
+ ?>
55
+ </tr>
56
+ </thead>
57
+
58
+ <tfoot>
59
+ <tr>
60
+ <?php
61
+ print_column_headers('powerpressadmin_taxonomyfeeds', false);
62
+ ?>
63
+ </tr>
64
+ </tfoot>
65
+ <tbody>
66
+ <?php
67
+
68
+ $PowerPressTaxonomies = get_option('powerpress_taxonomy_podcasting');
69
+ if( empty($PowerPressTaxonomies) )
70
+ $PowerPressTaxonomies = array();
71
+
72
+
73
+ $count = 0;
74
+ while( list($tt_id, $null) = each($PowerPressTaxonomies) )
75
+ {
76
+ $taxonomy_type = '';
77
+ $term_ID = '';
78
+
79
+ global $wpdb;
80
+ $term_info = $wpdb->get_results("SELECT term_id, taxonomy FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = $tt_id", ARRAY_A);
81
+ if( !empty( $term_info[0]['term_id']) ) {
82
+ $term_ID = $term_info[0]['term_id'];
83
+ $taxonomy_type = $term_info[0]['taxonomy'];
84
+ }
85
+ else
86
+ {
87
+ continue; // we didn't find this taxonomy relationship
88
+ }
89
+ // var_dump($term_info);
90
+
91
+ //$category = get_category_to_edit($cat_ID);
92
+ $term_object = get_term( $term_ID, $taxonomy_type, OBJECT, 'edit');
93
+
94
+
95
+ $columns = powerpress_admin_taxonomyfeeds_columns();
96
+ $hidden = array();
97
+
98
+ if( $count % 2 == 0 )
99
+ echo '<tr valign="middle" class="alternate">';
100
+ else
101
+ echo '<tr valign="middle">';
102
+
103
+ $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php&amp;action=powerpress-edittaxonomyfeed&amp;term='. $term_ID .'&taxonomy='.$taxonomy_type.'&amp;ttid='.$tt_id) ;
104
+
105
+ $feed_title = $term_object->name;
106
+ $url = get_term_feed_link($term_ID, $taxonomy_type, 'rss2');
107
+ $short_url = str_replace('http://', '', $url);
108
+ $short_url = str_replace('www.', '', $short_url);
109
+ if (strlen($short_url) > 35)
110
+ $short_url = substr($short_url, 0, 32).'...';
111
+
112
+ foreach($columns as $column_name=>$column_display_name) {
113
+ $class = "class=\"column-$column_name\"";
114
+
115
+
116
+
117
+ //$short_url = '';
118
+
119
+ switch($column_name) {
120
+ case 'feed-slug': {
121
+
122
+ echo "<td $class>{$term_object->slug}";
123
+ echo "</td>";
124
+
125
+ }; break;
126
+ case 'name': {
127
+
128
+ echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">'.$feed_title.'</a></strong><br />';
129
+ $actions = array();
130
+ $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
131
+ $actions['remove'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php&amp;action=powerpress-delete-taxonomy-feed&amp;ttid=$tt_id", 'powerpress-delete-taxonomy-feed-' . $tt_id) . "' onclick=\"if ( confirm('" . esc_js(sprintf( __("You are about to remove podcast settings for taxonomy '%s'\n 'Cancel' to stop, 'OK' to delete.", 'powerpress'), $feed_title )) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
132
+ $action_count = count($actions);
133
+ $i = 0;
134
+ echo '<div class="row-actions">';
135
+ foreach ( $actions as $action => $linkaction ) {
136
+ ++$i;
137
+ ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
138
+ echo '<span class="'.$action.'">'.$linkaction.$sep .'</span>';
139
+ }
140
+ echo '</div>';
141
+ echo '</td>';
142
+
143
+ }; break;
144
+
145
+ case 'url': {
146
+
147
+ echo "<td $class><a href='$url' title='". esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title))."' target=\"_blank\">$short_url</a>";
148
+ echo '<div class="row-actions">';
149
+ echo '<span class="'.$action .'"><a href="http://www.feedvalidator.org/check.cgi?url='. urlencode( str_replace('&amp;', '&', $url) ) .'" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
150
+ echo '</div>';
151
+ echo "</td>";
152
+
153
+ }; break;
154
+
155
+ case 'episode-count': {
156
+
157
+ echo "<td $class>$episode_total";
158
+ echo "</td>";
159
+
160
+ }; break;
161
+ case 'taxonomy': {
162
+ echo "<td $class>$taxonomy_type";
163
+ echo "</td>";
164
+ }; break;
165
+ default: {
166
+
167
+ }; break;
168
+ }
169
+ }
170
+ echo "\n </tr>\n";
171
+ $count++;
172
+ }
173
+ ?>
174
+ </tbody>
175
+ </table>
176
+ </div> <!-- col-right -->
177
+
178
+ <div id="col-left">
179
+ <div class="col-wrap">
180
+ <div class="form-wrap">
181
+ <h3><?php echo __('Add Podcasting to Existing Taxonomy Term', 'powerpress'); ?></h3>
182
+ <?php
183
+ $current_taxonomy = (isset($_GET['taxonomy'])?$_GET['taxonomy']: (isset($_POST['taxonomy'])?$_POST['taxonomy']:'') );
184
+ if( empty($current_taxonomy) )
185
+ {
186
+ ?>
187
+ <div class="form-field form-required">
188
+ <label><?php echo __('Step 1 - Select Taxonomy', 'powerpress'); ?></label>
189
+ <select id="powerpress_taxonomy_select" name="taxonomy" style="width: 95%;">
190
+ <option value=""><?php echo __('Select Taxonomy', ''); ?></option>
191
+ <?php
192
+ $taxonomies=get_taxonomies('','names');
193
+
194
+
195
+ while( list($null,$taxonomy) = each($taxonomies) ) {
196
+ if( $taxonomy == 'category' )
197
+ continue;
198
+ $taxonomy = htmlspecialchars($taxonomy);
199
+
200
+ echo "\t<option value=\"$taxonomy\"". ($current_taxonomy==$taxonomy?' selected':''). ">$taxonomy</option>\n";
201
+ }
202
+ ?>
203
+
204
+ <?php
205
+
206
+ ?>
207
+ </select>
208
+ </div>
209
+ <p class="submit"><input type="submit" class="button" name="select_taxonomy" value="<?php echo __('Select Taxonomy Term', 'powerpress'); ?>" /></p>
210
+
211
+ <?php
212
+ }
213
+ if( !empty($current_taxonomy) )
214
+ {
215
+ ?>
216
+ <input type="hidden" name="action" value="powerpress-addtaxonomyfeed" />
217
+ <input type="hidden" name="taxonomy" value="<?php echo htmlspecialchars($current_taxonomy); ?>" />
218
+ <?php
219
+ //wp_original_referer_field(true, 'previous');
220
+ wp_nonce_field('powerpress-add-taxonomy-feed');
221
+ ?>
222
+ <div class="form-field form-required">
223
+ <label for="term"><?php echo __('Step 2 - Select Taxonomy Term', 'powerpress'); ?></label>
224
+ <?php
225
+
226
+ wp_dropdown_categories( array('class'=>'', 'show_option_none'=>__('Select Term', 'powerpress'), 'orderby'=>'name', 'hide_empty'=>0, 'hierarchical'=>1, 'name'=>'term', 'id'=>'term_id', 'taxonomy'=>$current_taxonomy ) );
227
+ ?>
228
+ </div>
229
+
230
+ <p class="submit">
231
+ <input type="submit" class="button" name="add_podcasting" value="<?php echo __('Add Podcast Settings to Term', 'powerpress'); ?>" /> &nbsp;
232
+ <input type="submit" class="button" name="cancel" value="<?php echo __('Cancel', 'powerpress'); ?>" />
233
+ </p>
234
+ <?php
235
+ }
236
+ ?>
237
+
238
+ </div>
239
+ </div>
240
+
241
+ </div> <!-- col-left -->
242
+
243
+ </div> <!-- col-container -->
244
+
245
+ <?php
246
+ }
247
+ ?>
powerpressadmin.php CHANGED
@@ -3,17 +3,17 @@
3
  if( !function_exists('add_action') )
4
  die("access denied.");
5
 
6
- function powerpress_page_message_add_error($msg)
7
  {
8
  global $g_powerpress_page_message;
9
- $g_powerpress_page_message .= '<div class="error powerpress-error">'. $msg . '</div>';
10
  }
11
 
12
- function powerpress_page_message_add_notice($msg)
13
  {
14
  global $g_powerpress_page_message;
15
  // Always pre-pend, since jQuery will re-order with first as last.
16
- $g_powerpress_page_message = '<div class="updated fade powerpress-notice">'. $msg . '</div>' . $g_powerpress_page_message;
17
  }
18
 
19
 
@@ -28,7 +28,7 @@ function powerpress_page_message_print()
28
  function powerpress_admin_activate()
29
  {
30
  $Settings = get_option('powerpress_general');
31
- if( $Settings == false )
32
  {
33
  // If no settings exist, see if either PodPress or Podcasting plugins are enabled and import those settings...
34
  if( defined('PODPRESS_VERSION') )
@@ -39,6 +39,12 @@ function powerpress_admin_activate()
39
  {
40
  powerpress_admin_import_podcasting_settings();
41
  }
 
 
 
 
 
 
42
  }
43
  }
44
 
@@ -51,9 +57,6 @@ function powerpress_admin_init()
51
  wp_enqueue_script('jquery-ui-core'); // Now including the library at Google
52
  wp_enqueue_script('jquery-ui-tabs');
53
 
54
- // For nice watermarks in admin area
55
- wp_enqueue_script('jquery-watermark', powerpress_get_root_url() .'3rdparty/jquery.watermark.min.js');
56
-
57
  // Powerpress page
58
  if( isset($_GET['page']) && strstr($_GET['page'], 'powerpress' ) !== false )
59
  {
@@ -103,6 +106,7 @@ function powerpress_admin_init()
103
  $FeedSlug = (isset($_POST['feed_slug'])?$_POST['feed_slug']:false);
104
  $Category = (isset($_POST['cat'])?$_POST['cat']:false);
105
  $term_taxonomy_id = (isset($_POST['ttid'])?$_POST['ttid']:false);
 
106
 
107
  // New iTunes image
108
  if( !empty($_POST['itunes_image_checkbox']) )
@@ -131,7 +135,7 @@ function powerpress_admin_init()
131
 
132
  if( $ImageData )
133
  {
134
- if( ( $ImageData[2] == IMAGETYPE_JPEG || $ImageData[2] == IMAGETYPE_PNG ) && $ImageData[0] == $ImageData[1] && $ImageData[0] >= 600 && $ImageData['channels'] == 3 ) // Just check that it is an image, the correct image type and that the image is square
135
  {
136
  if( !move_uploaded_file($temp, $upload_path . $filename) )
137
  {
@@ -145,7 +149,7 @@ function powerpress_admin_init()
145
  $Feed['rss2_image'] = $upload_url . $filename;
146
  }
147
 
148
- if( $ImageData[0] < 1400 )
149
  {
150
  powerpress_page_message_add_error( __('iTunes image warning', 'powerpress') .': '. htmlspecialchars($_FILES['itunes_image_file']['name']) . __(' is', 'powerpress') .' '. $ImageData[0] .' x '.$ImageData[0] .' - '. __('Image must be square 1400 x 1400 pixels or larger.', 'powerprss') );
151
  }
@@ -362,7 +366,7 @@ function powerpress_admin_init()
362
 
363
 
364
  // Check to see if we need to update the feed title
365
- if( $FeedSlug )
366
  {
367
  $GeneralSettingsTemp = powerpress_get_settings('powerpress_general', false);
368
  if( !isset($GeneralSettingsTemp['custom_feeds'][$FeedSlug]) || $GeneralSettingsTemp['custom_feeds'][$FeedSlug] != $Feed['title'] )
@@ -420,6 +424,9 @@ function powerpress_admin_init()
420
  $General['episode_box_explicit'] = 0;
421
  if( !isset($General['episode_box_closed_captioned'] ) )
422
  $General['episode_box_closed_captioned'] = 0;
 
 
 
423
  if( !isset($General['episode_box_order'] ) )
424
  $General['episode_box_order'] = 0;
425
 
@@ -428,6 +435,8 @@ function powerpress_admin_init()
428
  else
429
  $General['episode_box_order'] = 0;
430
 
 
 
431
  if( !isset($General['feed_links']) )
432
  $General['feed_links'] = 0;
433
 
@@ -438,11 +447,15 @@ function powerpress_admin_init()
438
  $General['cat_casting'] = 0;
439
  if( !isset($General['channels'] ) )
440
  $General['channels'] = 0;
 
 
 
 
441
  if( !isset($General['metamarks'] ) )
442
  $General['metamarks'] = 0;
443
 
444
 
445
- // Media Presentation Settings
446
  $PlayerSettings = array();
447
  if( !empty($_POST['PlayerSettings']) )
448
  $PlayerSettings = $_POST['PlayerSettings'];
@@ -475,6 +488,25 @@ function powerpress_admin_init()
475
  if( !isset($General['new_window_nofactor'] ) )
476
  $General['new_window_nofactor'] = '';
477
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478
 
479
  if( !empty($_POST['action']) && $_POST['action'] == 'powerpress-save-tags' )
480
  {
@@ -569,14 +601,33 @@ function powerpress_admin_init()
569
  $Feed['itunes_complete'] = false;
570
  if( !isset($Feed['maximize_feed']) )
571
  $Feed['maximize_feed'] = false;
 
 
 
572
 
573
  $Feed = powerpress_stripslashes($Feed);
574
  if( $Category )
 
575
  powerpress_save_settings($Feed, 'powerpress_cat_feed_'.$Category);
 
576
  else if ( $term_taxonomy_id )
 
577
  powerpress_save_settings($Feed, 'powerpress_taxonomy_'.$term_taxonomy_id);
578
- else
 
 
 
 
 
 
 
 
 
 
 
 
579
  powerpress_save_settings($Feed, 'powerpress_feed'.($FeedSlug?'_'.$FeedSlug:'') );
 
580
  }
581
 
582
  if( isset($_POST['EpisodeBoxBGColor']) )
@@ -599,14 +650,21 @@ function powerpress_admin_init()
599
  {
600
  switch( $_POST['action'] )
601
  {
602
- case 'powerpress-save-settings': {
603
- powerpress_page_message_add_notice( __('Blubrry PowerPress settings saved successfully.', 'powerpress') );
 
 
 
 
604
  }; break;
605
- case 'powerpress-save-customfeed': {
606
- powerpress_page_message_add_notice( __('Blubrry PowerPress Custom Feed settings saved.', 'powerpress') );
607
  }; break;
608
- case 'powerpress-save-categoryfeedsettings': {
609
- powerpress_page_message_add_notice( __('Blubrry PowerPress Category Feed settings saved.', 'powerpress') );
 
 
 
610
  }; break;
611
  case 'powerpress-save-tags': {
612
  $General = get_option('powerpress_general');
@@ -615,9 +673,6 @@ function powerpress_admin_init()
615
  else
616
  powerpress_page_message_add_notice( __('Blubrry PowerPress MP3 Tag settings saved.', 'powerpress') );
617
  }; break;
618
- case 'powerpress-save-mode': {
619
- // TODO:
620
- }; break;
621
  default: {
622
  powerpress_page_message_add_notice( __('Blubrry PowerPress settings saved.', 'powerpress') );
623
  }; break;
@@ -745,6 +800,63 @@ function powerpress_admin_init()
745
  }
746
  }
747
  }; break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
748
  case 'powerpress-ping-sites': {
749
  check_admin_referer('powerpress-ping-sites');
750
 
@@ -906,6 +1018,22 @@ function powerpress_admin_init()
906
 
907
  powerpress_page_message_add_notice( __('Removed podcast settings for term successfully.', 'powerpress') );
908
  }; break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
909
  case 'powerpress-podpress-settings': {
910
  check_admin_referer('powerpress-podpress-settings');
911
 
@@ -1104,12 +1232,20 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1104
  unset($Settings['episode_box_author']);
1105
  if( isset($Settings['episode_box_explicit'] ) && $Settings['episode_box_explicit'] == 0 )
1106
  unset($Settings['episode_box_explicit']);
 
 
1107
  if( isset($Settings['episode_box_order'] ) && $Settings['episode_box_order'] == 0 )
1108
  unset($Settings['episode_box_order']);
1109
  if( isset($Settings['episode_box_feature_in_itunes'] ) && $Settings['episode_box_feature_in_itunes'] == 0 )
1110
  unset($Settings['episode_box_feature_in_itunes']);
1111
  if( isset($Settings['videojs_css_class']) && empty($Settings['videojs_css_class']) )
1112
  unset($Settings['videojs_css_class']);
 
 
 
 
 
 
1113
  }
1114
  else // Feed or player settings...
1115
  {
@@ -1119,6 +1255,8 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
1119
  unset($Settings['itunes_complete']);
1120
  if( isset($Settings['maximize_feed'] ) && $Settings['maximize_feed'] == 0 )
1121
  unset($Settings['maximize_feed']);
 
 
1122
  }
1123
 
1124
  update_option($field, $Settings);
@@ -1170,7 +1308,7 @@ function powerpress_stripslashes($data)
1170
  return $data;
1171
  }
1172
 
1173
- function powerpress_admin_get_post_types_by_capability_type($capability_type = 'post')
1174
  {
1175
  if( !function_exists('get_post_types') || !function_exists('get_post_type_object') )
1176
  return array($capability_type);
@@ -1179,15 +1317,43 @@ function powerpress_admin_get_post_types_by_capability_type($capability_type = '
1179
  $post_types = get_post_types();
1180
  while( list($index,$post_type) = each($post_types) )
1181
  {
1182
- if( $post_type == 'attachment' || $post_type == 'nav_menu_item' || $post_type == 'revision' )
1183
  continue;
1184
- $object = get_post_type_object($post_type);
1185
- if( $object && $object->capability_type == $capability_type )
 
 
 
 
 
 
1186
  $return[] = $post_type;
 
1187
  }
1188
  return $return;
1189
  }
1190
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1191
  function powerpress_admin_menu()
1192
  {
1193
  $Powerpress = get_option('powerpress_general');
@@ -1196,17 +1362,33 @@ function powerpress_admin_menu()
1196
  {
1197
  // CRAP
1198
  }
1199
- else if( function_exists('add_meta_box') && ( empty($Powerpress['use_caps']) || current_user_can('edit_podcast') ) )
1200
  { // Otherwise we're using a version of wordpress that is not supported.
1201
 
1202
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-metabox.php');
 
 
 
 
 
 
 
 
1203
  if( !defined('POWERPRESS_POST_TYPES') )
1204
  {
1205
- $page_types = powerpress_admin_get_post_types_by_capability_type('page');
 
 
 
1206
  while( list($null,$page_type) = each($page_types) )
1207
- add_meta_box('powerpress-podcast', __('Podcast Episode', 'powerpress'), 'powerpress_meta_box', $page_type, 'normal');
 
 
 
1208
 
1209
- $post_types = powerpress_admin_get_post_types_by_capability_type('post');
 
 
1210
  }
1211
  else
1212
  {
@@ -1214,6 +1396,30 @@ function powerpress_admin_menu()
1214
  $post_types = explode(',', $post_type_string);
1215
  }
1216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1217
  if( isset($Powerpress['custom_feeds']) )
1218
  {
1219
  $FeedDefaultPodcast = get_option('powerpress_feed_podcast');
@@ -1223,8 +1429,9 @@ function powerpress_admin_menu()
1223
  // Make sure this post type can edit the default podcast channel...
1224
  if( !empty($FeedDefaultPodcast['custom_post_type']) && $FeedDefaultPodcast['custom_post_type'] != $post_type )
1225
  continue;
1226
-
1227
- add_meta_box('powerpress-podcast', __('Podcast Episode (default)', 'powerpress'), 'powerpress_meta_box', $post_type, 'normal');
 
1228
  }
1229
 
1230
  while( list($feed_slug, $feed_title) = each($Powerpress['custom_feeds']) )
@@ -1241,22 +1448,26 @@ function powerpress_admin_menu()
1241
  if( !empty($FeedCustom['custom_post_type']) && $FeedCustom['custom_post_type'] != $post_type )
1242
  continue;
1243
 
1244
- add_meta_box('powerpress-'.$feed_slug, __('Podcast Episode for Custom Channel', 'powerpress') .': '.$feed_title, 'powerpress_meta_box', $post_type, 'normal');
 
1245
  }
1246
  }
1247
  reset($Powerpress['custom_feeds']);
1248
  }
1249
- else
1250
  {
1251
  reset($post_types);
1252
  while( list($null,$post_type) = each($post_types) )
1253
- add_meta_box('powerpress-podcast', __('Podcast Episode', 'powerpress'), 'powerpress_meta_box', $post_type, 'normal');
 
 
 
1254
  }
1255
 
1256
  // For custom compatibility type set:
1257
  if( isset($Powerpress['custom_feeds']) && defined('POWERPRESS_CUSTOM_CAPABILITY_TYPE') )
1258
  {
1259
- $post_types = powerpress_admin_get_post_types_by_capability_type( POWERPRESS_CUSTOM_CAPABILITY_TYPE );
1260
  if( !empty($post_types) )
1261
  {
1262
  while( list($feed_slug, $feed_title) = each($Powerpress['custom_feeds']) )
@@ -1272,7 +1483,8 @@ function powerpress_admin_menu()
1272
  if( !empty($FeedCustom['custom_post_type']) && $FeedCustom['custom_post_type'] != $post_type )
1273
  continue;
1274
 
1275
- add_meta_box('powerpress-'.$feed_slug, __('Podcast Episode for Custom Channel', 'powerpress') .': '.$feed_title, 'powerpress_meta_box', $post_type, 'normal');
 
1276
  }
1277
  }
1278
  reset($Powerpress['custom_feeds']);
@@ -1296,10 +1508,10 @@ function powerpress_admin_menu()
1296
  add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Custom Podcast Channels', 'powerpress'), __('Podcast Channels', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_customfeeds.php', 'powerpress_admin_page_customfeeds');
1297
  if( !empty($Powerpress['cat_casting']) )
1298
  add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Category Podcasting', 'powerpress'), __('Category Podcasting', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_categoryfeeds.php', 'powerpress_admin_page_categoryfeeds');
1299
- ////if( defined('POWERPRESS_TAXONOMY_PODCASTING') || !empty($Powerpress['taxonomy_podcasting']) )
1300
- //// add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Taxonomy Podcasting', 'powerpress'), __('Taxonomy Podcasting', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_taxonomyfeeds.php', 'powerpress_admin_page_taxonomyfeeds');
1301
- ////if( defined('POWERPRESS_POSTTYPE_PODCASTING') || !empty($Powerpress['posttype_podcasting']) )
1302
- //// add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Post Type Podcasting', 'powerpress'), __('Post Type Podcasting', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_posttypefeeds.php', 'powerpress_admin_page_posttypefeeds');
1303
  if( !empty($Powerpress['podpress_stats']) )
1304
  add_submenu_page('powerpress/powerpressadmin_basic.php', __('PodPress Stats', 'powerpress'), __('PodPress Stats', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_podpress-stats.php', 'powerpress_admin_page_podpress_stats');
1305
  if( !empty($Powerpress['blubrry_hosting']) )
@@ -1481,6 +1693,10 @@ function powerpress_edit_post($post_ID, $post)
1481
  // iTunes CC
1482
  if( isset($Powerpress['cc']) && trim($Powerpress['cc']) != '' )
1483
  $ToSerialize['cc'] = $Powerpress['cc'];
 
 
 
 
1484
  // order
1485
  if( isset($Powerpress['order']) && trim($Powerpress['order']) != '' )
1486
  $ToSerialize['order'] = $Powerpress['order'];
@@ -1800,9 +2016,6 @@ powerpress_url = '<?php echo powerpress_get_root_url(); ?>';
1800
  vertical-align: top;
1801
  font-size: 90%;
1802
  }
1803
- .powerpress-watermark {
1804
- color: #666666;
1805
- }
1806
  </style>
1807
  <script language="javascript"><!--
1808
 
@@ -2018,12 +2231,9 @@ function powerpress_remove_hosting(FeedSlug)
2018
  }
2019
  }
2020
 
 
 
2021
  jQuery(document).ready(function($) {
2022
- jQuery(".powerpress-duration-hh").watermark('HH', {className: 'powerpress-watermark'});
2023
- jQuery(".powerpress-duration-mm").watermark('MM', {className: 'powerpress-watermark'});
2024
- jQuery(".powerpress-duration-ss").watermark('SS', {className: 'powerpress-watermark'});
2025
- jQuery(".powerpress-player-width").watermark('<?php echo __('Width', 'powerpress'); ?>', {className: 'powerpress-watermark'});
2026
- jQuery(".powerpress-player-height").watermark('<?php echo __('Height', 'powerpress'); ?>', {className: 'powerpress-watermark'});
2027
 
2028
  jQuery('.powerpress-url').change(function() {
2029
 
@@ -2036,9 +2246,21 @@ jQuery(document).ready(function($) {
2036
  powerpress_update_for_video(media_url, FeedSlug);
2037
  });
2038
 
2039
- jQuery('.powerpress-image-browser').click(function() {
 
2040
  g_powerpress_last_selected_channel = this.id.replace(/(powerpress_image_browser_)(.*)$/, "$2");
2041
- tb_show('<?php echo __('Add Poster Image', 'powerpress'); ?>', jQuery(this).attr('href') );
 
 
 
 
 
 
 
 
 
 
 
2042
  return false;
2043
  });
2044
  jQuery('.powerpress-embed').change( function() {
@@ -2245,7 +2467,7 @@ function powerpress_delete_term($term_id, $tt_id, $taxonomy)
2245
  }
2246
  }
2247
 
2248
- add_action('delete_term', 'powerpress_delete_term');
2249
 
2250
 
2251
  function powerpress_edit_category_form($cat)
@@ -2327,15 +2549,17 @@ function powerpress_admin_page_basic()
2327
  {
2328
  $Settings = get_option('powerpress_general');
2329
 
2330
- // TODO: Replace this with welcome message screen with options to select category and channel podcasting.
2331
- //if( !isset($Settings['advanced_mode']) )
2332
- //{
2333
- // powerpress_admin_page_header(false, 'powerpress-edit', true);
2334
- // require_once( POWERPRESS_ABSPATH .'/powerpressadmin-mode.php');
2335
- // powerpress_admin_mode();
2336
- // powerpress_admin_page_footer(false);
2337
- // return;
2338
- //}
 
 
2339
 
2340
  powerpress_admin_page_header();
2341
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
@@ -2348,12 +2572,8 @@ function powerpress_admin_page_basic()
2348
  function powerpress_admin_page_players()
2349
  {
2350
  powerpress_admin_page_header('powerpress/powerpressadmin_player.php');
2351
-
2352
  require_once( POWERPRESS_ABSPATH.'/powerpressadmin-player-page.php');
2353
  powerpress_admin_players('audio');
2354
-
2355
- //require_once( POWERPRESS_ABSPATH .'/powerpressadmin-player.php');
2356
- //powerpress_admin_page_player();
2357
  powerpress_admin_page_footer(true);
2358
  }
2359
 
@@ -2455,22 +2675,25 @@ function powerpress_admin_page_taxonomyfeeds()
2455
  // Custom Post Type Feeds
2456
  function powerpress_admin_page_posttypefeeds()
2457
  {
 
2458
  $Action = (!empty($_GET['action'])? $_GET['action'] : false);
2459
  switch( $Action )
2460
  {
2461
- case 'powerpress-editcategoryfeed' : {
2462
- if( !empty($_GET['post_type']) ) {
 
2463
  powerpress_admin_page_header('powerpress/powerpressadmin_posttypefeeds.php');
2464
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
2465
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
2466
- powerpress_admin_editfeed('post_type', $_GET['post_type']);
2467
  powerpress_admin_page_footer();
 
2468
  }
2469
- }; break;
2470
  default: {
2471
  powerpress_admin_page_header('powerpress/powerpressadmin_posttypefeeds.php', 'powerpress-add-posttypefeed');
2472
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-posttypefeeds.php');
2473
- powerpress_admin_categoryfeeds();
2474
  powerpress_admin_page_footer(false);
2475
  };
2476
  }
@@ -3045,7 +3268,7 @@ function powerpress_admin_import_podcasting_settings()
3045
  return ($Changes||$FeedChanges);
3046
  }
3047
 
3048
- function powerpress_admin_episodes_per_feed($feed_slug)
3049
  {
3050
  $field = 'enclosure';
3051
  if( $feed_slug != 'podcast' )
@@ -3081,8 +3304,8 @@ function powerpress_default_settings($Settings, $Section='basic')
3081
  if( !isset($Settings['cat_casting'] ) )
3082
  {
3083
  $Settings['cat_casting'] = 0;
3084
- if( isset($Settings['custom_cat_feeds']) && count($Settings['custom_cat_feeds']) > 0 )
3085
- $Settings['cat_casting'] = 1;
3086
  }
3087
 
3088
  if( !isset($Settings['channels'] ) )
@@ -3581,11 +3804,18 @@ function powerpressadmin_community_news($items=3)
3581
  case 'mp4':
3582
  case 'm4v':
3583
  case 'webm': {
3584
- echo powerpressplayer_build_html5video($enclosure->link, $EpisodeData);
 
 
 
 
3585
  }; break;
3586
  case 'mp3':
3587
  case 'm4a': {
3588
- echo powerpressplayer_build_html5audio($enclosure->link, $EpisodeData);
 
 
 
3589
  }; break;
3590
  }
3591
  }
@@ -3640,6 +3870,14 @@ function powerpressadmin_community_highlighted($items=8)
3640
  echo '</div>';
3641
  }
3642
 
 
 
 
 
 
 
 
 
3643
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-jquery.php');
3644
  // Only include the dashboard when appropriate.
3645
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-dashboard.php');
3
  if( !function_exists('add_action') )
4
  die("access denied.");
5
 
6
+ function powerpress_page_message_add_error($msg, $classes='inline')
7
  {
8
  global $g_powerpress_page_message;
9
+ $g_powerpress_page_message .= '<div class="error powerpress-error '.$classes.'">'. $msg . '</div>';
10
  }
11
 
12
+ function powerpress_page_message_add_notice($msg, $classes='inline')
13
  {
14
  global $g_powerpress_page_message;
15
  // Always pre-pend, since jQuery will re-order with first as last.
16
+ $g_powerpress_page_message = '<div class="updated fade powerpress-notice '.$classes.'">'. $msg . '</div>' . $g_powerpress_page_message;
17
  }
18
 
19
 
28
  function powerpress_admin_activate()
29
  {
30
  $Settings = get_option('powerpress_general');
31
+ if( empty($Settings) )
32
  {
33
  // If no settings exist, see if either PodPress or Podcasting plugins are enabled and import those settings...
34
  if( defined('PODPRESS_VERSION') )
39
  {
40
  powerpress_admin_import_podcasting_settings();
41
  }
42
+ // This is a new user
43
+ powerpress_save_settings(array('advanced_mode_2'=>'0'), 'powerpress_general'); // Defaut them to simple mode
44
+ }
45
+ else if( !isset($Settings['advanced_mode_2']) ) // this is not a new user, lets put them in advanced mode by default...
46
+ {
47
+ powerpress_save_settings(array('advanced_mode_2'=>'1'), 'powerpress_general'); // Defaut them to simple mode
48
  }
49
  }
50
 
57
  wp_enqueue_script('jquery-ui-core'); // Now including the library at Google
58
  wp_enqueue_script('jquery-ui-tabs');
59
 
 
 
 
60
  // Powerpress page
61
  if( isset($_GET['page']) && strstr($_GET['page'], 'powerpress' ) !== false )
62
  {
106
  $FeedSlug = (isset($_POST['feed_slug'])?$_POST['feed_slug']:false);
107
  $Category = (isset($_POST['cat'])?$_POST['cat']:false);
108
  $term_taxonomy_id = (isset($_POST['ttid'])?$_POST['ttid']:false);
109
+ $podcast_post_type = (isset($_POST['podcast_post_type'])?$_POST['podcast_post_type']:false);
110
 
111
  // New iTunes image
112
  if( !empty($_POST['itunes_image_checkbox']) )
135
 
136
  if( $ImageData )
137
  {
138
+ if( ( $ImageData[2] == IMAGETYPE_JPEG || $ImageData[2] == IMAGETYPE_PNG ) && $ImageData[0] == $ImageData[1] && $ImageData[0] >= 300 && $ImageData['channels'] == 3 ) // Just check that it is an image, the correct image type and that the image is square
139
  {
140
  if( !move_uploaded_file($temp, $upload_path . $filename) )
141
  {
149
  $Feed['rss2_image'] = $upload_url . $filename;
150
  }
151
 
152
+ if( $ImageData[0] < 1400 || $ImageData[1] < 1400 )
153
  {
154
  powerpress_page_message_add_error( __('iTunes image warning', 'powerpress') .': '. htmlspecialchars($_FILES['itunes_image_file']['name']) . __(' is', 'powerpress') .' '. $ImageData[0] .' x '.$ImageData[0] .' - '. __('Image must be square 1400 x 1400 pixels or larger.', 'powerprss') );
155
  }
366
 
367
 
368
  // Check to see if we need to update the feed title
369
+ if( $FeedSlug && !$podcast_post_type )
370
  {
371
  $GeneralSettingsTemp = powerpress_get_settings('powerpress_general', false);
372
  if( !isset($GeneralSettingsTemp['custom_feeds'][$FeedSlug]) || $GeneralSettingsTemp['custom_feeds'][$FeedSlug] != $Feed['title'] )
424
  $General['episode_box_explicit'] = 0;
425
  if( !isset($General['episode_box_closed_captioned'] ) )
426
  $General['episode_box_closed_captioned'] = 0;
427
+ if( !isset($General['episode_box_itunes_image'] ) )
428
+ $General['episode_box_itunes_image'] = 0;
429
+
430
  if( !isset($General['episode_box_order'] ) )
431
  $General['episode_box_order'] = 0;
432
 
435
  else
436
  $General['episode_box_order'] = 0;
437
 
438
+
439
+
440
  if( !isset($General['feed_links']) )
441
  $General['feed_links'] = 0;
442
 
447
  $General['cat_casting'] = 0;
448
  if( !isset($General['channels'] ) )
449
  $General['channels'] = 0;
450
+ if( !isset($General['taxonomy_podcasting'] ) )
451
+ $General['taxonomy_podcasting'] = 0;
452
+ if( !isset($General['posttype_podcasting'] ) )
453
+ $General['posttype_podcasting'] = 0;
454
  if( !isset($General['metamarks'] ) )
455
  $General['metamarks'] = 0;
456
 
457
 
458
+ // Media Presentation Settings
459
  $PlayerSettings = array();
460
  if( !empty($_POST['PlayerSettings']) )
461
  $PlayerSettings = $_POST['PlayerSettings'];
488
  if( !isset($General['new_window_nofactor'] ) )
489
  $General['new_window_nofactor'] = '';
490
  }
491
+ else if( !empty($_POST['action']) && $_POST['action'] == 'powerpress-save-defaults' )
492
+ {
493
+ if( !isset($General['display_player_excerpt']) ) // If we are modifying appearance settings but this option was not checked...
494
+ $General['display_player_excerpt'] = 0; // Set it to zero.
495
+ if( !isset($_POST['StatsInDashboard'] ) )
496
+ $General['disable_dashboard_widget'] = 1;
497
+
498
+ // Advanced Mode options
499
+ if( !isset($General['cat_casting'] ) )
500
+ $General['cat_casting'] = 0;
501
+ if( !isset($General['channels'] ) )
502
+ $General['channels'] = 0;
503
+ if( !isset($General['taxonomy_podcasting'] ) )
504
+ $General['taxonomy_podcasting'] = 0;
505
+ if( !isset($General['posttype_podcasting'] ) )
506
+ $General['posttype_podcasting'] = 0;
507
+ if( !isset($General['metamarks'] ) )
508
+ $General['metamarks'] = 0;
509
+ }
510
 
511
  if( !empty($_POST['action']) && $_POST['action'] == 'powerpress-save-tags' )
512
  {
601
  $Feed['itunes_complete'] = false;
602
  if( !isset($Feed['maximize_feed']) )
603
  $Feed['maximize_feed'] = false;
604
+ if( !isset($Feed['episode_itunes_image']) )
605
+ $Feed['episode_itunes_image'] = false;
606
+
607
 
608
  $Feed = powerpress_stripslashes($Feed);
609
  if( $Category )
610
+ {
611
  powerpress_save_settings($Feed, 'powerpress_cat_feed_'.$Category);
612
+ }
613
  else if ( $term_taxonomy_id )
614
+ {
615
  powerpress_save_settings($Feed, 'powerpress_taxonomy_'.$term_taxonomy_id);
616
+ }
617
+ else if( $podcast_post_type )
618
+ {
619
+ $PostTypeSettings = array();
620
+ $PostTypeSettings[ $FeedSlug ] = $Feed;
621
+ powerpress_save_settings($PostTypeSettings, 'powerpress_posttype_'.$podcast_post_type);
622
+ powerpress_rebuild_posttype_podcasting();
623
+ }
624
+ else // otherwise treat as a podcast channel
625
+ {
626
+ if( $FeedSlug == false && get_option('powerpress_feed_podcast') ) // If the settings were moved to the podcast channels feature...
627
+ powerpress_save_settings($Feed, 'powerpress_feed_podcast' ); // save a copy here if that is the case.
628
+
629
  powerpress_save_settings($Feed, 'powerpress_feed'.($FeedSlug?'_'.$FeedSlug:'') );
630
+ }
631
  }
632
 
633
  if( isset($_POST['EpisodeBoxBGColor']) )
650
  {
651
  switch( $_POST['action'] )
652
  {
653
+ case 'powerpress-save-settings':
654
+ case 'powerpress-save-defaults': {
655
+ powerpress_page_message_add_notice( __('Blubrry PowerPress settings saved.', 'powerpress') );
656
+ }; break;
657
+ case 'powerpress-save-channel': {
658
+ powerpress_page_message_add_notice( __('Blubrry PowerPress Channel settings saved.', 'powerpress') );
659
  }; break;
660
+ case 'powerpress-save-category': {
661
+ powerpress_page_message_add_notice( __('Blubrry PowerPress Category Podcasting settings saved.', 'powerpress') );
662
  }; break;
663
+ case 'powerpress-save-ttid': {
664
+ powerpress_page_message_add_notice( __('Blubrry PowerPress Taxonomy Podcasting settings saved.', 'powerpress') );
665
+ }; break;
666
+ case 'powerpress-save-post_type': {
667
+ powerpress_page_message_add_notice( __('Blubrry PowerPress Post Type Podcasting settings saved.', 'powerpress') );
668
  }; break;
669
  case 'powerpress-save-tags': {
670
  $General = get_option('powerpress_general');
673
  else
674
  powerpress_page_message_add_notice( __('Blubrry PowerPress MP3 Tag settings saved.', 'powerpress') );
675
  }; break;
 
 
 
676
  default: {
677
  powerpress_page_message_add_notice( __('Blubrry PowerPress settings saved.', 'powerpress') );
678
  }; break;
800
  }
801
  }
802
  }; break;
803
+ case 'powerpress-addposttypefeed': {
804
+
805
+
806
+ check_admin_referer('powerpress-add-posttype-feed');
807
+ //die('ok 2');
808
+
809
+ $Settings = get_option('powerpress_general');
810
+ $feed_slug = sanitize_title($_POST['feed_slug']);
811
+ $post_type = $_POST['podcast_post_type'];
812
+ $post_type = powerpress_stripslashes($post_type);
813
+ $feed_title = $_POST['feed_title'];
814
+ $feed_title = powerpress_stripslashes($feed_title);
815
+
816
+
817
+
818
+ /*
819
+ if( isset($Settings['custom_feeds'][ $key ]) && empty($_POST['overwrite']) )
820
+ {
821
+ powerpress_page_message_add_error( sprintf(__('Feed slug "%s" already exists.'), $key) );
822
+ } else */
823
+ if( empty($feed_slug) )
824
+ {
825
+ powerpress_page_message_add_error( sprintf(__('Feed slug "%s" is not valid.', 'powerpress'), $_POST['feed_slug']) );
826
+ }
827
+ else if( empty($post_type) )
828
+ {
829
+ powerpress_page_message_add_error( sprintf(__('Post Type is invalid.', 'powerpress'), $post_type) );
830
+ }
831
+ // TODO:
832
+ //else if( in_array($feed_slug, $wp_rewrite->feeds) && !isset($Settings['custom_feeds'][ $key ]) ) // If it is a system feed or feed created by something else
833
+ //{
834
+ // powerpress_page_message_add_error( sprintf(__('Feed slug "%s" is not available.', 'powerpress'), $key) );
835
+ //}
836
+ else
837
+ {
838
+ $ExistingSettings = powerpress_get_settings('powerpress_posttype_'. $post_type);
839
+ if( !empty($ExistingSettings[ $feed_slug ]) )
840
+ {
841
+ powerpress_page_message_add_error( sprintf(__('Feed slug "%s" already exists.', 'powerpress'), $_POST['feed_slug']) );
842
+ }
843
+ else
844
+ {
845
+ $NewSettings = array();
846
+ $NewSettings[ $feed_slug ]['title'] = $feed_title;
847
+ powerpress_save_settings($NewSettings, 'powerpress_posttype_'. $post_type);
848
+
849
+
850
+ add_feed($feed_slug, 'powerpress_do_podcast_feed'); // Before we flush the rewrite rules we need to add the new custom feed...
851
+ $wp_rewrite->flush_rules();
852
+
853
+ powerpress_page_message_add_notice( sprintf(__('Podcast "%s" added, please configure your new podcast.', 'powerpress'), $feed_title) );
854
+ $_GET['action'] = 'powerpress-editposttypefeed';
855
+ $_GET['feed_slug'] = $feed_slug;
856
+ $_GET['podcast_post_type'] = $post_type;
857
+ }
858
+ }
859
+ }; break;
860
  case 'powerpress-ping-sites': {
861
  check_admin_referer('powerpress-ping-sites');
862
 
1018
 
1019
  powerpress_page_message_add_notice( __('Removed podcast settings for term successfully.', 'powerpress') );
1020
  }; break;
1021
+ case 'powerpress-delete-posttype-feed': {
1022
+
1023
+ $feed_slug = $_GET['feed_slug'];
1024
+ $post_type = $_GET['podcast_post_type'];
1025
+ check_admin_referer('powerpress-delete-posttype-feed-'.$post_type .'_'.$feed_slug);
1026
+
1027
+ $Settings = get_option('powerpress_posttype_'.$post_type);
1028
+ if( !empty($Settings[ $feed_slug ]) )
1029
+ {
1030
+ unset( $Settings[ $feed_slug ] );
1031
+ update_option('powerpress_posttype_'.$post_type, $Settings);
1032
+ //powerpress_save_settings($Settings, 'powerpress_posttype_'.$post_type); // Delete the feed from the general settings
1033
+ }
1034
+
1035
+ powerpress_page_message_add_notice( __('Removed podcast settings for post type successfully.', 'powerpress') );
1036
+ }; break;
1037
  case 'powerpress-podpress-settings': {
1038
  check_admin_referer('powerpress-podpress-settings');
1039
 
1232
  unset($Settings['episode_box_author']);
1233
  if( isset($Settings['episode_box_explicit'] ) && $Settings['episode_box_explicit'] == 0 )
1234
  unset($Settings['episode_box_explicit']);
1235
+ if( isset($Settings['episode_box_itunes_image'] ) && $Settings['episode_box_itunes_image'] == 0 )
1236
+ unset($Settings['episode_box_itunes_image']);
1237
  if( isset($Settings['episode_box_order'] ) && $Settings['episode_box_order'] == 0 )
1238
  unset($Settings['episode_box_order']);
1239
  if( isset($Settings['episode_box_feature_in_itunes'] ) && $Settings['episode_box_feature_in_itunes'] == 0 )
1240
  unset($Settings['episode_box_feature_in_itunes']);
1241
  if( isset($Settings['videojs_css_class']) && empty($Settings['videojs_css_class']) )
1242
  unset($Settings['videojs_css_class']);
1243
+ if( isset($Settings['cat_casting']) && empty($Settings['cat_casting']) )
1244
+ unset($Settings['cat_casting']);
1245
+ if( isset($Settings['posttype_podcasting']) && empty($Settings['posttype_podcasting']) )
1246
+ unset($Settings['posttype_podcasting']);
1247
+ if( isset($Settings['taxonomy_podcasting']) && empty($Settings['taxonomy_podcasting']) )
1248
+ unset($Settings['taxonomy_podcasting']);
1249
  }
1250
  else // Feed or player settings...
1251
  {
1255
  unset($Settings['itunes_complete']);
1256
  if( isset($Settings['maximize_feed'] ) && $Settings['maximize_feed'] == 0 )
1257
  unset($Settings['maximize_feed']);
1258
+ if( empty($Settings['episode_itunes_image']) )
1259
+ unset($Settings['episode_itunes_image']);
1260
  }
1261
 
1262
  update_option($field, $Settings);
1308
  return $data;
1309
  }
1310
 
1311
+ function powerpress_admin_get_post_types($capability_type = 'post')
1312
  {
1313
  if( !function_exists('get_post_types') || !function_exists('get_post_type_object') )
1314
  return array($capability_type);
1317
  $post_types = get_post_types();
1318
  while( list($index,$post_type) = each($post_types) )
1319
  {
1320
+ if( $post_type == 'attachment' || $post_type == 'nav_menu_item' || $post_type == 'revision' || $post_type == 'action' )
1321
  continue;
1322
+ if( $capability_type !== false )
1323
+ {
1324
+ $object = get_post_type_object($post_type);
1325
+ if( $object && $object->capability_type == $capability_type )
1326
+ $return[] = $post_type;
1327
+ }
1328
+ else
1329
+ {
1330
  $return[] = $post_type;
1331
+ }
1332
  }
1333
  return $return;
1334
  }
1335
 
1336
+ /* Rebuild powerpress_posttype_podcasting field*/
1337
+ function powerpress_rebuild_posttype_podcasting()
1338
+ {
1339
+ // Loop through all the posttype podcasting settings, save them into a field
1340
+ // array( feed-slugs => array('posttype1'=>'post type 1 title', 'posttype2'=>post type 2 title', ...) );
1341
+ $post_types = get_post_types();
1342
+ $FeedSlugPostTypeArray = array();
1343
+ while( list($index, $post_type) = each($post_types) )
1344
+ {
1345
+ $PostTypeSettingsArray = get_option('powerpress_posttype_'. $post_type );
1346
+ if( !$PostTypeSettingsArray )
1347
+ continue;
1348
+
1349
+ while( list($feed_slug, $PostTypeSettings) = each($PostTypeSettingsArray) )
1350
+ {
1351
+ $FeedSlugPostTypeArray[ $feed_slug ][ $post_type ] = ( empty($PostTypeSettings['title'])? $feed_slug : $PostTypeSettings['title'] );
1352
+ }
1353
+ }
1354
+ update_option('powerpress_posttype_podcasting', $FeedSlugPostTypeArray);
1355
+ }
1356
+
1357
  function powerpress_admin_menu()
1358
  {
1359
  $Powerpress = get_option('powerpress_general');
1362
  {
1363
  // CRAP
1364
  }
1365
+ else if( empty($Powerpress['use_caps']) || current_user_can('edit_podcast') )
1366
  { // Otherwise we're using a version of wordpress that is not supported.
1367
 
1368
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-metabox.php');
1369
+ $FeedSlugPostTypesArray = array();
1370
+ if( !empty($Powerpress['posttype_podcasting']) )
1371
+ {
1372
+ $FeedSlugPostTypesArray = get_option('powerpress_posttype_podcasting');
1373
+ if( empty($FeedSlugPostTypesArray) )
1374
+ $FeedSlugPostTypesArray = array();
1375
+ }
1376
+
1377
  if( !defined('POWERPRESS_POST_TYPES') )
1378
  {
1379
+ $page_types = array('page'); // Only apply to default pages
1380
+ if( empty($Powerpress['posttype_podcasting']) )
1381
+ $page_types = powerpress_admin_get_post_types('page'); // Get pages by capability type
1382
+
1383
  while( list($null,$page_type) = each($page_types) )
1384
+ {
1385
+ if( empty($FeedSlugPostTypesArray[ 'podcast' ][ $page_type ]) )
1386
+ add_meta_box('powerpress-podcast', __('Podcast Episode', 'powerpress'), 'powerpress_meta_box', $page_type, 'normal');
1387
+ }
1388
 
1389
+ $post_types = array('post'); // Only apply to default posts
1390
+ if( empty($Powerpress['posttype_podcasting']) )
1391
+ $post_types = powerpress_admin_get_post_types('post'); // Get pages by capability type
1392
  }
1393
  else
1394
  {
1396
  $post_types = explode(',', $post_type_string);
1397
  }
1398
 
1399
+ if( !empty($Powerpress['posttype_podcasting']) )
1400
+ {
1401
+ add_meta_box('powerpress-podcast', __('Podcast Episode (default)', 'powerpress'), 'powerpress_meta_box', 'post', 'normal'); // Default podcast box for post type 'post'
1402
+
1403
+ $FeedSlugPostTypesArray = get_option('powerpress_posttype_podcasting');
1404
+ if( empty($FeedSlugPostTypesArray) )
1405
+ $FeedSlugPostTypesArray = array();
1406
+
1407
+ while( list($feed_slug, $FeedSlugPostTypes) = each($FeedSlugPostTypesArray) )
1408
+ {
1409
+ while( list($post_type, $type_title) = each($FeedSlugPostTypes) )
1410
+ {
1411
+ if ( $feed_slug != 'podcast' || $post_type != 'post' ) // No the default podcast feed
1412
+ {
1413
+ $feed_title = $type_title;
1414
+ if( empty($feed_title) )
1415
+ $feed_title = $feed_slug;
1416
+ //echo (" $feed_slug ");
1417
+ add_meta_box('powerpress-'.$feed_slug, __('Podcast Episode', 'powerpress') .': '.$feed_title, 'powerpress_meta_box', $post_type, 'normal');
1418
+ }
1419
+ }
1420
+ }
1421
+ }
1422
+
1423
  if( isset($Powerpress['custom_feeds']) )
1424
  {
1425
  $FeedDefaultPodcast = get_option('powerpress_feed_podcast');
1429
  // Make sure this post type can edit the default podcast channel...
1430
  if( !empty($FeedDefaultPodcast['custom_post_type']) && $FeedDefaultPodcast['custom_post_type'] != $post_type )
1431
  continue;
1432
+
1433
+ if( empty($FeedSlugPostTypesArray[ 'podcast' ][ $post_type ]) )
1434
+ add_meta_box('powerpress-podcast', __('Podcast Episode (default)', 'powerpress'), 'powerpress_meta_box', $post_type, 'normal');
1435
  }
1436
 
1437
  while( list($feed_slug, $feed_title) = each($Powerpress['custom_feeds']) )
1448
  if( !empty($FeedCustom['custom_post_type']) && $FeedCustom['custom_post_type'] != $post_type )
1449
  continue;
1450
 
1451
+ if( empty($FeedSlugPostTypesArray[ $feed_slug ][ $post_type ]) )
1452
+ add_meta_box('powerpress-'.$feed_slug, __('Podcast Episode for Custom Channel', 'powerpress') .': '.$feed_title, 'powerpress_meta_box', $post_type, 'normal');
1453
  }
1454
  }
1455
  reset($Powerpress['custom_feeds']);
1456
  }
1457
+ else // This handles all podcast post types and default 'post'. if post type podcasting enabled.
1458
  {
1459
  reset($post_types);
1460
  while( list($null,$post_type) = each($post_types) )
1461
+ {
1462
+ if( empty($FeedSlugPostTypesArray[ 'podcast' ][ $post_type ]) )
1463
+ add_meta_box('powerpress-podcast', __('Podcast Episode', 'powerpress'), 'powerpress_meta_box', $post_type, 'normal');
1464
+ }
1465
  }
1466
 
1467
  // For custom compatibility type set:
1468
  if( isset($Powerpress['custom_feeds']) && defined('POWERPRESS_CUSTOM_CAPABILITY_TYPE') )
1469
  {
1470
+ $post_types = powerpress_admin_get_post_types( POWERPRESS_CUSTOM_CAPABILITY_TYPE );
1471
  if( !empty($post_types) )
1472
  {
1473
  while( list($feed_slug, $feed_title) = each($Powerpress['custom_feeds']) )
1483
  if( !empty($FeedCustom['custom_post_type']) && $FeedCustom['custom_post_type'] != $post_type )
1484
  continue;
1485
 
1486
+ if( empty($FeedSlugPostTypesArray[ $feed_slug ][ $post_type ]) )
1487
+ add_meta_box('powerpress-'.$feed_slug, __('Podcast Episode for Custom Channel', 'powerpress') .': '.$feed_title, 'powerpress_meta_box', $post_type, 'normal');
1488
  }
1489
  }
1490
  reset($Powerpress['custom_feeds']);
1508
  add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Custom Podcast Channels', 'powerpress'), __('Podcast Channels', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_customfeeds.php', 'powerpress_admin_page_customfeeds');
1509
  if( !empty($Powerpress['cat_casting']) )
1510
  add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Category Podcasting', 'powerpress'), __('Category Podcasting', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_categoryfeeds.php', 'powerpress_admin_page_categoryfeeds');
1511
+ if( defined('POWERPRESS_TAXONOMY_PODCASTING') || !empty($Powerpress['taxonomy_podcasting']) )
1512
+ add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Taxonomy Podcasting', 'powerpress'), __('Taxonomy Podcasting', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_taxonomyfeeds.php', 'powerpress_admin_page_taxonomyfeeds');
1513
+ if( defined('POWERPRESS_POSTTYPE_PODCASTING') || !empty($Powerpress['posttype_podcasting']) )
1514
+ add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Post Type Podcasting', 'powerpress'), __('Post Type Podcasting', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_posttypefeeds.php', 'powerpress_admin_page_posttypefeeds');
1515
  if( !empty($Powerpress['podpress_stats']) )
1516
  add_submenu_page('powerpress/powerpressadmin_basic.php', __('PodPress Stats', 'powerpress'), __('PodPress Stats', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_podpress-stats.php', 'powerpress_admin_page_podpress_stats');
1517
  if( !empty($Powerpress['blubrry_hosting']) )
1693
  // iTunes CC
1694
  if( isset($Powerpress['cc']) && trim($Powerpress['cc']) != '' )
1695
  $ToSerialize['cc'] = $Powerpress['cc'];
1696
+ // iTunes Episode image
1697
+ if( isset($Powerpress['itunes_image']) && trim($Powerpress['itunes_image']) != '' )
1698
+ $ToSerialize['itunes_image'] = $Powerpress['itunes_image'];
1699
+
1700
  // order
1701
  if( isset($Powerpress['order']) && trim($Powerpress['order']) != '' )
1702
  $ToSerialize['order'] = $Powerpress['order'];
2016
  vertical-align: top;
2017
  font-size: 90%;
2018
  }
 
 
 
2019
  </style>
2020
  <script language="javascript"><!--
2021
 
2231
  }
2232
  }
2233
 
2234
+ var pp_upload_image_button=false;
2235
+
2236
  jQuery(document).ready(function($) {
 
 
 
 
 
2237
 
2238
  jQuery('.powerpress-url').change(function() {
2239
 
2246
  powerpress_update_for_video(media_url, FeedSlug);
2247
  });
2248
 
2249
+ jQuery('.powerpress-image-browser').click(function(e) {
2250
+ e.preventDefault();
2251
  g_powerpress_last_selected_channel = this.id.replace(/(powerpress_image_browser_)(.*)$/, "$2");
2252
+ tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true&amp;post_id=0', false);
2253
+
2254
+ var oldFunc = window.send_to_editor;
2255
+ window.send_to_editor = function(html)
2256
+ {
2257
+ url = jQuery('img', html).attr('src');
2258
+ //jQuery("#"+formfieldID).val(imgurl);
2259
+ jQuery('#powerpress_image_'+g_powerpress_last_selected_channel).val( url );
2260
+ g_powerpress_last_selected_channel = '';
2261
+ tb_remove();
2262
+ window.send_to_editor = oldFunc;
2263
+ }
2264
  return false;
2265
  });
2266
  jQuery('.powerpress-embed').change( function() {
2467
  }
2468
  }
2469
 
2470
+ add_action('delete_term', 'powerpress_delete_term', 10, 3);
2471
 
2472
 
2473
  function powerpress_edit_category_form($cat)
2549
  {
2550
  $Settings = get_option('powerpress_general');
2551
 
2552
+ if( isset($Settings['advanced_mode_2']) && empty($Settings['advanced_mode_2']) ) // Simple Mode
2553
+ {
2554
+ powerpress_admin_page_header();
2555
+ require_once( POWERPRESS_ABSPATH .'/powerpressadmin-defaults.php');
2556
+
2557
+ require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
2558
+ require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
2559
+ powerpress_admin_defaults();
2560
+ powerpress_admin_page_footer(true);
2561
+ return;
2562
+ }
2563
 
2564
  powerpress_admin_page_header();
2565
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
2572
  function powerpress_admin_page_players()
2573
  {
2574
  powerpress_admin_page_header('powerpress/powerpressadmin_player.php');
 
2575
  require_once( POWERPRESS_ABSPATH.'/powerpressadmin-player-page.php');
2576
  powerpress_admin_players('audio');
 
 
 
2577
  powerpress_admin_page_footer(true);
2578
  }
2579
 
2675
  // Custom Post Type Feeds
2676
  function powerpress_admin_page_posttypefeeds()
2677
  {
2678
+
2679
  $Action = (!empty($_GET['action'])? $_GET['action'] : false);
2680
  switch( $Action )
2681
  {
2682
+ case 'powerpress-editposttypefeed' : {
2683
+ if( !empty($_GET['podcast_post_type']) && !empty($_GET['feed_slug']) ) {
2684
+
2685
  powerpress_admin_page_header('powerpress/powerpressadmin_posttypefeeds.php');
2686
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-editfeed.php');
2687
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-basic.php');
2688
+ powerpress_admin_editfeed('post_type', $_GET['podcast_post_type'], $_GET['feed_slug']);
2689
  powerpress_admin_page_footer();
2690
+
2691
  }
2692
+ } break;
2693
  default: {
2694
  powerpress_admin_page_header('powerpress/powerpressadmin_posttypefeeds.php', 'powerpress-add-posttypefeed');
2695
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-posttypefeeds.php');
2696
+ powerpress_admin_posttypefeeds();
2697
  powerpress_admin_page_footer(false);
2698
  };
2699
  }
3268
  return ($Changes||$FeedChanges);
3269
  }
3270
 
3271
+ function powerpress_admin_episodes_per_feed($feed_slug, $post_type='post')
3272
  {
3273
  $field = 'enclosure';
3274
  if( $feed_slug != 'podcast' )
3304
  if( !isset($Settings['cat_casting'] ) )
3305
  {
3306
  $Settings['cat_casting'] = 0;
3307
+ //if( isset($Settings['custom_cat_feeds']) && count($Settings['custom_cat_feeds']) > 0 )
3308
+ // $Settings['cat_casting'] = 1;
3309
  }
3310
 
3311
  if( !isset($Settings['channels'] ) )
3804
  case 'mp4':
3805
  case 'm4v':
3806
  case 'webm': {
3807
+
3808
+ if( version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
3809
+ echo powerpressplayer_build_mediaelementvideo($enclosure->link, $EpisodeData);
3810
+ else
3811
+ echo powerpressplayer_build_html5video($enclosure->link, $EpisodeData);
3812
  }; break;
3813
  case 'mp3':
3814
  case 'm4a': {
3815
+ if( version_compare($GLOBALS['wp_version'], '3.6-alpha', '>') )
3816
+ echo powerpressplayer_build_mediaelementaudio($enclosure->link, $EpisodeData);
3817
+ else
3818
+ echo powerpressplayer_build_html5audio($enclosure->link, $EpisodeData);
3819
  }; break;
3820
  }
3821
  }
3870
  echo '</div>';
3871
  }
3872
 
3873
+ function powerpress_admin_plugin_action_links( $links, $file )
3874
+ {
3875
+ if( preg_match('/powerpress\.php$/', $file) )
3876
+ $links[] = '<a href="'. admin_url("admin.php?page=powerpress/powerpressadmin_basic.php") .'">'. __('Settings', 'powerpress') .'</a>' ;
3877
+ return $links;
3878
+ }
3879
+ add_filter( 'plugin_action_links', 'powerpress_admin_plugin_action_links', 10, 2 );
3880
+
3881
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-jquery.php');
3882
  // Only include the dashboard when appropriate.
3883
  require_once( POWERPRESS_ABSPATH .'/powerpressadmin-dashboard.php');
readme.txt CHANGED
@@ -1,9 +1,12 @@
1
  === Blubrry PowerPress Podcasting plugin ===
2
- Contributors: Angelo Mandato, Blubrry.com
3
  Tags: podcasting, podcast, podcaster, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, webm, mp4, m4v, wordpressmu, mu, wordpress mu, multisite, multi site, mediacaster, post, plugin, posts, simple, social, dashboard, TSG, Buzzsprout, MTR, WP-boxCast, CastMyBlog, simple podcasting, seriously simple podcasting, seriously-simple-podcasting, podlove, podcast.de
4
  Requires at least: 3.0
5
  Tested up to: 3.6
6
- Stable tag: 4.0.9
 
 
 
7
 
8
  Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
9
 
@@ -11,53 +14,51 @@ Blubrry PowerPress brings the essential features for podcasting to WordPress inc
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! Visit [Migrating from PodPress to PowerPress](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/migrating-from-podpress-to-powerpress/) for details.
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, Italian ([Want to translate PowerPress?](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/translating-powerpress/))
30
 
31
- *The Blubrry basic statistics service is FREE. Our [Premium Statistics Service](https://secure.blubrry.com/podcast-statistics-premium/), which includes U.S. downloads, trending and exporting, is available for $5 month.
32
 
33
- = Full iTunes Support =
34
  iTunes can make up between 50 and 95 percent of a podcaster's audience. PowerPress comes with the following iTunes specific features.
35
 
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://create.blubrry.com/resources/powerpress/powerpress-settings/itunes/))
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.
43
 
44
- * 6 Audio Players: Pick from 6 audio players including the popular [1 Pixel Out Player](http://wpaudioplayer.com/whatsnew) and HTML5 audio player.
45
- * 3 Video Players: Pick between HTML5 video, Flow Player Classic Flash player or [VideoJS](http://wordpress.org/extend/plugins/videojs-html5-video-player-for-wordpress/).
46
- * Position player above or below your post content or use the`[powerpress]` shortcode and position the player where you want.
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.
54
 
55
  * Quickly access your Blubrry media download statistics from your WordPress dashboard.
56
  * Publish Blubrry hosted media directly from your blog.
57
  * View Blubrry hosting usage quota from your blog.
58
  * Configure how Blubrry writes media (ID3) tags within PowerPress settings.
59
 
60
- The Blubrry basic statistics service is FREE. Our [Premium Statistics Service](https://secure.blubrry.com/podcast-statistics-premium/), which includes U.S. downloads, trending and exporting, is available for $5 month. Blubrry [Media Hosting](https://secure.blubrry.com/podcast-publishing-premium-with-hosting/) packages start at $12.
61
 
62
  = Advanced Features =
63
  Want more? Check out the advanced features.
@@ -66,26 +67,23 @@ Want more? Check out the advanced features.
66
  * Media size and duration detection: Enter your media URL and let the PowerPress do the rest.
67
  * Category Casting: Add podcast support to your WordPress category feeds.
68
  * Custom Podcast Channels: Distribute multiple formats (audio/video) and versions (short/full length).
69
- * Tag/Keyword Podcast Feeds (Tag Casting): Add iTunes compliant attributes to your tag feeds.
 
70
  * FeedBurner Support: Use FeedBurner.com to host your podcast feeds.
71
- * *User Role Management: Control which users in your blog can podcast.
72
- * **Custom Post Types: Use the new Custom Post Types feature found in WordPress 3.0
73
  * Diagnostics: Check to see if your server is configured to support all of the available features in PowerPress.
74
- * WordPress MultiSite: Blubrry PowerPress is compatible with WordPress MultiSite (Previously WordPress MU)
75
 
76
- *User Role Management requires a separate plugin to manage WordPress Roles and Capabilities.
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
- Please visit [Migrating from PodPress to PowerPress](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/migrating-from-podpress-to-powerpress/) for specific details.
89
 
90
  = Need Help? =
91
  . . . or have some ideas that could improve the plugin?
@@ -95,6 +93,10 @@ Please visit [Migrating from PodPress to PowerPress](http://create.blubrry.com/r
95
  * Blubrry [PowerPress Documentation](http://create.blubrry.com/resources/powerpress/)
96
  * Check out [The Podcasting Manual](http://create.blubrry.com/manual/) - everything you need to know about podcasting
97
 
 
 
 
 
98
  *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.*
99
 
100
 
@@ -121,7 +123,7 @@ As a alternative, PowerPress allows you to create additional Custom Podcast Feed
121
  You may however access your Blubrry Statistics from within your WordPress dashboard.
122
 
123
  = How do you insert the player within a blog post? =
124
- You can insert the media player within yoru blog posts by using the WordPress shortcode feature. The shortcode for PowerPress is [powerpress] (all lowercase)
125
 
126
  You may use the shortcode to add a player to other media files (non episode files) by specifying the media url in the shortcode: [powerpress url="http://example.com/path/to/media.mp3"]
127
 
@@ -135,11 +137,23 @@ You can insert the media player within yoru blog posts by using the WordPress sh
135
  = Will you be upgrading the version of Flow Player to 3.x? =
136
  Because of the feature restrictions and branding that FlowPlayer.org places on FlowPlayer 3.x versions, we do not plan on updating the player packaged with PowerPress. The **PAID open-source** FlowPlayer is not compatible with the **FREE open source** PowerPress plugin.
137
 
 
 
138
 
 
139
 
140
 
141
  == Installation ==
 
 
 
 
 
 
 
 
142
  To install Blubrry PowerPress manually, follow these steps:
 
143
  1. Copy the entire directory from the downloaded zip file into the /wp-content/plugins/ folder.
144
  2. Activate the "Blubrry PowerPress" plugin in the Plugin Management page.
145
  3. Configure your Blubrry PowerPress by going to the **Settings** > **Blubrry PowerPress** page.
@@ -159,10 +173,32 @@ To install Blubrry PowerPress manually, follow these steps:
159
  * 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.
160
  * Translation support is now complete. Please visit the following link if you would like to have a version in your language: [http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/translating-powerpress/](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/translating-powerpress/)
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  = 4.0.9 =
163
  * Releaesd on 6/20/2013
164
  * PowerPress 5.0 is coming! If you would like to beta test, please contact Angelo at cio [at] rawovice dot com. Beta testing starts when WordPress 3.6 is released, PowerPress 5.0 will utilize some new features in WordPress 3.6.
165
- * The PowerPress Version Updates Survey results will be posted in the coming weeks. Based on user feedback, we will release minor updates within 7 days if necessary, major releases between 1-3 months apart, and new features will be included in the plguin but disabled by default.
166
  * Fixed logic for displaying statistics in dashboard to time out after 1 second (was previously 15 seconds) so if there's a network issue between the server and blubrry.com the dashboard still loads promptly. (Thanks Michael Hansen for bringing to our attention!)
167
  * Added new filter `powerpress_feed_auth` for other plugins to filter feed authentication. (Thanks amereservant for the feature suggestion!)
168
  * Added new define `POWERPRESS_AUTO_DETECT_ONCE`, edits to existing episodes will use the specify option if this define is set to true. (Thanks amereservant for the feature suggestion!)
1
  === Blubrry PowerPress Podcasting plugin ===
2
+ Contributors: amandato, blubrry
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, multisite, multi site, mediacaster, post, plugin, posts, simple, social, dashboard, TSG, Buzzsprout, MTR, WP-boxCast, CastMyBlog, simple podcasting, seriously simple podcasting, seriously-simple-podcasting, podlove, podcast.de
4
  Requires at least: 3.0
5
  Tested up to: 3.6
6
+ Stable tag: 5.0
7
+ Donate link: http://create.blubrry.com/
8
+ License: GPLv2 or later
9
+
10
 
11
  Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
12
 
14
 
15
  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.
16
 
 
 
 
 
 
17
 
18
  = PowerPress Key Features =
 
19
  - Full iTunes Support: Adds iTunes compliant podcast feeds to your WordPress blog.
20
  - Integrated HTML5 and Flash Media Players: Audio/video web players with embed support from sites such as YouTube and Ustream.tv.
21
+ - HTML5 video support: Add both mp4 and webm media to each episode for maximum platform compatibility
22
+ - Advanced and Default Mode: Simplfy settings using only the defaults, or harness all the potential of podcasting with Advanced Mode.
23
  - Media Modifiers: Easily add, modify and remove podcasts form blog posts and pages.
24
  - Migration tools: Quickly migrate from PodPress, Blogger or Movable Type without losing episodes.
25
+ - Multi-podcast support: Create separate podcasts by category (Category Podcasting) or by media format (Podcast Channels).
26
+ - Post Type and Taxonomy podcasting options, create podcasts from custom post types and taxonomies.
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, Italian ([Want to translate PowerPress?](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/translating-powerpress/))
30
 
31
+ *The Blubrry basic statistics service is FREE. Our [Premium Statistics Service](https://secure.blubrry.com/podcast-statistics-premium/), which includes [RawVoice Certified Statistics](http://create.blubrry.com/resources/podcast-media-download-statistics/rawvoice-certified/), U.S. downloads, trending and exporting, is available for $5 month.
32
 
33
+ = Full iTunes Support! =
34
  iTunes can make up between 50 and 95 percent of a podcaster's audience. PowerPress comes with the following iTunes specific features.
35
 
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://create.blubrry.com/resources/powerpress/powerpress-settings/itunes/))
38
  * Upload iTunes Artwork: Upload and change your iTunes artwork directly from within PowerPress settings.
39
+ * iTunes podcasting fully supported including the latest [Apple iTunes podcasting specifications](http://www.powerpresspodcast.com/2012/05/10/itunes-podcasting-specifications-changed-may-2012-what-that-means-for-podcasting/).
40
+ * Feed Episode Maximizer: Increase the number of episodes viewed on iTunes while decreasing the byte size of your feeds.
41
 
42
  = Integrated Media Players =
43
  Blubrry PowerPress includes extensive web player options to display your podcast audio and video in your web pages.
44
 
45
+ * 7 Audio Players: Pick from 7 audio players including [MediaElement.js](http://mediaelementjs.com/), [1 Pixel Out Player](http://wpaudioplayer.com/whatsnew) and HTML5 audio player.
46
+ * 4 Video Players: Pick between [MediaElement.js](http://mediaelementjs.com/), HTML5 video, Flow Player Classic Flash player or [VideoJS](http://wordpress.org/extend/plugins/videojs-html5-video-player-for-wordpress/).
47
+ * Position player above or below your post content.
48
+ * Place the player exactly where you want by adding the `[powerpress]` shortcode tag directly in your post content.
49
+ * Add video embeds from sites such as YouTube, Blip.tv and Ustream.tv.
50
+ * Provides download, play in new window, and embed links.
51
+ * Player formats supported: mp3, m4v, mp4, m4a, webm, ogg, ogv, oga, wma, mov, pdf, swf, avi, mpeg, epub and more.
52
 
53
  = Integrates with Blubrry's Services =
54
+ Make your life easier by adding our FREE or paid media hosting and statistics services to streamline your podcast productivity.
55
 
56
  * Quickly access your Blubrry media download statistics from your WordPress dashboard.
57
  * Publish Blubrry hosted media directly from your blog.
58
  * View Blubrry hosting usage quota from your blog.
59
  * Configure how Blubrry writes media (ID3) tags within PowerPress settings.
60
 
61
+ The Blubrry basic statistics service is FREE. Our [Premium Statistics Service](https://secure.blubrry.com/podcast-statistics-premium/), which includes [RawVoice Certified Statistics](http://create.blubrry.com/resources/podcast-media-download-statistics/rawvoice-certified/), U.S. downloads, trending and exporting, is available for $5 month. Blubrry [Media Hosting](https://secure.blubrry.com/podcast-publishing-premium-with-hosting/) packages start at $12.
62
 
63
  = Advanced Features =
64
  Want more? Check out the advanced features.
67
  * Media size and duration detection: Enter your media URL and let the PowerPress do the rest.
68
  * Category Casting: Add podcast support to your WordPress category feeds.
69
  * Custom Podcast Channels: Distribute multiple formats (audio/video) and versions (short/full length).
70
+ * *Taxonomy Podcasting: Create podcasts for your custom taxonomy tag names including WordPress Tags. (feature sponsored by [AfterBuzzTV.com](http://afterbuzztv.com/))
71
+ * *Post Type Podcasting: Create podcasts for your custom post types.
72
  * FeedBurner Support: Use FeedBurner.com to host your podcast feeds.
73
+ * **User Role Management: Control which users in your blog can podcast.
 
74
  * Diagnostics: Check to see if your server is configured to support all of the available features in PowerPress.
75
+ * WordPress MultiSite: Blubrry PowerPress is compatible with WordPress MultiSite.
76
 
77
+ *Custom Post Types and Taxonomies features require a separate plugin to manage custom post types and/or taxonomies.
78
 
79
+ **User Role Management requires a separate plugin to manage WordPress Roles and Capabilities.
80
 
81
+ = Migrating from PodPress? =
82
+ Switching to PowerPress is seamless, just enable PowerPress then disable PodPress and you're done! Switching plugins is that easy! Visit [Migrating from PodPress to PowerPress](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/migrating-from-podpress-to-powerpress/) for details.
 
 
 
83
 
84
  PowerPress will continue where plugin your old plugin left off by including your previously created episodes in your feeds and web pages.
85
 
86
+ Note: Advanced settings such as settings for podcast categories will need to be recreated in PowerPress.
87
 
88
  = Need Help? =
89
  . . . or have some ideas that could improve the plugin?
93
  * Blubrry [PowerPress Documentation](http://create.blubrry.com/resources/powerpress/)
94
  * Check out [The Podcasting Manual](http://create.blubrry.com/manual/) - everything you need to know about podcasting
95
 
96
+ = Need More Help? =
97
+ We now offer one-on-one consulting via Gotomeeting, Skype or phone.
98
+ [Learn more about Blubrry Consulting Services](http://create.blubrry.com/support/podcast-consulting-services/)
99
+
100
  *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.*
101
 
102
 
123
  You may however access your Blubrry Statistics from within your WordPress dashboard.
124
 
125
  = How do you insert the player within a blog post? =
126
+ You can insert the media player within your blog posts by using the WordPress shortcode feature. The shortcode for PowerPress is `[powerpress]` (all lowercase)
127
 
128
  You may use the shortcode to add a player to other media files (non episode files) by specifying the media url in the shortcode: [powerpress url="http://example.com/path/to/media.mp3"]
129
 
137
  = Will you be upgrading the version of Flow Player to 3.x? =
138
  Because of the feature restrictions and branding that FlowPlayer.org places on FlowPlayer 3.x versions, we do not plan on updating the player packaged with PowerPress. The **PAID open-source** FlowPlayer is not compatible with the **FREE open source** PowerPress plugin.
139
 
140
+ = The Media Player does not appear on my site? =
141
+ . . . or the RSS feed is invalid?
142
 
143
+ This can happen when there is a theme or plugin conflict. Please visit our [Diagnosing Feed and/or Player Issues](http://create.blubrry.com/resources/powerpress/using-powerpress/diagnosing-feed-andor-player-issues-with-powerpress/) for instructions how to resolve such issues.
144
 
145
 
146
  == Installation ==
147
+ = Pont and Click Installation =
148
+ 1. Sign into your blog, go to the plugins section and click 'Add New'.
149
+ 2. In the search box enter "PowerPress", then click 'Search'.
150
+ 3. Click the 'Install Now' link and proceed to install the plugin.
151
+ 4. Once installed, click 'Activate'.
152
+ 5. Configure your Blubrry PowerPress by going to the **Settings** > **Blubrry PowerPress** page.
153
+
154
+ = Manual Installation =
155
  To install Blubrry PowerPress manually, follow these steps:
156
+
157
  1. Copy the entire directory from the downloaded zip file into the /wp-content/plugins/ folder.
158
  2. Activate the "Blubrry PowerPress" plugin in the Plugin Management page.
159
  3. Configure your Blubrry PowerPress by going to the **Settings** > **Blubrry PowerPress** page.
173
  * 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.
174
  * Translation support is now complete. Please visit the following link if you would like to have a version in your language: [http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/translating-powerpress/](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/translating-powerpress/)
175
 
176
+
177
+ == 5.0 ==
178
+ * Released on 08/27/2013
179
+ * Advanced Mode added (Was an old feature in PowerPress 1.0 that was removed since 2.0, now it's back!)
180
+ * Default Mode with 3 Simple Steps added!
181
+ * Taxonomy Podcasting added (feature sponsored by [AfterBuzzTV.com](http://afterbuzztv.com/))
182
+ * Post Type Podcasting added
183
+ * MediaElement.js HTML5/CSS Audio and Video player added. You must have WordPress 3.6+ to use this player.
184
+ * Embed player will now use the MediaElement.js player when selected
185
+ * We now allow images that are 300x300 as the itunes image, but a warning is printed at the top of the page.
186
+ * Fixed bug where settings saved message did not always appear at the top of the pages.
187
+ * Added define `POWERPRESS_NO_PODCAST_FEED`, if set to true in wp-config, PowerPress will not add the default podcast feed with slug name 'podcast'. For users who exclusively want a page or category called 'podcast'. NOTE: There will be no podcast only feed provided by default when this define is set, use at your own risk.
188
+ * iTunes and RSS image settings moved to "Artwork" tab.
189
+ * New iTunes Episode image option added to both the Artwork tab as well as the Episode Entry Box (Thanks Robin Brinkler and Daniel Lewis for suggesting the features)
190
+ * jQuery based watermark replaced with HTML5 placeholder values, the jquery.watermark.js is no longer packaged with PowerPress.
191
+ * Fixed bug with *Feed Episode Maximizer* RSS <description> having the invalid characters when used with WordPRess 3.6.
192
+ * *Feed Episode Maximizer* is no longer experimental, we've successfully used the feature on a number of podcasts without issue for over a year now.
193
+ * Player width for audio and video can now use a percentage, ideal for resposive sites.
194
+ * player.js script is now always enqueued with other WordPress scripts. If you have player issues, please update your theme!
195
+ * Added link to settings from the plugins management screen, should help folks who are new to PowerPress find settings quickly.
196
+
197
+
198
  = 4.0.9 =
199
  * Releaesd on 6/20/2013
200
  * PowerPress 5.0 is coming! If you would like to beta test, please contact Angelo at cio [at] rawovice dot com. Beta testing starts when WordPress 3.6 is released, PowerPress 5.0 will utilize some new features in WordPress 3.6.
201
+ * The PowerPress Version Updates Survey results will be posted in the coming weeks. Based on user feedback, we will release minor updates within 7 days if necessary, major releases between 1-3 months apart, and new features will be included in the plugin but disabled by default.
202
  * Fixed logic for displaying statistics in dashboard to time out after 1 second (was previously 15 seconds) so if there's a network issue between the server and blubrry.com the dashboard still loads promptly. (Thanks Michael Hansen for bringing to our attention!)
203
  * Added new filter `powerpress_feed_auth` for other plugins to filter feed authentication. (Thanks amereservant for the feature suggestion!)
204
  * Added new define `POWERPRESS_AUTO_DETECT_ONCE`, edits to existing episodes will use the specify option if this define is set to true. (Thanks amereservant for the feature suggestion!)