Version Description
- Released on 7/23/2019
- Added new Apple categories announced in July. The new Apple Categories will be made available on Apple Podcasts mid August, 2019.
- Added Multi-program Blubrry Podcast Hosting, perfect for Category podcasting.
- Added Update Google PubSubHubbub, lets Google Podcasts and other podcast directory services when your podcast publishes new episodes.
- Added support for various languages to podcast as including "Thai" and "Vietnamese".
Download this release
Release Info
Developer | amandato |
Plugin | PowerPress Podcasting plugin by Blubrry |
Version | 7.5 |
Comparing to | |
See all releases |
Code changes from version 7.4.4 to 7.5
- css/admin.css +3 -0
- powerpress.php +3867 -3682
- powerpressadmin-basic.php +1646 -1639
- powerpressadmin-dashboard.php +454 -451
- powerpressadmin-editfeed.php +1377 -1197
- powerpressadmin-jquery.php +1089 -947
- powerpressadmin-metabox.php +1 -0
- powerpressadmin-notifications.php +25 -23
- powerpressadmin-ping-sites.php +38 -1
- powerpressadmin.php +83 -17
- readme.txt +490 -483
css/admin.css
CHANGED
@@ -471,4 +471,7 @@ a.pp-expand-section:visited {
|
|
471 |
background: #0D87E9;
|
472 |
border-color: #0D87E9;
|
473 |
color: #FFFFFF;
|
|
|
|
|
|
|
474 |
}
|
471 |
background: #0D87E9;
|
472 |
border-color: #0D87E9;
|
473 |
color: #FFFFFF;
|
474 |
+
}
|
475 |
+
.pp-form-error {
|
476 |
+
border: red solid 1px;
|
477 |
}
|
powerpress.php
CHANGED
@@ -1,3683 +1,3868 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Blubrry PowerPress
|
4 |
-
Plugin URI: http://create.blubrry.com/resources/powerpress/
|
5 |
-
Description: <a href="http://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
|
6 |
-
Version: 7.
|
7 |
-
Author: Blubrry
|
8 |
-
Author URI: http://www.blubrry.com/
|
9 |
-
Requires at least: 3.6
|
10 |
-
Tested up to: 5.2.2
|
11 |
-
Text Domain: powerpress
|
12 |
-
Change Log:
|
13 |
-
Please see readme.txt for detailed change log.
|
14 |
-
|
15 |
-
Contributors:
|
16 |
-
Angelo Mandato, CIO Blubrry - Plugin founder, architect and lead developer
|
17 |
-
See readme.txt for full list of contributors.
|
18 |
-
|
19 |
-
Credits:
|
20 |
-
getID3(), License: GPL 2.0+ by James Heinrich <info [at] getid3.org> http://www.getid3.org
|
21 |
-
Note: getid3.php analyze() function modified to prevent redundant filesize() function call.
|
22 |
-
|
23 |
-
Copyright 2008-2019 Blubrry (http://www.blubrry.com)
|
24 |
-
|
25 |
-
License: GPL (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
|
26 |
-
|
27 |
-
This project uses source that is GPL licensed.
|
28 |
-
*/
|
29 |
-
|
30 |
-
|
31 |
-
if( !function_exists('add_action') ) {
|
32 |
-
header( 'Status: 403 Forbidden' );
|
33 |
-
header( 'HTTP/1.1 403 Forbidden' );
|
34 |
-
exit();
|
35 |
-
}
|
36 |
-
|
37 |
-
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
38 |
-
define('POWERPRESS_VERSION', '7.
|
39 |
-
|
40 |
-
// Translation support:
|
41 |
-
if ( !defined('POWERPRESS_ABSPATH') )
|
42 |
-
define('POWERPRESS_ABSPATH', dirname(__FILE__) );
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
/////////////////////////////////////////////////////
|
47 |
-
// The following define options should be placed in your
|
48 |
-
// wp-config.php file so the setting is not disrupted when
|
49 |
-
// you upgrade the plugin.
|
50 |
-
/////////////////////////////////////////////////////
|
51 |
-
|
52 |
-
if( !defined('POWERPRESS_BLUBRRY_API_URL') )
|
53 |
-
define('POWERPRESS_BLUBRRY_API_URL', 'http://api.blubrry.com/');
|
54 |
-
|
55 |
-
// Replace validator service with one that is more reliable here:
|
56 |
-
define('POWERPRESS_FEEDVALIDATOR_URL', 'http://castfeedvalidator.com/?url=');
|
57 |
-
|
58 |
-
// Display custom play image for quicktime media. Applies to on page player only.
|
59 |
-
//define('POWERPRESS_PLAY_IMAGE', 'http://www.blubrry.com/themes/blubrry/images/player/PlayerBadge150x50NoBorder.jpg');
|
60 |
-
|
61 |
-
if( !defined('POWERPRESS_CONTENT_ACTION_PRIORITY') )
|
62 |
-
define('POWERPRESS_CONTENT_ACTION_PRIORITY', 10 );
|
63 |
-
|
64 |
-
// Added so administrators can customize what capability is needed for PowerPress
|
65 |
-
if( !defined('POWERPRESS_CAPABILITY_MANAGE_OPTIONS') )
|
66 |
-
define('POWERPRESS_CAPABILITY_MANAGE_OPTIONS', 'manage_options');
|
67 |
-
if( !defined('POWERPRESS_CAPABILITY_EDIT_PAGES') )
|
68 |
-
define('POWERPRESS_CAPABILITY_EDIT_PAGES', 'edit_pages');
|
69 |
-
|
70 |
-
//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://
|
71 |
-
|
72 |
-
// Define variables, advanced users could define these in their own wp-config.php so lets not try to re-define
|
73 |
-
if( !defined('POWERPRESS_LINK_SEPARATOR') )
|
74 |
-
define('POWERPRESS_LINK_SEPARATOR', '|');
|
75 |
-
if( !defined('POWERPRESS_TEXT_SEPARATOR') )
|
76 |
-
define('POWERPRESS_TEXT_SEPARATOR', ':');
|
77 |
-
if( !defined('POWERPRESS_PLAY_IMAGE') )
|
78 |
-
define('POWERPRESS_PLAY_IMAGE', 'play_video_default.jpg');
|
79 |
-
if( !defined('PHP_EOL') )
|
80 |
-
define('PHP_EOL', "\n"); // We need this variable defined for new lines.
|
81 |
-
if( defined('POWERPRESS_DEBUG') ) {
|
82 |
-
if( !defined('PHP_EOL_WEB') ) {
|
83 |
-
define('PHP_EOL_WEB', "\n"); // Helps with readability
|
84 |
-
}
|
85 |
-
} else {
|
86 |
-
if( !defined('PHP_EOL_WEB') ) {
|
87 |
-
define('PHP_EOL_WEB', ''); // We don't necessarily need new lines for web output
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
if( !defined('POWERPRESS_SUBSCRIBE') )
|
92 |
-
define('POWERPRESS_SUBSCRIBE', true);
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
if(
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
$GeneralSettings['custom_feeds']
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
//
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
$GeneralSettings['custom_feeds'][ $feed_slug ] = $
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
if( !isset($GeneralSettings['
|
240 |
-
|
241 |
-
if( !isset($GeneralSettings['
|
242 |
-
$GeneralSettings['
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
}
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
$new_window_width =
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
$new_window_height =
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
$
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
$Settings['title']
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
$Settings['feed_url'] =
|
454 |
-
else
|
455 |
-
$Settings['feed_url'] = get_category_feed_link(
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
}
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
}
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
$
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
echo 'mode="
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
if( !empty($powerpress_feed['
|
584 |
-
echo '
|
585 |
-
if( !empty($powerpress_feed['
|
586 |
-
echo '
|
587 |
-
if( !empty($powerpress_feed['
|
588 |
-
echo '
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
$feedComment =
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
}
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
echo "\t".'<itunes:summary
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
echo "\t
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
echo "\t
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
echo "\t".'<
|
664 |
-
}
|
665 |
-
|
666 |
-
if( !empty($Feed['
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
echo "\t".
|
693 |
-
echo "\t\t".'<
|
694 |
-
echo "\t\t".'<
|
695 |
-
echo "\t
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
echo "\t".'<
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
}
|
850 |
-
}
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
$
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
$
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
$
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
}
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
}
|
953 |
-
|
954 |
-
if(
|
955 |
-
|
956 |
-
}
|
957 |
-
|
958 |
-
if( !empty($
|
959 |
-
echo "\t
|
960 |
-
}
|
961 |
-
|
962 |
-
if( !empty($
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
}
|
969 |
-
|
970 |
-
if( $
|
971 |
-
echo "\t\t<itunes:
|
972 |
-
}
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
}
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
//
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
$
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
$
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
$
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
if(
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
}
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
if(
|
1414 |
-
{
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
}
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
$
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
{
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
if(
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
}
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
'
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
}
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
}
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
if(
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
}
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
if(
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
$
|
1813 |
-
$
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
$
|
1823 |
-
if( !empty($
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
$
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
if(
|
1891 |
-
|
1892 |
-
|
1893 |
-
$
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
$
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
$
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
if( !empty($
|
1943 |
-
$powerpress_feed['
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
if( $
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
$
|
2003 |
-
|
2004 |
-
|
2005 |
-
if(
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
if(
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
if(
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
}
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
{
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
}
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
add_filter('
|
2154 |
-
|
2155 |
-
|
2156 |
-
function
|
2157 |
-
{
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
}
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
function
|
2208 |
-
{
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
if(
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
}
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
$
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
case '
|
2404 |
-
|
2405 |
-
case '
|
2406 |
-
case '
|
2407 |
-
case '
|
2408 |
-
|
2409 |
-
|
2410 |
-
case '
|
2411 |
-
return '
|
2412 |
-
case '
|
2413 |
-
return '
|
2414 |
-
case '
|
2415 |
-
return '
|
2416 |
-
|
2417 |
-
|
2418 |
-
case '
|
2419 |
-
|
2420 |
-
|
2421 |
-
case '
|
2422 |
-
return '
|
2423 |
-
case '
|
2424 |
-
return '
|
2425 |
-
case '
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
case '
|
2438 |
-
case '
|
2439 |
-
return '
|
2440 |
-
case '
|
2441 |
-
|
2442 |
-
case '
|
2443 |
-
return '
|
2444 |
-
case '
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
$
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
$temp['
|
2514 |
-
$temp['
|
2515 |
-
$temp['
|
2516 |
-
$temp['
|
2517 |
-
|
2518 |
-
$temp['
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
$temp['
|
2529 |
-
$temp['
|
2530 |
-
$temp['
|
2531 |
-
$temp['
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
$temp['
|
2536 |
-
$temp['
|
2537 |
-
|
2538 |
-
|
2539 |
-
$temp['
|
2540 |
-
|
2541 |
-
|
2542 |
-
$temp['
|
2543 |
-
|
2544 |
-
|
2545 |
-
$temp['
|
2546 |
-
|
2547 |
-
|
2548 |
-
$temp['
|
2549 |
-
|
2550 |
-
|
2551 |
-
$temp['
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
|
2579 |
-
$temp['
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
$temp['
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
$temp['
|
2592 |
-
|
2593 |
-
$
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
|
2757 |
-
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
|
2836 |
-
$
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
//
|
2919 |
-
if(
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
|
2989 |
-
|
2990 |
-
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
{
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
$FeedSettings['
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
|
3091 |
-
|
3092 |
-
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
3168 |
-
|
3169 |
-
|
3170 |
-
|
3171 |
-
{
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
}
|
3197 |
-
|
3198 |
-
|
3199 |
-
}
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
|
3227 |
-
if(
|
3228 |
-
|
3229 |
-
|
3230 |
-
|
3231 |
-
|
3232 |
-
|
3233 |
-
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
|
3240 |
-
|
3241 |
-
|
3242 |
-
|
3243 |
-
|
3244 |
-
|
3245 |
-
|
3246 |
-
|
3247 |
-
|
3248 |
-
|
3249 |
-
|
3250 |
-
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
3260 |
-
|
3261 |
-
|
3262 |
-
|
3263 |
-
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
-
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
|
3294 |
-
|
3295 |
-
}
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
3300 |
-
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
3310 |
-
|
3311 |
-
|
3312 |
-
|
3313 |
-
|
3314 |
-
|
3315 |
-
|
3316 |
-
|
3317 |
-
|
3318 |
-
|
3319 |
-
|
3320 |
-
if(
|
3321 |
-
|
3322 |
-
|
3323 |
-
|
3324 |
-
|
3325 |
-
|
3326 |
-
|
3327 |
-
|
3328 |
-
|
3329 |
-
|
3330 |
-
|
3331 |
-
|
3332 |
-
|
3333 |
-
|
3334 |
-
|
3335 |
-
|
3336 |
-
|
3337 |
-
|
3338 |
-
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
3351 |
-
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
3355 |
-
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
-
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
3370 |
-
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
-
|
3379 |
-
|
3380 |
-
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
|
3385 |
-
|
3386 |
-
|
3387 |
-
|
3388 |
-
|
3389 |
-
|
3390 |
-
|
3391 |
-
|
3392 |
-
|
3393 |
-
|
3394 |
-
|
3395 |
-
|
3396 |
-
|
3397 |
-
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
3401 |
-
|
3402 |
-
|
3403 |
-
|
3404 |
-
|
3405 |
-
|
3406 |
-
|
3407 |
-
|
3408 |
-
|
3409 |
-
|
3410 |
-
|
3411 |
-
|
3412 |
-
|
3413 |
-
|
3414 |
-
|
3415 |
-
|
3416 |
-
|
3417 |
-
$
|
3418 |
-
|
3419 |
-
|
3420 |
-
|
3421 |
-
|
3422 |
-
|
3423 |
-
|
3424 |
-
|
3425 |
-
|
3426 |
-
|
3427 |
-
|
3428 |
-
|
3429 |
-
|
3430 |
-
|
3431 |
-
|
3432 |
-
if(
|
3433 |
-
|
3434 |
-
|
3435 |
-
|
3436 |
-
|
3437 |
-
|
3438 |
-
|
3439 |
-
|
3440 |
-
|
3441 |
-
|
3442 |
-
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
-
|
3448 |
-
|
3449 |
-
|
3450 |
-
|
3451 |
-
|
3452 |
-
|
3453 |
-
|
3454 |
-
|
3455 |
-
|
3456 |
-
|
3457 |
-
|
3458 |
-
|
3459 |
-
|
3460 |
-
|
3461 |
-
|
3462 |
-
|
3463 |
-
|
3464 |
-
if(
|
3465 |
-
|
3466 |
-
|
3467 |
-
|
3468 |
-
|
3469 |
-
|
3470 |
-
|
3471 |
-
|
3472 |
-
|
3473 |
-
|
3474 |
-
|
3475 |
-
|
3476 |
-
|
3477 |
-
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
3482 |
-
|
3483 |
-
|
3484 |
-
|
3485 |
-
|
3486 |
-
|
3487 |
-
|
3488 |
-
|
3489 |
-
|
3490 |
-
|
3491 |
-
|
3492 |
-
|
3493 |
-
|
3494 |
-
|
3495 |
-
|
3496 |
-
|
3497 |
-
|
3498 |
-
|
3499 |
-
return $
|
3500 |
-
}
|
3501 |
-
|
3502 |
-
function
|
3503 |
-
{
|
3504 |
-
|
3505 |
-
|
3506 |
-
$
|
3507 |
-
|
3508 |
-
|
3509 |
-
|
3510 |
-
|
3511 |
-
|
3512 |
-
|
3513 |
-
|
3514 |
-
|
3515 |
-
|
3516 |
-
|
3517 |
-
|
3518 |
-
|
3519 |
-
|
3520 |
-
|
3521 |
-
|
3522 |
-
$
|
3523 |
-
|
3524 |
-
|
3525 |
-
|
3526 |
-
|
3527 |
-
|
3528 |
-
|
3529 |
-
|
3530 |
-
|
3531 |
-
|
3532 |
-
|
3533 |
-
|
3534 |
-
|
3535 |
-
|
3536 |
-
|
3537 |
-
|
3538 |
-
|
3539 |
-
|
3540 |
-
|
3541 |
-
|
3542 |
-
|
3543 |
-
|
3544 |
-
|
3545 |
-
|
3546 |
-
|
3547 |
-
|
3548 |
-
|
3549 |
-
|
3550 |
-
|
3551 |
-
|
3552 |
-
|
3553 |
-
|
3554 |
-
|
3555 |
-
|
3556 |
-
$
|
3557 |
-
|
3558 |
-
|
3559 |
-
$
|
3560 |
-
|
3561 |
-
|
3562 |
-
|
3563 |
-
|
3564 |
-
|
3565 |
-
|
3566 |
-
|
3567 |
-
|
3568 |
-
|
3569 |
-
|
3570 |
-
|
3571 |
-
|
3572 |
-
return
|
3573 |
-
}
|
3574 |
-
|
3575 |
-
function
|
3576 |
-
{
|
3577 |
-
|
3578 |
-
|
3579 |
-
|
3580 |
-
|
3581 |
-
|
3582 |
-
|
3583 |
-
|
3584 |
-
|
3585 |
-
|
3586 |
-
|
3587 |
-
|
3588 |
-
|
3589 |
-
|
3590 |
-
$
|
3591 |
-
|
3592 |
-
|
3593 |
-
|
3594 |
-
|
3595 |
-
|
3596 |
-
|
3597 |
-
|
3598 |
-
|
3599 |
-
|
3600 |
-
|
3601 |
-
|
3602 |
-
$
|
3603 |
-
|
3604 |
-
|
3605 |
-
|
3606 |
-
|
3607 |
-
|
3608 |
-
|
3609 |
-
|
3610 |
-
|
3611 |
-
|
3612 |
-
|
3613 |
-
|
3614 |
-
|
3615 |
-
|
3616 |
-
|
3617 |
-
|
3618 |
-
|
3619 |
-
|
3620 |
-
|
3621 |
-
|
3622 |
-
|
3623 |
-
|
3624 |
-
|
3625 |
-
|
3626 |
-
|
3627 |
-
|
3628 |
-
|
3629 |
-
|
3630 |
-
|
3631 |
-
|
3632 |
-
|
3633 |
-
|
3634 |
-
|
3635 |
-
}
|
3636 |
-
|
3637 |
-
|
3638 |
-
|
3639 |
-
|
3640 |
-
|
3641 |
-
|
3642 |
-
|
3643 |
-
|
3644 |
-
|
3645 |
-
|
3646 |
-
|
3647 |
-
|
3648 |
-
|
3649 |
-
if(
|
3650 |
-
|
3651 |
-
|
3652 |
-
|
3653 |
-
|
3654 |
-
|
3655 |
-
|
3656 |
-
|
3657 |
-
|
3658 |
-
|
3659 |
-
|
3660 |
-
|
3661 |
-
|
3662 |
-
|
3663 |
-
|
3664 |
-
|
3665 |
-
|
3666 |
-
|
3667 |
-
|
3668 |
-
|
3669 |
-
|
3670 |
-
|
3671 |
-
|
3672 |
-
|
3673 |
-
|
3674 |
-
|
3675 |
-
|
3676 |
-
|
3677 |
-
|
3678 |
-
|
3679 |
-
|
3680 |
-
|
3681 |
-
|
3682 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3683 |
// eof
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Blubrry PowerPress
|
4 |
+
Plugin URI: http://create.blubrry.com/resources/powerpress/
|
5 |
+
Description: <a href="http://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
|
6 |
+
Version: 7.5
|
7 |
+
Author: Blubrry
|
8 |
+
Author URI: http://www.blubrry.com/
|
9 |
+
Requires at least: 3.6
|
10 |
+
Tested up to: 5.2.2
|
11 |
+
Text Domain: powerpress
|
12 |
+
Change Log:
|
13 |
+
Please see readme.txt for detailed change log.
|
14 |
+
|
15 |
+
Contributors:
|
16 |
+
Angelo Mandato, CIO Blubrry - Plugin founder, architect and lead developer
|
17 |
+
See readme.txt for full list of contributors.
|
18 |
+
|
19 |
+
Credits:
|
20 |
+
getID3(), License: GPL 2.0+ by James Heinrich <info [at] getid3.org> http://www.getid3.org
|
21 |
+
Note: getid3.php analyze() function modified to prevent redundant filesize() function call.
|
22 |
+
|
23 |
+
Copyright 2008-2019 Blubrry (http://www.blubrry.com)
|
24 |
+
|
25 |
+
License: GPL (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
|
26 |
+
|
27 |
+
This project uses source that is GPL licensed.
|
28 |
+
*/
|
29 |
+
|
30 |
+
|
31 |
+
if( !function_exists('add_action') ) {
|
32 |
+
header( 'Status: 403 Forbidden' );
|
33 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
34 |
+
exit();
|
35 |
+
}
|
36 |
+
|
37 |
+
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
38 |
+
define('POWERPRESS_VERSION', '7.5' );
|
39 |
+
|
40 |
+
// Translation support:
|
41 |
+
if ( !defined('POWERPRESS_ABSPATH') )
|
42 |
+
define('POWERPRESS_ABSPATH', dirname(__FILE__) );
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
/////////////////////////////////////////////////////
|
47 |
+
// The following define options should be placed in your
|
48 |
+
// wp-config.php file so the setting is not disrupted when
|
49 |
+
// you upgrade the plugin.
|
50 |
+
/////////////////////////////////////////////////////
|
51 |
+
|
52 |
+
if( !defined('POWERPRESS_BLUBRRY_API_URL') )
|
53 |
+
define('POWERPRESS_BLUBRRY_API_URL', 'http://api.blubrry.com/');
|
54 |
+
|
55 |
+
// Replace validator service with one that is more reliable here:
|
56 |
+
define('POWERPRESS_FEEDVALIDATOR_URL', 'http://castfeedvalidator.com/?url=');
|
57 |
+
|
58 |
+
// Display custom play image for quicktime media. Applies to on page player only.
|
59 |
+
//define('POWERPRESS_PLAY_IMAGE', 'http://www.blubrry.com/themes/blubrry/images/player/PlayerBadge150x50NoBorder.jpg');
|
60 |
+
|
61 |
+
if( !defined('POWERPRESS_CONTENT_ACTION_PRIORITY') )
|
62 |
+
define('POWERPRESS_CONTENT_ACTION_PRIORITY', 10 );
|
63 |
+
|
64 |
+
// Added so administrators can customize what capability is needed for PowerPress
|
65 |
+
if( !defined('POWERPRESS_CAPABILITY_MANAGE_OPTIONS') )
|
66 |
+
define('POWERPRESS_CAPABILITY_MANAGE_OPTIONS', 'manage_options');
|
67 |
+
if( !defined('POWERPRESS_CAPABILITY_EDIT_PAGES') )
|
68 |
+
define('POWERPRESS_CAPABILITY_EDIT_PAGES', 'edit_pages');
|
69 |
+
|
70 |
+
//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://
|
71 |
+
|
72 |
+
// Define variables, advanced users could define these in their own wp-config.php so lets not try to re-define
|
73 |
+
if( !defined('POWERPRESS_LINK_SEPARATOR') )
|
74 |
+
define('POWERPRESS_LINK_SEPARATOR', '|');
|
75 |
+
if( !defined('POWERPRESS_TEXT_SEPARATOR') )
|
76 |
+
define('POWERPRESS_TEXT_SEPARATOR', ':');
|
77 |
+
if( !defined('POWERPRESS_PLAY_IMAGE') )
|
78 |
+
define('POWERPRESS_PLAY_IMAGE', 'play_video_default.jpg');
|
79 |
+
if( !defined('PHP_EOL') )
|
80 |
+
define('PHP_EOL', "\n"); // We need this variable defined for new lines.
|
81 |
+
if( defined('POWERPRESS_DEBUG') ) {
|
82 |
+
if( !defined('PHP_EOL_WEB') ) {
|
83 |
+
define('PHP_EOL_WEB', "\n"); // Helps with readability
|
84 |
+
}
|
85 |
+
} else {
|
86 |
+
if( !defined('PHP_EOL_WEB') ) {
|
87 |
+
define('PHP_EOL_WEB', ''); // We don't necessarily need new lines for web output
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
if( !defined('POWERPRESS_SUBSCRIBE') )
|
92 |
+
define('POWERPRESS_SUBSCRIBE', true);
|
93 |
+
if(!defined('POWERPRESS_NEW_APPLE_CATEGORIES')) {
|
94 |
+
define('POWERPRESS_NEW_APPLE_CATEGORIES', true);
|
95 |
+
}
|
96 |
+
// Set regular expression values for determining mobile devices
|
97 |
+
if( !defined('POWERPRESS_MOBILE_REGEX') )
|
98 |
+
define('POWERPRESS_MOBILE_REGEX', 'iphone|ipod|ipad|aspen|android|blackberry|opera mini|webos|incognito|webmate|silk');
|
99 |
+
|
100 |
+
$powerpress_feed = NULL; // DO NOT CHANGE
|
101 |
+
|
102 |
+
function powerpress_content($content)
|
103 |
+
{
|
104 |
+
global $post, $g_powerpress_excerpt_post_id;
|
105 |
+
|
106 |
+
if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
|
107 |
+
return $content;
|
108 |
+
|
109 |
+
if( empty($post->ID) || !is_object($post) )
|
110 |
+
return $content;
|
111 |
+
|
112 |
+
if( defined('POWERPRESS_DO_ENCLOSE_FIX') )
|
113 |
+
$content = preg_replace('/\<!--.*added by PowerPress.*-->/im', '', $content );
|
114 |
+
|
115 |
+
if( is_feed() )
|
116 |
+
return $content; // We don't want to do anything to the feed
|
117 |
+
|
118 |
+
if( function_exists('post_password_required') )
|
119 |
+
{
|
120 |
+
if( post_password_required($post) )
|
121 |
+
return $content;
|
122 |
+
}
|
123 |
+
|
124 |
+
// PowerPress settings:
|
125 |
+
$GeneralSettings = get_option('powerpress_general');
|
126 |
+
|
127 |
+
// No player or links to add to content...
|
128 |
+
if( !empty($GeneralSettings['disable_appearance']) )
|
129 |
+
return $content;
|
130 |
+
|
131 |
+
// check for themes/plugins where we know we need to do this...
|
132 |
+
if( empty($GeneralSettings['player_aggressive']) )
|
133 |
+
{
|
134 |
+
if( !empty($GLOBALS['fb_ver']) && version_compare($GLOBALS['fb_ver'], '1.0', '<=') ) {
|
135 |
+
$GeneralSettings['player_aggressive'] = 1;
|
136 |
+
}
|
137 |
+
if( defined('JETPACK__VERSION') && version_compare(JETPACK__VERSION, '2.0', '>=') ) {
|
138 |
+
$GeneralSettings['player_aggressive'] = 1; // Jet pack still doesn't behave with PowerPress the_content
|
139 |
+
}
|
140 |
+
if( defined('WPSEO_VERSION') ) {
|
141 |
+
$GeneralSettings['player_aggressive'] = 4;
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
if( !empty($GeneralSettings['player_aggressive']) )
|
146 |
+
{
|
147 |
+
if( $GeneralSettings['player_aggressive'] == 4 )
|
148 |
+
{
|
149 |
+
$in_http_head = powerpress_in_wp_head();
|
150 |
+
if( $in_http_head === true )
|
151 |
+
return $content;
|
152 |
+
}
|
153 |
+
else if( $GeneralSettings['player_aggressive'] == 2 ) // If we do not have theme issues then lets keep this logic clean. and only display playes after the wp_head only
|
154 |
+
{
|
155 |
+
if( empty($GLOBALS['powerpress_wp_head_completed']) )
|
156 |
+
return $content;
|
157 |
+
}
|
158 |
+
else // method 1 or 3...
|
159 |
+
{
|
160 |
+
if( strstr($content, '<!--powerpress_player-->') !== false )
|
161 |
+
return $content; // The players were already added to the content
|
162 |
+
|
163 |
+
if( $GeneralSettings['player_aggressive'] != 3 && $g_powerpress_excerpt_post_id > 0 )
|
164 |
+
$g_powerpress_excerpt_post_id = 0; // Hack, set this to zero so it always goes past...
|
165 |
+
|
166 |
+
if( $GeneralSettings['player_aggressive'] == 3 )
|
167 |
+
$GeneralSettings['player_aggressive'] = 1; // remainder of the system will function as normal
|
168 |
+
}
|
169 |
+
}
|
170 |
+
|
171 |
+
// Problem: If the_excerpt is used instead of the_content, both the_exerpt and the_content will be called here.
|
172 |
+
// Important to note, get_the_excerpt will be called before the_content is called, so we add a simple little hack
|
173 |
+
if( current_filter() == 'get_the_excerpt' )
|
174 |
+
{
|
175 |
+
$g_powerpress_excerpt_post_id = $post->ID;
|
176 |
+
return $content; // We don't want to do anything to this content yet...
|
177 |
+
}
|
178 |
+
else if( current_filter() == 'the_content' && $g_powerpress_excerpt_post_id == $post->ID )
|
179 |
+
{
|
180 |
+
return $content; // We don't want to do anything to this excerpt content in this call either...
|
181 |
+
}
|
182 |
+
else if( class_exists('custom_post_widget') && powerpress_in_custom_post_widget() )
|
183 |
+
{
|
184 |
+
return $content; // Custom Post Widget compatibility
|
185 |
+
}
|
186 |
+
|
187 |
+
|
188 |
+
if( !isset($GeneralSettings['custom_feeds']) )
|
189 |
+
$GeneralSettings['custom_feeds'] = array('podcast'=>'Default Podcast Feed');
|
190 |
+
if( empty($GeneralSettings['custom_feeds']['podcast']) )
|
191 |
+
$GeneralSettings['custom_feeds']['podcast'] = 'Default Podcast Feed';
|
192 |
+
|
193 |
+
// Re-order so the default podcast episode is the top most...
|
194 |
+
$Temp = $GeneralSettings['custom_feeds'];
|
195 |
+
$GeneralSettings['custom_feeds'] = array();
|
196 |
+
$GeneralSettings['custom_feeds']['podcast'] = 'Default Podcast Feed';
|
197 |
+
foreach( $Temp as $feed_slug=> $feed_title )
|
198 |
+
{
|
199 |
+
if( $feed_slug == 'podcast' )
|
200 |
+
continue;
|
201 |
+
$GeneralSettings['custom_feeds'][ $feed_slug ] = $feed_title;
|
202 |
+
}
|
203 |
+
|
204 |
+
// Handle post type feeds....
|
205 |
+
if( !empty($GeneralSettings['posttype_podcasting']) )
|
206 |
+
{
|
207 |
+
$post_type = get_query_var('post_type');
|
208 |
+
if ( is_array( $post_type ) ) {
|
209 |
+
$post_type = reset( $post_type ); // get first element in array
|
210 |
+
}
|
211 |
+
|
212 |
+
// Get the feed slugs and titles for this post type
|
213 |
+
$PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
|
214 |
+
// Loop through this array of post type settings...
|
215 |
+
if( !empty($PostTypeSettingsArray) )
|
216 |
+
{
|
217 |
+
switch($post_type)
|
218 |
+
{
|
219 |
+
case 'post':
|
220 |
+
case 'page': {
|
221 |
+
// Do nothing!, we want the default podcast to appear in these post types
|
222 |
+
}; break;
|
223 |
+
default: {
|
224 |
+
if( !empty($post_type) && empty($PostTypeSettingsArray['podcast']) )
|
225 |
+
unset($GeneralSettings['custom_feeds']['podcast']); // special case, we do not want an accidental podcast episode to appear in a custom post type if the feature is enabled
|
226 |
+
}; break;
|
227 |
+
}
|
228 |
+
|
229 |
+
foreach( $PostTypeSettingsArray as $feed_slug=> $postTypeSettings )
|
230 |
+
{
|
231 |
+
if( !empty( $postTypeSettings['title']) )
|
232 |
+
$GeneralSettings['custom_feeds'][ $feed_slug ] = $postTypeSettings['title'];
|
233 |
+
else
|
234 |
+
$GeneralSettings['custom_feeds'][ $feed_slug ] = $feed_slug;
|
235 |
+
}
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
if( !isset($GeneralSettings['display_player']) )
|
240 |
+
$GeneralSettings['display_player'] = 1;
|
241 |
+
if( !isset($GeneralSettings['player_function']) )
|
242 |
+
$GeneralSettings['player_function'] = 1;
|
243 |
+
if( !isset($GeneralSettings['podcast_link']) )
|
244 |
+
$GeneralSettings['podcast_link'] = 1;
|
245 |
+
|
246 |
+
// The blog owner doesn't want anything displayed, so don't bother wasting anymore CPU cycles
|
247 |
+
if( $GeneralSettings['display_player'] == 0 )
|
248 |
+
return $content;
|
249 |
+
|
250 |
+
if( current_filter() == 'the_excerpt' && empty($GeneralSettings['display_player_excerpt']) )
|
251 |
+
return $content; // We didn't want to modify this since the user didn't enable it for excerpts
|
252 |
+
|
253 |
+
if( !empty($GeneralSettings['hide_player_more']) && strstr($content, 'class="more-link"') )
|
254 |
+
return $content; // We do not want to add players and links if the read-more class found
|
255 |
+
|
256 |
+
// Figure out which players are alerady in the body of the page...
|
257 |
+
$ExcludePlayers = array();
|
258 |
+
if( isset($GeneralSettings['disable_player']) )
|
259 |
+
$ExcludePlayers = $GeneralSettings['disable_player']; // automatically disable the players configured
|
260 |
+
|
261 |
+
if( !empty($GeneralSettings['process_podpress']) && strstr($content, '[display_podcast]') )
|
262 |
+
return $content;
|
263 |
+
|
264 |
+
if( preg_match_all('/(.?)\[(powerpress)\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)/s', $content, $matches) )
|
265 |
+
{
|
266 |
+
if( isset($matches[3]) )
|
267 |
+
{
|
268 |
+
foreach( $matches[3] as $key=> $row )
|
269 |
+
{
|
270 |
+
$attributes = shortcode_parse_atts($row);
|
271 |
+
if( isset($attributes['url']) )
|
272 |
+
{
|
273 |
+
// not a problem...
|
274 |
+
}
|
275 |
+
else if( isset($attributes['feed']) )
|
276 |
+
{
|
277 |
+
// we want to exclude this feed from the links aera...
|
278 |
+
$ExcludePlayers[ $attributes['feed'] ] = true;
|
279 |
+
}
|
280 |
+
else
|
281 |
+
{
|
282 |
+
// we don't want to include any players below...
|
283 |
+
$ExcludePlayers = $GeneralSettings['custom_feeds'];
|
284 |
+
}
|
285 |
+
}
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
// LOOP HERE TO DISPLAY EACH MEDIA TYPE
|
290 |
+
$new_content = '';
|
291 |
+
foreach( $GeneralSettings['custom_feeds'] as $feed_slug=> $feed_title )
|
292 |
+
{
|
293 |
+
// Get the enclosure data
|
294 |
+
$EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
|
295 |
+
|
296 |
+
if( !$EpisodeData && !empty($GeneralSettings['process_podpress']) && $feed_slug == 'podcast' )
|
297 |
+
$EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
|
298 |
+
|
299 |
+
if( !$EpisodeData || !$EpisodeData['url'] )
|
300 |
+
continue;
|
301 |
+
|
302 |
+
// Just in case, if there's no URL lets escape!
|
303 |
+
if( !$EpisodeData['url'] )
|
304 |
+
continue;
|
305 |
+
|
306 |
+
// If the player is not already inserted in the body of the post using the shortcode...
|
307 |
+
//if( preg_match('/\[powerpress(.*)\]/is', $content) == 0 )
|
308 |
+
if( !isset($ExcludePlayers[ $feed_slug ]) ) // If the player is not in our exclude list because it's already in the post body somewhere...
|
309 |
+
{
|
310 |
+
if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($feed_slug) )
|
311 |
+
{
|
312 |
+
$new_content .= powerpress_premium_content_message($post->ID, $feed_slug, $EpisodeData);
|
313 |
+
}
|
314 |
+
else
|
315 |
+
{
|
316 |
+
if( $GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0 ) // Play in new window only or disabled
|
317 |
+
{
|
318 |
+
do_action('wp_powerpress_player_scripts');
|
319 |
+
$AddDefaultPlayer = empty($EpisodeData['no_player']);
|
320 |
+
|
321 |
+
if( $EpisodeData && !empty($EpisodeData['embed']) )
|
322 |
+
{
|
323 |
+
$new_content .= trim($EpisodeData['embed']);
|
324 |
+
if( !empty($GeneralSettings['embed_replace_player']) )
|
325 |
+
$AddDefaultPlayer = false;
|
326 |
+
}
|
327 |
+
|
328 |
+
if( $AddDefaultPlayer )
|
329 |
+
{
|
330 |
+
$image = '';
|
331 |
+
if( isset($EpisodeData['image']) && $EpisodeData['image'] != '' )
|
332 |
+
$image = $EpisodeData['image'];
|
333 |
+
|
334 |
+
$new_content .= apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
335 |
+
}
|
336 |
+
}
|
337 |
+
|
338 |
+
if( !isset($EpisodeData['no_links']) ) {
|
339 |
+
do_action('wp_powerpress_player_scripts');
|
340 |
+
$new_content .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
341 |
+
$new_content .= apply_filters('powerpress_player_subscribe_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
342 |
+
}
|
343 |
+
}
|
344 |
+
}
|
345 |
+
}
|
346 |
+
|
347 |
+
if( $new_content == '' )
|
348 |
+
return $content;
|
349 |
+
|
350 |
+
switch( $GeneralSettings['display_player'] )
|
351 |
+
{
|
352 |
+
case 1: { // Below posts
|
353 |
+
return $content.$new_content.( !empty($GeneralSettings['player_aggressive']) && $GeneralSettings['player_aggressive'] == 1 ?'<!--powerpress_player-->':'');
|
354 |
+
}; break;
|
355 |
+
case 2: { // Above posts
|
356 |
+
return ( !empty($GeneralSettings['player_aggressive']) && $GeneralSettings['player_aggressive'] == 1 ?'<!--powerpress_player-->':'').$new_content.$content;
|
357 |
+
}; break;
|
358 |
+
}
|
359 |
+
return $content;
|
360 |
+
}//end function
|
361 |
+
|
362 |
+
|
363 |
+
add_filter('get_the_excerpt', 'powerpress_content', (POWERPRESS_CONTENT_ACTION_PRIORITY - 1) );
|
364 |
+
add_filter('the_content', 'powerpress_content', POWERPRESS_CONTENT_ACTION_PRIORITY);
|
365 |
+
if( !defined('POWERPRESS_NO_THE_EXCERPT') )
|
366 |
+
add_filter('the_excerpt', 'powerpress_content', POWERPRESS_CONTENT_ACTION_PRIORITY);
|
367 |
+
|
368 |
+
|
369 |
+
/* Specail case fix Yoast bug which messes up the HTML */
|
370 |
+
function powerpress_yoast_gawp_fix($content)
|
371 |
+
{
|
372 |
+
$content= preg_replace(
|
373 |
+
array('/return powerpress\_pinw\(\"/', '/return powerpress\_embed\_winplayer\(\"/', '/return powerpress\_show\_embed\(\"/', '/return powerpress\_embed\_html5v\(\"/', '/return powerpress\_embed\_html5a\(\"/', ),
|
374 |
+
array('return powerpress_pinw(\'', 'return powerpress_embed_winplayer(\'', 'return powerpress_show_embed(\'', 'return powerpress_embed_html5v(\'', 'return powerpress_embed_html5a(\'' ),
|
375 |
+
$content);
|
376 |
+
|
377 |
+
return $content;
|
378 |
+
}
|
379 |
+
|
380 |
+
function powerpress_header()
|
381 |
+
{
|
382 |
+
// PowerPress settings:
|
383 |
+
$Powerpress = get_option('powerpress_general');
|
384 |
+
if( !isset($Powerpress['custom_feeds']) )
|
385 |
+
$Powerpress['custom_feeds'] = array('podcast'=>'Default Podcast Feed');
|
386 |
+
|
387 |
+
if( empty($Powerpress['disable_appearance']) || $Powerpress['disable_appearance'] == false )
|
388 |
+
{
|
389 |
+
if( !isset($Powerpress['player_function']) || $Powerpress['player_function'] > 0 ) // Don't include the player in the header if it is not needed...
|
390 |
+
{
|
391 |
+
$PowerpressPluginURL = powerpress_get_root_url();
|
392 |
+
?>
|
393 |
+
<script type="text/javascript"><!--
|
394 |
+
<?php
|
395 |
+
$new_window_width = 420;
|
396 |
+
$new_window_height = 240;
|
397 |
+
|
398 |
+
if( isset($Powerpress['new_window_width']) && $Powerpress['new_window_width'] > 0 )
|
399 |
+
$new_window_width = $Powerpress['new_window_width'];
|
400 |
+
else if( isset($Powerpress['new_window_width']) )
|
401 |
+
$new_window_width = 420;
|
402 |
+
|
403 |
+
if( isset($Powerpress['new_window_height']) && $Powerpress['new_window_height'] > 0 )
|
404 |
+
$new_window_height = $Powerpress['new_window_height'];
|
405 |
+
else if( isset($Powerpress['new_window_height']) )
|
406 |
+
$new_window_height = 240;
|
407 |
+
|
408 |
+
if( empty($Powerpress['new_window_nofactor']) )
|
409 |
+
{
|
410 |
+
$new_window_width += 40;
|
411 |
+
$new_window_height += 80;
|
412 |
+
}
|
413 |
+
|
414 |
+
?>
|
415 |
+
function powerpress_pinw(pinw_url){window.open(pinw_url, 'PowerPressPlayer','toolbar=0,status=0,resizable=1,width=<?php echo ($new_window_width); ?>,height=<?php echo ($new_window_height); ?>'); return false;}
|
416 |
+
//-->
|
417 |
+
</script>
|
418 |
+
<?php
|
419 |
+
}
|
420 |
+
}
|
421 |
+
|
422 |
+
if( !empty($Powerpress['feed_links']) )
|
423 |
+
{
|
424 |
+
if( is_home() ) {
|
425 |
+
$feed_slug = 'podcast';
|
426 |
+
$href = get_feed_link($feed_slug);
|
427 |
+
// Podcast default and channel feed settings
|
428 |
+
$Settings = get_option('powerpress_feed_'. $feed_slug);
|
429 |
+
|
430 |
+
if( empty($Settings) && $feed_slug == 'podcast' )
|
431 |
+
$Settings = get_option('powerpress_feed'); // Get the main feed settings
|
432 |
+
|
433 |
+
if( empty($Settings['title']) )
|
434 |
+
$Settings['title'] = get_bloginfo_rss('name'); // Get blog title
|
435 |
+
|
436 |
+
// Get the default podcast feed...
|
437 |
+
echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( $Settings['title'] ) . '" href="' . esc_url( $href ) . '" />' . "\n";
|
438 |
+
} else if( is_category() ) {
|
439 |
+
|
440 |
+
$category_id = get_query_var('cat');
|
441 |
+
if( $category_id ) {
|
442 |
+
$Settings = get_option('powerpress_cat_feed_'.$category_id );
|
443 |
+
if( empty($Settings['title']) ) {
|
444 |
+
$Settings['title'] = get_cat_name( $category_id ); // Get category title
|
445 |
+
$Settings['title'] .= ' '. apply_filters( 'document_title_separator', '-' ) .' ';
|
446 |
+
$Settings['title'] .= get_bloginfo_rss('name');
|
447 |
+
}
|
448 |
+
if( empty($Settings['title']) ) {
|
449 |
+
$Settings['title'] = get_bloginfo_rss('name'); // Get blog title, best we can do
|
450 |
+
}
|
451 |
+
|
452 |
+
if( !empty($Settings['feed_redirect_url']) )
|
453 |
+
$Settings['feed_url'] = $Settings['feed_redirect_url'];
|
454 |
+
else if( !empty($General['cat_casting_podcast_feeds']) )
|
455 |
+
$Settings['feed_url'] = get_category_feed_link($category_id, 'podcast');
|
456 |
+
else
|
457 |
+
$Settings['feed_url'] = get_category_feed_link( $category_id ); // Get category feed URL
|
458 |
+
|
459 |
+
// Get the category podcast feed...
|
460 |
+
echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( $Settings['title'] ) . '" href="' . esc_url( $Settings['feed_url'] ) . '" />' . "\n";
|
461 |
+
}
|
462 |
+
}
|
463 |
+
}
|
464 |
+
}
|
465 |
+
|
466 |
+
add_action('wp_head', 'powerpress_header');
|
467 |
+
|
468 |
+
function powerpress_wp_head_completed()
|
469 |
+
{
|
470 |
+
$GLOBALS['powerpress_wp_head_completed'] = true;
|
471 |
+
}
|
472 |
+
|
473 |
+
add_action('wp_head', 'powerpress_wp_head_completed', 100000);
|
474 |
+
|
475 |
+
function powerpress_exit_on_http_head($return)
|
476 |
+
{
|
477 |
+
if( is_feed() )
|
478 |
+
{
|
479 |
+
// Set the content type for HTTP headers...
|
480 |
+
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
|
481 |
+
|
482 |
+
// Needs authentication?
|
483 |
+
$GeneralSettings = get_option('powerpress_general');
|
484 |
+
if( !empty($GeneralSettings['premium_caps']) )
|
485 |
+
{
|
486 |
+
$feed_slug = get_query_var('feed');
|
487 |
+
$FeedSettings = get_option('powerpress_feed_'.$feed_slug);
|
488 |
+
if( !empty($FeedSettings['premium']) )
|
489 |
+
{
|
490 |
+
return false; // Let the logic further into PowerPress authenticate this HEAD request
|
491 |
+
}
|
492 |
+
}
|
493 |
+
}
|
494 |
+
return $return;
|
495 |
+
}
|
496 |
+
|
497 |
+
add_filter('exit_on_http_head', 'powerpress_exit_on_http_head' );
|
498 |
+
|
499 |
+
function powerpress_rss2_ns()
|
500 |
+
{
|
501 |
+
if( !powerpress_is_podcast_feed() )
|
502 |
+
return;
|
503 |
+
|
504 |
+
// Okay, lets add the namespace
|
505 |
+
echo 'xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"'.PHP_EOL;
|
506 |
+
if( !defined('POWERPRESS_RAWVOICE_RSS') || POWERPRESS_RAWVOICE_RSS != false )
|
507 |
+
{
|
508 |
+
echo 'xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"'.PHP_EOL;
|
509 |
+
}
|
510 |
+
if( !defined('POWERPRESS_GOOGLEPLAY_RSS') || POWERPRESS_GOOGLEPLAY_RSS != false )
|
511 |
+
{
|
512 |
+
echo 'xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"'.PHP_EOL;
|
513 |
+
//echo 'xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0/play-podcasts.xsd"'.PHP_EOL;
|
514 |
+
}
|
515 |
+
}
|
516 |
+
|
517 |
+
add_action('rss2_ns', 'powerpress_rss2_ns');
|
518 |
+
add_action('rss2_ns_powerpress', 'powerpress_rss2_ns');
|
519 |
+
|
520 |
+
function powerpress_rss2_head()
|
521 |
+
{
|
522 |
+
global $powerpress_feed;
|
523 |
+
|
524 |
+
if( !powerpress_is_podcast_feed() )
|
525 |
+
return; // Not a feed we manage
|
526 |
+
|
527 |
+
$feed_slug = get_query_var( 'feed' );
|
528 |
+
$cat_ID = get_query_var('cat');
|
529 |
+
|
530 |
+
$Feed = get_option('powerpress_feed'); // Get the main feed settings
|
531 |
+
if( !empty($powerpress_feed['category']) )
|
532 |
+
{
|
533 |
+
$CustomFeed = get_option('powerpress_cat_feed_'.$powerpress_feed['category']); // Get the custom podcast feed settings saved in the database
|
534 |
+
if( $CustomFeed )
|
535 |
+
$Feed = powerpress_merge_empty_feed_settings($CustomFeed, $Feed);
|
536 |
+
}
|
537 |
+
else if( !empty($powerpress_feed['term_taxonomy_id']) )
|
538 |
+
{
|
539 |
+
$CustomFeed = get_option('powerpress_taxonomy_'.$powerpress_feed['term_taxonomy_id']); // Get the taxonomy podcast settings saved in the database
|
540 |
+
if( $CustomFeed )
|
541 |
+
$Feed = powerpress_merge_empty_feed_settings($CustomFeed, $Feed);
|
542 |
+
}
|
543 |
+
else if( !empty($powerpress_feed['post_type']) )
|
544 |
+
{
|
545 |
+
$PostTypeSettingsArray = get_option('powerpress_posttype_'.$powerpress_feed['post_type']); // Get the post type podcast feed settings saved in the database
|
546 |
+
if( !empty($PostTypeSettingsArray[ $feed_slug ]) )
|
547 |
+
{
|
548 |
+
$CustomFeed = $PostTypeSettingsArray[ $feed_slug ];
|
549 |
+
$Feed = powerpress_merge_empty_feed_settings($CustomFeed, $Feed, ($feed_slug == 'podcast') );
|
550 |
+
}
|
551 |
+
}
|
552 |
+
else if( powerpress_is_custom_podcast_feed() ) // If we're handling a custom podcast feed...
|
553 |
+
{
|
554 |
+
$CustomFeed = get_option('powerpress_feed_'.$feed_slug); // Get the custom podcast feed settings saved in the database
|
555 |
+
$Feed = powerpress_merge_empty_feed_settings($CustomFeed, $Feed, ($feed_slug == 'podcast') );
|
556 |
+
}
|
557 |
+
|
558 |
+
if( !isset($Feed['url']) || trim($Feed['url']) == '' )
|
559 |
+
{
|
560 |
+
if( is_category() )
|
561 |
+
$Feed['url'] = get_category_link($cat_ID);
|
562 |
+
else {
|
563 |
+
|
564 |
+
$blogHomepage = get_option('page_for_posts');
|
565 |
+
if( !empty($blogHomepage) ) {
|
566 |
+
$Feed['url'] = get_permalink( $blogHomepage );
|
567 |
+
}
|
568 |
+
|
569 |
+
if( empty($Feed['url']) )
|
570 |
+
$Feed['url'] = get_bloginfo('url');
|
571 |
+
}
|
572 |
+
}
|
573 |
+
|
574 |
+
$General = get_option('powerpress_general');
|
575 |
+
|
576 |
+
// We made it this far, lets write stuff to the feed!
|
577 |
+
echo '<!-- podcast_generator="Blubrry PowerPress/'. POWERPRESS_VERSION .'" ';
|
578 |
+
if( isset($General['advanced_mode_2']) && empty($General['advanced_mode_2']) )
|
579 |
+
echo 'mode="simple" ';
|
580 |
+
else
|
581 |
+
echo 'mode="advanced" ';
|
582 |
+
// Additional info for diagnostics
|
583 |
+
if( !empty($powerpress_feed['category']) )
|
584 |
+
echo 'category="'.$powerpress_feed['category'].'" ';
|
585 |
+
if( !empty($powerpress_feed['term_taxonomy_id']) )
|
586 |
+
echo 'ttid="'.$powerpress_feed['term_taxonomy_id'].'" ';
|
587 |
+
if( !empty($powerpress_feed['post_type']) )
|
588 |
+
echo 'posttype="'.$powerpress_feed['post_type'].'" ';
|
589 |
+
if( !empty($powerpress_feed['feed-slug']) )
|
590 |
+
echo 'feedslug="'.$powerpress_feed['feed-slug'].'" ';
|
591 |
+
|
592 |
+
$feedComment = apply_filters('powerpress_feed_comment', '');
|
593 |
+
$feedComment = str_replace( array('<!--', '-->'), array('|!~~', '~~>'), $feedComment);
|
594 |
+
$feedComment = trim($feedComment);
|
595 |
+
if( !empty($feedComment) )
|
596 |
+
echo $feedComment.' ';
|
597 |
+
|
598 |
+
echo 'Blubrry PowerPress Podcasting plugin for WordPress (https://www.blubrry.com/powerpress/) -->'.PHP_EOL;
|
599 |
+
|
600 |
+
// Websub!
|
601 |
+
if(!empty($General['websub_enabled']) && $General['websub_enabled'] == 1) {
|
602 |
+
echo "\t<atom:link rel=\"hub\" href=\"https://pubsubhubbub.appspot.com/\" />" . PHP_EOL;
|
603 |
+
}
|
604 |
+
|
605 |
+
// add the itunes:new-feed-url tag to feed
|
606 |
+
if( powerpress_is_custom_podcast_feed() )
|
607 |
+
{
|
608 |
+
if( !empty($Feed['itunes_new_feed_url']) )
|
609 |
+
{
|
610 |
+
$Feed['itunes_new_feed_url'] = str_replace('&', '&', $Feed['itunes_new_feed_url']);
|
611 |
+
echo "\t<itunes:new-feed-url>". htmlspecialchars(trim($Feed['itunes_new_feed_url'])) .'</itunes:new-feed-url>'.PHP_EOL;
|
612 |
+
}
|
613 |
+
}
|
614 |
+
else if( !empty($Feed['itunes_new_feed_url']) && ($feed_slug == 'feed' || $feed_slug == 'rss2') ) // If it is the default feed (We don't wnat to apply this to category or tag feeds
|
615 |
+
{
|
616 |
+
$Feed['itunes_new_feed_url'] = str_replace('&', '&', $Feed['itunes_new_feed_url']);
|
617 |
+
echo "\t<itunes:new-feed-url>". htmlspecialchars(trim($Feed['itunes_new_feed_url'])) .'</itunes:new-feed-url>'.PHP_EOL;
|
618 |
+
}
|
619 |
+
|
620 |
+
if( !empty($General['itunes_cdata']) ) {
|
621 |
+
if( !empty($Feed['itunes_summary']) )
|
622 |
+
echo "\t".'<itunes:summary><![CDATA['. powerpress_format_itunes_value( $Feed['itunes_summary'], 'summary', true ) .']]></itunes:summary>'.PHP_EOL;
|
623 |
+
else
|
624 |
+
echo "\t".'<itunes:summary><![CDATA['. powerpress_format_itunes_value( get_bloginfo('description'), 'summary', true ) .']]></itunes:summary>'.PHP_EOL;
|
625 |
+
} else {
|
626 |
+
if( !empty($Feed['itunes_summary']) )
|
627 |
+
echo "\t".'<itunes:summary>'. powerpress_format_itunes_value( $Feed['itunes_summary'], 'summary' ) .'</itunes:summary>'.PHP_EOL;
|
628 |
+
else
|
629 |
+
echo "\t".'<itunes:summary>'. powerpress_format_itunes_value( get_bloginfo('description'), 'summary' ) .'</itunes:summary>'.PHP_EOL;
|
630 |
+
}
|
631 |
+
|
632 |
+
if( !empty($powerpress_feed['itunes_talent_name']) )
|
633 |
+
echo "\t<itunes:author>" . esc_html($powerpress_feed['itunes_talent_name']) . '</itunes:author>'.PHP_EOL;
|
634 |
+
|
635 |
+
if( !empty($powerpress_feed['explicit']) && $powerpress_feed['explicit'] != 'no' )
|
636 |
+
echo "\t".'<itunes:explicit>' . $powerpress_feed['explicit'] . '</itunes:explicit>'.PHP_EOL;
|
637 |
+
|
638 |
+
if( !empty($Feed['itunes_block']) )
|
639 |
+
echo "\t<itunes:block>yes</itunes:block>".PHP_EOL;
|
640 |
+
|
641 |
+
if( !empty($Feed['itunes_complete']) )
|
642 |
+
echo "\t<itunes:complete>yes</itunes:complete>".PHP_EOL;
|
643 |
+
|
644 |
+
if( !empty($Feed['itunes_image']) )
|
645 |
+
{
|
646 |
+
echo "\t".'<itunes:image href="' . esc_html( powerpress_url_in_feed(str_replace(' ', '+', $Feed['itunes_image'])), 'double') . '" />'.PHP_EOL;
|
647 |
+
}
|
648 |
+
else
|
649 |
+
{
|
650 |
+
echo "\t".'<itunes:image href="' . powerpress_url_in_feed(powerpress_get_root_url()) . 'itunes_default.jpg" />'.PHP_EOL;
|
651 |
+
}
|
652 |
+
|
653 |
+
if( !empty($Feed['itunes_type']) ) {
|
654 |
+
echo "\t".'<itunes:type>'. esc_html($Feed['itunes_type']) .'</itunes:type>'.PHP_EOL;
|
655 |
+
}
|
656 |
+
|
657 |
+
if( !empty($Feed['email']) )
|
658 |
+
{
|
659 |
+
echo "\t".'<itunes:owner>'.PHP_EOL;
|
660 |
+
echo "\t\t".'<itunes:name>' . esc_html($powerpress_feed['itunes_talent_name']) . '</itunes:name>'.PHP_EOL;
|
661 |
+
echo "\t\t".'<itunes:email>' . esc_html($Feed['email']) . '</itunes:email>'.PHP_EOL;
|
662 |
+
echo "\t".'</itunes:owner>'.PHP_EOL;
|
663 |
+
echo "\t".'<managingEditor>'. esc_html($Feed['email'] .' ('. $powerpress_feed['itunes_talent_name'] .')') .'</managingEditor>'.PHP_EOL;
|
664 |
+
}
|
665 |
+
|
666 |
+
if( !empty($Feed['copyright']) )
|
667 |
+
{
|
668 |
+
// In case the user entered the copyright html version or the copyright UTF-8 or ASCII symbol or just (c)
|
669 |
+
$Feed['copyright'] = str_replace(array('©', '(c)', '(C)', chr(194) . chr(169), chr(169) ), '©', $Feed['copyright']);
|
670 |
+
echo "\t".'<copyright>'. esc_html($Feed['copyright']) . '</copyright>'.PHP_EOL;
|
671 |
+
}
|
672 |
+
|
673 |
+
if( !empty($Feed['itunes_subtitle']) )
|
674 |
+
echo "\t".'<itunes:subtitle>' . powerpress_format_itunes_value($Feed['itunes_subtitle'], 'subtitle') . '</itunes:subtitle>'.PHP_EOL;
|
675 |
+
else
|
676 |
+
echo "\t".'<itunes:subtitle>'. powerpress_format_itunes_value( get_bloginfo('description'), 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
|
677 |
+
$podcast_title_safe = '';
|
678 |
+
if( version_compare($GLOBALS['wp_version'], 4.4, '<' ) ) {
|
679 |
+
$podcast_title_safe .= get_bloginfo_rss('name');
|
680 |
+
}
|
681 |
+
$podcast_title_safe .= get_wp_title_rss();
|
682 |
+
if( empty($General['disable_rss_image']) )
|
683 |
+
{
|
684 |
+
if( !empty($Feed['rss2_image']) || !empty($Feed['itunes_image']) )
|
685 |
+
{
|
686 |
+
if( !empty($Feed['rss2_image']) ) // If the RSS image is set, use it, otherwise use the iTunes image...
|
687 |
+
$rss_image = $Feed['rss2_image'];
|
688 |
+
else
|
689 |
+
$rss_image = $Feed['itunes_image'];
|
690 |
+
|
691 |
+
echo "\t". '<image>' .PHP_EOL;
|
692 |
+
echo "\t\t".'<title>' . $podcast_title_safe . '</title>'.PHP_EOL;
|
693 |
+
echo "\t\t".'<url>' . esc_html( str_replace(' ', '+', $rss_image)) . '</url>'.PHP_EOL;
|
694 |
+
echo "\t\t".'<link>'. $Feed['url'] . '</link>' . PHP_EOL;
|
695 |
+
echo "\t".'</image>' . PHP_EOL;
|
696 |
+
}
|
697 |
+
else // Use the default image
|
698 |
+
{
|
699 |
+
echo "\t". '<image>' .PHP_EOL;
|
700 |
+
echo "\t\t".'<title>' . $podcast_title_safe . '</title>'.PHP_EOL;
|
701 |
+
echo "\t\t".'<url>' . powerpress_get_root_url() . 'rss_default.jpg</url>'.PHP_EOL;
|
702 |
+
echo "\t\t".'<link>'. $Feed['url'] . '</link>' . PHP_EOL;
|
703 |
+
echo "\t".'</image>' . PHP_EOL;
|
704 |
+
}
|
705 |
+
}
|
706 |
+
|
707 |
+
// Handle iTunes categories
|
708 |
+
$Cat1 = false; $Cat2 = false; $Cat3 = false; $SubCat1 = false; $SubCat2 = false; $SubCat3 = false;
|
709 |
+
if(defined('POWERPRESS_NEW_APPLE_CATEGORIES') && POWERPRESS_NEW_APPLE_CATEGORIES == true) {
|
710 |
+
$Categories = powerpress_apple_categories();
|
711 |
+
for ($i = 1; $i <= 3; $i++) {
|
712 |
+
if(!empty($Feed['itunes_cat_'.$i] && empty($Feed['apple_cat_'.$i]))) {
|
713 |
+
$mappings = array('01-00' => '01-00', '01-01' => '01-02', '01-02' => '01-03', '01-03' => '01-04', '01-04' => '01-01',
|
714 |
+
'01-05' => '01-05', '01-06' => '01-06', '02-00' => '02-00', '02-01' => '12-01', '02-02' => '02-01', '02-03' => '02-03',
|
715 |
+
'02-04' => '02-00', '02-05' => '02-00', '03-00' => '03-00', '04-00' => '04-00', '04-01' => '04-00', '04-02' => '04-00',
|
716 |
+
'04-03' => '09-01', '04-04' => '04-03', '04-05' => '04-00', '05-00' => '10-00', '05-01' => '10-02', '05-02' => '10-03',
|
717 |
+
'05-03' => '10-06', '05-04' => '10-05', '05-05' => '10-05', '06-00' => '06-00', '06-01' => '06-00', '06-02' => '06-00',
|
718 |
+
'06-03' => '06-00', '06-04' => '06-00', '07-00' => '07-00', '07-01' => '07-01', '07-02' => '07-00', '07-03' => '04-04',
|
719 |
+
'07-04' => '07-06', '08-00' => '09-00', '09-00' => '11-00', '11-00' => '13-00', '11-01' => '13-01', '11-02' => '13-02',
|
720 |
+
'11-03' => '13-03', '11-04' => '13-04', '11-05' => '13-05', '11-06' => '13-06', '11-07' => '13-07', '12-00' => '14-00',
|
721 |
+
'12-01' => '07-03', '12-02' => '14-06', '12-03' => '14-09', '13-00' => '15-00', '13-01' => '08-00', '13-02' => '15-02',
|
722 |
+
'13-03' => '15-03', '13-04' => '15-04', '14-00' => '16-00', '14-01' => '16-00', '14-02' => '16-00', '14-03' => '16-15',
|
723 |
+
'14-04' => '16-00', '15-00' => '17-00', '15-01' => '17-00', '15-02' => '12-07', '15-03' => '17-00', '15-04' => '17-00', '16-00' => '19-00');
|
724 |
+
$Feed['apple_cat_'. $i] = $mappings[$Feed['itunes_cat_'.$i]];
|
725 |
+
|
726 |
+
}
|
727 |
+
}
|
728 |
+
if (!empty($Feed['apple_cat_1']))
|
729 |
+
list($Cat1, $SubCat1) = explode('-', $Feed['apple_cat_1']);
|
730 |
+
if (!empty($Feed['apple_cat_2']))
|
731 |
+
list($Cat2, $SubCat2) = explode('-', $Feed['apple_cat_2']);
|
732 |
+
if (!empty($Feed['apple_cat_3']))
|
733 |
+
list($Cat3, $SubCat3) = explode('-', $Feed['apple_cat_3']);
|
734 |
+
}
|
735 |
+
else {
|
736 |
+
$Categories = powerpress_itunes_categories();
|
737 |
+
if (!empty($Feed['itunes_cat_1']))
|
738 |
+
list($Cat1, $SubCat1) = explode('-', $Feed['itunes_cat_1']);
|
739 |
+
if (!empty($Feed['itunes_cat_2']))
|
740 |
+
list($Cat2, $SubCat2) = explode('-', $Feed['itunes_cat_2']);
|
741 |
+
if (!empty($Feed['itunes_cat_3']))
|
742 |
+
list($Cat3, $SubCat3) = explode('-', $Feed['itunes_cat_3']);
|
743 |
+
}
|
744 |
+
|
745 |
+
if( $Cat1 )
|
746 |
+
{
|
747 |
+
$CatDesc = $Categories[$Cat1.'-00'];
|
748 |
+
$SubCatDesc = $Categories[$Cat1.'-'.$SubCat1];
|
749 |
+
echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'">'.PHP_EOL;
|
750 |
+
if( $SubCat1 != '00' )
|
751 |
+
echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'"></itunes:category>'.PHP_EOL;
|
752 |
+
|
753 |
+
// End this category set
|
754 |
+
echo "\t".'</itunes:category>'.PHP_EOL;
|
755 |
+
}
|
756 |
+
|
757 |
+
if( $Cat2 )
|
758 |
+
{
|
759 |
+
$CatDesc = $Categories[$Cat2.'-00'];
|
760 |
+
$SubCatDesc = $Categories[$Cat2.'-'.$SubCat2];
|
761 |
+
|
762 |
+
echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'">'.PHP_EOL;
|
763 |
+
if( $SubCat2 != '00' )
|
764 |
+
echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'"></itunes:category>'.PHP_EOL;
|
765 |
+
echo "\t".'</itunes:category>'.PHP_EOL;
|
766 |
+
}
|
767 |
+
|
768 |
+
if( $Cat3 )
|
769 |
+
{
|
770 |
+
$CatDesc = $Categories[$Cat3.'-00'];
|
771 |
+
$SubCatDesc = $Categories[$Cat3.'-'.$SubCat3];
|
772 |
+
|
773 |
+
echo "\t".'<itunes:category text="'. esc_html($CatDesc) .'">'.PHP_EOL;
|
774 |
+
if( $SubCat3 != '00' )
|
775 |
+
echo "\t\t".'<itunes:category text="'. esc_html($SubCatDesc) .'"></itunes:category>'.PHP_EOL;
|
776 |
+
// End this category set
|
777 |
+
echo "\t".'</itunes:category>'.PHP_EOL;
|
778 |
+
}
|
779 |
+
// End Handle iTunes categories
|
780 |
+
|
781 |
+
if( !empty($Feed['googleplay_email']) )
|
782 |
+
{
|
783 |
+
echo "\t".'<googleplay:email>' . esc_html($Feed['googleplay_email']) . '</googleplay:email>'.PHP_EOL;
|
784 |
+
}
|
785 |
+
|
786 |
+
if( !empty($Feed['googleplay_description']) )
|
787 |
+
{
|
788 |
+
echo "\t".'<googleplay:description>' . esc_html($Feed['googleplay_description']) . '</googleplay:description>'.PHP_EOL;
|
789 |
+
}
|
790 |
+
|
791 |
+
if( !empty($Feed['googleplay_explicit']) )
|
792 |
+
{
|
793 |
+
echo "\t".'<googleplay:explicit>Yes</googleplay:explicit>'.PHP_EOL;
|
794 |
+
}
|
795 |
+
|
796 |
+
// google_play_cat // google_play_explicit
|
797 |
+
if( !empty($Feed['googleplay_cat']) )
|
798 |
+
{
|
799 |
+
$play_cats = powerpress_googleplay_categories();
|
800 |
+
if( !empty($play_cats[ $Feed['googleplay_cat'] ]) )
|
801 |
+
{
|
802 |
+
echo "\t".'<googleplay:category text="'. esc_html($play_cats[ $Feed['googleplay_cat'] ]) .'" />'.PHP_EOL;
|
803 |
+
}
|
804 |
+
}
|
805 |
+
|
806 |
+
if( !empty($Feed['googleplay_image']) )
|
807 |
+
{
|
808 |
+
echo "\t".'<googleplay:image href="' . esc_html( str_replace(' ', '+', $Feed['googleplay_image']), 'double') . '" />'.PHP_EOL;
|
809 |
+
}
|
810 |
+
|
811 |
+
// RawVoice RSS Tags
|
812 |
+
if( !defined('POWERPRESS_RAWVOICE_RSS') || POWERPRESS_RAWVOICE_RSS != false )
|
813 |
+
{
|
814 |
+
if( !empty($Feed['parental_rating']) )
|
815 |
+
echo "\t<rawvoice:rating>". $Feed['parental_rating'] ."</rawvoice:rating>".PHP_EOL;
|
816 |
+
if( !empty($Feed['location']) )
|
817 |
+
echo "\t<rawvoice:location>". htmlspecialchars($Feed['location']) ."</rawvoice:location>".PHP_EOL;
|
818 |
+
if( !empty($Feed['frequency']) )
|
819 |
+
echo "\t<rawvoice:frequency>". htmlspecialchars($Feed['frequency']) ."</rawvoice:frequency>".PHP_EOL;
|
820 |
+
if( !empty($Feed['donate_link']) && !empty($Feed['donate_url']) )
|
821 |
+
echo "\t<rawvoice:donate href=\"". htmlspecialchars( $Feed['donate_url'] ) ."\">". htmlspecialchars( (empty($Feed['donate_label'])?'':$Feed['donate_label']) ) ."</rawvoice:donate>".PHP_EOL;
|
822 |
+
|
823 |
+
if( !empty($Feed['itunes_url']) || !empty($Feed['blubrry_url']) || !empty($Feed['stitcher_url']) || !empty($Feed['tunein_url']) || !empty($Feed['spotify_url']) ) {
|
824 |
+
echo "\t<rawvoice:subscribe feed=\"";
|
825 |
+
self_link();
|
826 |
+
echo '"';
|
827 |
+
|
828 |
+
// Subscribe page // empty($FeedSettings['subscribe_page_link_href']) && empty($FeedSettings['subscribe_page_link_id'])
|
829 |
+
if( !empty($Feed['subscribe_page_link_id']) ) {
|
830 |
+
$link = get_page_link($Feed['subscribe_page_link_id']);
|
831 |
+
if( !empty($link) ) {
|
832 |
+
echo " html=\"". htmlspecialchars( $link ) .'"';
|
833 |
+
}
|
834 |
+
} else if( !empty($Feed['subscribe_page_link_href']) ) {
|
835 |
+
echo " html=\"". htmlspecialchars( $Feed['subscribe_page_link_href'] ) .'"';
|
836 |
+
}
|
837 |
+
|
838 |
+
if( !empty($Feed['itunes_url']) )
|
839 |
+
echo " itunes=\"". htmlspecialchars( $Feed['itunes_url'] ) .'"';
|
840 |
+
if( !empty($Feed['blubrry_url']) )
|
841 |
+
echo " blubrry=\"". htmlspecialchars( $Feed['blubrry_url'] ) .'"';
|
842 |
+
if( !empty($Feed['stitcher_url']) )
|
843 |
+
echo " stitcher=\"". htmlspecialchars( $Feed['stitcher_url'] ) .'"';
|
844 |
+
if( !empty($Feed['tunein_url']) )
|
845 |
+
echo " tunein=\"". htmlspecialchars( $Feed['tunein_url'] ) .'"';
|
846 |
+
if( !empty($Feed['spotify_url']) )
|
847 |
+
echo " spotify=\"". htmlspecialchars( $Feed['spotify_url'] ) .'"';
|
848 |
+
echo "></rawvoice:subscribe>".PHP_EOL;
|
849 |
+
}
|
850 |
+
}
|
851 |
+
}
|
852 |
+
|
853 |
+
add_action('rss2_head', 'powerpress_rss2_head');
|
854 |
+
add_action('rss2_head_powerpress', 'powerpress_rss2_head');
|
855 |
+
|
856 |
+
function powerpress_rss2_item()
|
857 |
+
{
|
858 |
+
global $post, $powerpress_feed;
|
859 |
+
|
860 |
+
// are we processing a feed that powerpress should handle
|
861 |
+
if( !powerpress_is_podcast_feed() )
|
862 |
+
return;
|
863 |
+
|
864 |
+
if( function_exists('post_password_required') )
|
865 |
+
{
|
866 |
+
if( post_password_required($post) )
|
867 |
+
return;
|
868 |
+
}
|
869 |
+
|
870 |
+
// Check and see if we're working with a podcast episode
|
871 |
+
$custom_enclosure = false;
|
872 |
+
if( powerpress_is_custom_podcast_feed() && get_query_var('feed') !== 'podcast' && !is_category() && !is_tax() && !is_tag() )
|
873 |
+
{
|
874 |
+
$EpisodeData = powerpress_get_enclosure_data($post->ID, get_query_var('feed') );
|
875 |
+
$custom_enclosure = true;
|
876 |
+
}
|
877 |
+
else
|
878 |
+
{
|
879 |
+
$EpisodeData = powerpress_get_enclosure_data($post->ID, 'podcast');
|
880 |
+
if( !$EpisodeData && !empty($powerpress_feed['process_podpress']) )
|
881 |
+
{
|
882 |
+
$EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
|
883 |
+
$custom_enclosure = true;
|
884 |
+
}
|
885 |
+
}
|
886 |
+
|
887 |
+
// No episode data to include
|
888 |
+
if( empty($EpisodeData) || empty($EpisodeData['url']) )
|
889 |
+
return;
|
890 |
+
|
891 |
+
// If enclosure not added, check to see why...
|
892 |
+
if( defined('POWERPRESS_ENCLOSURE_FIX') && POWERPRESS_ENCLOSURE_FIX && !$custom_enclosure && $GLOBALS['powerpress_rss_enclosure_post_id'] != $post->ID )
|
893 |
+
{
|
894 |
+
$enclosure_in_wp = apply_filters('rss_enclosure', '<enclosure url="' . trim(htmlspecialchars($EpisodeData['url']) . '" length="' . $EpisodeData['size'] . '" type="' . $EpisodeData['type'] . '" />' . "\n") );
|
895 |
+
if( !$enclosure_in_wp )
|
896 |
+
$custom_enclosure = true;
|
897 |
+
}
|
898 |
+
|
899 |
+
// Lets print the enclosure tag
|
900 |
+
if( $custom_enclosure ) // We need to add the enclosure tag here...
|
901 |
+
{
|
902 |
+
if( empty($EpisodeData['size']) )
|
903 |
+
$EpisodeData['size'] = 5242880; // Use the dummy 5MB size since we don't have a size to quote
|
904 |
+
|
905 |
+
echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
|
906 |
+
powerpress_url_in_feed(trim($EpisodeData['url'])),
|
907 |
+
trim($EpisodeData['size']),
|
908 |
+
trim($EpisodeData['type']),
|
909 |
+
PHP_EOL);
|
910 |
+
}
|
911 |
+
|
912 |
+
$author = $powerpress_feed['itunes_talent_name'];
|
913 |
+
if( isset($powerpress_feed['itunes_author_post']) )
|
914 |
+
$author = get_the_author();
|
915 |
+
|
916 |
+
$explicit = $powerpress_feed['explicit'];
|
917 |
+
$summary = '';
|
918 |
+
$subtitle = '';
|
919 |
+
$block = false;
|
920 |
+
$cc = false;
|
921 |
+
|
922 |
+
if( isset( $EpisodeData['summary'] ) && strlen($EpisodeData['summary']) > 1 )
|
923 |
+
$summary = $EpisodeData['summary'];
|
924 |
+
if( isset( $EpisodeData['subtitle'] ) && strlen($EpisodeData['subtitle']) > 1 )
|
925 |
+
$subtitle = $EpisodeData['subtitle'];
|
926 |
+
if( isset( $EpisodeData['explicit'] ) && is_numeric($EpisodeData['explicit']) )
|
927 |
+
{
|
928 |
+
$explicit_array = array("no", "yes", "clean");
|
929 |
+
$explicit = $explicit_array[$EpisodeData['explicit']];
|
930 |
+
}
|
931 |
+
|
932 |
+
if( !empty( $EpisodeData['author'] ) )
|
933 |
+
$author = $EpisodeData['author'];
|
934 |
+
if( !empty( $EpisodeData['block'] ) )
|
935 |
+
$block = 'yes';
|
936 |
+
if( !empty( $EpisodeData['cc'] ) )
|
937 |
+
$cc = 'yes';
|
938 |
+
|
939 |
+
$General = get_option('powerpress_general');
|
940 |
+
$summary_cdata = ( !empty( $General['itunes_cdata'] ) ? true : false );
|
941 |
+
|
942 |
+
if( empty($subtitle) ) {
|
943 |
+
$subtitle = powerpress_get_the_exerpt( false, !empty($General['feed_action_hook']) );
|
944 |
+
}
|
945 |
+
|
946 |
+
// If no summary specified and we have enhanced summary enabled...
|
947 |
+
if( empty($summary) && !empty($powerpress_feed['enhance_itunes_summary']) ) {
|
948 |
+
$summary = powerpress_enhanced_itunes_summary( !empty($General['feed_action_hook']) );
|
949 |
+
if( !empty($summary) ) {
|
950 |
+
$summary_cdata = true; // Always use CDATA for enhanced iTunes summary
|
951 |
+
}
|
952 |
+
}
|
953 |
+
|
954 |
+
if( empty($summary) ) { // Backwards compatibility with PodPress, the excerpt is used as the itunes summary if set
|
955 |
+
$summary = powerpress_get_the_exerpt( true, !empty($General['feed_action_hook']) ); // Will call powerpress_get_the_content(true) if the excerpt does not exist
|
956 |
+
}
|
957 |
+
|
958 |
+
if( !empty($subtitle) ) {
|
959 |
+
echo "\t<itunes:subtitle>". powerpress_format_itunes_value($subtitle, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
|
960 |
+
}
|
961 |
+
|
962 |
+
if( !empty($summary) ) {
|
963 |
+
if( $summary_cdata ) {
|
964 |
+
echo "\t\t<itunes:summary><![CDATA[". powerpress_format_itunes_value($summary, 'summary', true) .']]></itunes:summary>'.PHP_EOL;
|
965 |
+
} else {
|
966 |
+
echo "\t\t<itunes:summary>". powerpress_format_itunes_value($summary, 'summary') .'</itunes:summary>'.PHP_EOL;
|
967 |
+
}
|
968 |
+
}
|
969 |
+
|
970 |
+
if( !empty($author) ) {
|
971 |
+
echo "\t\t<itunes:author>" . esc_html($author) . '</itunes:author>'.PHP_EOL;
|
972 |
+
}
|
973 |
+
|
974 |
+
// itunes episode image
|
975 |
+
if( !empty( $EpisodeData['itunes_image']) ) {
|
976 |
+
echo "\t\t".'<itunes:image href="' . esc_html( powerpress_url_in_feed(str_replace(' ', '+', $EpisodeData['itunes_image'])), 'double') . '" />'.PHP_EOL;
|
977 |
+
} else if( !empty($powerpress_feed['itunes_image']) ) {
|
978 |
+
echo "\t\t".'<itunes:image href="' . esc_html( powerpress_url_in_feed(str_replace(' ', '+', $powerpress_feed['itunes_image'])), 'double') . '" />'.PHP_EOL;
|
979 |
+
}
|
980 |
+
|
981 |
+
if( !empty($EpisodeData['season']) ) {
|
982 |
+
echo "\t\t".'<itunes:season>'. esc_html($EpisodeData['season']) .'</itunes:season>'.PHP_EOL;
|
983 |
+
}
|
984 |
+
|
985 |
+
if( !empty($EpisodeData['episode_no']) ) {
|
986 |
+
echo "\t\t".'<itunes:episode>'. esc_html($EpisodeData['episode_no']) .'</itunes:episode>'.PHP_EOL;
|
987 |
+
}
|
988 |
+
|
989 |
+
if( !empty($EpisodeData['episode_title']) ) {
|
990 |
+
echo "\t\t".'<itunes:title>'. esc_html($EpisodeData['episode_title']) .'</itunes:title>'.PHP_EOL;
|
991 |
+
}
|
992 |
+
|
993 |
+
if( !empty($EpisodeData['episode_type']) ) {
|
994 |
+
echo "\t\t".'<itunes:episodeType>'. esc_html($EpisodeData['episode_type']) .'</itunes:episodeType>'.PHP_EOL;
|
995 |
+
}
|
996 |
+
|
997 |
+
if( !empty($explicit) && $explicit != 'no' ) {
|
998 |
+
echo "\t\t<itunes:explicit>" . $explicit . '</itunes:explicit>'.PHP_EOL;
|
999 |
+
}
|
1000 |
+
|
1001 |
+
if( !empty($EpisodeData['duration']) && preg_match('/^(\d{1,2}:){0,2}\d{1,2}$/i', ltrim($EpisodeData['duration'], '0:') ) ) { // Include duration if it is valid
|
1002 |
+
echo "\t\t<itunes:duration>" . ltrim($EpisodeData['duration'], '0:') . '</itunes:duration>'.PHP_EOL;
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
if( $block && $block == 'yes' ) {
|
1006 |
+
echo "\t\t<itunes:block>yes</itunes:block>".PHP_EOL;
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
if( $cc && $cc == 'yes' ) {
|
1010 |
+
echo "\t\t<itunes:isClosedCaptioned>yes</itunes:isClosedCaptioned>".PHP_EOL;
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
if( !empty($powerpress_feed['itunes_feature']) ) { // We are using the itunes:order option to feature a specific episode.
|
1014 |
+
// Skip inserting the order tag
|
1015 |
+
} else {
|
1016 |
+
if( isset( $EpisodeData['order'] ) && is_numeric( $EpisodeData['order'] ) )
|
1017 |
+
echo "\t\t<itunes:order>". $EpisodeData['order'] ."</itunes:order>".PHP_EOL;
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
// Google Play tags:
|
1021 |
+
if( empty($powerpress_feed['feed_maximizer_on']) ) { // These tags for the most part replicate what is in the itunes tags, so lets not include them when we want to maximize the feed
|
1022 |
+
if( !empty( $EpisodeData['gp_desc'] ) ) {
|
1023 |
+
echo "\t\t<googleplay:description>". powerpress_format_itunes_value($EpisodeData['gp_desc'], 'summary') ."</googleplay:description>".PHP_EOL;
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
if( !empty( $EpisodeData['gp_explicit'] ) ) {
|
1027 |
+
echo "\t\t<googleplay:explicit>yes</googleplay:explicit>".PHP_EOL;
|
1028 |
+
}
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
if( !empty( $EpisodeData['gp_block'] ) ) {
|
1032 |
+
echo "\t\t<googleplay:block>yes</googleplay:block>".PHP_EOL;
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
|
1036 |
+
// RawVoice RSS Tags
|
1037 |
+
if( empty($powerpress_feed['feed_maximizer_on']) )
|
1038 |
+
{
|
1039 |
+
if( !defined('POWERPRESS_RAWVOICE_RSS') || POWERPRESS_RAWVOICE_RSS != false )
|
1040 |
+
{
|
1041 |
+
if( !empty($EpisodeData['ishd']) )
|
1042 |
+
echo "\t\t<rawvoice:isHD>yes</rawvoice:isHD>".PHP_EOL;;
|
1043 |
+
if( !empty($EpisodeData['image']) )
|
1044 |
+
echo "\t\t<rawvoice:poster url=\"". $EpisodeData['image'] ."\" />".PHP_EOL;
|
1045 |
+
if( !empty($EpisodeData['embed']) )
|
1046 |
+
echo "\t\t<rawvoice:embed>". htmlspecialchars($EpisodeData['embed']) ."</rawvoice:embed>".PHP_EOL;
|
1047 |
+
else if( !empty($powerpress_feed['podcast_embed_in_feed']) && function_exists('powerpress_generate_embed') )
|
1048 |
+
{
|
1049 |
+
$player = powerpressplayer_embedable($EpisodeData['url'], $EpisodeData);
|
1050 |
+
$embed_content = '';
|
1051 |
+
|
1052 |
+
if( $player )
|
1053 |
+
$embed_content = powerpress_generate_embed($player, $EpisodeData);
|
1054 |
+
if( $embed_content )
|
1055 |
+
echo "\t\t<rawvoice:embed>". htmlspecialchars( $embed_content ) ."</rawvoice:embed>".PHP_EOL;
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
if( !empty($EpisodeData['webm_src']) )
|
1059 |
+
{
|
1060 |
+
echo "\t\t<rawvoice:webm src=\"". $EpisodeData['webm_src'] ."\"";
|
1061 |
+
if( $EpisodeData['webm_length'] )
|
1062 |
+
echo " length=\"". $EpisodeData['webm_length'] ."\"";
|
1063 |
+
echo " type=\"video/webm\" />".PHP_EOL;
|
1064 |
+
}
|
1065 |
+
|
1066 |
+
$GeneralSettings = get_option('powerpress_general');
|
1067 |
+
|
1068 |
+
if( !empty($GeneralSettings) && !empty($GeneralSettings['metamarks']) )
|
1069 |
+
{
|
1070 |
+
require_once(POWERPRESS_ABSPATH .'/powerpressadmin-metamarks.php');
|
1071 |
+
powerpress_metamarks_print_rss2($EpisodeData);
|
1072 |
+
}
|
1073 |
+
}
|
1074 |
+
}
|
1075 |
+
}
|
1076 |
+
|
1077 |
+
add_action('rss2_item', 'powerpress_rss2_item');
|
1078 |
+
add_action('rss2_item_powerpress', 'powerpress_rss2_item');
|
1079 |
+
|
1080 |
+
/*
|
1081 |
+
This filter is only necessary for feeds that are not specifically for podcasting, e.g. a category feed that did not have category podcasting added to it
|
1082 |
+
*/
|
1083 |
+
function powerpress_filter_rss_enclosure($content)
|
1084 |
+
{
|
1085 |
+
if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') ) {
|
1086 |
+
return $content; // Another podcasting plugin is enabled...
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
if( powerpress_is_custom_podcast_feed() && get_query_var('feed') !== 'podcast' && !is_category() && !is_tag() && !is_tax() )
|
1090 |
+
return ''; // We will handle this enclosure in the powerpress_rss2_item() function
|
1091 |
+
|
1092 |
+
$match_count = preg_match('/\surl="([^"]*)"/', $content, $matches); // No URL found, weird
|
1093 |
+
if( count($matches) != 2)
|
1094 |
+
return $content;
|
1095 |
+
|
1096 |
+
// Original Media URL
|
1097 |
+
$OrigURL = $matches[1];
|
1098 |
+
|
1099 |
+
if( substr($OrigURL, 0, 5) != 'http:' && substr($OrigURL, 0, 6) != 'https:' )
|
1100 |
+
return ''; // The URL value is invalid
|
1101 |
+
|
1102 |
+
global $post, $powerpress_rss_enclosure_post_id;
|
1103 |
+
if( empty($powerpress_rss_enclosure_post_id) )
|
1104 |
+
$powerpress_rss_enclosure_post_id = -1;
|
1105 |
+
|
1106 |
+
if( $powerpress_rss_enclosure_post_id == $post->ID )
|
1107 |
+
return ''; // we've already included one enclosure, lets not allow anymore
|
1108 |
+
$powerpress_rss_enclosure_post_id = $post->ID;
|
1109 |
+
|
1110 |
+
$EpisodeData = powerpress_get_enclosure_data($post->ID);
|
1111 |
+
|
1112 |
+
// Modified Media URL
|
1113 |
+
$ModifiedURL = powerpress_url_in_feed($EpisodeData['url']); // powerpress_add_redirect_url($OrigURL);
|
1114 |
+
|
1115 |
+
// Check that the content type is a valid one...
|
1116 |
+
$match_count = preg_match('/\stype="([^"]*)"/', $content, $matches);
|
1117 |
+
if( count($matches) > 1 && strstr($matches[1], '/') == false )
|
1118 |
+
{
|
1119 |
+
$ContentType = powerpress_get_contenttype($ModifiedURL);
|
1120 |
+
$content = str_replace("type=\"{$matches[1]}\"", "type=\"$ContentType\"", $content);
|
1121 |
+
}
|
1122 |
+
|
1123 |
+
// Check that the content length is a digit greater that zero
|
1124 |
+
$match_count = preg_match('/\slength="([^"]*)"/', $content, $matches);
|
1125 |
+
if( count($matches) > 1 && empty($matches[1]) )
|
1126 |
+
{
|
1127 |
+
$content = str_replace("length=\"{$matches[1]}\"", "length=\"5242880\"", $content);
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
// Replace the original url with the modified one...
|
1131 |
+
if( $OrigURL != $ModifiedURL )
|
1132 |
+
return str_replace($OrigURL, $ModifiedURL, $content);
|
1133 |
+
return $content;
|
1134 |
+
}
|
1135 |
+
|
1136 |
+
|
1137 |
+
add_filter('rss_enclosure', 'powerpress_filter_rss_enclosure', 11);
|
1138 |
+
|
1139 |
+
function powerpress_bloginfo_rss($content, $field = '')
|
1140 |
+
{
|
1141 |
+
$new_value = '';
|
1142 |
+
if( powerpress_is_custom_podcast_feed() )
|
1143 |
+
{
|
1144 |
+
if( is_category() ) {
|
1145 |
+
$Feed = get_option('powerpress_cat_feed_'.get_query_var('cat') );
|
1146 |
+
}
|
1147 |
+
else if( is_tax() || is_tag() ) {
|
1148 |
+
global $powerpress_feed;
|
1149 |
+
if( !empty($powerpress_feed['term_taxonomy_id']) )
|
1150 |
+
$Feed = get_option('powerpress_taxonomy_'.$powerpress_feed['term_taxonomy_id'] );
|
1151 |
+
}
|
1152 |
+
else
|
1153 |
+
{
|
1154 |
+
global $powerpress_feed;
|
1155 |
+
|
1156 |
+
if( !empty($powerpress_feed['post_type']) )
|
1157 |
+
{
|
1158 |
+
$feed_slug = get_query_var('feed');
|
1159 |
+
$PostTypeSettingsArray = get_option('powerpress_posttype_'.$powerpress_feed['post_type'] );
|
1160 |
+
if( !empty($PostTypeSettingsArray[ $feed_slug ]) )
|
1161 |
+
$Feed = $PostTypeSettingsArray[ $feed_slug ];
|
1162 |
+
}
|
1163 |
+
else
|
1164 |
+
{
|
1165 |
+
$Feed = get_option('powerpress_feed_'.get_query_var('feed') );
|
1166 |
+
if( empty($Feed) && get_query_var('feed') === 'podcast' )
|
1167 |
+
$Feed = get_option('powerpress_feed');
|
1168 |
+
}
|
1169 |
+
}
|
1170 |
+
|
1171 |
+
if( $Feed )
|
1172 |
+
{
|
1173 |
+
switch( $field )
|
1174 |
+
{
|
1175 |
+
case 'description': {
|
1176 |
+
if( !empty($Feed['description']) )
|
1177 |
+
$new_value = $Feed['description'];
|
1178 |
+
else if( is_category() )
|
1179 |
+
{
|
1180 |
+
$category = get_category( get_query_var('cat') );
|
1181 |
+
if( $category->description )
|
1182 |
+
$new_value = $category->description;
|
1183 |
+
}
|
1184 |
+
}; break;
|
1185 |
+
case 'url': {
|
1186 |
+
// If the website URL is set for this podcast then lets use it...
|
1187 |
+
if( !empty($Feed['url']) )
|
1188 |
+
return trim($Feed['url']);
|
1189 |
+
|
1190 |
+
if( is_category() ) {
|
1191 |
+
return get_category_link( get_query_var('cat') );
|
1192 |
+
} else {
|
1193 |
+
$urlTemp = '';
|
1194 |
+
$blogHomepage = get_option('page_for_posts');
|
1195 |
+
if( !empty($blogHomepage) ) {
|
1196 |
+
$urlTemp = get_permalink( $blogHomepage );
|
1197 |
+
}
|
1198 |
+
|
1199 |
+
if( empty($urlTemp) )
|
1200 |
+
$urlTemp = get_bloginfo('url');
|
1201 |
+
if( !empty($urlTemp) )
|
1202 |
+
return $urlTemp;
|
1203 |
+
}
|
1204 |
+
}; break;
|
1205 |
+
case 'name': { // As of wp 4.4+ title is handled by get_the_title_rss completely.
|
1206 |
+
if( !empty($Feed['title']) )
|
1207 |
+
$new_value = $Feed['title'];
|
1208 |
+
}; break;
|
1209 |
+
case 'language': {
|
1210 |
+
// Get the feed language
|
1211 |
+
$lang = '';
|
1212 |
+
if( isset($Feed['rss_language']) && $Feed['rss_language'] != '' )
|
1213 |
+
$lang = $Feed['rss_language'];
|
1214 |
+
if( strlen($lang) == 5 )
|
1215 |
+
$lang = substr($lang,0,3) . strtoupper( substr($lang, 3) ); // Format example: en-US for English, United States
|
1216 |
+
if( !empty($lang) )
|
1217 |
+
return $lang;
|
1218 |
+
}; break;
|
1219 |
+
}
|
1220 |
+
}
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
if( !empty($new_value) )
|
1224 |
+
{
|
1225 |
+
$new_value = wptexturize($new_value);
|
1226 |
+
$new_value = convert_chars($new_value);
|
1227 |
+
$new_value = esc_html($new_value);
|
1228 |
+
//$new_value = convert_chars($new_value);
|
1229 |
+
return $new_value;
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
return $content;
|
1233 |
+
}
|
1234 |
+
|
1235 |
+
add_filter('get_bloginfo_rss', 'powerpress_bloginfo_rss', 10, 2);
|
1236 |
+
|
1237 |
+
|
1238 |
+
function powerpress_wp_title_rss($title)
|
1239 |
+
{
|
1240 |
+
if( version_compare($GLOBALS['wp_version'], 4.4, '>=' ) )
|
1241 |
+
{
|
1242 |
+
if( powerpress_is_custom_podcast_feed() )
|
1243 |
+
{
|
1244 |
+
if( is_category() ) {
|
1245 |
+
$Feed = get_option('powerpress_cat_feed_'.get_query_var('cat') );
|
1246 |
+
}
|
1247 |
+
else if( is_tax() || is_tag() ) {
|
1248 |
+
global $powerpress_feed;
|
1249 |
+
if( !empty($powerpress_feed['term_taxonomy_id']) )
|
1250 |
+
$Feed = get_option('powerpress_taxonomy_'.$powerpress_feed['term_taxonomy_id'] );
|
1251 |
+
}
|
1252 |
+
else
|
1253 |
+
{
|
1254 |
+
global $powerpress_feed;
|
1255 |
+
|
1256 |
+
if( !empty($powerpress_feed['post_type']) )
|
1257 |
+
{
|
1258 |
+
$feed_slug = get_query_var('feed');
|
1259 |
+
if( !empty($feed_slug) ) {
|
1260 |
+
$PostTypeSettingsArray = get_option('powerpress_posttype_'.$powerpress_feed['post_type'] );
|
1261 |
+
if( !empty($PostTypeSettingsArray[ $feed_slug ]) )
|
1262 |
+
$Feed = $PostTypeSettingsArray[ $feed_slug ];
|
1263 |
+
}
|
1264 |
+
}
|
1265 |
+
else
|
1266 |
+
{
|
1267 |
+
$feed_slug = get_query_var('feed');
|
1268 |
+
$Feed = false;
|
1269 |
+
if( !empty($feed_slug) ) {
|
1270 |
+
$Feed = get_option('powerpress_feed_'.get_query_var('feed') );
|
1271 |
+
}
|
1272 |
+
if( empty($Feed) && get_query_var('feed') === 'podcast' )
|
1273 |
+
$Feed = get_option('powerpress_feed');
|
1274 |
+
}
|
1275 |
+
}
|
1276 |
+
|
1277 |
+
if( $Feed )
|
1278 |
+
{
|
1279 |
+
if( !empty($Feed['title']) )
|
1280 |
+
return esc_html( $Feed['title'] );
|
1281 |
+
}
|
1282 |
+
}
|
1283 |
+
}
|
1284 |
+
else
|
1285 |
+
{
|
1286 |
+
if( powerpress_is_custom_podcast_feed() )
|
1287 |
+
{
|
1288 |
+
if( is_category() )
|
1289 |
+
{
|
1290 |
+
$Feed = get_option('powerpress_cat_feed_'.get_query_var('cat') );
|
1291 |
+
if( $Feed && isset($Feed['title']) && $Feed['title'] != '' )
|
1292 |
+
return ''; // We alrady did a custom title, lets not add the category to it...
|
1293 |
+
}
|
1294 |
+
else
|
1295 |
+
{
|
1296 |
+
return ''; // It is not a category, lets not mess with our beautiful title then
|
1297 |
+
}
|
1298 |
+
}
|
1299 |
+
}
|
1300 |
+
|
1301 |
+
return $title;
|
1302 |
+
}
|
1303 |
+
|
1304 |
+
add_filter('get_wp_title_rss', 'powerpress_wp_title_rss');
|
1305 |
+
|
1306 |
+
function powerpress_the_title_rss($title)
|
1307 |
+
{
|
1308 |
+
$new_title = $title;
|
1309 |
+
$GeneralSettings = get_option('powerpress_general');
|
1310 |
+
// If it is a custom podcast channel...
|
1311 |
+
if( !empty($GeneralSettings['seo_feed_title']) )
|
1312 |
+
{
|
1313 |
+
$feed_slug = 'podcast';
|
1314 |
+
// IF custom post type or channel, use that feed slug...
|
1315 |
+
if( get_query_var('feed') !== 'podcast' && !is_category() && !is_tax() && !is_tag() )
|
1316 |
+
$feed_slug = get_query_var('feed');
|
1317 |
+
|
1318 |
+
// Get the episode specific title...
|
1319 |
+
$EpisodeData = powerpress_get_enclosure_data(get_the_ID(), $feed_slug);
|
1320 |
+
if( !empty($EpisodeData['feed_title']) )
|
1321 |
+
{
|
1322 |
+
$feed_title = ent2ncr( $EpisodeData['feed_title'] );
|
1323 |
+
$feed_title = strip_tags( $feed_title );
|
1324 |
+
$feed_title = esc_html( $feed_title );
|
1325 |
+
|
1326 |
+
//switch( $GeneralSettings['custom_feed_title'] )
|
1327 |
+
switch( $GeneralSettings['seo_feed_title'] )
|
1328 |
+
{
|
1329 |
+
case 1: { // Replaces title
|
1330 |
+
$new_title = $feed_title;
|
1331 |
+
}; break;
|
1332 |
+
case 2: { // Prefixes title
|
1333 |
+
$new_title = $feed_title . ' ' . $title;
|
1334 |
+
}; break;
|
1335 |
+
case 3: { // Postfixes title
|
1336 |
+
$new_title = $title . ' ' . $feed_title;
|
1337 |
+
}; break;
|
1338 |
+
}
|
1339 |
+
}
|
1340 |
+
}
|
1341 |
+
|
1342 |
+
return $new_title;
|
1343 |
+
}
|
1344 |
+
|
1345 |
+
add_filter('the_title_rss', 'powerpress_the_title_rss', 11);
|
1346 |
+
|
1347 |
+
|
1348 |
+
function powerpress_feed_content_type($content_type = '', $feedslug = '')
|
1349 |
+
{
|
1350 |
+
switch( $feedslug )
|
1351 |
+
{
|
1352 |
+
case 'rss':
|
1353 |
+
case 'rss2':
|
1354 |
+
case 'atom':
|
1355 |
+
case 'rdf': {
|
1356 |
+
// Do nothing, let WordPress take care of these
|
1357 |
+
}; break;
|
1358 |
+
case 'podcast': {
|
1359 |
+
// This one is ours!
|
1360 |
+
$content_type = 'application/rss+xml';
|
1361 |
+
}; break;
|
1362 |
+
default: { // Check for the custom podcast feeds
|
1363 |
+
$GeneralSettings = get_option('powerpress_general');
|
1364 |
+
if( !empty($GeneralSettings['custom_feeds'][ $feedslug ]) )
|
1365 |
+
{
|
1366 |
+
$content_type = 'application/rss+xml';
|
1367 |
+
}
|
1368 |
+
else if( !empty($GeneralSettings['posttype_podcasting']) )
|
1369 |
+
{
|
1370 |
+
// We need to look up these settings...
|
1371 |
+
$FeedSlugPostTypesArray = get_option('powerpress_posttype-podcasting');
|
1372 |
+
if( is_array($FeedSlugPostTypesArray) && !empty($FeedSlugPostTypesArray[ $feedslug ]) )
|
1373 |
+
{
|
1374 |
+
$content_type = 'application/rss+xml';
|
1375 |
+
}
|
1376 |
+
}
|
1377 |
+
}
|
1378 |
+
}
|
1379 |
+
|
1380 |
+
return $content_type;
|
1381 |
+
}
|
1382 |
+
|
1383 |
+
add_filter( 'feed_content_type', 'powerpress_feed_content_type', 10, 2 );
|
1384 |
+
|
1385 |
+
// Following code only works for WP 3.3 or older. WP 3.4+ now uses the get_locale setting, so we have to override directly in the get_bloginfo_rss functoin.
|
1386 |
+
if( version_compare($GLOBALS['wp_version'], '3.4', '<') )
|
1387 |
+
{
|
1388 |
+
function powerpress_rss_language($value)
|
1389 |
+
{
|
1390 |
+
if( powerpress_is_custom_podcast_feed() )
|
1391 |
+
{
|
1392 |
+
global $powerpress_feed;
|
1393 |
+
if( $powerpress_feed && isset($powerpress_feed['rss_language']) && $powerpress_feed['rss_language'] != '' )
|
1394 |
+
$value = $powerpress_feed['rss_language'];
|
1395 |
+
}
|
1396 |
+
return $value;
|
1397 |
+
}
|
1398 |
+
|
1399 |
+
add_filter('option_rss_language', 'powerpress_rss_language');
|
1400 |
+
}
|
1401 |
+
|
1402 |
+
function powerpress_do_podcast_feed($for_comments=false)
|
1403 |
+
{
|
1404 |
+
global $wp_query, $powerpress_feed;
|
1405 |
+
|
1406 |
+
powerpress_is_podcast_feed(); // Loads the feed settings if not already loaded...
|
1407 |
+
|
1408 |
+
$GeneralSettings = get_option('powerpress_general');
|
1409 |
+
if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] )
|
1410 |
+
{
|
1411 |
+
$feed_slug = get_query_var('feed');
|
1412 |
+
|
1413 |
+
if( $feed_slug != 'podcast' )
|
1414 |
+
{
|
1415 |
+
$FeedSettings = get_option('powerpress_feed_'.$feed_slug);
|
1416 |
+
if( !empty($FeedSettings['premium']) )
|
1417 |
+
{
|
1418 |
+
require_once( POWERPRESS_ABSPATH.'/powerpress-feed-auth.php');
|
1419 |
+
powerpress_feed_auth( $feed_slug );
|
1420 |
+
}
|
1421 |
+
}
|
1422 |
+
}
|
1423 |
+
|
1424 |
+
// Use the template to gurantee future WordPress behavior
|
1425 |
+
if( defined('POWERPRESS_FEED_TEMPLATE') ) {
|
1426 |
+
load_template( POWERPRESS_FEED_TEMPLATE );
|
1427 |
+
} else {
|
1428 |
+
load_template( POWERPRESS_ABSPATH . '/feed-podcast.php' );
|
1429 |
+
}
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
function powerpress_template_redirect()
|
1433 |
+
{
|
1434 |
+
if( is_feed() && powerpress_is_custom_podcast_feed() )
|
1435 |
+
{
|
1436 |
+
if ( defined('WPSEO_VERSION') && version_compare(WPSEO_VERSION, '7.7', '>=') && class_exists( 'WPSEO_Frontend' ) ) {
|
1437 |
+
$wpseo_frontend = WPSEO_Frontend::get_instance();
|
1438 |
+
if( !empty($wpseo_frontend) ) {
|
1439 |
+
remove_action( 'template_redirect', array( $wpseo_frontend, 'noindex_feed' ) );
|
1440 |
+
}
|
1441 |
+
}
|
1442 |
+
|
1443 |
+
remove_action('template_redirect', 'ol_feed_redirect'); // Remove this action so feedsmith doesn't redirect
|
1444 |
+
global $powerpress_feed;
|
1445 |
+
if( !isset($powerpress_feed['feed_redirect_url']) )
|
1446 |
+
$powerpress_feed['feed_redirect_url'] = '';
|
1447 |
+
$redirect_value = ( !empty($_GET['redirect'])? $_GET['redirect'] : false );
|
1448 |
+
if( is_array($powerpress_feed) && trim($powerpress_feed['feed_redirect_url']) != '' && !preg_match("/feedburner|feedsqueezer|feedvalidator/i", $_SERVER['HTTP_USER_AGENT'] ) && $redirect_value != 'no' )
|
1449 |
+
{
|
1450 |
+
if (function_exists('status_header'))
|
1451 |
+
status_header( 301 );
|
1452 |
+
header("Location: " . trim($powerpress_feed['feed_redirect_url']));
|
1453 |
+
header("HTTP/1.1 301 Moved Permanently");
|
1454 |
+
exit();
|
1455 |
+
}
|
1456 |
+
}
|
1457 |
+
}
|
1458 |
+
|
1459 |
+
add_action('template_redirect', 'powerpress_template_redirect', 0);
|
1460 |
+
|
1461 |
+
|
1462 |
+
function powerpress_rewrite_rules_array($array)
|
1463 |
+
{
|
1464 |
+
global $wp_rewrite;
|
1465 |
+
$settings = get_option('powerpress_general');
|
1466 |
+
|
1467 |
+
$podcast_feeds = array('podcast'=>true);
|
1468 |
+
if( isset($settings['custom_feeds']) && is_array($settings['custom_feeds']) )
|
1469 |
+
$podcast_feeds = array_merge($settings['custom_feeds'], $podcast_feeds );
|
1470 |
+
|
1471 |
+
$merged_slugs = '';
|
1472 |
+
foreach( $podcast_feeds as $feed_slug=> $feed_title )
|
1473 |
+
{
|
1474 |
+
if( $merged_slugs != '' )
|
1475 |
+
$merged_slugs .= '|';
|
1476 |
+
$merged_slugs .= $feed_slug;
|
1477 |
+
}
|
1478 |
+
|
1479 |
+
// $wp_rewrite->index most likely index.php
|
1480 |
+
$new_array[ 'feed/('.$merged_slugs.')/?$' ] = $wp_rewrite->index. '?feed='. $wp_rewrite->preg_index(1);
|
1481 |
+
|
1482 |
+
// If feature is not enabled, use the default permalinks
|
1483 |
+
if( empty($settings['permalink_feeds_only']) )
|
1484 |
+
return array_merge($new_array, $array);
|
1485 |
+
|
1486 |
+
global $wpdb;
|
1487 |
+
reset($podcast_feeds);
|
1488 |
+
foreach( $podcast_feeds as $feed_slug=> $feed_title )
|
1489 |
+
{
|
1490 |
+
$page_name_id = $wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE post_name = '".$feed_slug."'");
|
1491 |
+
if( $page_name_id )
|
1492 |
+
{
|
1493 |
+
$new_array[ $feed_slug.'/?$' ] = $wp_rewrite->index. '?pagename='. $feed_slug.'&page_id='.$page_name_id;
|
1494 |
+
unset($podcast_feeds[ $feed_slug ]);
|
1495 |
+
continue;
|
1496 |
+
}
|
1497 |
+
|
1498 |
+
$category = get_category_by_slug($feed_slug);
|
1499 |
+
if( $category )
|
1500 |
+
{
|
1501 |
+
$new_array[ $feed_slug.'/?$' ] = $wp_rewrite->index. '?cat='. $category->term_id; // category_name='. $feed_slug .'&
|
1502 |
+
unset($podcast_feeds[ $feed_slug ]);
|
1503 |
+
}
|
1504 |
+
}
|
1505 |
+
|
1506 |
+
if( count($podcast_feeds) > 0 )
|
1507 |
+
{
|
1508 |
+
reset($podcast_feeds);
|
1509 |
+
$remaining_slugs = '';
|
1510 |
+
foreach( $podcast_feeds as $feed_slug=> $feed_title )
|
1511 |
+
{
|
1512 |
+
if( $remaining_slugs != '' )
|
1513 |
+
$remaining_slugs .= '|';
|
1514 |
+
$remaining_slugs .= $feed_slug;
|
1515 |
+
}
|
1516 |
+
|
1517 |
+
$new_array[ '('.$remaining_slugs.')/?$' ] = $wp_rewrite->index. '?pagename='. $wp_rewrite->preg_index(1);
|
1518 |
+
}
|
1519 |
+
|
1520 |
+
return array_merge($new_array, $array);
|
1521 |
+
}
|
1522 |
+
|
1523 |
+
add_filter('rewrite_rules_array', 'powerpress_rewrite_rules_array');
|
1524 |
+
|
1525 |
+
|
1526 |
+
function powerpress_pre_transient_rewrite_rules($return_rules)
|
1527 |
+
{
|
1528 |
+
global $wp_rewrite;
|
1529 |
+
$GeneralSettings = get_option('powerpress_general');
|
1530 |
+
if( !in_array('podcast', $wp_rewrite->feeds) )
|
1531 |
+
$wp_rewrite->feeds[] = 'podcast';
|
1532 |
+
|
1533 |
+
if( $GeneralSettings && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) )
|
1534 |
+
{
|
1535 |
+
foreach( $GeneralSettings['custom_feeds'] as $feed_slug=> $null )
|
1536 |
+
{
|
1537 |
+
if( !in_array($feed_slug, $wp_rewrite->feeds) )
|
1538 |
+
$wp_rewrite->feeds[] = $feed_slug;
|
1539 |
+
}
|
1540 |
+
}
|
1541 |
+
|
1542 |
+
return $return_rules;
|
1543 |
+
}
|
1544 |
+
|
1545 |
+
add_filter('pre_transient_rewrite_rules', 'powerpress_pre_transient_rewrite_rules');
|
1546 |
+
|
1547 |
+
function powerpress_init()
|
1548 |
+
{
|
1549 |
+
$GeneralSettings = get_option('powerpress_general');
|
1550 |
+
|
1551 |
+
if( !empty($GeneralSettings['powerpress-beta-features']) && file_exists(POWERPRESS_ABSPATH.'/powerpressadmin-pts.php') )
|
1552 |
+
{
|
1553 |
+
require_once(POWERPRESS_ABSPATH.'/powerpressadmin-pts.php');
|
1554 |
+
}
|
1555 |
+
|
1556 |
+
if( empty($GeneralSettings['disable_appearance']) || $GeneralSettings['disable_appearance'] == false )
|
1557 |
+
{
|
1558 |
+
require_once( POWERPRESS_ABSPATH.'/powerpress-player.php');
|
1559 |
+
powerpressplayer_init($GeneralSettings);
|
1560 |
+
}
|
1561 |
+
|
1562 |
+
// Enable the playlist feature for PowerPress
|
1563 |
+
if( !empty($GeneralSettings['playlist_player']) ) // Either not set or set on
|
1564 |
+
{
|
1565 |
+
require_once(POWERPRESS_ABSPATH.'/powerpress-playlist.php');
|
1566 |
+
}
|
1567 |
+
|
1568 |
+
if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
|
1569 |
+
return false; // Another podcasting plugin is enabled...
|
1570 |
+
|
1571 |
+
// If we are to process podpress data..
|
1572 |
+
if( !empty($GeneralSettings['process_podpress']) )
|
1573 |
+
{
|
1574 |
+
powerpress_podpress_redirect_check();
|
1575 |
+
}
|
1576 |
+
|
1577 |
+
// Add the podcast feeds;
|
1578 |
+
if( !defined('POWERPRESS_NO_PODCAST_FEED') )
|
1579 |
+
{
|
1580 |
+
add_feed('podcast', 'powerpress_do_podcast_feed');
|
1581 |
+
}
|
1582 |
+
|
1583 |
+
if( $GeneralSettings && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) )
|
1584 |
+
{
|
1585 |
+
foreach( $GeneralSettings['custom_feeds'] as $feed_slug=> $feed_title )
|
1586 |
+
{
|
1587 |
+
if( $feed_slug != 'podcast' )
|
1588 |
+
add_feed($feed_slug, 'powerpress_do_podcast_feed');
|
1589 |
+
}
|
1590 |
+
}
|
1591 |
+
|
1592 |
+
if( !empty($GeneralSettings['posttype_podcasting']) )
|
1593 |
+
{
|
1594 |
+
// Loop through the posttype podcasting settings and set the feeds for the custom post type slugs...
|
1595 |
+
global $wp_rewrite;
|
1596 |
+
|
1597 |
+
|
1598 |
+
$FeedSlugPostTypesArray = get_option('powerpress_posttype-podcasting'); // Changed field slightly so it does not conflict with a post type "podcasting"
|
1599 |
+
if( $FeedSlugPostTypesArray === false )
|
1600 |
+
{
|
1601 |
+
// Simple one-time fix...
|
1602 |
+
$FeedSlugPostTypesArray = get_option('powerpress_posttype_podcasting');
|
1603 |
+
if( empty($FeedSlugPostTypesArray) )
|
1604 |
+
$FeedSlugPostTypesArray = array();
|
1605 |
+
update_option('powerpress_posttype-podcasting', $FeedSlugPostTypesArray);
|
1606 |
+
if( !array_key_exists('title', $FeedSlugPostTypesArray) ) // AS long as it doesn't have post type specific settings...
|
1607 |
+
delete_option('powerpress_posttype_podcasting');
|
1608 |
+
}
|
1609 |
+
|
1610 |
+
if( empty($FeedSlugPostTypesArray) )
|
1611 |
+
{
|
1612 |
+
$FeedSlugPostTypesArray = array();
|
1613 |
+
}
|
1614 |
+
foreach( $FeedSlugPostTypesArray as $feed_slug=> $FeedSlugPostTypes )
|
1615 |
+
{
|
1616 |
+
if ( !in_array($feed_slug, $wp_rewrite->feeds) ) // we need to add this feed name
|
1617 |
+
{
|
1618 |
+
add_feed($feed_slug, 'powerpress_do_podcast_feed');
|
1619 |
+
foreach( $FeedSlugPostTypes as $post_type_slug=> $title )
|
1620 |
+
{
|
1621 |
+
add_rewrite_rule( '/'. $post_type_slug .'/feed/'. $feed_slug .'/?$', 'index.php?post_type='. $post_type_slug .'&feed='.$feed_slug, 'top' ); // capture the post type feeds
|
1622 |
+
add_rewrite_rule( '/'. $post_type_slug .'/feed/'. $feed_slug .'/?$', 'index.php?post_type='. $post_type_slug .'&feed='.$feed_slug, 'bottom' ); // capture the post type feeds
|
1623 |
+
}
|
1624 |
+
}
|
1625 |
+
}
|
1626 |
+
}
|
1627 |
+
|
1628 |
+
if( defined('GAWP_VERSION') )
|
1629 |
+
{
|
1630 |
+
add_filter('the_content', 'powerpress_yoast_gawp_fix', 120 );
|
1631 |
+
}
|
1632 |
+
|
1633 |
+
if( !empty($GeneralSettings['subscribe_links']) )
|
1634 |
+
{
|
1635 |
+
// 2 Subscribe page shortocde [powerpress_subscribe feedslug="podcast"]
|
1636 |
+
// 3 Subscribe sidebar widget: iTunes, RSS
|
1637 |
+
add_filter('powerpress_player_subscribe_links', 'powerpressplayer_link_subscribe_pre', 1, 3);
|
1638 |
+
add_filter('powerpress_player_subscribe_links', 'powerpressplayer_link_subscribe_post', 1000, 3);
|
1639 |
+
}
|
1640 |
+
wp_register_style(
|
1641 |
+
'powerpress-subscribe-style',
|
1642 |
+
powerpress_get_root_url() . 'css/subscribe.css',
|
1643 |
+
array(),
|
1644 |
+
'20141021',
|
1645 |
+
'all' );
|
1646 |
+
|
1647 |
+
if( !empty($GeneralSettings['rss_emoji']) ) {
|
1648 |
+
if( has_filter('the_content_feed', 'wp_staticize_emoji') ) {
|
1649 |
+
remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); // Remove the emoji images
|
1650 |
+
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
|
1651 |
+
//add_filter( 'the_content_feed', 'wp_encode_emoji' ); // Convert an emoji to xxx;
|
1652 |
+
//add_filter( 'get_wp_title_rss', 'wp_encode_emoji' );
|
1653 |
+
}
|
1654 |
+
}
|
1655 |
+
|
1656 |
+
remove_action( 'wp_head', 'feed_links', 2 );
|
1657 |
+
remove_action( 'wp_head', 'feed_links_extra', 3 );
|
1658 |
+
}
|
1659 |
+
|
1660 |
+
add_action('init', 'powerpress_init', -100); // We need to add the feeds before other plugins start screwing with them
|
1661 |
+
|
1662 |
+
function powerpress_wp_print_styles()
|
1663 |
+
{
|
1664 |
+
$Settings = get_option('powerpress_general');
|
1665 |
+
|
1666 |
+
if( !empty($Settings['audio_player_max_width']) )
|
1667 |
+
{
|
1668 |
+
echo '<style type="text/css">'."\n";
|
1669 |
+
if( is_numeric($Settings['audio_player_max_width']) )
|
1670 |
+
$Settings['audio_player_max_width'] .= 'px';
|
1671 |
+
echo '.powerpress_player .wp-audio-shortcode { max-width: '.$Settings['audio_player_max_width'].'; }'."\n";
|
1672 |
+
echo '</style>'."\n";
|
1673 |
+
}
|
1674 |
+
}
|
1675 |
+
|
1676 |
+
add_action('wp_print_styles', 'powerpress_wp_print_styles');
|
1677 |
+
|
1678 |
+
function powerpress_request($qv)
|
1679 |
+
{
|
1680 |
+
if( !empty($qv['feed']) )
|
1681 |
+
{
|
1682 |
+
$podcast_feed_slug = false;
|
1683 |
+
if( $qv['feed'] == 'podcast' ) {
|
1684 |
+
$GeneralSettings = get_option('powerpress_general');
|
1685 |
+
if( empty($GeneralSettings['posttype_podcasting']) )
|
1686 |
+
$podcast_feed_slug = 'podcast';
|
1687 |
+
} else if( $qv['feed'] == 'rss' || $qv['feed'] == 'rss2' || $qv['feed'] == 'atom' || $qv['feed'] == 'rdf' || $qv['feed'] == 'feed' ) { // 'feed', 'rdf', 'rss', 'rss2', 'atom'
|
1688 |
+
// Skip
|
1689 |
+
} else {
|
1690 |
+
$GeneralSettings = get_option('powerpress_general');
|
1691 |
+
if( empty($GeneralSettings['posttype_podcasting']) && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) && !empty($GeneralSettings['custom_feeds'][ $qv['feed'] ] ) )
|
1692 |
+
$podcast_feed_slug = $qv['feed'];
|
1693 |
+
|
1694 |
+
|
1695 |
+
}
|
1696 |
+
|
1697 |
+
if( $podcast_feed_slug )
|
1698 |
+
{
|
1699 |
+
if( !defined('POWERPRESS_POSTTYPE_MIXING') && $qv['feed'] == 'podcast' ) {
|
1700 |
+
$qv['post_type'] = 'post';
|
1701 |
+
} else {
|
1702 |
+
$qv['post_type'] = get_post_types( array('public'=> true, 'capability_type'=>'post') );
|
1703 |
+
if( !empty($qv['post_type']['attachment']) )
|
1704 |
+
unset($qv['post_type']['attachment']);
|
1705 |
+
}
|
1706 |
+
|
1707 |
+
$FeedCustom = get_option('powerpress_feed_'.$podcast_feed_slug); // Get custom feed specific settings
|
1708 |
+
// See if the user set a custom post type only...
|
1709 |
+
if( !empty($FeedCustom) && !empty( $FeedCustom['custom_post_type']) )
|
1710 |
+
$qv['post_type'] = $FeedCustom['custom_post_type'];
|
1711 |
+
}
|
1712 |
+
}
|
1713 |
+
return $qv;
|
1714 |
+
}
|
1715 |
+
|
1716 |
+
add_filter('request', 'powerpress_request');
|
1717 |
+
|
1718 |
+
|
1719 |
+
function powerpress_plugins_loaded()
|
1720 |
+
{
|
1721 |
+
// Translation support loaded:
|
1722 |
+
load_plugin_textdomain('powerpress', // domain / keyword name of plugin
|
1723 |
+
POWERPRESS_ABSPATH .'/languages', // Absolute path
|
1724 |
+
basename(POWERPRESS_ABSPATH).'/languages' ); // relative path in plugins folder
|
1725 |
+
|
1726 |
+
/*
|
1727 |
+
####
|
1728 |
+
# Defines that effect translation defined now:
|
1729 |
+
####
|
1730 |
+
*/
|
1731 |
+
// Set specific play and download labels for your installation of PowerPress
|
1732 |
+
if( !defined('POWERPRESS_LINKS_TEXT') )
|
1733 |
+
define('POWERPRESS_LINKS_TEXT', __('Podcast', 'powerpress') );
|
1734 |
+
if( !defined('POWERPRESS_DURATION_TEXT') )
|
1735 |
+
define('POWERPRESS_DURATION_TEXT', __('Duration', 'powerpress') );
|
1736 |
+
if( !defined('POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT') )
|
1737 |
+
define('POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT', __('Play in new window', 'powerpress') );
|
1738 |
+
if( !defined('POWERPRESS_DOWNLOAD_TEXT') )
|
1739 |
+
define('POWERPRESS_DOWNLOAD_TEXT', __('Download', 'powerpress') );
|
1740 |
+
if( !defined('POWERPRESS_PLAY_TEXT') )
|
1741 |
+
define('POWERPRESS_PLAY_TEXT', __('Play', 'powerpress') );
|
1742 |
+
if( !defined('POWERPRESS_EMBED_TEXT') )
|
1743 |
+
define('POWERPRESS_EMBED_TEXT', __('Embed', 'powerpress') );
|
1744 |
+
if( !defined('POWERPRESS_READ_TEXT') )
|
1745 |
+
define('POWERPRESS_READ_TEXT', __('Read', 'powerpress') );
|
1746 |
+
}
|
1747 |
+
add_action('plugins_loaded', 'powerpress_plugins_loaded');
|
1748 |
+
|
1749 |
+
|
1750 |
+
function powerpress_w3tc_can_print_comment($settings)
|
1751 |
+
{
|
1752 |
+
return false;
|
1753 |
+
}
|
1754 |
+
|
1755 |
+
// Disable minifying if W3TC is enabled
|
1756 |
+
function powerpress_w3tc_minify_enable($enable)
|
1757 |
+
{
|
1758 |
+
if( is_feed() )
|
1759 |
+
return false;
|
1760 |
+
return $enable;
|
1761 |
+
}
|
1762 |
+
|
1763 |
+
// Load the general feed settings for feeds handled by powerpress
|
1764 |
+
function powerpress_load_general_feed_settings()
|
1765 |
+
{
|
1766 |
+
global $wp_query;
|
1767 |
+
global $powerpress_feed;
|
1768 |
+
|
1769 |
+
if( $powerpress_feed !== false ) // If it is not false (either NULL or an array) then we already looked these settings up
|
1770 |
+
{
|
1771 |
+
$powerpress_feed = false;
|
1772 |
+
|
1773 |
+
// Get the powerpress settings
|
1774 |
+
$GeneralSettings = get_option('powerpress_general');
|
1775 |
+
if( !isset($GeneralSettings['custom_feeds']['podcast']) )
|
1776 |
+
$GeneralSettings['custom_feeds']['podcast'] = 'Podcast Feed'; // Fixes scenario where the user never configured the custom default podcast feed.
|
1777 |
+
if( empty($GeneralSettings['default_url']) )
|
1778 |
+
$GeneralSettings['default_url'] = '';
|
1779 |
+
|
1780 |
+
if( $GeneralSettings )
|
1781 |
+
{
|
1782 |
+
$FeedSettingsBasic = get_option('powerpress_feed'); // Get overall feed settings
|
1783 |
+
if( is_feed() && defined( 'WPCACHEHOME' ) && empty($GeneralSettings['allow_feed_comments']) )
|
1784 |
+
{
|
1785 |
+
global $wp_super_cache_comments;
|
1786 |
+
$wp_super_cache_comments = 0;
|
1787 |
+
}
|
1788 |
+
|
1789 |
+
if( is_feed() && defined('W3TC') && empty($GeneralSettings['allow_feed_comments']) )
|
1790 |
+
{
|
1791 |
+
add_filter( 'w3tc_can_print_comment', 'powerpress_w3tc_can_print_comment', 10, 1 );
|
1792 |
+
}
|
1793 |
+
|
1794 |
+
if( is_feed() && defined('W3TC') )
|
1795 |
+
{
|
1796 |
+
add_filter( 'w3tc_minify_enable', 'powerpress_w3tc_minify_enable');
|
1797 |
+
}
|
1798 |
+
|
1799 |
+
// If we're in advanced mode and we're dealing with a category feed we're extending, lets work with it...
|
1800 |
+
if( is_category() && isset($GeneralSettings['custom_cat_feeds']) && is_array($GeneralSettings['custom_cat_feeds']) && in_array( get_query_var('cat'), $GeneralSettings['custom_cat_feeds']) )
|
1801 |
+
{
|
1802 |
+
$cat_ID = get_query_var('cat');
|
1803 |
+
$FeedCustom = get_option('powerpress_cat_feed_'.$cat_ID); // Get custom feed specific settings
|
1804 |
+
$Feed = powerpress_merge_empty_feed_settings($FeedCustom, $FeedSettingsBasic);
|
1805 |
+
|
1806 |
+
$powerpress_feed = array();
|
1807 |
+
if( !empty($GeneralSettings['feed_accel']) )
|
1808 |
+
$powerpress_feed['feed_accel'] = true;
|
1809 |
+
$powerpress_feed['is_custom'] = true;
|
1810 |
+
$powerpress_feed['category'] = $cat_ID;
|
1811 |
+
$powerpress_feed['process_podpress'] = !empty($GeneralSettings['process_podpress']); // Category feeds could originate from Podpress
|
1812 |
+
$powerpress_feed['rss_language'] = ''; // default, let WordPress set the language
|
1813 |
+
$powerpress_feed['default_url'] = '';
|
1814 |
+
if( !empty($GeneralSettings['default_url']) )
|
1815 |
+
$powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
|
1816 |
+
$explicit_array = array("no", "yes", "clean");
|
1817 |
+
$powerpress_feed['explicit'] = $explicit_array[$Feed['itunes_explicit']];
|
1818 |
+
if( !empty($Feed['itunes_talent_name']) )
|
1819 |
+
$powerpress_feed['itunes_talent_name'] = $Feed['itunes_talent_name'];
|
1820 |
+
else
|
1821 |
+
$powerpress_feed['itunes_talent_name'] = get_wp_title_rss();
|
1822 |
+
$powerpress_feed['enhance_itunes_summary'] = $Feed['enhance_itunes_summary'];
|
1823 |
+
if( !empty($GeneralSettings['seo_itunes']) )
|
1824 |
+
$powerpress_feed['enhance_itunes_summary'] = 1;
|
1825 |
+
$powerpress_feed['posts_per_rss'] = false;
|
1826 |
+
if( !empty($Feed['posts_per_rss']) && is_numeric($Feed['posts_per_rss']) && $Feed['posts_per_rss'] > 0 )
|
1827 |
+
$powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
|
1828 |
+
$powerpress_feed['feed_redirect_url'] = '';
|
1829 |
+
if( !empty($Feed['feed_redirect_url']) )
|
1830 |
+
$powerpress_feed['feed_redirect_url'] = $Feed['feed_redirect_url'];
|
1831 |
+
if( $Feed['itunes_author_post'] == true )
|
1832 |
+
$powerpress_feed['itunes_author_post'] = true;
|
1833 |
+
if( $Feed['rss_language'] != '' )
|
1834 |
+
$powerpress_feed['rss_language'] = $Feed['rss_language'];
|
1835 |
+
|
1836 |
+
if( !empty($GeneralSettings['podcast_embed_in_feed']) )
|
1837 |
+
$powerpress_feed['podcast_embed_in_feed'] = true;
|
1838 |
+
if( !empty($Feed['maximize_feed']) )
|
1839 |
+
$powerpress_feed['maximize_feed'] = true;
|
1840 |
+
if( !empty($Feed['episode_itunes_image']) && !empty($Feed['itunes_image']) )
|
1841 |
+
$powerpress_feed['itunes_image'] = $Feed['itunes_image'];
|
1842 |
+
return;
|
1843 |
+
}
|
1844 |
+
else if( ( defined('POWERPRESS_TAXONOMY_PODCASTING') || !empty($GeneralSettings['taxonomy_podcasting']) ) && ( is_tag() || is_tax() ) )
|
1845 |
+
{
|
1846 |
+
// We need to get the term_id and the tax_id (tt_id)
|
1847 |
+
$term_slug = get_query_var('term');
|
1848 |
+
$taxonomy = get_query_var('taxonomy');
|
1849 |
+
|
1850 |
+
if( empty($term_slug) && empty($taxonomy) ) // Handle situation where tag is the taxonomy we're working with
|
1851 |
+
{
|
1852 |
+
$term_slug = get_query_var('tag');
|
1853 |
+
if( !empty($term_slug) )
|
1854 |
+
$taxonomy = 'post_tag';
|
1855 |
+
}
|
1856 |
+
|
1857 |
+
$term = false;
|
1858 |
+
if( !empty($term_slug) && !empty($taxonomy) )
|
1859 |
+
{
|
1860 |
+
$term = term_exists($term_slug, $taxonomy);
|
1861 |
+
}
|
1862 |
+
|
1863 |
+
if( !empty($term['term_taxonomy_id']) )
|
1864 |
+
{
|
1865 |
+
$FeedCustom = get_option('powerpress_taxonomy_'.$term['term_taxonomy_id'] ); // Get custom feed specific settings
|
1866 |
+
if( $FeedCustom )
|
1867 |
+
{
|
1868 |
+
$Feed = powerpress_merge_empty_feed_settings($FeedCustom, $FeedSettingsBasic);
|
1869 |
+
|
1870 |
+
$powerpress_feed = array();
|
1871 |
+
if( !empty($GeneralSettings['feed_accel']) )
|
1872 |
+
$powerpress_feed['feed_accel'] = true;
|
1873 |
+
$powerpress_feed['is_custom'] = true;
|
1874 |
+
$powerpress_feed['term_taxonomy_id'] = $term['term_taxonomy_id'];
|
1875 |
+
$powerpress_feed['process_podpress'] = false; // Taxonomy feeds will not originate from Podpress
|
1876 |
+
$powerpress_feed['rss_language'] = ''; // default, let WordPress set the language
|
1877 |
+
$powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
|
1878 |
+
$explicit_array = array("no", "yes", "clean");
|
1879 |
+
$powerpress_feed['explicit'] = $explicit_array[$Feed['itunes_explicit']];
|
1880 |
+
if( !empty($Feed['itunes_talent_name']) )
|
1881 |
+
$powerpress_feed['itunes_talent_name'] = $Feed['itunes_talent_name'];
|
1882 |
+
else
|
1883 |
+
$powerpress_feed['itunes_talent_name'] = get_wp_title_rss();
|
1884 |
+
$powerpress_feed['enhance_itunes_summary'] = $Feed['enhance_itunes_summary'];
|
1885 |
+
if( !empty($GeneralSettings['seo_itunes']) )
|
1886 |
+
$powerpress_feed['enhance_itunes_summary'] = 1;
|
1887 |
+
$powerpress_feed['posts_per_rss'] = false;
|
1888 |
+
if( !empty($Feed['posts_per_rss']) && is_numeric($Feed['posts_per_rss']) && $Feed['posts_per_rss'] > 0 )
|
1889 |
+
$powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
|
1890 |
+
if( $Feed['feed_redirect_url'] != '' )
|
1891 |
+
$powerpress_feed['feed_redirect_url'] = $Feed['feed_redirect_url'];
|
1892 |
+
if( $Feed['itunes_author_post'] == true )
|
1893 |
+
$powerpress_feed['itunes_author_post'] = true;
|
1894 |
+
if( $Feed['rss_language'] != '' )
|
1895 |
+
$powerpress_feed['rss_language'] = $Feed['rss_language'];
|
1896 |
+
|
1897 |
+
if( !empty($GeneralSettings['podcast_embed_in_feed']) )
|
1898 |
+
$powerpress_feed['podcast_embed_in_feed'] = true;
|
1899 |
+
if( !empty($Feed['maximize_feed']) )
|
1900 |
+
$powerpress_feed['maximize_feed'] = true;
|
1901 |
+
if( !empty($Feed['episode_itunes_image']) && !empty($Feed['itunes_image']) )
|
1902 |
+
$powerpress_feed['itunes_image'] = $Feed['itunes_image'];
|
1903 |
+
return;
|
1904 |
+
}
|
1905 |
+
}
|
1906 |
+
}
|
1907 |
+
|
1908 |
+
$feed_slug = get_query_var('feed');
|
1909 |
+
// Are we dealing with a custom podcast channel or a custom post type podcast feed...
|
1910 |
+
if( !empty($GeneralSettings['posttype_podcasting']) || isset($GeneralSettings['custom_feeds'][ $feed_slug ]) )
|
1911 |
+
{
|
1912 |
+
$Feed = false;
|
1913 |
+
if( !empty($GeneralSettings['posttype_podcasting']) )
|
1914 |
+
{
|
1915 |
+
$post_type = get_query_var('post_type');
|
1916 |
+
|
1917 |
+
if( !empty($post_type) )
|
1918 |
+
{
|
1919 |
+
if ( is_array( $post_type ) ) {
|
1920 |
+
$post_type = reset( $post_type ); // get first element in array
|
1921 |
+
}
|
1922 |
+
|
1923 |
+
// Get the settings for this podcast post type
|
1924 |
+
$PostTypeSettingsArray = get_option('powerpress_posttype_'. $post_type);
|
1925 |
+
if( !empty($PostTypeSettingsArray[ $feed_slug ]) )
|
1926 |
+
{
|
1927 |
+
$FeedCustom = $PostTypeSettingsArray[ $feed_slug ];
|
1928 |
+
$Feed = powerpress_merge_empty_feed_settings($FeedCustom, $FeedSettingsBasic);
|
1929 |
+
$Feed['post_type'] = $post_type;
|
1930 |
+
}
|
1931 |
+
}
|
1932 |
+
}
|
1933 |
+
if( empty($Feed) && isset($GeneralSettings['custom_feeds'][ $feed_slug ]) )
|
1934 |
+
{
|
1935 |
+
$FeedCustom = get_option('powerpress_feed_'.$feed_slug); // Get custom feed specific settings
|
1936 |
+
$Feed = powerpress_merge_empty_feed_settings($FeedCustom, $FeedSettingsBasic, ($feed_slug == 'podcast') );
|
1937 |
+
}
|
1938 |
+
|
1939 |
+
if( $Feed )
|
1940 |
+
{
|
1941 |
+
$powerpress_feed = array();
|
1942 |
+
if( !empty($GeneralSettings['feed_accel']) )
|
1943 |
+
$powerpress_feed['feed_accel'] = true;
|
1944 |
+
$powerpress_feed['is_custom'] = true;
|
1945 |
+
$powerpress_feed['feed-slug'] = $feed_slug;
|
1946 |
+
if( !empty($Feed['post_type']) )
|
1947 |
+
$powerpress_feed['post_type'] = $Feed['post_type'];
|
1948 |
+
$powerpress_feed['process_podpress'] = ($feed_slug=='podcast'? !empty($GeneralSettings['process_podpress']): false); // We don't touch podpress data for custom feeds
|
1949 |
+
$powerpress_feed['rss_language'] = ''; // RSS language should be set by WordPress by default
|
1950 |
+
$powerpress_feed['default_url'] = '';
|
1951 |
+
if( !empty($powerpress_feed['default_url']) )
|
1952 |
+
$powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
|
1953 |
+
$explicit = array("no", "yes", "clean");
|
1954 |
+
$powerpress_feed['explicit'] ='no';
|
1955 |
+
if( !empty($Feed['itunes_explicit']) )
|
1956 |
+
$powerpress_feed['explicit'] = $explicit[ $Feed['itunes_explicit'] ];
|
1957 |
+
if( !empty($Feed['itunes_talent_name']) )
|
1958 |
+
$powerpress_feed['itunes_talent_name'] = $Feed['itunes_talent_name'];
|
1959 |
+
else
|
1960 |
+
$powerpress_feed['itunes_talent_name'] = get_wp_title_rss();
|
1961 |
+
$powerpress_feed['enhance_itunes_summary'] = $Feed['enhance_itunes_summary'];
|
1962 |
+
if( !empty($GeneralSettings['seo_itunes']) )
|
1963 |
+
$powerpress_feed['enhance_itunes_summary'] = 1;
|
1964 |
+
$powerpress_feed['posts_per_rss'] = false;
|
1965 |
+
if( !empty($Feed['posts_per_rss']) && is_numeric($Feed['posts_per_rss']) && $Feed['posts_per_rss'] > 0 )
|
1966 |
+
$powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
|
1967 |
+
if( !empty($Feed['feed_redirect_url']) )
|
1968 |
+
$powerpress_feed['feed_redirect_url'] = $Feed['feed_redirect_url'];
|
1969 |
+
if( !empty($Feed['itunes_author_post'] ) )
|
1970 |
+
$powerpress_feed['itunes_author_post'] = true;
|
1971 |
+
if( !empty($Feed['rss_language']) )
|
1972 |
+
$powerpress_feed['rss_language'] = $Feed['rss_language'];
|
1973 |
+
if( !empty($GeneralSettings['podcast_embed_in_feed']) )
|
1974 |
+
$powerpress_feed['podcast_embed_in_feed'] = true;
|
1975 |
+
if( !empty($Feed['maximize_feed']) )
|
1976 |
+
$powerpress_feed['maximize_feed'] = true;
|
1977 |
+
if( !empty($Feed['episode_itunes_image']) && !empty($Feed['itunes_image']) )
|
1978 |
+
$powerpress_feed['itunes_image'] = $Feed['itunes_image'];
|
1979 |
+
return;
|
1980 |
+
}
|
1981 |
+
}
|
1982 |
+
|
1983 |
+
if( !isset($FeedSettingsBasic['apply_to']) )
|
1984 |
+
$FeedSettingsBasic['apply_to'] = 1;
|
1985 |
+
|
1986 |
+
// We fell this far,we must be in simple mode or the user never saved customized their custom feed settings
|
1987 |
+
switch( $FeedSettingsBasic['apply_to'] )
|
1988 |
+
{
|
1989 |
+
case 0: // enhance only the podcast feed added by PowerPress, with the logic above this code should never be reached but it is added for readability.
|
1990 |
+
{
|
1991 |
+
if( $feed_slug != 'podcast' )
|
1992 |
+
break;
|
1993 |
+
} // important: no break here!
|
1994 |
+
case 2: // RSS2 Main feed and podcast feed added by PowerPress only
|
1995 |
+
{
|
1996 |
+
if( $feed_slug != 'feed' && $feed_slug != 'rss2' && $feed_slug != 'podcast' )
|
1997 |
+
break; // We're only adding podcasts to the rss2 feed in this situation
|
1998 |
+
|
1999 |
+
if( $wp_query->is_category ) // don't touch the category feeds...
|
2000 |
+
break;
|
2001 |
+
|
2002 |
+
if( $wp_query->is_tag ) // don't touch the tag feeds...
|
2003 |
+
break;
|
2004 |
+
|
2005 |
+
if( $wp_query->is_comment_feed ) // don't touch the comments feeds...
|
2006 |
+
break;
|
2007 |
+
} // important: no break here!
|
2008 |
+
case 1: // All feeds
|
2009 |
+
{
|
2010 |
+
$powerpress_feed = array(); // Only store what's needed for each feed item
|
2011 |
+
if( !empty($GeneralSettings['feed_accel']) )
|
2012 |
+
$powerpress_feed['feed_accel'] = true;
|
2013 |
+
$powerpress_feed['is_custom'] = false; // ($feed_slug == 'podcast'?true:false);
|
2014 |
+
$powerpress_feed['feed-slug'] = $feed_slug;
|
2015 |
+
$powerpress_feed['process_podpress'] = !empty($GeneralSettings['process_podpress']); // We don't touch podpress data for custom feeds
|
2016 |
+
$powerpress_feed['default_url'] = '';
|
2017 |
+
if( !empty($GeneralSettings['default_url']) )
|
2018 |
+
$powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
|
2019 |
+
$explicit = array("no", "yes", "clean");
|
2020 |
+
$powerpress_feed['explicit'] = 'no';
|
2021 |
+
if( !empty($FeedSettingsBasic['itunes_explicit']) )
|
2022 |
+
$powerpress_feed['explicit'] = $explicit[$FeedSettingsBasic['itunes_explicit']];
|
2023 |
+
if( !empty($FeedSettingsBasic['itunes_talent_name']) )
|
2024 |
+
$powerpress_feed['itunes_talent_name'] = $FeedSettingsBasic['itunes_talent_name'];
|
2025 |
+
else
|
2026 |
+
$powerpress_feed['itunes_talent_name'] = get_wp_title_rss();
|
2027 |
+
$powerpress_feed['enhance_itunes_summary'] = 0;
|
2028 |
+
if( isset($FeedSettingsBasic['enhance_itunes_summary']) )
|
2029 |
+
$powerpress_feed['enhance_itunes_summary'] = $FeedSettingsBasic['enhance_itunes_summary'];
|
2030 |
+
if( !empty($GeneralSettings['seo_itunes']) )
|
2031 |
+
$powerpress_feed['enhance_itunes_summary'] = 1;
|
2032 |
+
$powerpress_feed['posts_per_rss'] = false;
|
2033 |
+
if( !empty($FeedSettingsBasic['posts_per_rss']) && is_numeric($FeedSettingsBasic['posts_per_rss']) && $FeedSettingsBasic['posts_per_rss'] > 0 )
|
2034 |
+
$powerpress_feed['posts_per_rss'] = $FeedSettingsBasic['posts_per_rss'];
|
2035 |
+
if( !empty($FeedSettingsBasic['itunes_author_post']) )
|
2036 |
+
$powerpress_feed['itunes_author_post'] = true;
|
2037 |
+
$powerpress_feed['rss_language'] = ''; // Cannot set the language setting in simple mode
|
2038 |
+
if( !empty($GeneralSettings['podcast_embed_in_feed']) )
|
2039 |
+
$powerpress_feed['podcast_embed_in_feed'] = true;
|
2040 |
+
if( !empty($FeedSettingsBasic['episode_itunes_image']) && !empty($FeedSettingsBasic['itunes_image']) )
|
2041 |
+
$powerpress_feed['itunes_image'] = $FeedSettingsBasic['itunes_image'];
|
2042 |
+
|
2043 |
+
}; break;
|
2044 |
+
// All other cases we let fall through
|
2045 |
+
}
|
2046 |
+
}
|
2047 |
+
}
|
2048 |
+
}
|
2049 |
+
|
2050 |
+
// Returns true of the feed should be treated as a podcast feed
|
2051 |
+
function powerpress_is_podcast_feed()
|
2052 |
+
{
|
2053 |
+
if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
|
2054 |
+
return false; // Another podcasting plugin is enabled...
|
2055 |
+
|
2056 |
+
global $powerpress_feed;
|
2057 |
+
if( $powerpress_feed !== false && !is_array($powerpress_feed) )
|
2058 |
+
powerpress_load_general_feed_settings();
|
2059 |
+
if( $powerpress_feed === false )
|
2060 |
+
return false;
|
2061 |
+
return true;
|
2062 |
+
}
|
2063 |
+
|
2064 |
+
// Returns true if the feed is a custom feed added by PowerPress
|
2065 |
+
function powerpress_is_custom_podcast_feed()
|
2066 |
+
{
|
2067 |
+
if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
|
2068 |
+
return false; // Another podcasting plugin is enabled...
|
2069 |
+
|
2070 |
+
global $powerpress_feed;
|
2071 |
+
if( $powerpress_feed !== false && !is_array($powerpress_feed) )
|
2072 |
+
powerpress_load_general_feed_settings();
|
2073 |
+
if( $powerpress_feed === false )
|
2074 |
+
return false;
|
2075 |
+
return $powerpress_feed['is_custom'];
|
2076 |
+
}
|
2077 |
+
|
2078 |
+
function powerpress_posts_fields($cols)
|
2079 |
+
{
|
2080 |
+
if( !is_feed() )
|
2081 |
+
return $cols;
|
2082 |
+
|
2083 |
+
if( is_category() || is_tag() || is_tax() ) {
|
2084 |
+
if( get_query_var('feed') !== 'podcast' )
|
2085 |
+
return $cols;
|
2086 |
+
}
|
2087 |
+
|
2088 |
+
if( powerpress_is_custom_podcast_feed() || get_query_var('feed') === 'podcast' )
|
2089 |
+
{
|
2090 |
+
if( !empty($GLOBALS['powerpress_feed']['feed_accel']) )
|
2091 |
+
{
|
2092 |
+
$feed_slug = get_query_var('feed');
|
2093 |
+
global $wpdb;
|
2094 |
+
$cols .= ", pp_{$wpdb->postmeta}.meta_value AS podcast_meta_value ";
|
2095 |
+
}
|
2096 |
+
}
|
2097 |
+
|
2098 |
+
return $cols;
|
2099 |
+
}
|
2100 |
+
//$fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) );
|
2101 |
+
add_filter('posts_fields', 'powerpress_posts_fields' );
|
2102 |
+
|
2103 |
+
function powerpress_posts_join($join)
|
2104 |
+
{
|
2105 |
+
if( !is_feed() )
|
2106 |
+
return $join;
|
2107 |
+
|
2108 |
+
if( is_category() || is_tag() || is_tax() ) {
|
2109 |
+
if( get_query_var('feed') !== 'podcast' )
|
2110 |
+
return $join;
|
2111 |
+
}
|
2112 |
+
|
2113 |
+
if( powerpress_is_custom_podcast_feed() || get_query_var('feed') === 'podcast' )
|
2114 |
+
{
|
2115 |
+
global $wpdb;
|
2116 |
+
$join .= " INNER JOIN {$wpdb->postmeta} AS pp_{$wpdb->postmeta} ";
|
2117 |
+
$join .= " ON {$wpdb->posts}.ID = pp_{$wpdb->postmeta}.post_id ";
|
2118 |
+
}
|
2119 |
+
|
2120 |
+
return $join;
|
2121 |
+
}
|
2122 |
+
|
2123 |
+
add_filter('posts_join', 'powerpress_posts_join' );
|
2124 |
+
|
2125 |
+
function powerpress_posts_where($where)
|
2126 |
+
{
|
2127 |
+
if( !is_feed() )
|
2128 |
+
return $where;
|
2129 |
+
if( is_category() || is_tag() || is_tax() ) {
|
2130 |
+
if( get_query_var('feed') !== 'podcast' )
|
2131 |
+
return $where;
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
if( powerpress_is_custom_podcast_feed() || get_query_var('feed') === 'podcast' )
|
2135 |
+
{
|
2136 |
+
global $wpdb, $powerpress_feed;
|
2137 |
+
$where .= " AND (";
|
2138 |
+
|
2139 |
+
if( powerpress_is_custom_podcast_feed() && get_query_var('feed') !== 'podcast' )
|
2140 |
+
$where .= " pp_{$wpdb->postmeta}.meta_key = '_". get_query_var('feed') .":enclosure' ";
|
2141 |
+
else
|
2142 |
+
$where .= " pp_{$wpdb->postmeta}.meta_key = 'enclosure' ";
|
2143 |
+
|
2144 |
+
// Include Podpress data if exists...
|
2145 |
+
if( !empty($powerpress_feed['process_podpress']) && get_query_var('feed') === 'podcast' )
|
2146 |
+
$where .= " OR pp_{$wpdb->postmeta}.meta_key = 'podPressMedia' OR pp_{$wpdb->postmeta}.meta_key = '_podPressMedia' ";
|
2147 |
+
|
2148 |
+
$where .= ") ";
|
2149 |
+
}
|
2150 |
+
return $where;
|
2151 |
+
}
|
2152 |
+
|
2153 |
+
add_filter('posts_where', 'powerpress_posts_where' );
|
2154 |
+
|
2155 |
+
// Add the groupby needed for enclosures only
|
2156 |
+
function powerpress_posts_groupby($groupby)
|
2157 |
+
{
|
2158 |
+
if( !is_feed() )
|
2159 |
+
return $groupby;
|
2160 |
+
|
2161 |
+
if( is_category() || is_tag() || is_tax() ) {
|
2162 |
+
if( get_query_var('feed') !== 'podcast' )
|
2163 |
+
return $groupby;
|
2164 |
+
}
|
2165 |
+
|
2166 |
+
if( powerpress_is_custom_podcast_feed() || get_query_var('feed') === 'podcast' )
|
2167 |
+
{
|
2168 |
+
global $wpdb;
|
2169 |
+
$groupby = " {$wpdb->posts}.ID ";
|
2170 |
+
}
|
2171 |
+
return $groupby;
|
2172 |
+
}
|
2173 |
+
add_filter('posts_groupby', 'powerpress_posts_groupby');
|
2174 |
+
|
2175 |
+
function powerpress_post_limits($limits)
|
2176 |
+
{
|
2177 |
+
if( !is_feed() )
|
2178 |
+
return $limits;
|
2179 |
+
|
2180 |
+
if( powerpress_is_custom_podcast_feed() || get_query_var('feed') === 'podcast' )
|
2181 |
+
{
|
2182 |
+
global $powerpress_feed;
|
2183 |
+
if( !empty($powerpress_feed['posts_per_rss']) && preg_match('/^(\d)+$/', trim($powerpress_feed['posts_per_rss'])) )
|
2184 |
+
$limits = "LIMIT 0, {$powerpress_feed['posts_per_rss']}";
|
2185 |
+
}
|
2186 |
+
return $limits;
|
2187 |
+
}
|
2188 |
+
add_filter('post_limits', 'powerpress_post_limits');
|
2189 |
+
|
2190 |
+
|
2191 |
+
function powerpress_do_all_pings()
|
2192 |
+
{
|
2193 |
+
global $wpdb;
|
2194 |
+
$wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE meta_key = '_encloseme' ");
|
2195 |
+
|
2196 |
+
// Now call the WordPress do_all_pings()...
|
2197 |
+
do_all_pings();
|
2198 |
+
remove_action('do_pings', 'do_all_pings');
|
2199 |
+
}
|
2200 |
+
|
2201 |
+
remove_action('do_pings', 'do_all_pings');
|
2202 |
+
add_action('do_pings', 'powerpress_do_all_pings', 1, 1);
|
2203 |
+
|
2204 |
+
/*
|
2205 |
+
Helper functions:
|
2206 |
+
*/
|
2207 |
+
function powerpress_podpress_redirect_check()
|
2208 |
+
{
|
2209 |
+
if( preg_match('/podpress_trac\/([^\/]+)\/([^\/]+)\/([^\/]+)\/(.*)$/', $_SERVER['REQUEST_URI'], $matches) )
|
2210 |
+
{
|
2211 |
+
$post_id = $matches[2];
|
2212 |
+
$mediaNum = $matches[3];
|
2213 |
+
//$filename = $matches[4];
|
2214 |
+
//$method = $matches[1];
|
2215 |
+
|
2216 |
+
if( is_numeric($post_id) && is_numeric($mediaNum))
|
2217 |
+
{
|
2218 |
+
$EpisodeData = powerpress_get_enclosure_data_podpress($post_id, $mediaNum);
|
2219 |
+
if( $EpisodeData && isset($EpisodeData['url']) )
|
2220 |
+
{
|
2221 |
+
if( strpos($EpisodeData['url'], 'http://' ) !== 0 && strpos($EpisodeData['url'], 'https://' ) !== 0 )
|
2222 |
+
{
|
2223 |
+
die('Error occurred obtaining the URL for the requested media file.');
|
2224 |
+
exit;
|
2225 |
+
}
|
2226 |
+
|
2227 |
+
$EnclosureURL = str_replace(' ', '%20', $EpisodeData['url']);
|
2228 |
+
header('Location: '.$EnclosureURL, true, 302);
|
2229 |
+
header('Content-Length: 0');
|
2230 |
+
exit;
|
2231 |
+
}
|
2232 |
+
// Let the WordPress 404 page load as normal
|
2233 |
+
}
|
2234 |
+
}
|
2235 |
+
}
|
2236 |
+
|
2237 |
+
function the_powerpress_content()
|
2238 |
+
{
|
2239 |
+
echo get_the_powerpress_content();
|
2240 |
+
}
|
2241 |
+
|
2242 |
+
function get_the_powerpress_content()
|
2243 |
+
{
|
2244 |
+
global $post;
|
2245 |
+
|
2246 |
+
if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
|
2247 |
+
return '';
|
2248 |
+
|
2249 |
+
if( function_exists('post_password_required') )
|
2250 |
+
{
|
2251 |
+
if( post_password_required($post) )
|
2252 |
+
return '';
|
2253 |
+
}
|
2254 |
+
|
2255 |
+
// PowerPress settings:
|
2256 |
+
$GeneralSettings = get_option('powerpress_general');
|
2257 |
+
|
2258 |
+
// No player or links to add to content...
|
2259 |
+
if( !empty($GeneralSettings['disable_appearance']) )
|
2260 |
+
return $content;
|
2261 |
+
|
2262 |
+
if( !isset($GeneralSettings['custom_feeds']) )
|
2263 |
+
$GeneralSettings['custom_feeds'] = array('podcast'=>'Default Podcast Feed');
|
2264 |
+
|
2265 |
+
// Re-order so the default podcast episode is the top most...
|
2266 |
+
$Temp = $GeneralSettings['custom_feeds'];
|
2267 |
+
$GeneralSettings['custom_feeds'] = array();
|
2268 |
+
$GeneralSettings['custom_feeds']['podcast'] = 'Default Podcast Feed';
|
2269 |
+
|
2270 |
+
foreach( $Temp as $feed_slug=> $feed_title )
|
2271 |
+
{
|
2272 |
+
if( $feed_slug == 'podcast' )
|
2273 |
+
continue;
|
2274 |
+
$GeneralSettings['custom_feeds'][ $feed_slug ] = $feed_title;
|
2275 |
+
}
|
2276 |
+
|
2277 |
+
// Handle post type feeds....
|
2278 |
+
if( !empty($GeneralSettings['posttype_podcasting']) )
|
2279 |
+
{
|
2280 |
+
$post_type = get_query_var('post_type');
|
2281 |
+
if ( is_array( $post_type ) ) {
|
2282 |
+
$post_type = reset( $post_type ); // get first element in array
|
2283 |
+
}
|
2284 |
+
|
2285 |
+
// Get the feed slugs and titles for this post type
|
2286 |
+
$PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
|
2287 |
+
// Loop through this array of post type settings...
|
2288 |
+
if( !empty($PostTypeSettingsArray) )
|
2289 |
+
{
|
2290 |
+
switch($post_type)
|
2291 |
+
{
|
2292 |
+
case 'post':
|
2293 |
+
case 'page': {
|
2294 |
+
// Do nothing!, we want the default podcast to appear in these post types
|
2295 |
+
}; break;
|
2296 |
+
default: {
|
2297 |
+
if( !empty($post_type) && empty($PostTypeSettingsArray['podcast']) )
|
2298 |
+
unset($GeneralSettings['custom_feeds']['podcast']); // special case, we do not want an accidental podcast episode to appear in a custom post type if the feature is enabled
|
2299 |
+
}; break;
|
2300 |
+
}
|
2301 |
+
|
2302 |
+
foreach( $PostTypeSettingsArray as $feed_slug=> $postTypeSettings )
|
2303 |
+
{
|
2304 |
+
if( !empty( $postTypeSettings['title']) )
|
2305 |
+
$GeneralSettings['custom_feeds'][ $feed_slug ] = $postTypeSettings['title'];
|
2306 |
+
else
|
2307 |
+
$GeneralSettings['custom_feeds'][ $feed_slug ] = $feed_slug;
|
2308 |
+
}
|
2309 |
+
}
|
2310 |
+
}
|
2311 |
+
|
2312 |
+
if( !isset($GeneralSettings['display_player']) )
|
2313 |
+
$GeneralSettings['display_player'] = 1;
|
2314 |
+
if( !isset($GeneralSettings['player_function']) )
|
2315 |
+
$GeneralSettings['player_function'] = 1;
|
2316 |
+
if( !isset($GeneralSettings['podcast_link']) )
|
2317 |
+
$GeneralSettings['podcast_link'] = 1;
|
2318 |
+
|
2319 |
+
// Figure out which players are alerady in the body of the page...
|
2320 |
+
$ExcludePlayers = array();
|
2321 |
+
if( isset($GeneralSettings['disable_player']) )
|
2322 |
+
$ExcludePlayers = $GeneralSettings['disable_player']; // automatically disable the players configured
|
2323 |
+
|
2324 |
+
// LOOP HERE TO DISPLAY EACH MEDIA TYPE
|
2325 |
+
$new_content = '';
|
2326 |
+
foreach( $GeneralSettings['custom_feeds'] as $feed_slug=> $feed_title )
|
2327 |
+
{
|
2328 |
+
// Get the enclosure data
|
2329 |
+
$EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
|
2330 |
+
|
2331 |
+
if( !$EpisodeData && !empty($GeneralSettings['process_podpress']) && $feed_slug == 'podcast' )
|
2332 |
+
$EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
|
2333 |
+
|
2334 |
+
if( !$EpisodeData || !$EpisodeData['url'] )
|
2335 |
+
continue;
|
2336 |
+
|
2337 |
+
// Just in case, if there's no URL lets escape!
|
2338 |
+
if( !$EpisodeData['url'] )
|
2339 |
+
continue;
|
2340 |
+
|
2341 |
+
// If the player is not already inserted in the body of the post using the shortcode...
|
2342 |
+
//if( preg_match('/\[powerpress(.*)\]/is', $content) == 0 )
|
2343 |
+
if( !isset($ExcludePlayers[ $feed_slug ]) ) // If the player is not in our exclude list because it's already in the post body somewhere...
|
2344 |
+
{
|
2345 |
+
if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($feed_slug) )
|
2346 |
+
{
|
2347 |
+
$new_content .= powerpress_premium_content_message($post->ID, $feed_slug, $EpisodeData);
|
2348 |
+
}
|
2349 |
+
else
|
2350 |
+
{
|
2351 |
+
if( $GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0 ) // Play in new window only or disabled
|
2352 |
+
{
|
2353 |
+
do_action('wp_powerpress_player_scripts');
|
2354 |
+
$AddDefaultPlayer = empty($EpisodeData['no_player']);
|
2355 |
+
|
2356 |
+
if( $EpisodeData && !empty($EpisodeData['embed']) )
|
2357 |
+
{
|
2358 |
+
$new_content .= trim($EpisodeData['embed']);
|
2359 |
+
if( !empty($GeneralSettings['embed_replace_player']) )
|
2360 |
+
$AddDefaultPlayer = false;
|
2361 |
+
}
|
2362 |
+
|
2363 |
+
if( $AddDefaultPlayer )
|
2364 |
+
{
|
2365 |
+
$image = '';
|
2366 |
+
$width = '';
|
2367 |
+
$height = '';
|
2368 |
+
if( isset($EpisodeData['image']) && $EpisodeData['image'] != '' )
|
2369 |
+
$image = $EpisodeData['image'];
|
2370 |
+
if( !empty($EpisodeData['width']) && is_numeric($EpisodeData['width']) )
|
2371 |
+
$width = $EpisodeData['width'];
|
2372 |
+
if( !empty($EpisodeData['height']) && is_numeric($EpisodeData['height']) )
|
2373 |
+
$height = $EpisodeData['height'];
|
2374 |
+
|
2375 |
+
$new_content .= apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
2376 |
+
}
|
2377 |
+
}
|
2378 |
+
|
2379 |
+
if( !isset($EpisodeData['no_links']) )
|
2380 |
+
{
|
2381 |
+
do_action('wp_powerpress_player_scripts');
|
2382 |
+
$new_content .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
2383 |
+
$new_content .= apply_filters('powerpress_player_subscribe_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
2384 |
+
}
|
2385 |
+
}
|
2386 |
+
}
|
2387 |
+
}
|
2388 |
+
|
2389 |
+
return $new_content;
|
2390 |
+
}
|
2391 |
+
|
2392 |
+
|
2393 |
+
|
2394 |
+
// Adds content types that are missing from the default wp_check_filetype function
|
2395 |
+
function powerpress_get_contenttype($file, $use_wp_check_filetype = true)
|
2396 |
+
{
|
2397 |
+
$parts = pathinfo($file);
|
2398 |
+
if( !empty($parts['extension']) )
|
2399 |
+
{
|
2400 |
+
switch( strtolower($parts['extension']) )
|
2401 |
+
{
|
2402 |
+
// Audio formats
|
2403 |
+
case 'mp3': // most common
|
2404 |
+
case 'mpga':
|
2405 |
+
case 'mp2':
|
2406 |
+
case 'mp2a':
|
2407 |
+
case 'm2a':
|
2408 |
+
case 'm3a':
|
2409 |
+
return 'audio/mpeg';
|
2410 |
+
case 'm4a':
|
2411 |
+
return 'audio/x-m4a';
|
2412 |
+
case 'm4b': // Audio book format
|
2413 |
+
return 'audio/m4b';
|
2414 |
+
case 'm4r': // iPhone ringtone format
|
2415 |
+
return 'audio/m4r';
|
2416 |
+
// OGG Internet content types as set forth by rfc5334 (http://tools.ietf.org/html/rfc5334)
|
2417 |
+
case 'opus':
|
2418 |
+
case 'oga':
|
2419 |
+
case 'spx':
|
2420 |
+
return 'audio/ogg';
|
2421 |
+
case 'wma':
|
2422 |
+
return 'audio/x-ms-wma';
|
2423 |
+
case 'wax':
|
2424 |
+
return 'audio/x-ms-wax';
|
2425 |
+
case 'ra':
|
2426 |
+
case 'ram':
|
2427 |
+
return 'audio/x-pn-realaudio';
|
2428 |
+
case 'mp4a':
|
2429 |
+
return 'audio/mp4';
|
2430 |
+
|
2431 |
+
// Video formats
|
2432 |
+
case 'm4v':
|
2433 |
+
return 'video/x-m4v';
|
2434 |
+
case 'mpeg':
|
2435 |
+
case 'mpg':
|
2436 |
+
case 'mpe':
|
2437 |
+
case 'm1v':
|
2438 |
+
case 'm2v':
|
2439 |
+
return 'video/mpeg';
|
2440 |
+
case 'mp4':
|
2441 |
+
case 'mp4v':
|
2442 |
+
case 'mpg4':
|
2443 |
+
return 'video/mp4';
|
2444 |
+
case 'asf':
|
2445 |
+
case 'asx':
|
2446 |
+
return 'video/x-ms-asf';
|
2447 |
+
case 'wmx':
|
2448 |
+
return 'video/x-ms-wmx';
|
2449 |
+
case 'avi':
|
2450 |
+
return 'video/x-msvideo';
|
2451 |
+
case 'wmv':
|
2452 |
+
return 'video/x-ms-wmv'; // Check this
|
2453 |
+
case 'flv':
|
2454 |
+
return 'video/x-flv';
|
2455 |
+
case 'mov':
|
2456 |
+
case 'qt':
|
2457 |
+
return 'video/quicktime';
|
2458 |
+
case 'divx':
|
2459 |
+
return 'video/divx';
|
2460 |
+
case '3gp':
|
2461 |
+
return 'video/3gpp';
|
2462 |
+
case 'webm':
|
2463 |
+
return 'video/webm';
|
2464 |
+
case 'ogg': {
|
2465 |
+
if( !defined('POWERPRESS_OGG_VIDEO') )
|
2466 |
+
return 'audio/ogg';
|
2467 |
+
} // Let this fall through as ogg/video
|
2468 |
+
case 'ogv':
|
2469 |
+
return 'video/ogg';
|
2470 |
+
|
2471 |
+
// rarely used
|
2472 |
+
case 'mid':
|
2473 |
+
case 'midi':
|
2474 |
+
return 'audio/midi';
|
2475 |
+
case 'wav':
|
2476 |
+
return 'audio/wav';
|
2477 |
+
case 'aa':
|
2478 |
+
return 'audio/audible';
|
2479 |
+
case 'pdf':
|
2480 |
+
return 'application/pdf';
|
2481 |
+
case 'torrent':
|
2482 |
+
return 'application/x-bittorrent';
|
2483 |
+
case 'swf':
|
2484 |
+
return 'application/x-shockwave-flash';
|
2485 |
+
case 'ogx':
|
2486 |
+
return 'application/ogg';
|
2487 |
+
|
2488 |
+
// Most recently added by Apple:
|
2489 |
+
case 'epub':
|
2490 |
+
return 'document/x-epub';
|
2491 |
+
|
2492 |
+
default: // Let it fall through
|
2493 |
+
}
|
2494 |
+
}
|
2495 |
+
|
2496 |
+
// Last case let wordpress detect it:
|
2497 |
+
if( $use_wp_check_filetype )
|
2498 |
+
{
|
2499 |
+
$FileType = wp_check_filetype($file);
|
2500 |
+
if( $FileType && isset($FileType['type']) )
|
2501 |
+
return $FileType['type'];
|
2502 |
+
}
|
2503 |
+
return '';
|
2504 |
+
}
|
2505 |
+
|
2506 |
+
|
2507 |
+
function powerpress_itunes_categories($PrefixSubCategories = false)
|
2508 |
+
{
|
2509 |
+
$temp = array();
|
2510 |
+
$temp['01-00'] = 'Arts';
|
2511 |
+
$temp['01-01'] = 'Design';
|
2512 |
+
$temp['01-02'] = 'Fashion & Beauty';
|
2513 |
+
$temp['01-03'] = 'Food';
|
2514 |
+
$temp['01-04'] = 'Literature';
|
2515 |
+
$temp['01-05'] = 'Performing Arts';
|
2516 |
+
$temp['01-06'] = 'Visual Arts';
|
2517 |
+
|
2518 |
+
$temp['02-00'] = 'Business';
|
2519 |
+
$temp['02-01'] = 'Business News';
|
2520 |
+
$temp['02-02'] = 'Careers';
|
2521 |
+
$temp['02-03'] = 'Investing';
|
2522 |
+
$temp['02-04'] = 'Management & Marketing';
|
2523 |
+
$temp['02-05'] = 'Shopping';
|
2524 |
+
|
2525 |
+
$temp['03-00'] = 'Comedy';
|
2526 |
+
|
2527 |
+
$temp['04-00'] = 'Education';
|
2528 |
+
$temp['04-01'] = 'Education Technology';
|
2529 |
+
$temp['04-02'] = 'Higher Education';
|
2530 |
+
$temp['04-03'] = 'K-12';
|
2531 |
+
$temp['04-04'] = 'Language Courses';
|
2532 |
+
$temp['04-05'] = 'Training';
|
2533 |
+
|
2534 |
+
$temp['05-00'] = 'Games & Hobbies';
|
2535 |
+
$temp['05-01'] = 'Automotive';
|
2536 |
+
$temp['05-02'] = 'Aviation';
|
2537 |
+
$temp['05-03'] = 'Hobbies';
|
2538 |
+
$temp['05-04'] = 'Other Games';
|
2539 |
+
$temp['05-05'] = 'Video Games';
|
2540 |
+
|
2541 |
+
$temp['06-00'] = 'Government & Organizations';
|
2542 |
+
$temp['06-01'] = 'Local';
|
2543 |
+
$temp['06-02'] = 'National';
|
2544 |
+
$temp['06-03'] = 'Non-Profit';
|
2545 |
+
$temp['06-04'] = 'Regional';
|
2546 |
+
|
2547 |
+
$temp['07-00'] = 'Health';
|
2548 |
+
$temp['07-01'] = 'Alternative Health';
|
2549 |
+
$temp['07-02'] = 'Fitness & Nutrition';
|
2550 |
+
$temp['07-03'] = 'Self-Help';
|
2551 |
+
$temp['07-04'] = 'Sexuality';
|
2552 |
+
|
2553 |
+
$temp['08-00'] = 'Kids & Family';
|
2554 |
+
|
2555 |
+
$temp['09-00'] = 'Music';
|
2556 |
+
|
2557 |
+
$temp['10-00'] = 'News & Politics';
|
2558 |
+
|
2559 |
+
$temp['11-00'] = 'Religion & Spirituality';
|
2560 |
+
$temp['11-01'] = 'Buddhism';
|
2561 |
+
$temp['11-02'] = 'Christianity';
|
2562 |
+
$temp['11-03'] = 'Hinduism';
|
2563 |
+
$temp['11-04'] = 'Islam';
|
2564 |
+
$temp['11-05'] = 'Judaism';
|
2565 |
+
$temp['11-06'] = 'Other';
|
2566 |
+
$temp['11-07'] = 'Spirituality';
|
2567 |
+
|
2568 |
+
$temp['12-00'] = 'Science & Medicine';
|
2569 |
+
$temp['12-01'] = 'Medicine';
|
2570 |
+
$temp['12-02'] = 'Natural Sciences';
|
2571 |
+
$temp['12-03'] = 'Social Sciences';
|
2572 |
+
|
2573 |
+
$temp['13-00'] = 'Society & Culture';
|
2574 |
+
$temp['13-01'] = 'History';
|
2575 |
+
$temp['13-02'] = 'Personal Journals';
|
2576 |
+
$temp['13-03'] = 'Philosophy';
|
2577 |
+
$temp['13-04'] = 'Places & Travel';
|
2578 |
+
|
2579 |
+
$temp['14-00'] = 'Sports & Recreation';
|
2580 |
+
$temp['14-01'] = 'Amateur';
|
2581 |
+
$temp['14-02'] = 'College & High School';
|
2582 |
+
$temp['14-03'] = 'Outdoor';
|
2583 |
+
$temp['14-04'] = 'Professional';
|
2584 |
+
|
2585 |
+
$temp['15-00'] = 'Technology';
|
2586 |
+
$temp['15-01'] = 'Gadgets';
|
2587 |
+
$temp['15-02'] = 'Tech News';
|
2588 |
+
$temp['15-03'] = 'Podcasting';
|
2589 |
+
$temp['15-04'] = 'Software How-To';
|
2590 |
+
|
2591 |
+
$temp['16-00'] = 'TV & Film';
|
2592 |
+
|
2593 |
+
if( $PrefixSubCategories )
|
2594 |
+
{
|
2595 |
+
foreach( $temp as $key=> $val )
|
2596 |
+
{
|
2597 |
+
$parts = explode('-', $key);
|
2598 |
+
$cat = $parts[0];
|
2599 |
+
$subcat = $parts[1];
|
2600 |
+
|
2601 |
+
if( $subcat != '00' )
|
2602 |
+
$temp[$key] = $temp[$cat.'-00'].' > '.$val;
|
2603 |
+
}
|
2604 |
+
reset($temp);
|
2605 |
+
}
|
2606 |
+
|
2607 |
+
return $temp;
|
2608 |
+
}
|
2609 |
+
|
2610 |
+
/**
|
2611 |
+
* Categories for 2019+ Apple Podcast directory
|
2612 |
+
*/
|
2613 |
+
function powerpress_apple_categories($PrefixSubCategories = false) {
|
2614 |
+
$temp = array();
|
2615 |
+
$temp['01-00'] = 'Arts';
|
2616 |
+
$temp['01-01'] = 'Books';
|
2617 |
+
$temp['01-02'] = 'Design';
|
2618 |
+
$temp['01-03'] = 'Fashion & Beauty';
|
2619 |
+
$temp['01-04'] = 'Food';
|
2620 |
+
$temp['01-05'] = 'Performing Arts';
|
2621 |
+
$temp['01-06'] = 'Visual Arts';
|
2622 |
+
|
2623 |
+
$temp['02-00'] = 'Business';
|
2624 |
+
$temp['02-01'] = 'Careers';
|
2625 |
+
$temp['02-02'] = 'Entrepreneurship';
|
2626 |
+
$temp['02-03'] = 'Investing';
|
2627 |
+
$temp['02-04'] = 'Management';
|
2628 |
+
$temp['02-05'] = 'Marketing';
|
2629 |
+
$temp['02-06'] = 'Non-profit';
|
2630 |
+
|
2631 |
+
$temp['03-00'] = 'Comedy';
|
2632 |
+
$temp['03-01'] = 'Comedy Interviews';
|
2633 |
+
$temp['03-02'] = 'Improv';
|
2634 |
+
$temp['03-03'] = 'Stand-Up';
|
2635 |
+
|
2636 |
+
$temp['04-00'] = 'Education';
|
2637 |
+
$temp['04-01'] = 'Courses';
|
2638 |
+
$temp['04-02'] = 'How To';
|
2639 |
+
$temp['04-03'] = 'Language Learning';
|
2640 |
+
$temp['04-04'] = 'Self-Improvement';
|
2641 |
+
|
2642 |
+
$temp['05-00'] = 'Fiction';
|
2643 |
+
$temp['05-01'] = 'Comedy Fiction';
|
2644 |
+
$temp['05-02'] = 'Drama';
|
2645 |
+
$temp['05-03'] = 'Science Fiction';
|
2646 |
+
|
2647 |
+
$temp['06-00'] = 'Government';
|
2648 |
+
|
2649 |
+
$temp['07-00'] = 'Health & Fitness';
|
2650 |
+
$temp['07-01'] = 'Alternative Health';
|
2651 |
+
$temp['07-02'] = 'Fitness';
|
2652 |
+
$temp['07-03'] = 'Medicine';
|
2653 |
+
$temp['07-04'] = 'Mental Health';
|
2654 |
+
$temp['07-05'] = 'Nutrition';
|
2655 |
+
$temp['07-06'] = 'Sexuality';
|
2656 |
+
|
2657 |
+
$temp['08-00'] = 'History';
|
2658 |
+
|
2659 |
+
$temp['09-00'] = 'Kids & Family';
|
2660 |
+
$temp['09-01'] = 'Education for Kids';
|
2661 |
+
$temp['09-02'] = 'Parenting';
|
2662 |
+
$temp['09-03'] = 'Pets & Animals';
|
2663 |
+
$temp['09-04'] = 'Stories for Kids';
|
2664 |
+
|
2665 |
+
$temp['10-00'] = 'Leisure';
|
2666 |
+
$temp['10-01'] = 'Animation & Manga';
|
2667 |
+
$temp['10-02'] = 'Automotive';
|
2668 |
+
$temp['10-03'] = 'Aviation';
|
2669 |
+
$temp['10-04'] = 'Crafts';
|
2670 |
+
$temp['10-05'] = 'Games';
|
2671 |
+
$temp['10-06'] = 'Hobbies';
|
2672 |
+
$temp['10-07'] = 'Home & Garden';
|
2673 |
+
$temp['10-08'] = 'Video Games';
|
2674 |
+
|
2675 |
+
$temp['11-00'] = 'Music';
|
2676 |
+
$temp['11-01'] = 'Music Commentary';
|
2677 |
+
$temp['11-02'] = 'Music History';
|
2678 |
+
$temp['11-03'] = 'Music Interviews';
|
2679 |
+
|
2680 |
+
$temp['12-00'] = 'News';
|
2681 |
+
$temp['12-01'] = 'Business News';
|
2682 |
+
$temp['12-02'] = 'Daily News';
|
2683 |
+
$temp['12-03'] = 'Entertainment News';
|
2684 |
+
$temp['12-04'] = 'News Commentary';
|
2685 |
+
$temp['12-05'] = 'Politics';
|
2686 |
+
$temp['12-06'] = 'Sports News';
|
2687 |
+
$temp['12-07'] = 'Tech News';
|
2688 |
+
|
2689 |
+
$temp['13-00'] = 'Religion & Spirituality';
|
2690 |
+
$temp['13-01'] = 'Buddhism';
|
2691 |
+
$temp['13-02'] = 'Christianity';
|
2692 |
+
$temp['13-03'] = 'Hinduism';
|
2693 |
+
$temp['13-04'] = 'Islam';
|
2694 |
+
$temp['13-05'] = 'Judaism';
|
2695 |
+
$temp['13-06'] = 'Religion';
|
2696 |
+
$temp['13-07'] = 'Spirituality';
|
2697 |
+
|
2698 |
+
$temp['14-00'] = 'Science';
|
2699 |
+
$temp['14-01'] = 'Astronomy';
|
2700 |
+
$temp['14-02'] = 'Chemistry';
|
2701 |
+
$temp['14-03'] = 'Earth Sciences';
|
2702 |
+
$temp['14-04'] = 'Life Sciences';
|
2703 |
+
$temp['14-05'] = 'Mathematics';
|
2704 |
+
$temp['14-06'] = 'Natural Sciences';
|
2705 |
+
$temp['14-07'] = 'Nature';
|
2706 |
+
$temp['14-08'] = 'Physics';
|
2707 |
+
$temp['14-09'] = 'Social Sciences';
|
2708 |
+
|
2709 |
+
$temp['15-00'] = 'Society & Culture';
|
2710 |
+
$temp['15-01'] = 'Documentary';
|
2711 |
+
$temp['15-02'] = 'Personal Journals';
|
2712 |
+
$temp['15-03'] = 'Philosophy';
|
2713 |
+
$temp['15-04'] = 'Places & Travel';
|
2714 |
+
$temp['15-06'] = 'Relationships';
|
2715 |
+
|
2716 |
+
$temp['16-00'] = 'Sports';
|
2717 |
+
$temp['16-01'] = 'Baseball';
|
2718 |
+
$temp['16-02'] = 'Basketball';
|
2719 |
+
$temp['16-03'] = 'Cricket';
|
2720 |
+
$temp['16-04'] = 'Fantasy Sports';
|
2721 |
+
$temp['16-05'] = 'Football';
|
2722 |
+
$temp['16-06'] = 'Golf';
|
2723 |
+
$temp['16-07'] = 'Hockey';
|
2724 |
+
$temp['16-08'] = 'Rugby';
|
2725 |
+
$temp['16-09'] = 'Running';
|
2726 |
+
$temp['16-10'] = 'Soccer';
|
2727 |
+
$temp['16-11'] = 'Swimming';
|
2728 |
+
$temp['16-12'] = 'Tennis';
|
2729 |
+
$temp['16-13'] = 'Volleyball';
|
2730 |
+
$temp['16-15'] = 'Wilderness';
|
2731 |
+
$temp['16-16'] = 'Wrestling';
|
2732 |
+
|
2733 |
+
$temp['17-00'] = 'Technology';
|
2734 |
+
|
2735 |
+
$temp['18-00'] = 'True Crime';
|
2736 |
+
|
2737 |
+
$temp['19-00'] = 'TV & Film';
|
2738 |
+
$temp['19-01'] = 'After shows';
|
2739 |
+
$temp['19-02'] = 'Film History';
|
2740 |
+
$temp['19-03'] = 'Film Interviews';
|
2741 |
+
$temp['19-04'] = 'Film Reviews';
|
2742 |
+
$temp['19-05'] = 'TV Reviews';
|
2743 |
+
|
2744 |
+
if( $PrefixSubCategories )
|
2745 |
+
{
|
2746 |
+
foreach( $temp as $key=> $val )
|
2747 |
+
{
|
2748 |
+
$parts = explode('-', $key);
|
2749 |
+
$cat = $parts[0];
|
2750 |
+
$subcat = $parts[1];
|
2751 |
+
|
2752 |
+
if( $subcat != '00' )
|
2753 |
+
$temp[$key] = $temp[$cat.'-00'].' > '.$val;
|
2754 |
+
}
|
2755 |
+
reset($temp);
|
2756 |
+
}
|
2757 |
+
|
2758 |
+
return $temp;
|
2759 |
+
}
|
2760 |
+
|
2761 |
+
function powerpress_googleplay_categories()
|
2762 |
+
{
|
2763 |
+
$temp = array();
|
2764 |
+
$temp['01-00'] = 'Arts';
|
2765 |
+
$temp['02-00'] = 'Business';
|
2766 |
+
$temp['03-00'] = 'Comedy';
|
2767 |
+
$temp['04-00'] = 'Education';
|
2768 |
+
$temp['05-00'] = 'Games & Hobbies';
|
2769 |
+
$temp['06-00'] = 'Government & Organizations';
|
2770 |
+
$temp['07-00'] = 'Health';
|
2771 |
+
$temp['08-00'] = 'Kids & Family';
|
2772 |
+
$temp['09-00'] = 'Music';
|
2773 |
+
$temp['10-00'] = 'News & Politics';
|
2774 |
+
$temp['11-00'] = 'Religion & Spirituality';
|
2775 |
+
$temp['12-00'] = 'Science & Medicine';
|
2776 |
+
$temp['13-00'] = 'Society & Culture';
|
2777 |
+
$temp['14-00'] = 'Sports & Recreation';
|
2778 |
+
$temp['15-00'] = 'Technology';
|
2779 |
+
$temp['16-00'] = 'TV & Film';
|
2780 |
+
|
2781 |
+
return $temp;
|
2782 |
+
}
|
2783 |
+
|
2784 |
+
function powerpress_get_root_url()
|
2785 |
+
{
|
2786 |
+
/*
|
2787 |
+
// OLD CODE:
|
2788 |
+
$powerpress_dirname = basename( POWERPRESS_ABSPATH );
|
2789 |
+
return WP_PLUGIN_URL . '/'. $powerpress_dirname .'/';
|
2790 |
+
*/
|
2791 |
+
$local_path = __FILE__;
|
2792 |
+
if( DIRECTORY_SEPARATOR == '\\' ) { // Win32 fix
|
2793 |
+
$local_path = basename(dirname(__FILE__)) .'/'. basename(__FILE__);
|
2794 |
+
}
|
2795 |
+
$plugin_url = plugins_url('', $local_path);
|
2796 |
+
return $plugin_url . '/';
|
2797 |
+
}
|
2798 |
+
|
2799 |
+
function powerpress_get_the_exerpt($for_summary = false, $no_filters = false, $post_id = false)
|
2800 |
+
{
|
2801 |
+
if( $no_filters ) {
|
2802 |
+
if( $post_id > 0 ) {
|
2803 |
+
$post = get_post($post_id);
|
2804 |
+
$subtitle = $post->post_excerpt;
|
2805 |
+
if ( $subtitle == '') {
|
2806 |
+
|
2807 |
+
$subtitle = $post->post_content;
|
2808 |
+
$shortcodesTemp = $GLOBALS['shortcode_tags'];
|
2809 |
+
$GLOBALS['shortcode_tags']['skipto'] = 'powerpress_shortcode_skipto';
|
2810 |
+
$subtitle = do_shortcode($subtitle);
|
2811 |
+
$GLOBALS['shortcode_tags'] = $shortcodesTemp;
|
2812 |
+
|
2813 |
+
$subtitle = strip_shortcodes( $subtitle );
|
2814 |
+
$subtitle = str_replace(']]>', ']]>', $subtitle);
|
2815 |
+
$subtitle = strip_tags($subtitle);
|
2816 |
+
}
|
2817 |
+
}
|
2818 |
+
else if( is_object($GLOBALS['post']) )
|
2819 |
+
{
|
2820 |
+
$subtitle = $GLOBALS['post']->post_excerpt;
|
2821 |
+
if ( $subtitle == '') {
|
2822 |
+
|
2823 |
+
$subtitle = $GLOBALS['post']->post_content;
|
2824 |
+
|
2825 |
+
$shortcodesTemp = $GLOBALS['shortcode_tags'];
|
2826 |
+
$GLOBALS['shortcode_tags']['skipto'] = 'powerpress_shortcode_skipto';
|
2827 |
+
$subtitle = do_shortcode($subtitle);
|
2828 |
+
$GLOBALS['shortcode_tags'] = $shortcodesTemp;
|
2829 |
+
|
2830 |
+
$subtitle = strip_shortcodes( $subtitle );
|
2831 |
+
$subtitle = str_replace(']]>', ']]>', $subtitle);
|
2832 |
+
$subtitle = strip_tags($subtitle);
|
2833 |
+
}
|
2834 |
+
}
|
2835 |
+
} else {
|
2836 |
+
$subtitle = get_the_excerpt();
|
2837 |
+
}
|
2838 |
+
|
2839 |
+
$subtitle = trim( strip_tags( $subtitle ) );
|
2840 |
+
if( !empty($subtitle) )
|
2841 |
+
return $subtitle;
|
2842 |
+
return powerpress_get_the_content( $for_summary, $no_filters );
|
2843 |
+
}
|
2844 |
+
|
2845 |
+
function powerpress_get_the_content($for_summary = true, $no_filters = false, $no_strip_tags = false) {
|
2846 |
+
if( $no_filters ) {
|
2847 |
+
global $post;
|
2848 |
+
$content_no_html = $post->post_content;
|
2849 |
+
|
2850 |
+
$shortcodesTemp = $GLOBALS['shortcode_tags'];
|
2851 |
+
$GLOBALS['shortcode_tags']['skipto'] = 'powerpress_shortcode_skipto';
|
2852 |
+
$content_no_html = do_shortcode($content_no_html);
|
2853 |
+
$GLOBALS['shortcode_tags'] = $shortcodesTemp;
|
2854 |
+
|
2855 |
+
//$content_no_html = strip_shortcodes( $content_no_html );
|
2856 |
+
$content_no_html = str_replace(']]>', ']]>', $content_no_html);
|
2857 |
+
$content_no_html = wp_staticize_emoji( _oembed_filter_feed_content( $content_no_html ) );
|
2858 |
+
} else {
|
2859 |
+
$content_no_html = get_the_content();
|
2860 |
+
}
|
2861 |
+
|
2862 |
+
$content_no_html = strip_shortcodes( $content_no_html );
|
2863 |
+
if( $no_strip_tags )
|
2864 |
+
return $content_no_html;
|
2865 |
+
|
2866 |
+
if( $for_summary ) {
|
2867 |
+
return trim( strip_tags($content_no_html, '<a><p><br><ul><li>') );
|
2868 |
+
}
|
2869 |
+
return trim( strip_tags($content_no_html) );
|
2870 |
+
}
|
2871 |
+
|
2872 |
+
function powerpress_enhanced_itunes_summary($no_filters = false)
|
2873 |
+
{
|
2874 |
+
if( $no_filters ) {
|
2875 |
+
$summary = powerpress_get_the_content(false, true, true);
|
2876 |
+
} else {
|
2877 |
+
$summary = apply_filters( 'the_content', powerpress_get_the_content(false, $no_filters, true) );
|
2878 |
+
}
|
2879 |
+
$summary = str_replace("<li>", '<li>* ', $summary); // Make sure our bullet lists stay nicely formatted.
|
2880 |
+
$summary = strip_tags($summary, '<a>'); // We can leave a tags for itunes:summary, this will also strip CDATA tags
|
2881 |
+
return $summary;
|
2882 |
+
}
|
2883 |
+
|
2884 |
+
function powerpress_url_in_feed($url) {
|
2885 |
+
if( defined('POWERPRESS_FEEDS_FORCE_HTTP') && is_feed() ) {
|
2886 |
+
if( preg_match('/^https:\/\/(.*)$/', $url, $matches) ) {
|
2887 |
+
return 'http://'.$matches[1];
|
2888 |
+
}
|
2889 |
+
}
|
2890 |
+
else if( defined('POWERPRESS_FEEDS_FORCE_HTTPS') && is_feed() ) {
|
2891 |
+
if( preg_match('/^http:\/\/(.*)$/', $url, $matches) ) {
|
2892 |
+
return 'https://'.$matches[1];
|
2893 |
+
}
|
2894 |
+
}
|
2895 |
+
return $url;
|
2896 |
+
}
|
2897 |
+
|
2898 |
+
function powerpress_format_itunes_value($value, $tag, $cdata=false)
|
2899 |
+
{
|
2900 |
+
if( $tag == 'summary' )
|
2901 |
+
$value = nl2br($value); // Does not remove existing br tags if present.
|
2902 |
+
|
2903 |
+
if( $cdata ) {
|
2904 |
+
$value = str_replace(']]>', ']]>', $value);
|
2905 |
+
return powerpress_trim_itunes_value($value, $tag);
|
2906 |
+
}
|
2907 |
+
|
2908 |
+
if( !defined('POWERPRESS_DISABLE_ITUNES_UTF8') || POWERPRESS_DISABLE_ITUNES_UTF8 == false ) // If not defined or it is false
|
2909 |
+
{
|
2910 |
+
global $wpdb;
|
2911 |
+
switch( $wpdb->charset )
|
2912 |
+
{
|
2913 |
+
case 'utf8': break;
|
2914 |
+
case 'utf8mb3': break;
|
2915 |
+
case 'utf8mb4': break;
|
2916 |
+
default: {
|
2917 |
+
|
2918 |
+
// preg_match fails when it encounters invalid UTF8 in $string
|
2919 |
+
if ( 1 !== @preg_match( '/^./us', $value ) ) {
|
2920 |
+
$value = utf8_encode($value); // If it is not, convert to UTF-8 then decode it...
|
2921 |
+
}
|
2922 |
+
}
|
2923 |
+
}
|
2924 |
+
}
|
2925 |
+
|
2926 |
+
// Code added to solve issue with KimiliFlashEmbed plugin and also remove the shortcode for the WP Audio Player
|
2927 |
+
// 99.9% of the time this code will not be necessary
|
2928 |
+
$value = preg_replace("/\[(kml_(flash|swf)embed|audio\:)\b(.*?)(?:(\/))?(\]|$)/isu", '', $value);
|
2929 |
+
$value = @html_entity_decode($value, ENT_COMPAT, 'UTF-8'); // Remove any additional entities such as
|
2930 |
+
$value = preg_replace( '/&/ui' , '&', $value); // Precaution in case it didn't get removed from function above.
|
2931 |
+
|
2932 |
+
return esc_html( powerpress_trim_itunes_value($value, $tag) );
|
2933 |
+
}
|
2934 |
+
|
2935 |
+
function powerpress_trim_itunes_value($value, $tag = 'summary')
|
2936 |
+
{
|
2937 |
+
$value = trim($value); // First we need to trim the string
|
2938 |
+
$length = (function_exists('mb_strlen')?mb_strlen($value):strlen($value) );
|
2939 |
+
$trim_at = false;
|
2940 |
+
$remove_new_lines = false;
|
2941 |
+
|
2942 |
+
switch($tag)
|
2943 |
+
{
|
2944 |
+
case 'description':
|
2945 |
+
case 'summary': {
|
2946 |
+
// 4000 character limit
|
2947 |
+
if( $length > 4000 )
|
2948 |
+
$trim_at = 3997; // 3 less characters so we can add a dot dot dot
|
2949 |
+
}; break;
|
2950 |
+
case 'subtitle':
|
2951 |
+
case 'author':
|
2952 |
+
case 'name':
|
2953 |
+
default: {
|
2954 |
+
$remove_new_lines = true;
|
2955 |
+
// 255 character limit
|
2956 |
+
if( $length > 255 )
|
2957 |
+
$trim_at = 252; // Allow 3 dots to be added after the trim
|
2958 |
+
};
|
2959 |
+
}
|
2960 |
+
|
2961 |
+
if( $trim_at )
|
2962 |
+
{
|
2963 |
+
// Start trimming
|
2964 |
+
$value = (function_exists('mb_substr')?mb_substr($value, 0, $trim_at):substr($value, 0, $trim_at) );
|
2965 |
+
$clean_break = false;
|
2966 |
+
if( preg_match('/(.*[,\n.\?!])[^,\n.\?!]/isu', $value, $matches) ) // pattern modifiers: case (i)nsensitive, entire (s)tring and (u)nicode
|
2967 |
+
{
|
2968 |
+
if( isset( $matches[1]) )
|
2969 |
+
{
|
2970 |
+
$detected_eof_pos = (function_exists('mb_strlen')?mb_strlen($matches[1]):strlen($matches[1]) );
|
2971 |
+
// Look back at most 50 characters...
|
2972 |
+
if( $detected_eof_pos > 3950 || ($detected_eof_pos > 205 && $detected_eof_pos < 255 ) )
|
2973 |
+
{
|
2974 |
+
$value = $matches[1];
|
2975 |
+
$clean_break = true;
|
2976 |
+
}
|
2977 |
+
// Otherwise we want to continue with the same value we started with...
|
2978 |
+
}
|
2979 |
+
}
|
2980 |
+
|
2981 |
+
if( $clean_break == false && $tag = 'subtitle' ) // Subtitle we want to add a ... at the end
|
2982 |
+
{
|
2983 |
+
if( $trim_at )
|
2984 |
+
$value = (function_exists('mb_substr')?mb_substr($value, 0, $trim_at):substr($value, 0, $trim_at) ). '...';
|
2985 |
+
}
|
2986 |
+
}
|
2987 |
+
|
2988 |
+
if( $remove_new_lines )
|
2989 |
+
$value = str_replace( array("\r\n\r\n", "\n", "\r", "\t","- "), array(' - ',' ', '', ' ', ''), $value );
|
2990 |
+
|
2991 |
+
return $value;
|
2992 |
+
}
|
2993 |
+
|
2994 |
+
function powerpress_add_redirect_url($MediaURL, $EpisodeData = false) // $channel = 'podcast')
|
2995 |
+
{
|
2996 |
+
if( preg_match('/^https?:\/\//i', $MediaURL) == 0 )
|
2997 |
+
return $MediaURL; // If the user is hosting media not via http (e.g. ftp) then we can't handle the redirect
|
2998 |
+
|
2999 |
+
if( !is_array($EpisodeData) )
|
3000 |
+
{
|
3001 |
+
$feed_slug = '';
|
3002 |
+
if( is_string($EpisodeData) && !empty($EpisodeData) ) {
|
3003 |
+
$feed_slug = $EpisodeData;
|
3004 |
+
}
|
3005 |
+
|
3006 |
+
$EpisodeData = array();
|
3007 |
+
if( !empty($feed_slug) )
|
3008 |
+
$EpisodeData['feed'] = $EpisodeData;
|
3009 |
+
}
|
3010 |
+
|
3011 |
+
if( empty($EpisodeData['feed']) )
|
3012 |
+
$EpisodeData['feed'] = 'podcast';
|
3013 |
+
|
3014 |
+
$NewURL = apply_filters( 'powerpress_redirect_url', $MediaURL, $EpisodeData );
|
3015 |
+
|
3016 |
+
$URLScheme = ( (preg_match('/^https:\/\//i', $NewURL) != 0 ) ? 'https://':'http://');
|
3017 |
+
|
3018 |
+
$GeneralSettings = get_option('powerpress_general');
|
3019 |
+
$Redirects = array('redirect0'=>'', 'redirect1'=>'', 'redirect2'=>'', 'redirect3'=>'');
|
3020 |
+
if( !empty($GeneralSettings['redirect1']) )
|
3021 |
+
$Redirects['redirect1'] = $GeneralSettings['redirect1'];
|
3022 |
+
if( !empty($GeneralSettings['redirect2']) )
|
3023 |
+
$Redirects['redirect2'] = $GeneralSettings['redirect2'];
|
3024 |
+
if( !empty($GeneralSettings['redirect3']) )
|
3025 |
+
$Redirects['redirect3'] = $GeneralSettings['redirect3'];
|
3026 |
+
|
3027 |
+
if( !empty($GeneralSettings['cat_casting']) ) { // If category podcasting...
|
3028 |
+
|
3029 |
+
if( !empty($EpisodeData['category']) ) {
|
3030 |
+
|
3031 |
+
$FeedCatSettings = get_option('powerpress_cat_feed_'.$EpisodeData['category'] );
|
3032 |
+
if( !empty($FeedCatSettings['redirect']) ) {
|
3033 |
+
$Redirects['redirect0'] = $FeedCatSettings['redirect'];
|
3034 |
+
$Redirects['redirect1'] = '';
|
3035 |
+
$Redirects['redirect2'] = '';
|
3036 |
+
$Redirects['redirect3'] = '';
|
3037 |
+
}
|
3038 |
+
if( !empty($FeedCatSettings['redirect2']) ) {
|
3039 |
+
$Redirects['redirect1'] = $FeedCatSettings['redirect2'];
|
3040 |
+
}
|
3041 |
+
} else { // Use the old way
|
3042 |
+
|
3043 |
+
if( is_category() ) { // Special case where we want to track the category separately
|
3044 |
+
$FeedCatSettings = get_option('powerpress_cat_feed_'.get_query_var('cat') );
|
3045 |
+
if( $FeedCatSettings && !empty($FeedCatSettings['redirect']) ) {
|
3046 |
+
$Redirects['redirect0'] = $FeedCatSettings['redirect'];
|
3047 |
+
$Redirects['redirect1'] = '';
|
3048 |
+
$Redirects['redirect2'] = '';
|
3049 |
+
$Redirects['redirect3'] = '';
|
3050 |
+
if( !empty($FeedCatSettings['redirect2']) ) {
|
3051 |
+
$Redirects['redirect1'] = $FeedCatSettings['redirect2'];
|
3052 |
+
}
|
3053 |
+
}
|
3054 |
+
} else if( is_single() ) {
|
3055 |
+
$categories = wp_get_post_categories( get_the_ID() );
|
3056 |
+
if( count($categories) == 1 ) { // See if only one category is associated with this post
|
3057 |
+
foreach( $categories as $null=> $cat_id ) {
|
3058 |
+
break;
|
3059 |
+
}
|
3060 |
+
$FeedCatSettings = get_option('powerpress_cat_feed_'.$cat_id );
|
3061 |
+
if( $FeedCatSettings && !empty($FeedCatSettings['redirect']) ) {
|
3062 |
+
$Redirects['redirect0'] = $FeedCatSettings['redirect'];
|
3063 |
+
$Redirects['redirect1'] = '';
|
3064 |
+
$Redirects['redirect2'] = '';
|
3065 |
+
$Redirects['redirect3'] = '';
|
3066 |
+
if( !empty($FeedCatSettings['redirect2']) ) {
|
3067 |
+
$Redirects['redirect1'] = $FeedCatSettings['redirect2'];
|
3068 |
+
}
|
3069 |
+
}
|
3070 |
+
}
|
3071 |
+
}
|
3072 |
+
}
|
3073 |
+
}
|
3074 |
+
|
3075 |
+
//custom_feeds
|
3076 |
+
if( !empty($GeneralSettings['channels']) ) {
|
3077 |
+
|
3078 |
+
$FeedSettings = get_option('powerpress_feed_'. $EpisodeData['feed']);
|
3079 |
+
if( !empty($FeedSettings['redirect']) )
|
3080 |
+
{
|
3081 |
+
// Override the redirect
|
3082 |
+
$Redirects['redirect0'] = $FeedSettings['redirect'];
|
3083 |
+
$Redirects['redirect1'] = '';
|
3084 |
+
$Redirects['redirect2'] = '';
|
3085 |
+
$Redirects['redirect3'] = '';
|
3086 |
+
}
|
3087 |
+
if( !empty($FeedSettings['redirect2']) ) {
|
3088 |
+
$Redirects['redirect1'] = $FeedSettings['redirect2'];
|
3089 |
+
}
|
3090 |
+
}
|
3091 |
+
|
3092 |
+
if( !empty($GeneralSettings['posttype_podcasting']) ) // Post Type Podcasting
|
3093 |
+
{
|
3094 |
+
$post_type = get_post_type();
|
3095 |
+
switch($post_type) {
|
3096 |
+
case 'post':
|
3097 |
+
case 'page': {
|
3098 |
+
// Do nothing!, we want the default podcast and channels to appear in these post types
|
3099 |
+
}; break;
|
3100 |
+
default: {
|
3101 |
+
$PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
|
3102 |
+
|
3103 |
+
// We found a post type statsitics tracking
|
3104 |
+
if( !empty($PostTypeSettingsArray[ $EpisodeData['feed'] ]['redirect']) )
|
3105 |
+
{
|
3106 |
+
$Redirects['redirect0'] = $PostTypeSettingsArray[ $EpisodeData['feed'] ]['redirect'];
|
3107 |
+
$Redirects['redirect1'] = '';
|
3108 |
+
$Redirects['redirect2'] = '';
|
3109 |
+
$Redirects['redirect3'] = '';
|
3110 |
+
}
|
3111 |
+
if( !empty($PostTypeSettingsArray[ $EpisodeData['feed'] ]['redirect2']) ) {
|
3112 |
+
$Redirects['redirect1'] = $PostTypeSettingsArray[ $EpisodeData['feed'] ]['redirect2'];
|
3113 |
+
}
|
3114 |
+
};
|
3115 |
+
}
|
3116 |
+
}
|
3117 |
+
|
3118 |
+
if( version_compare($GLOBALS['wp_version'], 4.5, '>=' ) )
|
3119 |
+
{
|
3120 |
+
if( !empty($GeneralSettings['taxonomy_podcasting']) ) // Taxonomy Podcasting
|
3121 |
+
{
|
3122 |
+
$PowerPressTaxonomies = get_option('powerpress_taxonomy_podcasting');
|
3123 |
+
if( !empty($PowerPressTaxonomies) )
|
3124 |
+
{
|
3125 |
+
$terms = get_terms();
|
3126 |
+
$ttid_found = 0;
|
3127 |
+
$TaxonomySettings = false;
|
3128 |
+
|
3129 |
+
foreach( $terms as $index=> $termObj )
|
3130 |
+
{
|
3131 |
+
// Skip the default taxonomies
|
3132 |
+
if( $termObj->taxonomy == 'category' || $termObj->taxonomy == 'link_category' || $termObj->taxonomy == 'post_tag' || $termObj->taxonomy == 'nav_menu' )
|
3133 |
+
continue;
|
3134 |
+
|
3135 |
+
if( !empty($PowerPressTaxonomies[ $termObj->term_taxonomy_id ]) )
|
3136 |
+
{
|
3137 |
+
$ttid_found = $termObj->term_taxonomy_id;
|
3138 |
+
|
3139 |
+
$TaxonomySettings = get_option('powerpress_taxonomy_'.$ttid_found);
|
3140 |
+
// Found it???
|
3141 |
+
if( !empty($TaxonomySettings['redirect']) )
|
3142 |
+
{
|
3143 |
+
$Redirects['redirect0'] = $TaxonomySettings['redirect'];
|
3144 |
+
$Redirects['redirect1'] = '';
|
3145 |
+
$Redirects['redirect2'] = '';
|
3146 |
+
$Redirects['redirect3'] = '';
|
3147 |
+
break;
|
3148 |
+
}
|
3149 |
+
}
|
3150 |
+
}
|
3151 |
+
}
|
3152 |
+
}
|
3153 |
+
}
|
3154 |
+
|
3155 |
+
// Allow other apps to update the redirects
|
3156 |
+
$Redirects = apply_filters('powerpress_redirects', $Redirects, $EpisodeData);
|
3157 |
+
|
3158 |
+
for( $x = 3; $x >= 0; $x-- )
|
3159 |
+
{
|
3160 |
+
$key = sprintf('redirect%d', $x);
|
3161 |
+
if( !empty($Redirects[ $key ]) )
|
3162 |
+
{
|
3163 |
+
if( preg_match('/^https?:\/\/(.*)$/', trim($Redirects[ $key ]) , $matches ) == 0 )
|
3164 |
+
continue;
|
3165 |
+
|
3166 |
+
$RedirectClean = $matches[1];
|
3167 |
+
if( substr($RedirectClean, -1, 1) != '/' ) // Rediercts need to end with a slash /.
|
3168 |
+
$RedirectClean .= '/';
|
3169 |
+
|
3170 |
+
if( !empty($RedirectClean) )
|
3171 |
+
{
|
3172 |
+
if( strpos($RedirectClean, '/') == 0 ) // Not a valid redirect URL
|
3173 |
+
continue;
|
3174 |
+
|
3175 |
+
|
3176 |
+
// Check that redirect is either media.blubrry.com, media.techpodcasts.com, media.rawvoice.com, or *.podtrac.com
|
3177 |
+
$ValidRedirectDomains = array('media.blubrry.com', 'media.rawvoice.com', 'media.techpodcasts.com', 'www.podtrac.com', 'podtrac.com');
|
3178 |
+
$ValidRedirectDomainsPattern = '/^(media\.blubrry\.com|media\.rawvoice\.com|media\.techpodcasts\.com|.*\.podtrac\.com|traffic\.cast\.plus)$/';
|
3179 |
+
if( $URLScheme == 'https://' ) {
|
3180 |
+
$ValidRedirectDomains = array('media.blubrry.com', 'media.rawvoice.com', 'www.podtrac.com', 'podtrac.com'); // Only URLs that support https:// to an https:// media file
|
3181 |
+
$ValidRedirectDomainsPattern = '/^(media\.blubrry\.com|media\.rawvoice\.com|.*\.podtrac\.com|traffic\.cast\.plus)$/';
|
3182 |
+
}
|
3183 |
+
|
3184 |
+
$RedirectDomain = strtolower(substr($RedirectClean, 0, strpos($RedirectClean, '/') ));
|
3185 |
+
|
3186 |
+
if( preg_match($ValidRedirectDomainsPattern, $RedirectDomain) == 0 )
|
3187 |
+
continue;
|
3188 |
+
|
3189 |
+
//if( !in_array($RedirectDomain, $ValidRedirectDomains) )
|
3190 |
+
// continue; // Not a valid domain so lets not add it
|
3191 |
+
|
3192 |
+
// Make sure we are no longer doubling up on media.blubrry.com or media.rawvoice.com redirects
|
3193 |
+
//if( ($RedirectDomain == 'media.blubrry.com'||$RedirectDomain == 'media.rawvoice.com') && strstr($NewURL, '/'.$RedirectDomain.'/') )
|
3194 |
+
//{
|
3195 |
+
// // Strip the media.blubrry.com/XXX/x/ or media.blubrry.com/xxx/ from the URL since we will be replacing it
|
3196 |
+
// if( preg_match('/^(.*\/)media\.(?:blubrry|rawvoice)\.com\/[a-zA-Z0-9_-]{2,60}\/([a-zA-Z0-9]\/)?(.*)$/', $NewURL, $matches) )
|
3197 |
+
// {
|
3198 |
+
// $NewURL = $matches[1].$matches[3];
|
3199 |
+
// }
|
3200 |
+
//}
|
3201 |
+
|
3202 |
+
if( !strstr($NewURL, $RedirectClean) ) // If the redirect is not already added...
|
3203 |
+
$NewURL = $URLScheme. $RedirectClean . str_replace($URLScheme, '', $NewURL);
|
3204 |
+
}
|
3205 |
+
}
|
3206 |
+
}
|
3207 |
+
|
3208 |
+
return $NewURL;
|
3209 |
+
}
|
3210 |
+
|
3211 |
+
function powerpress_add_flag_to_redirect_url($MediaURL, $Flag)
|
3212 |
+
{
|
3213 |
+
// First strip any previous flags...
|
3214 |
+
$MediaURL = preg_replace('/(media\.(blubrry|techpodcasts|rawvoice|podcasternews)\.com\/[A-Za-z0-9-_]+\/)([A-Za-z0-9]\/)?/i', '$1'."", $MediaURL);
|
3215 |
+
return preg_replace('/(media\.(blubrry|techpodcasts|rawvoice|podcasternews)\.com\/[A-Za-z0-9-_]+\/)('.$Flag.'\/)?/i', '$1'."$Flag/", $MediaURL);
|
3216 |
+
}
|
3217 |
+
|
3218 |
+
/*
|
3219 |
+
Code contributed from upekshapriya on the Blubrry Forums
|
3220 |
+
*/
|
3221 |
+
function powerpress_byte_size($ppbytes)
|
3222 |
+
{
|
3223 |
+
$ppbytes = intval($ppbytes);
|
3224 |
+
if( empty($ppbytes) )
|
3225 |
+
return '';
|
3226 |
+
$ppsize = intval($ppbytes) / 1024;
|
3227 |
+
if($ppsize < 1024)
|
3228 |
+
{
|
3229 |
+
$ppsize = number_format($ppsize, 1);
|
3230 |
+
$ppsize .= 'KB';
|
3231 |
+
}
|
3232 |
+
else
|
3233 |
+
{
|
3234 |
+
if($ppsize / 1024 < 1024)
|
3235 |
+
{
|
3236 |
+
$ppsize = number_format($ppsize / 1024, 1);
|
3237 |
+
$ppsize .= 'MB';
|
3238 |
+
}
|
3239 |
+
else if ($ppsize / 1024 / 1024 < 1024)
|
3240 |
+
{
|
3241 |
+
$ppsize = number_format($ppsize / 1024 / 1024, 1);
|
3242 |
+
$ppsize .= 'GB';
|
3243 |
+
}
|
3244 |
+
}
|
3245 |
+
return $ppsize;
|
3246 |
+
}
|
3247 |
+
|
3248 |
+
// Merges settings from feed settings page to empty custom feed settings
|
3249 |
+
function powerpress_merge_empty_feed_settings($CustomFeedSettings, $FeedSettings, $DefaultPodcastFeed = false)
|
3250 |
+
{
|
3251 |
+
unset($FeedSettings['apply_to']);
|
3252 |
+
// Remove settings from main $FeedSettings that should not be copied to custom feed.
|
3253 |
+
if( !$DefaultPodcastFeed )
|
3254 |
+
{
|
3255 |
+
unset($FeedSettings['itunes_new_feed_url']);
|
3256 |
+
unset($FeedSettings['feed_redirect_url']);
|
3257 |
+
unset($FeedSettings['itunes_complete']);
|
3258 |
+
unset($FeedSettings['itunes_block']);
|
3259 |
+
unset($FeedSettings['maximize_feed']);
|
3260 |
+
}
|
3261 |
+
|
3262 |
+
// If the setting is not already set, set the enhnaced itunes setting if they have PHP5+ on by default
|
3263 |
+
if( !isset($FeedSettings['enhance_itunes_summary']) )
|
3264 |
+
$FeedSettings['enhance_itunes_summary'] = 0;
|
3265 |
+
|
3266 |
+
if( !$CustomFeedSettings )
|
3267 |
+
return $FeedSettings; // If the $CustomFeedSettings is false
|
3268 |
+
|
3269 |
+
foreach( $CustomFeedSettings as $key=> $value )
|
3270 |
+
{
|
3271 |
+
if( $value !== '' || !isset($FeedSettings[$key]) )
|
3272 |
+
$FeedSettings[$key] = $value;
|
3273 |
+
}
|
3274 |
+
|
3275 |
+
return $FeedSettings;
|
3276 |
+
}
|
3277 |
+
|
3278 |
+
function powerpress_readable_duration($duration, $include_hour=false)
|
3279 |
+
{
|
3280 |
+
$seconds = 0;
|
3281 |
+
$parts = explode(':', $duration);
|
3282 |
+
if( count($parts) == 3 )
|
3283 |
+
$seconds = $parts[2] + ($parts[1]*60) + ($parts[0]*60*60);
|
3284 |
+
else if ( count($parts) == 2 )
|
3285 |
+
$seconds = $parts[1] + ($parts[0]*60);
|
3286 |
+
else
|
3287 |
+
$seconds = $parts[0];
|
3288 |
+
|
3289 |
+
$hours = 0;
|
3290 |
+
$minutes = 0;
|
3291 |
+
if( $seconds >= (60*60) )
|
3292 |
+
{
|
3293 |
+
$hours = floor( $seconds /(60*60) );
|
3294 |
+
$seconds -= (60*60*$hours);
|
3295 |
+
}
|
3296 |
+
if( $seconds >= (60) )
|
3297 |
+
{
|
3298 |
+
$minutes = floor( $seconds /(60) );
|
3299 |
+
$seconds -= (60*$minutes);
|
3300 |
+
}
|
3301 |
+
|
3302 |
+
if( $hours || $include_hour ) // X:XX:XX (readable)
|
3303 |
+
return sprintf('%d:%02d:%02d', $hours, $minutes, $seconds);
|
3304 |
+
|
3305 |
+
return sprintf('%d:%02d', $minutes, $seconds); // X:XX or 0:XX (readable)
|
3306 |
+
}
|
3307 |
+
|
3308 |
+
// Duratoin in form of seconds (parses hh:mm:ss)
|
3309 |
+
function powerpress_raw_duration($duration)
|
3310 |
+
{
|
3311 |
+
$duration = trim($duration);
|
3312 |
+
$Parts = explode(':',$duration);
|
3313 |
+
if( empty($Parts) )
|
3314 |
+
return $duration;
|
3315 |
+
|
3316 |
+
if( count($Parts) == 3 )
|
3317 |
+
return (($Parts[0]*60*60) + ($Parts[1]*60) +$Parts[2]);
|
3318 |
+
else if( count($Parts) == 2 )
|
3319 |
+
return (($Parts[0]*60) +$Parts[1]);
|
3320 |
+
//else if( count($Parts) == 1 )
|
3321 |
+
// return ($Parts[0]);
|
3322 |
+
|
3323 |
+
// We never found any colons, so we assume duration is seconds
|
3324 |
+
return $duration;
|
3325 |
+
}
|
3326 |
+
|
3327 |
+
// For grabbing data from Podpress data stored serialized, the strings for some values can sometimes get corrupted, so we fix it...
|
3328 |
+
|
3329 |
+
function powerpress_repair_serialize($string)
|
3330 |
+
{
|
3331 |
+
if( @unserialize($string) )
|
3332 |
+
return $string; // Nothing to repair...
|
3333 |
+
|
3334 |
+
$string = preg_replace_callback('/(s:(\d+):"([^"]*)")/',
|
3335 |
+
'powerpress_repair_serialize_callback',
|
3336 |
+
$string);
|
3337 |
+
|
3338 |
+
if( substr($string, 0, 2) == 's:' ) // Sometimes the serialized data is double serialized, so we need to re-serialize the outside string
|
3339 |
+
{
|
3340 |
+
$string = preg_replace_callback('/(s:(\d+):"(.*)"(;))$/',
|
3341 |
+
'powerpress_repair_serialize_callback',
|
3342 |
+
$string);
|
3343 |
+
}
|
3344 |
+
|
3345 |
+
return $string;
|
3346 |
+
}
|
3347 |
+
|
3348 |
+
function powerpress_repair_serialize_callback($matches)
|
3349 |
+
{
|
3350 |
+
if( strlen($matches[3]) == $matches[2] )
|
3351 |
+
return $matches[0];
|
3352 |
+
return sprintf('s:%d:"%s"', strlen($matches[3]), $matches[3]) . (!empty($matches[4])?';':'');
|
3353 |
+
}
|
3354 |
+
|
3355 |
+
function powerpress_base64_encode($value)
|
3356 |
+
{
|
3357 |
+
return rtrim(strtr(base64_encode($value), '+/', '-_'), '=');
|
3358 |
+
}
|
3359 |
+
/*
|
3360 |
+
powerpress_get_post_meta()
|
3361 |
+
Safe function to retrieve corrupted PodPress data from the database
|
3362 |
+
@post_id - post id to retrieve post meta for
|
3363 |
+
@key - key to retrieve post meta for
|
3364 |
+
*/
|
3365 |
+
function powerpress_get_post_meta($post_id, $key)
|
3366 |
+
{
|
3367 |
+
$pp_meta_cache = wp_cache_get($post_id, 'post_meta');
|
3368 |
+
if ( !$pp_meta_cache ) {
|
3369 |
+
update_postmeta_cache($post_id);
|
3370 |
+
$pp_meta_cache = wp_cache_get($post_id, 'post_meta');
|
3371 |
+
}
|
3372 |
+
|
3373 |
+
$meta = false;
|
3374 |
+
if ( isset($pp_meta_cache[$key]) )
|
3375 |
+
$meta = $pp_meta_cache[$key][0];
|
3376 |
+
|
3377 |
+
if ( is_serialized( $meta ) ) // Logic used up but not including WordPress 2.8, new logic doesn't make sure if unserialized failed or not
|
3378 |
+
{
|
3379 |
+
if ( false !== ( $gm = @unserialize( $meta ) ) )
|
3380 |
+
return $meta;
|
3381 |
+
}
|
3382 |
+
|
3383 |
+
return $meta;
|
3384 |
+
}
|
3385 |
+
|
3386 |
+
function powerpress_get_enclosure($post_id, $feed_slug = 'podcast')
|
3387 |
+
{
|
3388 |
+
$Data = powerpress_get_enclosure_data($post_id, $feed_slug);
|
3389 |
+
if( $Data )
|
3390 |
+
return $Data['url'];
|
3391 |
+
return false;
|
3392 |
+
}
|
3393 |
+
|
3394 |
+
function powerpress_get_enclosure_data($post_id, $feed_slug = 'podcast', $raw_data = false, $add_redirect=true)
|
3395 |
+
{
|
3396 |
+
global $post;
|
3397 |
+
if( false != $raw_data )
|
3398 |
+
$MetaData = $raw_data;
|
3399 |
+
else
|
3400 |
+
{
|
3401 |
+
if( !empty($post->podcast_meta_value) && $post->ID == $post_id) // See if we got the meta data from the initial query...
|
3402 |
+
{
|
3403 |
+
$PodcastData = powerpress_get_enclosure_data($post_id, $feed_slug, $post->podcast_meta_value, true);
|
3404 |
+
return $PodcastData;
|
3405 |
+
}
|
3406 |
+
|
3407 |
+
if( 'podcast' == $feed_slug || '' == $feed_slug )
|
3408 |
+
$MetaData = get_post_meta($post_id, 'enclosure', true);
|
3409 |
+
else
|
3410 |
+
$MetaData = get_post_meta($post_id, '_'. $feed_slug .':enclosure', true);
|
3411 |
+
}
|
3412 |
+
if( empty($MetaData) )
|
3413 |
+
return false;
|
3414 |
+
|
3415 |
+
$MetaParts = explode("\n", $MetaData, 4);
|
3416 |
+
|
3417 |
+
$Serialized = false;
|
3418 |
+
$Data = array();
|
3419 |
+
$Data['id'] = $post_id;
|
3420 |
+
$Data['feed'] = $feed_slug;
|
3421 |
+
$Data['url'] = '';
|
3422 |
+
$Data['duration'] = '';
|
3423 |
+
$Data['size'] = '';
|
3424 |
+
$Data['type'] = '';
|
3425 |
+
$Data['width'] = '';
|
3426 |
+
$Data['height'] = '';
|
3427 |
+
|
3428 |
+
if( count($MetaParts) > 0 )
|
3429 |
+
$Data['url'] = trim($MetaParts[0]);
|
3430 |
+
if( count($MetaParts) > 1 )
|
3431 |
+
$Data['size'] = trim($MetaParts[1]);
|
3432 |
+
if( count($MetaParts) > 2 )
|
3433 |
+
$Data['type'] = trim($MetaParts[2]);
|
3434 |
+
if( count($MetaParts) > 3 )
|
3435 |
+
$Serialized = $MetaParts[3];
|
3436 |
+
|
3437 |
+
if( $Serialized )
|
3438 |
+
{
|
3439 |
+
$ExtraData = @unserialize($Serialized);
|
3440 |
+
if( $ExtraData && is_array($ExtraData) )
|
3441 |
+
{
|
3442 |
+
foreach( $ExtraData as $key=> $value ) {
|
3443 |
+
|
3444 |
+
// Make sure specific fields are not overwritten...
|
3445 |
+
switch( $key ) {
|
3446 |
+
case 'id':
|
3447 |
+
case 'feed':
|
3448 |
+
case 'url':
|
3449 |
+
case 'size':
|
3450 |
+
case 'type': break;
|
3451 |
+
default: $Data[ $key ] = $value;
|
3452 |
+
}
|
3453 |
+
}
|
3454 |
+
|
3455 |
+
if( isset($Data['length']) ) // Setting from the "Podcasting" plugin...
|
3456 |
+
$Data['duration'] = powerpress_readable_duration($Data['length'], true);
|
3457 |
+
|
3458 |
+
if( !empty($Data['webm_src']) )
|
3459 |
+
{
|
3460 |
+
$Data['webm_src'] = trim($Data['webm_src']);
|
3461 |
+
}
|
3462 |
+
|
3463 |
+
|
3464 |
+
if( strpos($MetaParts[0], 'http://') !== 0 && !empty($Data['hosting']) ) // if the URL is not set (just file name) and we're a hosting customer...
|
3465 |
+
{
|
3466 |
+
$post_status = get_post_status($post_id);
|
3467 |
+
switch( $post_status )
|
3468 |
+
{
|
3469 |
+
case 'pending':
|
3470 |
+
case 'draft':
|
3471 |
+
case 'auto-draft': {
|
3472 |
+
// Determine if audio or video, then set the demo episode here...
|
3473 |
+
$Data['url'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/preview.mp3'; // audio
|
3474 |
+
if( strstr($Data['type'], 'video') )
|
3475 |
+
$Data['url'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/preview.mp4'; // video
|
3476 |
+
}; break;
|
3477 |
+
}
|
3478 |
+
}
|
3479 |
+
}
|
3480 |
+
}
|
3481 |
+
|
3482 |
+
// If the URL is using Blubrry hosting, then lets pump it up to https...
|
3483 |
+
if( is_ssl() && preg_match('/^http:\/\/(.*\/content\.blubrry\.com\/.*)$/i', $Data['url'], $matches) )
|
3484 |
+
{
|
3485 |
+
$Data['url'] = 'https://'. $matches[1];
|
3486 |
+
}
|
3487 |
+
|
3488 |
+
// Check that the content type is a valid one...
|
3489 |
+
if( strstr($Data['type'], '/') == false )
|
3490 |
+
$Data['type'] = powerpress_get_contenttype($Data['url']);
|
3491 |
+
|
3492 |
+
// Do redirect filter here...
|
3493 |
+
if( $add_redirect && !empty($Data['url']) )
|
3494 |
+
$Data['url'] = powerpress_add_redirect_url( $Data['url'], $Data );
|
3495 |
+
|
3496 |
+
if( $add_redirect && !empty($Data['webm_src']) )
|
3497 |
+
$Data['webm_src'] = powerpress_add_redirect_url( $Data['webm_src'], $Data );
|
3498 |
+
|
3499 |
+
return apply_filters('powerpress_get_enclosure_data', $Data);
|
3500 |
+
}
|
3501 |
+
|
3502 |
+
function powerpress_get_enclosure_data_podpress($post_id, $mediaNum = 0, $include_premium = false)
|
3503 |
+
{
|
3504 |
+
$podPressMedia = powerpress_get_post_meta($post_id, 'podPressMedia');
|
3505 |
+
if( !$podPressMedia )
|
3506 |
+
$podPressMedia = powerpress_get_post_meta($post_id, '_podPressMedia'); // handles latest verions of PodPress
|
3507 |
+
if( $podPressMedia )
|
3508 |
+
{
|
3509 |
+
|
3510 |
+
if( !is_array($podPressMedia) )
|
3511 |
+
{
|
3512 |
+
// Sometimes the stored data gets messed up, we can fix it here:
|
3513 |
+
$podPressMedia = powerpress_repair_serialize($podPressMedia);
|
3514 |
+
$podPressMedia = @unserialize($podPressMedia);
|
3515 |
+
}
|
3516 |
+
|
3517 |
+
// Do it a second time in case it is double serialized
|
3518 |
+
if( !is_array($podPressMedia) )
|
3519 |
+
{
|
3520 |
+
// Sometimes the stored data gets messed up, we can fix it here:
|
3521 |
+
$podPressMedia = powerpress_repair_serialize($podPressMedia);
|
3522 |
+
$podPressMedia = @unserialize($podPressMedia);
|
3523 |
+
}
|
3524 |
+
|
3525 |
+
if( is_array($podPressMedia) && isset($podPressMedia[$mediaNum]) && isset($podPressMedia[$mediaNum]['URI']) )
|
3526 |
+
{
|
3527 |
+
if( $include_premium == false && isset($podPressMedia[$mediaNum]['premium_only']) && ($podPressMedia[$mediaNum]['premium_only'] == 'on' || $podPressMedia[$mediaNum]['premium_only'] == true) )
|
3528 |
+
return false;
|
3529 |
+
|
3530 |
+
$Data = array();
|
3531 |
+
$Data['id'] = $post_id;
|
3532 |
+
$Data['feed'] = 'podcast';
|
3533 |
+
$Data['duration'] = 0;
|
3534 |
+
$Data['url'] = '';
|
3535 |
+
$Data['size'] = 0;
|
3536 |
+
$Data['type'] = '';
|
3537 |
+
$Data['width'] = '';
|
3538 |
+
$Data['height'] = '';
|
3539 |
+
|
3540 |
+
$Data['url'] = $podPressMedia[$mediaNum]['URI'];
|
3541 |
+
if( isset($podPressMedia[$mediaNum]['size']) )
|
3542 |
+
$Data['size'] = $podPressMedia[$mediaNum]['size'];
|
3543 |
+
if( isset($PodPressSettings[$mediaNum]['duration']) )
|
3544 |
+
$Data['duration'] = $podPressMedia[$mediaNum]['duration'];
|
3545 |
+
if( isset($PodPressSettings[$mediaNum]['previewImage']) )
|
3546 |
+
$Data['image'] = $podPressMedia[$mediaNum]['previewImage'];
|
3547 |
+
|
3548 |
+
if( strpos($Data['url'], 'http://' ) !== 0 && strpos($Data['url'], 'https://' ) !== 0 )
|
3549 |
+
{
|
3550 |
+
$PodPressSettings = get_option('podPress_config');
|
3551 |
+
if( $PodPressSettings && isset($PodPressSettings['mediaWebPath']) )
|
3552 |
+
$Data['url'] = rtrim($PodpressSettings['mediaWebPath'], '/') . '/' . ltrim($Data['url'], '/');
|
3553 |
+
unset($PodPressSettings);
|
3554 |
+
}
|
3555 |
+
|
3556 |
+
if( strpos($Data['url'], 'http://' ) !== 0 && strpos($Data['url'], 'https://' ) !== 0 )
|
3557 |
+
{
|
3558 |
+
$Settings = get_option('powerpress_general');
|
3559 |
+
if( $Settings && isset($Settings['default_url']) )
|
3560 |
+
$Data['url'] = rtrim($Settings['default_url'], '/') . '/' . ltrim($Data['url'], '/');
|
3561 |
+
}
|
3562 |
+
|
3563 |
+
if( strpos($Data['url'], 'http://' ) !== 0 && strpos($Data['url'], 'https://' ) !== 0 )
|
3564 |
+
return false;
|
3565 |
+
|
3566 |
+
$Data['type'] = powerpress_get_contenttype($Data['url']); // Detect the content type
|
3567 |
+
$Data['url'] = powerpress_add_redirect_url($Data['url'], $Data); // Add redirects to Media URL
|
3568 |
+
|
3569 |
+
return apply_filters('powerpress_get_enclosure_data', $Data);
|
3570 |
+
}
|
3571 |
+
}
|
3572 |
+
return false;
|
3573 |
+
}
|
3574 |
+
|
3575 |
+
function powerpress_get_apple_id($url, $strict=false)
|
3576 |
+
{
|
3577 |
+
if( $strict )
|
3578 |
+
{
|
3579 |
+
$results = preg_match('/apple\.com\/.*\/id(\d+)/i', $url, $matches);
|
3580 |
+
if( !$results )
|
3581 |
+
$results = preg_match('/apple\.com\/.*id\=(\d+)/i', $url, $matches);
|
3582 |
+
if( $results )
|
3583 |
+
return $matches[1];
|
3584 |
+
return 0;
|
3585 |
+
}
|
3586 |
+
$results = preg_match('/\/id(\d+)/i', $url, $matches);
|
3587 |
+
if( !$results )
|
3588 |
+
$results = preg_match('/id\=(\d+)/i', $url, $matches);
|
3589 |
+
if( $results )
|
3590 |
+
return $matches[1];
|
3591 |
+
return 0;
|
3592 |
+
}
|
3593 |
+
|
3594 |
+
|
3595 |
+
function the_powerpress_all_players($slug = false, $no_link=false)
|
3596 |
+
{
|
3597 |
+
echo get_the_powerpress_all_players($slug, $no_link);
|
3598 |
+
}
|
3599 |
+
|
3600 |
+
function get_the_powerpress_all_players($slug = false, $no_link=false)
|
3601 |
+
{
|
3602 |
+
$return = '';
|
3603 |
+
//Use this function to insert the Powerpress player anywhere in the page.
|
3604 |
+
//Made by Nicolas Bouliane (http://nicolasbouliane.com/)
|
3605 |
+
|
3606 |
+
/*We're going to use the Loop to retrieve the latest post with the 'enclosure' custom key set
|
3607 |
+
//then interpret it and manually launch powerpressplayer_build with the URL contained within
|
3608 |
+
//that data.*/
|
3609 |
+
|
3610 |
+
//Let's reset the Loop to make sure we look through all posts
|
3611 |
+
rewind_posts();
|
3612 |
+
|
3613 |
+
// Get the list of podcast channel slug names...
|
3614 |
+
$GeneralSettings = get_option('powerpress_general');
|
3615 |
+
|
3616 |
+
// No player or links to add to content...
|
3617 |
+
if( !empty($GeneralSettings['disable_appearance']) )
|
3618 |
+
return $return;
|
3619 |
+
|
3620 |
+
$ChannelSlugs = array('podcast');
|
3621 |
+
if( $slug == false )
|
3622 |
+
{
|
3623 |
+
if( isset($GeneralSettings['custom_feeds']['podcast']) )
|
3624 |
+
$ChannelSlugs = array(); // Reset the array so it is added from the list in specified order
|
3625 |
+
foreach( $GeneralSettings['custom_feeds'] as $feed_slug=> $null )
|
3626 |
+
$ChannelSlugs[] = $feed_slug;
|
3627 |
+
}
|
3628 |
+
else if( is_array($slug) )
|
3629 |
+
{
|
3630 |
+
$ChannelSlugs = $slug;
|
3631 |
+
}
|
3632 |
+
else
|
3633 |
+
{
|
3634 |
+
$ChannelSlugs = array($slug);
|
3635 |
+
}
|
3636 |
+
|
3637 |
+
// Loop through the posts
|
3638 |
+
while( have_posts() )
|
3639 |
+
{
|
3640 |
+
the_post();
|
3641 |
+
|
3642 |
+
foreach( $ChannelSlugs as $null=> $feed_slug )
|
3643 |
+
{
|
3644 |
+
// Do we follow the global settings to disable a player?
|
3645 |
+
if( isset($GeneralSettings['disable_player']) && isset($GeneralSettings['disable_player'][$feed_slug]) && $slug == false )
|
3646 |
+
continue;
|
3647 |
+
|
3648 |
+
$EpisodeData = powerpress_get_enclosure_data(get_the_ID(), $feed_slug);
|
3649 |
+
if( !$EpisodeData && !empty($GeneralSettings['process_podpress']) && $feed_slug == 'podcast' )
|
3650 |
+
$EpisodeData = powerpress_get_enclosure_data_podpress(get_the_ID());
|
3651 |
+
|
3652 |
+
if( !$EpisodeData )
|
3653 |
+
continue;
|
3654 |
+
|
3655 |
+
$AddDefaultPlayer = true;
|
3656 |
+
if( !empty($EpisodeData['embed']) )
|
3657 |
+
{
|
3658 |
+
$return .= $EpisodeData['embed'];
|
3659 |
+
if( !empty($GeneralSettings['embed_replace_player']) )
|
3660 |
+
$AddDefaultPlayer = false;
|
3661 |
+
}
|
3662 |
+
|
3663 |
+
if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($feed_slug) )
|
3664 |
+
{
|
3665 |
+
$return .= powerpress_premium_content_message(get_the_ID(), $feed_slug, $EpisodeData);
|
3666 |
+
continue;
|
3667 |
+
}
|
3668 |
+
|
3669 |
+
if( !isset($EpisodeData['no_player']) && $AddDefaultPlayer )
|
3670 |
+
{
|
3671 |
+
do_action('wp_powerpress_player_scripts');
|
3672 |
+
$return .= apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
3673 |
+
}
|
3674 |
+
if( !isset($EpisodeData['no_links']) && $no_link == false )
|
3675 |
+
{
|
3676 |
+
do_action('wp_powerpress_player_scripts');
|
3677 |
+
$return .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
3678 |
+
$return .= apply_filters('powerpress_player_subscribe_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
|
3679 |
+
}
|
3680 |
+
}
|
3681 |
+
reset($ChannelSlugs);
|
3682 |
+
}
|
3683 |
+
|
3684 |
+
return $return;
|
3685 |
+
}
|
3686 |
+
|
3687 |
+
function powerpress_premium_content_authorized_filter($default, $feed_slug)
|
3688 |
+
{
|
3689 |
+
if( $feed_slug != 'podcast' )
|
3690 |
+
{
|
3691 |
+
$FeedSettings = get_option('powerpress_feed_'. $feed_slug);
|
3692 |
+
if( isset($FeedSettings['premium']) && $FeedSettings['premium'] != '' )
|
3693 |
+
return current_user_can($FeedSettings['premium']);
|
3694 |
+
}
|
3695 |
+
|
3696 |
+
$post_type = get_query_var('post_type');
|
3697 |
+
if ( is_array( $post_type ) ) {
|
3698 |
+
$post_type = reset( $post_type ); // get first element in array
|
3699 |
+
}
|
3700 |
+
|
3701 |
+
if( $post_type != 'post' )
|
3702 |
+
{
|
3703 |
+
$GeneralSettings = get_option('powerpress_general');
|
3704 |
+
if( !empty($GeneralSettings['posttype_podcasting']) ) // Custom Post Types
|
3705 |
+
{
|
3706 |
+
// Get the feed slugs and titles for this post type
|
3707 |
+
$PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
|
3708 |
+
if( !empty($PostTypeSettingsArray[$feed_slug]['premium']) )
|
3709 |
+
return current_user_can($PostTypeSettingsArray[$feed_slug]['premium']);
|
3710 |
+
}
|
3711 |
+
}
|
3712 |
+
|
3713 |
+
return $default;
|
3714 |
+
}
|
3715 |
+
add_filter('powerpress_premium_content_authorized', 'powerpress_premium_content_authorized_filter', 10, 2);
|
3716 |
+
|
3717 |
+
function powerpress_premium_content_authorized($feed_slug)
|
3718 |
+
{
|
3719 |
+
return apply_filters('powerpress_premium_content_authorized', true, $feed_slug );
|
3720 |
+
}
|
3721 |
+
|
3722 |
+
function powerpress_premium_content_message($post_id, $feed_slug, $EpisodeData = false)
|
3723 |
+
{
|
3724 |
+
if( !$EpisodeData && $post_id )
|
3725 |
+
$EpisodeData = powerpress_get_enclosure_data($post_id, $feed_slug);
|
3726 |
+
|
3727 |
+
if( !$EpisodeData )
|
3728 |
+
return '';
|
3729 |
+
$FeedSettings = get_option('powerpress_feed_'.$feed_slug);
|
3730 |
+
$post_type = get_query_var('post_type');
|
3731 |
+
if ( is_array( $post_type ) ) {
|
3732 |
+
$post_type = reset( $post_type ); // get first element in array
|
3733 |
+
}
|
3734 |
+
|
3735 |
+
if( $post_type != 'post' )
|
3736 |
+
{
|
3737 |
+
$GeneralSettings = get_option('powerpress_general');
|
3738 |
+
if( !empty($GeneralSettings['posttype_podcasting']) ) // Custom Post Types
|
3739 |
+
{
|
3740 |
+
// Get the feed slugs and titles for this post type
|
3741 |
+
$PostTypeSettingsArray = get_option('powerpress_posttype_'.$post_type);
|
3742 |
+
if( !empty($PostTypeSettingsArray[$feed_slug]['premium']) )
|
3743 |
+
{
|
3744 |
+
$FeedSettings = $PostTypeSettingsArray[$feed_slug];
|
3745 |
+
}
|
3746 |
+
}
|
3747 |
+
}
|
3748 |
+
|
3749 |
+
$extension = 'unknown';
|
3750 |
+
$parts = pathinfo($EpisodeData['url']);
|
3751 |
+
if( $parts && isset($parts['extension']) )
|
3752 |
+
$extension = strtolower($parts['extension']);
|
3753 |
+
|
3754 |
+
if( isset($FeedSettings['premium_label']) && $FeedSettings['premium_label'] != '' ) // User has a custom label
|
3755 |
+
return '<p class="powerpress_links powerpress_links_'. $extension .'">'. $FeedSettings['premium_label'] . '</p>'.PHP_EOL_WEB;
|
3756 |
+
|
3757 |
+
return '<p class="powerpress_links powerpress_links_'. $extension .'">'. htmlspecialchars($FeedSettings['title']) .': <a href="'. get_bloginfo('url') .'/wp-login.php" title="Protected Content">(Protected Content)</a></p>'.PHP_EOL_WEB;
|
3758 |
+
}
|
3759 |
+
|
3760 |
+
function powerpress_is_mobile_client()
|
3761 |
+
{
|
3762 |
+
_deprecated_function( __FUNCTION__, '7.0' );
|
3763 |
+
return false;
|
3764 |
+
}
|
3765 |
+
|
3766 |
+
function powerpress_get_api_array()
|
3767 |
+
{
|
3768 |
+
$return = array();
|
3769 |
+
if( strstr(POWERPRESS_BLUBRRY_API_URL, 'http://api.blubrry.com') == false ) // If not the default
|
3770 |
+
{
|
3771 |
+
$return = explode(';', POWERPRESS_BLUBRRY_API_URL);
|
3772 |
+
}
|
3773 |
+
else
|
3774 |
+
{
|
3775 |
+
$return[] = 'https://api.blubrry.com/'; // Use secure URL first when possible
|
3776 |
+
$return[] = 'http://api.blubrry.net/';
|
3777 |
+
$return[] = 'http://api.blubrry.com/';
|
3778 |
+
}
|
3779 |
+
|
3780 |
+
return $return;
|
3781 |
+
}
|
3782 |
+
|
3783 |
+
|
3784 |
+
function powerpress_in_wp_head()
|
3785 |
+
{
|
3786 |
+
$e = new Exception();
|
3787 |
+
$trace = $e->getTrace();
|
3788 |
+
|
3789 |
+
if( !empty($trace) ) {
|
3790 |
+
foreach( $trace as $index=> $call ) {
|
3791 |
+
if( isset($call['function']) ) {
|
3792 |
+
// Which calls should we not add the player and links...
|
3793 |
+
switch( $call['function'] ) {
|
3794 |
+
case 'wp_head': return true; break;
|
3795 |
+
}
|
3796 |
+
}
|
3797 |
+
}
|
3798 |
+
}
|
3799 |
+
return false;
|
3800 |
+
}
|
3801 |
+
|
3802 |
+
function powerpress_in_custom_post_widget()
|
3803 |
+
{
|
3804 |
+
if( !class_exists('custom_post_widget') )
|
3805 |
+
return false;
|
3806 |
+
|
3807 |
+
$e = new Exception();
|
3808 |
+
$trace = $e->getTrace();
|
3809 |
+
|
3810 |
+
if( !empty($trace) ) {
|
3811 |
+
|
3812 |
+
foreach( $trace as $index=> $call ) {
|
3813 |
+
if( isset($call['function']) ) {
|
3814 |
+
// Which calls should we not add the player and links...
|
3815 |
+
switch( $call['function'] ) {
|
3816 |
+
case 'custom_post_widget_shortcode': return true; break;
|
3817 |
+
}
|
3818 |
+
}
|
3819 |
+
}
|
3820 |
+
}
|
3821 |
+
return false;
|
3822 |
+
}
|
3823 |
+
/*
|
3824 |
+
End Helper Functions
|
3825 |
+
*/
|
3826 |
+
|
3827 |
+
// Are we in the admin?
|
3828 |
+
if( is_admin() )
|
3829 |
+
{
|
3830 |
+
require_once(POWERPRESS_ABSPATH.'/powerpressadmin.php');
|
3831 |
+
register_activation_hook( __FILE__, 'powerpress_admin_activate' );
|
3832 |
+
}
|
3833 |
+
|
3834 |
+
if( defined('POWERPRESS_SUBSCRIBE') && POWERPRESS_SUBSCRIBE )
|
3835 |
+
{
|
3836 |
+
require_once(POWERPRESS_ABSPATH.'/powerpress-subscribe.php');
|
3837 |
+
}
|
3838 |
+
|
3839 |
+
// For testing purposes in development
|
3840 |
+
if( defined('POWERPRESS_NEW_CODE') && POWERPRESS_NEW_CODE && file_exists(POWERPRESS_ABSPATH.'/powerpress-new-code.php') )
|
3841 |
+
{
|
3842 |
+
require_once(POWERPRESS_ABSPATH.'/powerpress-new-code.php');
|
3843 |
+
}
|
3844 |
+
|
3845 |
+
if( defined('POWERPRESS_PREMIUM_GROUPS_PLUGIN') ) {
|
3846 |
+
|
3847 |
+
function powerpress_pre_get_posts($query) {
|
3848 |
+
if( is_feed() && powerpress_is_custom_podcast_feed() && method_exists('Groups_Post_Access', 'posts_where') )
|
3849 |
+
{
|
3850 |
+
$feed_slug = get_query_var('feed');
|
3851 |
+
|
3852 |
+
if( $feed_slug != 'podcast' )
|
3853 |
+
{
|
3854 |
+
$FeedSettings = get_option('powerpress_feed_'.$feed_slug);
|
3855 |
+
if( !empty($FeedSettings['premium']) )
|
3856 |
+
{
|
3857 |
+
if( has_filter('posts_where', 'Groups_Post_Access::posts_where') )
|
3858 |
+
{
|
3859 |
+
remove_filter('posts_where', 'Groups_Post_Access::posts_where');
|
3860 |
+
}
|
3861 |
+
}
|
3862 |
+
}
|
3863 |
+
}
|
3864 |
+
}
|
3865 |
+
add_filter('pre_get_posts', 'powerpress_pre_get_posts');
|
3866 |
+
}
|
3867 |
+
|
3868 |
// eof
|
powerpressadmin-basic.php
CHANGED
@@ -1,1639 +1,1646 @@
|
|
1 |
-
<?php
|
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 |
-
$MultiSiteServiceSettings = false;
|
24 |
-
if( is_multisite() )
|
25 |
-
{
|
26 |
-
$MultiSiteSettings = get_site_option('powerpress_multisite');
|
27 |
-
if( !empty($MultiSiteSettings['services_multisite_only']) )
|
28 |
-
{
|
29 |
-
$MultiSiteServiceSettings = true;
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
?>
|
34 |
-
<script type="text/javascript"><!--
|
35 |
-
function CheckRedirect(obj)
|
36 |
-
{
|
37 |
-
if( obj.value )
|
38 |
-
{
|
39 |
-
if( obj.value.indexOf('rawvoice') == -1 && obj.value.indexOf('techpodcasts') == -1 &&
|
40 |
-
obj.value.indexOf('blubrry') == -1 && obj.value.indexOf('podtrac') == -1 )
|
41 |
-
{
|
42 |
-
if( !confirm('<?php echo __('The redirect entered is not recongized as a supported statistics redirect service.', 'powerpress'); ?>\n\n<?php echo __('Are you sure you wish to continue with this redirect url?', 'powerpress'); ?>') )
|
43 |
-
{
|
44 |
-
obj.value = '';
|
45 |
-
return false;
|
46 |
-
}
|
47 |
-
}
|
48 |
-
}
|
49 |
-
return true;
|
50 |
-
}
|
51 |
-
|
52 |
-
function SelectEmbedField(checked)
|
53 |
-
{
|
54 |
-
if( checked )
|
55 |
-
jQuery('#embed_replace_player').removeAttr("disabled");
|
56 |
-
else
|
57 |
-
jQuery('#embed_replace_player').attr("disabled","disabled");
|
58 |
-
}
|
59 |
-
|
60 |
-
jQuery(document).ready(function($) {
|
61 |
-
|
62 |
-
jQuery('#powerpress_advanced_mode_button').click( function(event) {
|
63 |
-
event.preventDefault();
|
64 |
-
jQuery('#powerpress_advanced_mode').val('0');
|
65 |
-
jQuery(this).closest("form").submit();
|
66 |
-
});
|
67 |
-
|
68 |
-
jQuery('#episode_box_player_links_options').change(function () {
|
69 |
-
|
70 |
-
var objectChecked = jQuery('#episode_box_player_links_options').attr('checked');
|
71 |
-
if(typeof jQuery.prop === 'function') {
|
72 |
-
objectChecked = jQuery('#episode_box_player_links_options').prop('checked');
|
73 |
-
}
|
74 |
-
|
75 |
-
if( objectChecked == true ) {
|
76 |
-
jQuery('#episode_box_player_links_options_div').css("display", 'block' );
|
77 |
-
}
|
78 |
-
else {
|
79 |
-
jQuery('#episode_box_player_links_options_div').css("display", 'none' );
|
80 |
-
jQuery('.episode_box_no_player_or_links').attr("checked", false );
|
81 |
-
jQuery('#episode_box_no_player_and_links').attr("checked", false );
|
82 |
-
if(typeof jQuery.prop === 'function') {
|
83 |
-
jQuery('.episode_box_no_player_or_links').prop("checked", false );
|
84 |
-
jQuery('#episode_box_no_player_and_links').prop("checked", false );
|
85 |
-
}
|
86 |
-
}
|
87 |
-
} );
|
88 |
-
|
89 |
-
jQuery('#episode_box_no_player_and_links').change(function () {
|
90 |
-
|
91 |
-
var objectChecked = jQuery(this).attr("checked");
|
92 |
-
if(typeof jQuery.prop === 'function') {
|
93 |
-
objectChecked = jQuery(this).prop("checked");
|
94 |
-
}
|
95 |
-
|
96 |
-
if( objectChecked == true ) {
|
97 |
-
jQuery('.episode_box_no_player_or_links').attr("checked", false );
|
98 |
-
if(typeof jQuery.prop === 'function') {
|
99 |
-
jQuery('.episode_box_no_player_or_links').prop("checked", false );
|
100 |
-
}
|
101 |
-
}
|
102 |
-
} );
|
103 |
-
|
104 |
-
jQuery('.episode_box_no_player_or_links').change(function () {
|
105 |
-
var objectChecked = jQuery(this).attr("checked");
|
106 |
-
if(typeof jQuery.prop === 'function') {
|
107 |
-
objectChecked = jQuery(this).prop("checked");
|
108 |
-
}
|
109 |
-
|
110 |
-
if( objectChecked == true) {
|
111 |
-
jQuery('#episode_box_no_player_and_links').attr("checked", false );
|
112 |
-
if(typeof jQuery.prop === 'function') {
|
113 |
-
jQuery('#episode_box_no_player_and_links').prop("checked", false );
|
114 |
-
}
|
115 |
-
}
|
116 |
-
} );
|
117 |
-
|
118 |
-
jQuery('#episode_box_feature_in_itunes').change( function() {
|
119 |
-
var objectChecked = jQuery('#episode_box_feature_in_itunes').attr('checked');
|
120 |
-
if(typeof jQuery.prop === 'function') {
|
121 |
-
objectChecked = jQuery('#episode_box_feature_in_itunes').prop('checked');
|
122 |
-
}
|
123 |
-
if( objectChecked ) {
|
124 |
-
$("#episode_box_order").attr("disabled", true);
|
125 |
-
} else {
|
126 |
-
$("#episode_box_order").removeAttr("disabled");
|
127 |
-
}
|
128 |
-
});
|
129 |
-
|
130 |
-
} );
|
131 |
-
//-->
|
132 |
-
</script>
|
133 |
-
|
134 |
-
<input type="hidden" name="action" value="powerpress-save-settings" />
|
135 |
-
|
136 |
-
|
137 |
-
<input type="hidden" id="powerpress_advanced_mode" name="General[advanced_mode_2]" value="1" />
|
138 |
-
<input type="hidden" id="save_tab_pos" name="tab" value="<?php echo (empty($_POST['tab'])?0: intval($_POST['tab']) ); ?>" />
|
139 |
-
|
140 |
-
<div id="powerpress_admin_header">
|
141 |
-
<h2><?php echo __('Blubrry PowerPress Settings', 'powerpress'); ?></h2>
|
142 |
-
<span class="powerpress-mode"><?php echo __('Advanced Mode', 'powerpress'); ?>
|
143 |
-
<a href="<?php echo admin_url("admin.php?page=". urlencode(powerpress_admin_get_page()) ."&mode=simple"); ?>" id="powerpress_advanced_mode_button" class="button-primary button-blubrry"><?php echo __('Switch to Simple Mode', 'powerpress'); ?></a>
|
144 |
-
</span>
|
145 |
-
</div>
|
146 |
-
|
147 |
-
<div id="powerpress_settings_page" class="powerpress_tabbed_content">
|
148 |
-
<ul class="powerpress_settings_tabs">
|
149 |
-
<li><a href="#tab0"><span><?php echo htmlspecialchars(__('Welcome', 'powerpress')); ?></span></a></li>
|
150 |
-
<li><a href="#tab1"><span><?php echo htmlspecialchars(__('Episodes', 'powerpress')); ?></span></a></li>
|
151 |
-
<li><a href="#tab2"><span><?php echo htmlspecialchars(__('Services & Stats', 'powerpress')); ?></span></a></li>
|
152 |
-
<li><a href="#tab3"><span><?php echo htmlspecialchars(__('Website', 'powerpress')); ?></span></a></li>
|
153 |
-
<li><a href="#tab4"><span><?php echo htmlspecialchars(__('Feeds', 'powerpress')); ?></span></a></li>
|
154 |
-
<li><a href="#tab5"><span><?php echo htmlspecialchars(__('Apple', 'powerpress')); ?></span></a></li>
|
155 |
-
<li><a href="#tab6"><span><?php echo htmlspecialchars(__('Google', 'powerpress')); ?></span></a></li>
|
156 |
-
<li><a href="#tab7"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
|
157 |
-
<li><a href="#tab-dest"><span><?php echo htmlspecialchars(__('Destinations', 'powerpress')); ?></span></a></li>
|
158 |
-
</ul>
|
159 |
-
|
160 |
-
<div id="tab0" class="powerpress_tab">
|
161 |
-
<?php powerpressadmin_welcome($General); ?>
|
162 |
-
</div>
|
163 |
-
|
164 |
-
<div id="tab1" class="powerpress_tab">
|
165 |
-
<?php
|
166 |
-
powerpressadmin_edit_entry_options($General);
|
167 |
-
powerpressadmin_edit_podpress_options($General);
|
168 |
-
?>
|
169 |
-
</div>
|
170 |
-
|
171 |
-
<div id="tab2" class="powerpress_tab">
|
172 |
-
<?php
|
173 |
-
if( $MultiSiteServiceSettings && defined('POWERPRESS_MULTISITE_VERSION') )
|
174 |
-
{
|
175 |
-
PowerPressMultiSitePlugin::edit_blubrry_services($General);
|
176 |
-
}
|
177 |
-
else
|
178 |
-
{
|
179 |
-
powerpressadmin_edit_blubrry_services($General);
|
180 |
-
powerpressadmin_edit_media_statistics($General);
|
181 |
-
}
|
182 |
-
?>
|
183 |
-
</div>
|
184 |
-
|
185 |
-
<div id="tab3" class="powerpress_tab">
|
186 |
-
<?php
|
187 |
-
powerpressadmin_appearance($General, $FeedSettings);
|
188 |
-
?>
|
189 |
-
</div>
|
190 |
-
|
191 |
-
<div id="tab4" class="powerpress_tab">
|
192 |
-
<?php
|
193 |
-
powerpressadmin_edit_feed_general($FeedSettings, $General);
|
194 |
-
powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs);
|
195 |
-
powerpressadmin_edit_funding($FeedSettings);
|
196 |
-
powerpressadmin_edit_tv($FeedSettings);
|
197 |
-
?>
|
198 |
-
</div>
|
199 |
-
|
200 |
-
<div id="tab5" class="powerpress_tab">
|
201 |
-
<?php
|
202 |
-
powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
|
203 |
-
?>
|
204 |
-
</div>
|
205 |
-
<div id="tab6" class="powerpress_tab">
|
206 |
-
<?php
|
207 |
-
powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs);
|
208 |
-
?>
|
209 |
-
</div>
|
210 |
-
<div id="tab7" class="powerpress_tab">
|
211 |
-
<?php
|
212 |
-
powerpressadmin_edit_artwork($FeedSettings, $General);
|
213 |
-
?>
|
214 |
-
</div>
|
215 |
-
<div id="tab-dest" class="powerpress_tab">
|
216 |
-
<?php
|
217 |
-
powerpressadmin_edit_destinations($FeedSettings, $General, $FeedAttribs);
|
218 |
-
?>
|
219 |
-
</div>
|
220 |
-
|
221 |
-
</div>
|
222 |
-
<div class="clear"></div>
|
223 |
-
|
224 |
-
<?php
|
225 |
-
|
226 |
-
powerpressadmin_advanced_options($General);
|
227 |
-
}
|
228 |
-
|
229 |
-
function powerpressadmin_advanced_options($General)
|
230 |
-
{
|
231 |
-
// Break the bottom section here out into it's own function
|
232 |
-
$ChannelsCheckbox = '';
|
233 |
-
if( !empty($General['custom_feeds']) )
|
234 |
-
$ChannelsCheckbox = ' onclick="alert(\''. __('You must delete all of the Podcast Channels to disable this option.', 'powerpress') .'\');return false;"';
|
235 |
-
$CategoryCheckbox = '';
|
236 |
-
//if( !empty($General['custom_cat_feeds']) ) // Decided ont to include this warning because it may imply that you have to delete the actual category, which is not true.
|
237 |
-
// $CategoryCheckbox = ' onclick="alert(\'You must remove podcasting from the categories to disable this option.\');return false;"';
|
238 |
-
?>
|
239 |
-
<script language="javascript"><!--
|
240 |
-
|
241 |
-
jQuery(document).ready( function() {
|
242 |
-
|
243 |
-
jQuery('.pp-expand-section').click( function(e) {
|
244 |
-
e.preventDefault();
|
245 |
-
|
246 |
-
if( jQuery(this).hasClass('pp-expand-section-expanded') ) {
|
247 |
-
jQuery(this).removeClass('pp-expand-section-expanded');
|
248 |
-
jQuery(this).parent().next('div').hide(400);
|
249 |
-
jQuery(this).blur();
|
250 |
-
} else {
|
251 |
-
jQuery(this).addClass('pp-expand-section-expanded');
|
252 |
-
jQuery(this).parent().next('div').show(400);
|
253 |
-
jQuery(this).blur();
|
254 |
-
}
|
255 |
-
});
|
256 |
-
});
|
257 |
-
|
258 |
-
//-->
|
259 |
-
</script>
|
260 |
-
<div style="margin-left: 10px;">
|
261 |
-
<h3><a href="#" class="pp-expand-section pp-expand-section-expanded"><?php echo __('Advanced Options', 'powerpress'); ?></a></h3>
|
262 |
-
<div style="margin-left: 50px;" >
|
263 |
-
<div>
|
264 |
-
<input type="checkbox" name="NULL[import_podcast]" value="1" checked disabled />
|
265 |
-
<strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_import_feed.php'); ?>"><?php echo __('Import Podcast', 'powerpress'); ?></a></strong> -
|
266 |
-
<?php echo __('Import podcast feed from SoundCloud, LibSyn, PodBean or other podcast service.', 'powerpress'); ?>
|
267 |
-
</div>
|
268 |
-
<div>
|
269 |
-
<input type="checkbox" name="NULL[migrate_media]" value="1" checked disabled />
|
270 |
-
<strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_migrate.php'); ?>"><?php echo __('Migrate Media', 'powerpress'); ?></a></strong> -
|
271 |
-
<?php echo __('Migrate media files to Blubrry Podcast Media Hosting with only a few clicks.', 'powerpress'); ?>
|
272 |
-
</div>
|
273 |
-
<div>
|
274 |
-
<input type="checkbox" name="NULL[podcasting_seo]" value="1" checked disabled />
|
275 |
-
<strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_search.php'); ?>"><?php echo __('Podcasting SEO', 'powerpress'); ?></a></strong> -
|
276 |
-
<?php echo __('Select from 3 different web based audio players.', 'powerpress'); ?>
|
277 |
-
</div>
|
278 |
-
|
279 |
-
<div>
|
280 |
-
<input type="checkbox" name="NULL[player_options]" value="1" checked disabled />
|
281 |
-
<strong><?php echo __('Audio Player Options', 'powerpress'); ?></strong> -
|
282 |
-
<?php echo __('Select from 3 different web based audio players.', 'powerpress'); ?>
|
283 |
-
<span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_player.php&sp=1'); ?>"><?php echo __('configure audio player', 'powerpress'); ?></a>)</span>
|
284 |
-
</div>
|
285 |
-
<div>
|
286 |
-
<input type="checkbox" name="NULL[video_player_options]" value="1" checked disabled />
|
287 |
-
<strong><?php echo __('Video Player Options', 'powerpress'); ?></strong> -
|
288 |
-
<?php echo __('Select from 3 different web based video players.', 'powerpress'); ?>
|
289 |
-
<span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_videoplayer.php&sp=1'); ?>"><?php echo __('configure video player', 'powerpress'); ?></a>)</span>
|
290 |
-
|
291 |
-
</div>
|
292 |
-
<div>
|
293 |
-
<input type="hidden" name="General[channels]" value="0" />
|
294 |
-
<input type="checkbox" name="General[channels]" value="1" <?php echo ( !empty($General['channels']) ?' checked':''); echo $ChannelsCheckbox; ?> />
|
295 |
-
<strong><?php echo __('Custom Podcast Channels', 'powerpress'); ?></strong> -
|
296 |
-
<?php echo __('Manage multiple media files and/or formats to one blog post.', 'powerpress'); ?>
|
297 |
-
<?php if( empty($General['channels']) ) { ?>
|
298 |
-
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
|
299 |
-
<?php } else { ?>
|
300 |
-
<span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_customfeeds.php'); ?>"><?php echo __('configure podcast channels', 'powerpress'); ?></a>)</span>
|
301 |
-
<?php } ?>
|
302 |
-
</div>
|
303 |
-
<div>
|
304 |
-
<input type="hidden" name="General[cat_casting]" value="0" />
|
305 |
-
<input type="checkbox" name="General[cat_casting]" value="1" <?php echo ( !empty($General['cat_casting']) ?' checked':''); echo $CategoryCheckbox; ?> />
|
306 |
-
<strong><?php echo __('Category Podcasting', 'powerpress'); ?></strong> -
|
307 |
-
<?php echo __('Manage podcasting for specific categories.', 'powerpress'); ?>
|
308 |
-
<?php if( empty($General['cat_casting']) ) { ?>
|
309 |
-
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
|
310 |
-
<?php } else { ?>
|
311 |
-
<span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php'); ?>"><?php echo __('configure podcast categories', 'powerpress'); ?></a>)</span>
|
312 |
-
<?php } ?>
|
313 |
-
</div>
|
314 |
-
<div>
|
315 |
-
<input type="checkbox" name="General[metamarks]" value="1" <?php echo ( !empty($General['metamarks']) ?' checked':''); ?> />
|
316 |
-
<strong><?php echo __('Meta Marks', 'powerpress'); ?></strong> -
|
317 |
-
<?php echo __('Add additional meta information to your media for syndication.', 'powerpress'); ?>
|
318 |
-
<?php echo powerpress_help_link('http://www.powerpresspodcast.com/metamarks/'); ?>
|
319 |
-
<span style="font-size: 85%;">(<?php echo __('feature will appear in episode entry box', 'powerpress'); ?>)</span>
|
320 |
-
</div>
|
321 |
-
|
322 |
-
|
323 |
-
<div>
|
324 |
-
<input type="hidden" name="General[taxonomy_podcasting]" value="0" />
|
325 |
-
<input type="checkbox" name="General[taxonomy_podcasting]" value="1" <?php echo ( !empty($General['taxonomy_podcasting']) ?' checked':''); ?> />
|
326 |
-
<strong><?php echo __('Taxonomy Podcasting', 'powerpress'); ?></strong>
|
327 |
-
<span style="font-size: 14px;">(<?php echo __('Feature sponsored by', 'powerpress'); ?> <a href="http://afterbuzztv.com/" target="_blank">AfterBuzzTV.com</a>)</span> -
|
328 |
-
<?php echo __('Manage podcasting for specific taxonomies.', 'powerpress'); ?>
|
329 |
-
<?php if( empty($General['taxonomy_podcasting']) ) { ?>
|
330 |
-
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
|
331 |
-
<?php } else { ?>
|
332 |
-
<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>
|
333 |
-
<?php } ?>
|
334 |
-
</div>
|
335 |
-
<div>
|
336 |
-
<input type="hidden" name="General[posttype_podcasting]" value="0" />
|
337 |
-
<input type="checkbox" name="General[posttype_podcasting]" value="1" <?php echo ( !empty($General['posttype_podcasting']) ?' checked':''); ?> />
|
338 |
-
<strong><?php echo __('Post Type Podcasting', 'powerpress'); ?></strong> -
|
339 |
-
<?php echo __('Manage multiple media files and/or formats to specific post types.', 'powerpress'); ?>
|
340 |
-
<?php if( empty($General['posttype_podcasting']) ) { ?>
|
341 |
-
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
|
342 |
-
<?php } else { ?>
|
343 |
-
<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>
|
344 |
-
<?php } ?>
|
345 |
-
</div>
|
346 |
-
<div>
|
347 |
-
<input type="checkbox" name="General[playlist_player]" value="1" <?php echo ( !empty($General['playlist_player']) ?' checked':''); ?> />
|
348 |
-
<strong><?php echo __('PowerPress Playlist Player', 'powerpress'); ?></strong> -
|
349 |
-
<?php echo __('Create playlists for your podcasts.', 'powerpress'); ?>
|
350 |
-
<span style="font-size: 85%;">(<a href="http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/powerpress-playlist-shortcode/" target="_blank"><?php echo __('learn more', 'powerpress'); ?></a>)</span>
|
351 |
-
</div>
|
352 |
-
</div>
|
353 |
-
</div>
|
354 |
-
|
355 |
-
<?php
|
356 |
-
$link_action_url = admin_url('admin.php?action=powerpress-jquery-account');
|
357 |
-
$link_action = 'powerpress-jquery-account';
|
358 |
-
?>
|
359 |
-
<div style="margin-left: 10px;">
|
360 |
-
<h3><?php echo __('Link Blubrry Account', 'powerpress'); ?></h3>
|
361 |
-
<p style="font-size: 125%;">
|
362 |
-
<strong><a class="button-primary button-blubrry thickbox" title="<?php echo esc_attr(__('Blubrry Services Integration', 'powerpress')); ?>" href="<?php echo wp_nonce_url($link_action_url, $link_action); ?>&KeepThis=true&TB_iframe=true&width=600&height=400&modal=false" target="_blank"><?php echo __('Click here to link Blubrry account', 'powerpress'); ?></a></strong>
|
363 |
-
</p>
|
364 |
-
<p>
|
365 |
-
<?php echo __('Link your blubrry.com account if you have a Blubrry Podcast Hosting or Blubrry Podcast Statistics services.', 'powerpress'); ?>
|
366 |
-
</p>
|
367 |
-
</div>
|
368 |
-
|
369 |
-
<div style="margin-left: 10px;">
|
370 |
-
<h3 style="margin-bottom: 5px;"><?php echo __('Looking for Support, Consulting or Custom Development?', 'powerpress'); ?></h3>
|
371 |
-
<p style="margin: 0 0 0 50px;">
|
372 |
-
<?php echo __('Blubrry offers a variety of options, free and paid, to assist you with your podcasting and Internet media needs. Whether you need your theme customized for podcasting or you want consulting on what video format is best for your audience, we have the staff and knowledge to assist.', 'powerpress'); ?>
|
373 |
-
</p>
|
374 |
-
<p style="margin: 5px 0 0 50px;">
|
375 |
-
<strong><?php echo '<a href="http://create.blubrry.com/support/" target="_blank">'. __('Learn More about Blubrry Support Options', 'powerpress') .'</a>'; ?></strong>
|
376 |
-
</p>
|
377 |
-
</div>
|
378 |
-
|
379 |
-
<?php
|
380 |
-
return;
|
381 |
-
|
382 |
-
// We will not pester folks with this stuff in PowerPress 7.0+
|
383 |
-
|
384 |
-
if( isset($General['timestamp']) && $General['timestamp'] > 0 && $General['timestamp'] < ( time()- (60*60*24*14) ) ) // Lets wait 14 days before we annoy them asking for support
|
385 |
-
{
|
386 |
-
?>
|
387 |
-
<div style="margin-left: 10px;">
|
388 |
-
<h3 style="margin-bottom: 5px;"><?php echo __('Like The Plugin?', 'powerpress'); ?></h3>
|
389 |
-
<p style="margin-top: 0;">
|
390 |
-
<?php echo __('This plugin is great, don\'t you think? If you like the plugin we\'d be ever so grateful if you\'d give it your support. Here\'s how:', 'powerpress'); ?>
|
391 |
-
</p>
|
392 |
-
<ul id="powerpress_support">
|
393 |
-
<li><?php echo sprintf(__('Rate this plugin 5 stars in the %s.', 'powerpress'),
|
394 |
-
'<a href="http://wordpress.org/extend/plugins/powerpress/" target="_blank">'. __('WordPress Plugins Directory', 'powerpress') .'</a>');
|
395 |
-
|
396 |
-
?>
|
397 |
-
</li>
|
398 |
-
<li><?php echo __('Tell the world about PowerPress by writing about it on your blog', 'powerpress'); ?>,
|
399 |
-
<a href="https://twitter.com/home/?status=<?php echo urlencode( __('I\'m podcasting with Blubrry PowerPress (https://blubrry.com/powerpress/) #powerpress #wordpress', 'powerpress') ); ?>" target="_blank"><?php echo __('Twitter', 'powerpress'); ?></a>,
|
400 |
-
<a href="https://www.facebook.com/share.php?u=<?php echo urlencode('https://www.blubrry.com/powerpress'); ?>&t=<?php echo urlencode( __('I podcast with Blubrry PowerPress', 'powerpress')); ?>" target="_blank"><?php echo __('Facebook', 'powerpress'); ?></a>,
|
401 |
-
etc...</li>
|
402 |
-
<li><a href="http://www.blubrry.com/contact.php" target="_blank"><?php echo __('Send us feedback', 'powerpress'); ?></a> (<?php echo __('we love getting suggestions for new features!', 'powerpress'); ?>)</li>
|
403 |
-
</ul>
|
404 |
-
</div>
|
405 |
-
<?php
|
406 |
-
}
|
407 |
-
?>
|
408 |
-
<div style="margin-left: 10px;">
|
409 |
-
<h3 style="margin-bottom: 5px;"><?php echo __('Become a PowerPress Patron!', 'powerpress'); ?></h3>
|
410 |
-
<p style="margin: 0; padding-left: 50px;">
|
411 |
-
<?php echo __('Help support your favorite podcasting plugin via Patreon.', 'powerpress'); ?>
|
412 |
-
</p>
|
413 |
-
<p style="margin-top: 0; padding-left: 50px;"><?php echo '<a href="https://www.patreon.com/blubrry?ty=h" target="_blank">'. __('Visit Blubrry\'s Patreon page', 'powerpress') .'</a>'; ?>
|
414 |
-
</p>
|
415 |
-
</div>
|
416 |
-
<?php
|
417 |
-
}
|
418 |
-
|
419 |
-
function powerpressadmin_edit_entry_options($General)
|
420 |
-
{
|
421 |
-
if( !isset($General['default_url']) )
|
422 |
-
$General['default_url'] = '';
|
423 |
-
if( !isset($General['episode_box_mode']) )
|
424 |
-
$General['episode_box_mode'] = 0; // Default not set, 1 = no duration/file size, 2 = yes duration/file size (default if not set)
|
425 |
-
if( !isset($General['episode_box_embed']) )
|
426 |
-
$General['episode_box_embed'] = 0;
|
427 |
-
if( !isset($General['set_duration']) )
|
428 |
-
$General['set_duration'] = 0;
|
429 |
-
if( !isset($General['set_size']) )
|
430 |
-
$General['set_size'] = 0;
|
431 |
-
if( !isset($General['auto_enclose']) )
|
432 |
-
$General['auto_enclose'] = 0;
|
433 |
-
if( !isset($General['episode_box_player_size']) )
|
434 |
-
$General['episode_box_player_size'] = 0;
|
435 |
-
if( !isset($General['episode_box_closed_captioned']) )
|
436 |
-
$General['episode_box_closed_captioned'] = 0;
|
437 |
-
if( !isset($General['episode_box_order']) )
|
438 |
-
$General['episode_box_order'] = 0;
|
439 |
-
if( !isset($General['episode_box_feature_in_itunes']) )
|
440 |
-
$General['episode_box_feature_in_itunes'] = 0;
|
441 |
-
|
442 |
-
?>
|
443 |
-
<h3><?php echo __('Episode Entry Options', 'powerpress'); ?></h3>
|
444 |
-
|
445 |
-
|
446 |
-
<table class="form-table">
|
447 |
-
<tr valign="top">
|
448 |
-
<th scope="row">
|
449 |
-
|
450 |
-
<?php echo __('Podcast Entry Box', 'powerpress'); ?></th>
|
451 |
-
<td>
|
452 |
-
<p style="margin-top: 5px;">
|
453 |
-
<?php echo __('Configure your podcast episode entry box with the options that fit your needs.', 'powerpress'); ?>
|
454 |
-
</p>
|
455 |
-
<div id="episode_box_mode_adv">
|
456 |
-
|
457 |
-
<p style="margin-top: 15px;"><input class="episode_box_option" name="Null[ignore]" type="checkbox" value="1" checked onclick="return false" onkeydown="return false" /> <?php echo __('Media URL', 'powerpress'); ?>
|
458 |
-
(<?php echo __('Specify URL to episode\'s media file', 'powerpress'); ?>)</p>
|
459 |
-
|
460 |
-
<p style="margin-top: 15px;"><input id="episode_box_mode" class="episode_box_option" name="General[episode_box_mode]" type="checkbox" value="2" <?php if( empty($General['episode_box_mode']) || $General['episode_box_mode'] != 1 ) echo ' checked'; ?> /> <?php echo __('Media File Size and Duration', 'powerpress'); ?>
|
461 |
-
(<?php echo __('Specify episode\'s media file size and duration', 'powerpress'); ?>)</p>
|
462 |
-
|
463 |
-
<p style="margin-top: 15px; margin-bottom: 0;"><input id="episode_box_embed" class="episode_box_option" name="General[episode_box_embed]" type="checkbox" value="1"<?php if( !empty($General['episode_box_embed']) ) echo ' checked'; ?> onclick="SelectEmbedField(this.checked);" /> <?php echo __('Embed Field', 'powerpress'); ?>
|
464 |
-
(<?php echo __('Enter embed code from sites such as YouTube', 'powerpress'); ?>)</p>
|
465 |
-
<p style="margin-top: 5px; margin-left: 20px; font-size: 90%;"><input id="embed_replace_player" class="episode_box_option" name="General[embed_replace_player]" type="checkbox" value="1"<?php if( !empty($General['embed_replace_player']) ) echo ' checked'; ?> /> <?php echo __('Replace Player with Embed', 'powerpress'); ?>
|
466 |
-
(<?php echo __('Do not display default player if embed present for episode.', 'powerpress'); ?>)</p>
|
467 |
-
|
468 |
-
<p style="margin-top: 15px;"><input id="episode_box_player_links_options" class="episode_box_option" name="NULL[episode_box_player_links_options]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_player_and_links']) || !empty($General['episode_box_no_player']) || !empty($General['episode_box_no_links']) ) echo ' checked'; ?> /> <?php echo __('Display Player and Links Options', 'powerpress'); ?>
|
469 |
-
</p>
|
470 |
-
<div id="episode_box_player_links_options_div" style="margin-left: 20px;<?php if( empty($General['episode_box_no_player_and_links']) && empty($General['episode_box_no_player']) && empty($General['episode_box_no_links']) ) echo 'display:none;'; ?>">
|
471 |
-
|
472 |
-
<p style="margin-top: 0px; margin-bottom: 5px;"><input id="episode_box_no_player_and_links" class="episode_box_option" name="General[episode_box_no_player_and_links]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_player_and_links']) ) echo ' checked'; ?> /> <?php echo htmlspecialchars(__('No Player & Links Option', 'powerpress')); ?>
|
473 |
-
(<?php echo __('Disable media player and links on a per episode basis', 'powerpress'); ?>)</p>
|
474 |
-
|
475 |
-
<p style="margin-top: 0; margin-bottom: 0; margin-left: 20px;"><?php echo __('- or -', 'powerpress'); ?></p>
|
476 |
-
|
477 |
-
<p style="margin-top: 5px; margin-bottom: 10px;"><input id="episode_box_no_player" class="episode_box_option episode_box_no_player_or_links" name="General[episode_box_no_player]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_player']) ) echo ' checked'; ?> /> <?php echo __('No Player Option', 'powerpress'); ?>
|
478 |
-
(<?php echo __('Disable media player on a per episode basis', 'powerpress'); ?>)</p>
|
479 |
-
|
480 |
-
<p style="margin-top: 5px; margin-bottom: 20px;"><input id="episode_box_no_links" class="episode_box_option episode_box_no_player_or_links" name="General[episode_box_no_links]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_links']) ) echo ' checked'; ?> /> <?php echo __('No Links Option', 'powerpress'); ?>
|
481 |
-
(<?php echo __('Disable media links on a per episode basis', 'powerpress'); ?>)</p>
|
482 |
-
|
483 |
-
</div>
|
484 |
-
|
485 |
-
<p style="margin-top: 15px;"><input id="episode_box_cover_image" class="episode_box_option" name="General[episode_box_cover_image]" type="checkbox" value="1"<?php if( !empty($General['episode_box_cover_image']) ) echo ' checked'; ?> /> <?php echo __('Poster Image', 'powerpress'); ?>
|
486 |
-
(<?php echo __('Specify URL to poster artwork specific to each episode', 'powerpress'); ?>)</p>
|
487 |
-
|
488 |
-
<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'); ?>
|
489 |
-
(<?php echo __('Customize player width and height on a per episode basis', 'powerpress'); ?>)</p>
|
490 |
-
<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'); ?>
|
491 |
-
(<?php echo __('Leave unchecked to use the first 250 characters of your blog post', 'powerpress'); ?>)</p>
|
492 |
-
<p style="margin-top: 15px;"><input id="episode_box_summary" class="episode_box_option" name="General[episode_box_summary]" type="checkbox" value="1"<?php if( !empty($General['episode_box_summary']) ) echo ' checked'; ?> /> <?php echo __('iTunes Summary Field', 'powerpress'); ?>
|
493 |
-
(<?php echo __('Leave unchecked to use your blog post', 'powerpress'); ?>)</p>
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
<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'); ?>
|
498 |
-
(<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
|
499 |
-
|
500 |
-
<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'); ?>
|
501 |
-
(<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
|
502 |
-
|
503 |
-
|
504 |
-
<p style="margin-top: 15px;"><label><input id="episode_box_itunes_image" 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>
|
505 |
-
(<?php echo __('Leave unchecked to use the image embedded into your media files.', 'powerpress'); ?>)</p>
|
506 |
-
|
507 |
-
<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>
|
508 |
-
(<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
|
509 |
-
|
510 |
-
<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>
|
511 |
-
(<?php echo __('Override the default ordering of episodes on the Apple and Google Podcast directories', 'powerpress'); ?>)</p>
|
512 |
-
<em><strong><?php echo __('If conflicting values are present the directories will use the default ordering.', 'powerpress'); ?></strong></em><br />
|
513 |
-
<em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
|
514 |
-
|
515 |
-
<?php if( empty($General['ios11_fields']) || $General['ios11_fields'] == 2 ) { ?>
|
516 |
-
<p><label><select name="General[ebititle]" class="bpp_input_sm">
|
517 |
-
<?php
|
518 |
-
$linkoptions = array('false'=>__('Hide Field', 'powerpress'),
|
519 |
-
1=>__('Show Field', 'powerpress') );
|
520 |
-
|
521 |
-
foreach( $linkoptions as $value => $desc )
|
522 |
-
echo "\t<option value=\"$value\"". ( !empty($General['episode_box_itunes_title']) && $General['episode_box_itunes_title'] == $value ?' selected':''). ">$desc</option>\n";
|
523 |
-
|
524 |
-
?>
|
525 |
-
</select> <?php echo __('iTunes Episode Title Field', 'powerpress'); ?></label> </p>
|
526 |
-
<em><strong><?php echo __('Specify iTunes episode title separate from podcast feed title.', 'powerpress'); ?></strong></em>
|
527 |
-
<?php } // end episode_box_itunes_title ?>
|
528 |
-
|
529 |
-
<?php if( empty($General['ios11_fields']) || $General['ios11_fields'] == 4 ) { ?>
|
530 |
-
<p><label><select name="General[ebinst]" class="bpp_input_sm">
|
531 |
-
<?php
|
532 |
-
$linkoptions = array('false'=>__('Hide Field', 'powerpress'),
|
533 |
-
1=>__('Show Field', 'powerpress') );
|
534 |
-
|
535 |
-
foreach( $linkoptions as $value => $desc )
|
536 |
-
echo "\t<option value=\"$value\"". ( !empty($General['episode_box_itunes_nst']) && $General['episode_box_itunes_nst'] == $value ?' selected':''). ">$desc</option>\n";
|
537 |
-
|
538 |
-
?>
|
539 |
-
</select> <?php echo __('iTunes Episode Number, Season and Type Fields', 'powerpress'); ?></label> </p>
|
540 |
-
<em><strong><?php echo __('Enter specifics about episode including episode number, season number and type (full, trailer, or bonus).', 'powerpress'); ?></strong></em>
|
541 |
-
<?php } // end episode_box_itunes_title ?>
|
542 |
-
|
543 |
-
<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 Apple and Google Podcasts', 'powerpress'); ?></label>
|
544 |
-
(<?php echo __('Display selected episode at top of your Apple and Google Podcasts listings', 'powerpress'); ?>)</p>
|
545 |
-
<em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
|
546 |
-
<em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
|
547 |
-
|
548 |
-
|
549 |
-
<p style="margin-top: 15px;"><input id="episode_box_gp_desc" class="episode_box_option" name="General[episode_box_gp_desc]" type="checkbox" value="1"<?php if( !empty($General['episode_box_gp_desc']) ) echo ' checked'; ?> /> <?php echo __('Google Play Description Field', 'powerpress'); ?>
|
550 |
-
(<?php echo __('Leave unchecked to use your blog post', 'powerpress'); ?>)</p>
|
551 |
-
<p style="margin-top: 15px;"><input id="episode_box_gp_explicit" class="episode_box_option" name="General[episode_box_gp_explicit]" type="checkbox" value="1"<?php if( !empty($General['episode_box_gp_explicit']) ) echo ' checked'; ?> /> <?php echo __('Google Play Explicit Field', 'powerpress'); ?>
|
552 |
-
(<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
|
553 |
-
|
554 |
-
<fieldset style="border: 1px dashed #333333; margin: 10px 0 10px -20px;">
|
555 |
-
<legend style="margin: 0 20px; padding: 0 5px 5px 5px; font-weight: bold;"><?php echo __('Advanced Options', 'powerpress'); ?></legend>
|
556 |
-
<p style="margin: 15px 0 0 20px;"><label><input id="episode_box_block" class="episode_box_option" name="General[episode_box_block]" type="checkbox" value="1"<?php if( !empty($General['episode_box_block']) ) echo ' checked'; ?> /> <?php echo __('iTunes Block', 'powerpress'); ?> (<?php echo htmlspecialchars('<itunes:block>yes</itunes:block>'); ?>)</label></p>
|
557 |
-
<div style="margin: 0 10px 10px 20px;"><em><strong><?php echo __('Prevent episodes from appearing in iTunes and other diretories that support the iTunes:block tag. Episodes may still appear in other directories and applications.', 'powerpress'); ?></strong></em></div>
|
558 |
-
|
559 |
-
<p style="margin: 15px 0 0 20px;"><label><input id="episode_box_gp_block" class="episode_box_option" name="General[episode_box_gp_block]" type="checkbox" value="1"<?php if( !empty($General['episode_box_gp_block']) ) echo ' checked'; ?> /> <?php echo __('Google Play Block', 'powerpress'); ?> (<?php echo htmlspecialchars('<googleplay:block>yes</itunes:googleplay>'); ?>)</label></p>
|
560 |
-
<div style="margin: 0 10px 10px 20px;"><em><strong><?php echo __('Prevent episodes from appearing in Google Play Music. Episodes may still appear in other directories and applications.', 'powerpress'); ?></strong></em></div>
|
561 |
-
</fieldset>
|
562 |
-
|
563 |
-
</div>
|
564 |
-
|
565 |
-
</td>
|
566 |
-
</tr>
|
567 |
-
</table>
|
568 |
-
<script language="javascript"><!--
|
569 |
-
SelectEmbedField(<?php echo $General['episode_box_embed']; ?>);
|
570 |
-
//-->
|
571 |
-
</script>
|
572 |
-
|
573 |
-
<?php
|
574 |
-
|
575 |
-
$AdvanecdOptions = false;
|
576 |
-
if( !empty($General['default_url']) )
|
577 |
-
$AdvanecdOptions = true;
|
578 |
-
if( !empty($General['set_duration']) )
|
579 |
-
$AdvanecdOptions = true;
|
580 |
-
if( !empty($General['set_size']) )
|
581 |
-
$AdvanecdOptions = true;
|
582 |
-
if( !empty($General['auto_enclose']) )
|
583 |
-
$AdvanecdOptions = true;
|
584 |
-
if( !empty($General['permalink_feeds_only']) )
|
585 |
-
$AdvanecdOptions = true;
|
586 |
-
if( !empty($General['hide_warnings']) )
|
587 |
-
$AdvanecdOptions = true;
|
588 |
-
|
589 |
-
$DefaultMediaURL = false;
|
590 |
-
|
591 |
-
if( !empty($General['default_url']) )
|
592 |
-
$DefaultMediaURL = true;
|
593 |
-
|
594 |
-
if( !$AdvanecdOptions ) {
|
595 |
-
?>
|
596 |
-
<div style="margin-left: 10px; font-weight: bold;" id="advanced_basic_options_show_link"><a href="#" onclick="document.getElementById('advanced_basic_options').style.display='block';document.getElementById('advanced_basic_options_show_link').style.display='none';return false;"><?php echo __('Show Advanced Episode Entry Settings', 'powerpress'); ?></a></div>
|
597 |
-
<?php } ?>
|
598 |
-
<!-- start advanced features -->
|
599 |
-
<div id="advanced_basic_options" <?php echo ($AdvanecdOptions?'':'style="display:none;"'); ?>>
|
600 |
-
<?php if( $DefaultMediaURL || defined('POWERPRESS_DEFAULT_MEDIA_URL') ) { ?>
|
601 |
-
<table class="form-table">
|
602 |
-
<tr valign="top">
|
603 |
-
<th scope="row"><?php echo __('Default Media URL', 'powerpress'); ?></th>
|
604 |
-
<td>
|
605 |
-
<input type="text" style="width: 80%;" name="General[default_url]" value="<?php echo esc_attr($General['default_url']); ?>" maxlength="255" />
|
606 |
-
<p><?php echo __('e.g. http://example.com/mediafolder/', 'powerpress'); ?></p>
|
607 |
-
<p><?php echo __('URL above will prefix entered file names that do not start with \'http://\'. URL above must end with a trailing slash. You may leave blank if you always enter the complete URL to your media when creating podcast episodes.', 'powerpress'); ?>
|
608 |
-
</p>
|
609 |
-
</td>
|
610 |
-
</tr>
|
611 |
-
</table>
|
612 |
-
<?php } ?>
|
613 |
-
|
614 |
-
<div id="episode_entry_settings">
|
615 |
-
<table class="form-table">
|
616 |
-
<tr valign="top">
|
617 |
-
<th scope="row">
|
618 |
-
|
619 |
-
<?php echo __('File Size Default', 'powerpress'); ?></th>
|
620 |
-
<td>
|
621 |
-
<select name="General[set_size]" class="bpp_input_med">
|
622 |
-
<?php
|
623 |
-
$options = array(0=>__('Auto detect file size', 'powerpress'), 1=>__('User specify', 'powerpress') );
|
624 |
-
|
625 |
-
foreach( $options as $value => $desc )
|
626 |
-
echo "\t<option value=\"$value\"". ($General['set_size']==$value?' selected':''). ">$desc</option>\n";
|
627 |
-
|
628 |
-
?>
|
629 |
-
</select> (<?php echo __('specify default file size option when creating a new episode', 'powerpress'); ?>)
|
630 |
-
</td>
|
631 |
-
</tr>
|
632 |
-
|
633 |
-
<tr valign="top">
|
634 |
-
<th scope="row">
|
635 |
-
<?php echo __('Duration Default', 'powerpress'); ?></th>
|
636 |
-
<td>
|
637 |
-
<select name="General[set_duration]" class="bpp_input_med">
|
638 |
-
<?php
|
639 |
-
$options = array(0=>__('Auto detect duration', 'powerpress'), 1=>__('User specify', 'powerpress'), -1=>__('Not specified (not recommended)', 'powerpress') );
|
640 |
-
|
641 |
-
foreach( $options as $value => $desc )
|
642 |
-
echo "\t<option value=\"$value\"". ($General['set_duration']==$value?' selected':''). ">$desc</option>\n";
|
643 |
-
|
644 |
-
?>
|
645 |
-
</select> (<?php echo __('specify default duration option when creating a new episode', 'powerpress'); ?>)
|
646 |
-
</td>
|
647 |
-
</tr>
|
648 |
-
</table>
|
649 |
-
</div>
|
650 |
-
|
651 |
-
<table class="form-table">
|
652 |
-
<tr valign="top">
|
653 |
-
<th scope="row">
|
654 |
-
<?php echo __('Auto Add Media', 'powerpress'); ?></th>
|
655 |
-
<td>
|
656 |
-
<select name="General[auto_enclose]" class="bpp_input_med">
|
657 |
-
<?php
|
658 |
-
$options = array(0=>__('Disabled (default)', 'powerpress'), 1=>__('First media link found in post content', 'powerpress'), 2=>__('Last media link found in post content', 'powerpress') );
|
659 |
-
|
660 |
-
foreach( $options as $value => $desc )
|
661 |
-
echo "\t<option value=\"$value\"". ($General['auto_enclose']==$value?' selected':''). ">$desc</option>\n";
|
662 |
-
|
663 |
-
?>
|
664 |
-
</select>
|
665 |
-
<p><?php echo __('When enabled, the first or last media link found in the post content is automatically added as your podcast episode.', 'powerpress'); ?></p>
|
666 |
-
<p style="margin-bottom: 0;" class="description"><em><?php echo __('NOTE: Use this feature with caution. Links to media files could unintentionally become podcast episodes.', 'powerpress'); ?></em></p>
|
667 |
-
<p><em><?php echo __('WARNING: Episodes created with this feature will <u>not</u> include Duration (total play time) information.', 'powerpress'); ?></em></p>
|
668 |
-
</td>
|
669 |
-
</tr>
|
670 |
-
<tr valign="top">
|
671 |
-
<th scope="row">
|
672 |
-
<?php echo __('Disable Warnings', 'powerpress'); ?></th>
|
673 |
-
<td>
|
674 |
-
<select name="General[hide_warnings]" class="bpp_input_med">
|
675 |
-
<?php
|
676 |
-
$options = array(0=>__('No (default)', 'powerpress'), 1=>__('Yes', 'powerpress') );
|
677 |
-
$current_value = (!empty($General['hide_warnings'])?$General['hide_warnings']:0);
|
678 |
-
foreach( $options as $value => $desc )
|
679 |
-
echo "\t<option value=\"$value\"". ($current_value==$value?' selected':''). ">$desc</option>\n";
|
680 |
-
|
681 |
-
?>
|
682 |
-
</select>
|
683 |
-
<p><?php echo __('Disable warning messages displayed in episode entry box. Errors are still displayed.', 'powerpress'); ?></p>
|
684 |
-
</td>
|
685 |
-
</tr>
|
686 |
-
</table>
|
687 |
-
</div>
|
688 |
-
<!-- end advanced features -->
|
689 |
-
<?php
|
690 |
-
|
691 |
-
|
692 |
-
global $wp_rewrite;
|
693 |
-
if( $wp_rewrite->permalink_structure ) // Only display if permalinks is enabled in WordPress
|
694 |
-
{
|
695 |
-
?>
|
696 |
-
<h3><?php echo __('Permalinks', 'powerpress'); ?></h3>
|
697 |
-
<table class="form-table">
|
698 |
-
<tr valign="top">
|
699 |
-
<th scope="row">
|
700 |
-
<?php echo __('Podcast Permalinks', 'powerpress'); ?></th>
|
701 |
-
<td>
|
702 |
-
<select name="General[permalink_feeds_only]" class="bpp_input_normal">
|
703 |
-
<?php
|
704 |
-
$options = array(0=>__('Default WordPress Behavior', 'powerpress'), 1=>__('Match Feed Name to Page/Category', 'powerpress') );
|
705 |
-
$current_value = (!empty($General['permalink_feeds_only'])?$General['permalink_feeds_only']:0);
|
706 |
-
|
707 |
-
foreach( $options as $value => $desc )
|
708 |
-
echo "\t<option value=\"$value\"". ($current_value==$value?' selected':''). ">$desc</option>\n";
|
709 |
-
|
710 |
-
?>
|
711 |
-
</select>
|
712 |
-
<p><?php echo sprintf(__('When configured, %s/podcast/ is matched to page/category named \'podcast\'.', 'powerpress'), get_bloginfo('url') ); ?></p>
|
713 |
-
</td>
|
714 |
-
</tr>
|
715 |
-
</table>
|
716 |
-
<?php
|
717 |
-
}
|
718 |
-
?>
|
719 |
-
|
720 |
-
|
721 |
-
<?php
|
722 |
-
}
|
723 |
-
|
724 |
-
function powerpressadmin_edit_podpress_options($General)
|
725 |
-
{
|
726 |
-
if( !empty($General['process_podpress']) || powerpress_podpress_episodes_exist() )
|
727 |
-
{
|
728 |
-
if( !isset($General['process_podpress']) )
|
729 |
-
$General['process_podpress'] = 0;
|
730 |
-
if( !isset($General['podpress_stats']) )
|
731 |
-
$General['podpress_stats'] = 0;
|
732 |
-
?>
|
733 |
-
|
734 |
-
<h3><?php echo __('PodPress Options', 'powerpress'); ?></h3>
|
735 |
-
<table class="form-table">
|
736 |
-
<tr valign="top">
|
737 |
-
<th scope="row">
|
738 |
-
|
739 |
-
<?php echo __('PodPress Episodes', 'powerpress'); ?></th>
|
740 |
-
<td>
|
741 |
-
<select name="General[process_podpress]" class="bpp_input_med">
|
742 |
-
<?php
|
743 |
-
$options = array(0=>__('Ignore', 'powerpress'), 1=>__('Include in Posts and Feeds', 'powerpress') );
|
744 |
-
|
745 |
-
foreach( $options as $value => $desc )
|
746 |
-
echo "\t<option value=\"$value\"". ($General['process_podpress']==$value?' selected':''). ">$desc</option>\n";
|
747 |
-
|
748 |
-
?>
|
749 |
-
</select> (<?php echo __('includes podcast episodes previously created in PodPress', 'powerpress'); ?>)
|
750 |
-
</td>
|
751 |
-
</tr>
|
752 |
-
<?php if( !empty($General['podpress_stats']) || powerpress_podpress_stats_exist() ) { ?>
|
753 |
-
<tr valign="top">
|
754 |
-
<th scope="row">
|
755 |
-
|
756 |
-
<?php echo __('PodPress Stats Archive', 'powerpress'); ?></th>
|
757 |
-
<td>
|
758 |
-
<select name="General[podpress_stats]" class="bpp_input_sm">
|
759 |
-
<?php
|
760 |
-
$options = array(0=>__('Hide', 'powerpress'), 1=>__('Display', 'powerpress') );
|
761 |
-
|
762 |
-
foreach( $options as $value => $desc )
|
763 |
-
echo "\t<option value=\"$value\"". ($General['podpress_stats']==$value?' selected':''). ">$desc</option>\n";
|
764 |
-
|
765 |
-
?>
|
766 |
-
</select> (<?php echo __('display archive of old PodPress statistics', 'powerpress'); ?>)
|
767 |
-
</td>
|
768 |
-
</tr>
|
769 |
-
<?php } ?>
|
770 |
-
</table>
|
771 |
-
<?php
|
772 |
-
}
|
773 |
-
}
|
774 |
-
|
775 |
-
|
776 |
-
function powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs = array() )
|
777 |
-
{
|
778 |
-
$feed_slug = $FeedAttribs['feed_slug'];
|
779 |
-
$cat_ID = $FeedAttribs['category_id'];
|
780 |
-
|
781 |
-
// Set default settings (if not set)
|
782 |
-
if( empty($FeedSettings['googleplay_url']) )
|
783 |
-
$FeedSettings['googleplay_url'] = '';
|
784 |
-
if( empty($FeedSettings['googleplay_email']) )
|
785 |
-
$FeedSettings['googleplay_email'] = '';
|
786 |
-
if( empty($FeedSettings['googleplay_author']) )
|
787 |
-
$FeedSettings['googleplay_author'] = '';
|
788 |
-
if( empty($FeedSettings['googleplay_description']) )
|
789 |
-
$FeedSettings['googleplay_description'] = '';
|
790 |
-
if( empty($FeedSettings['googleplay_explicit']) )
|
791 |
-
$FeedSettings['googleplay_explicit'] = '';
|
792 |
-
if( empty($FeedSettings['googleplay_cat']) )
|
793 |
-
$FeedSettings['googleplay_cat'] = '';
|
794 |
-
|
795 |
-
$gp_feed_url = '';
|
796 |
-
switch( $FeedAttribs['type'] )
|
797 |
-
{
|
798 |
-
case 'ttid': {
|
799 |
-
$gp_feed_url = get_term_feed_link($FeedAttribs['term_taxonomy_id'], $FeedAttribs['taxonomy_type'], 'rss2' );
|
800 |
-
}; break;
|
801 |
-
case 'category': {
|
802 |
-
if( !empty($General['cat_casting_podcast_feeds']) )
|
803 |
-
$gp_feed_url = get_category_feed_link($cat_ID, 'podcast');
|
804 |
-
else
|
805 |
-
$gp_feed_url = get_category_feed_link($cat_ID);
|
806 |
-
}; break;
|
807 |
-
case 'channel': {
|
808 |
-
$gp_feed_url = get_feed_link($feed_slug);
|
809 |
-
}; break;
|
810 |
-
case 'post_type': {
|
811 |
-
$gp_feed_url = get_post_type_archive_feed_link($FeedAttribs['post_type'], $feed_slug);
|
812 |
-
}; break;
|
813 |
-
case 'general':
|
814 |
-
default: {
|
815 |
-
$gp_feed_url = get_feed_link('podcast');
|
816 |
-
}
|
817 |
-
}
|
818 |
-
|
819 |
-
?>
|
820 |
-
<h3><?php echo __('Google Play Settings', 'powerpress'); ?> </h3>
|
821 |
-
<table class="form-table">
|
822 |
-
<tr valign="top">
|
823 |
-
<th scope="row">
|
824 |
-
<?php echo __('Google Play Email', 'powerpress'); ?>
|
825 |
-
</th>
|
826 |
-
<td>
|
827 |
-
<input type="text" name="Feed[googleplay_email]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['googleplay_email']); ?>" maxlength="255" />
|
828 |
-
<div>(<?php echo __('Google will email this address when your podcast is accepted to the Google Play Music Podcast directory.', 'powerpress'); ?>)</div>
|
829 |
-
<p><?php echo __('iTunes email setting will be used if left blank.', 'powerpress'); ?></p>
|
830 |
-
</td>
|
831 |
-
</tr>
|
832 |
-
<tr valign="top">
|
833 |
-
<th scope="row">
|
834 |
-
<?php echo __('Google Play Author', 'powerpress'); ?>
|
835 |
-
</th>
|
836 |
-
<td>
|
837 |
-
<input type="text" name="Feed[googleplay_author]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['googleplay_author']); ?>" maxlength="255" />
|
838 |
-
<p><?php echo __('iTunes Author will be used if left blank', 'powerpress'); ?></p>
|
839 |
-
<?php if( !empty($General['seo_itunes']) ) { ?>
|
840 |
-
<p class="description"><?php echo __('Podcasting SEO Suggestion: This field may be indexed for Google Play Music search.', 'powerpress'); ?></p>
|
841 |
-
<?php } ?>
|
842 |
-
</td>
|
843 |
-
</tr>
|
844 |
-
<tr valign="top">
|
845 |
-
<th scope="row">
|
846 |
-
<?php echo __('Google Play Description', 'powerpress'); ?>
|
847 |
-
</th>
|
848 |
-
<td>
|
849 |
-
<p style="margin-top: 5px;"><?php echo __('Your description cannot exceed 4,000 characters in length.', 'powerpress'); ?></p>
|
850 |
-
<textarea name="Feed[googleplay_description]" rows="5" class="bpp-input-normal"><?php echo esc_textarea($FeedSettings['googleplay_description']); ?></textarea>
|
851 |
-
<p><?php echo __('iTunes Summary will be used if left blank', 'powerpress'); ?></p>
|
852 |
-
<?php if( !empty($General['seo_itunes']) ) { ?>
|
853 |
-
<p class="description"><?php echo __('Podcasting SEO Suggestion: This field may be indexed for Google Play Music search.', 'powerpress'); ?></p>
|
854 |
-
<?php } ?>
|
855 |
-
</td>
|
856 |
-
</tr>
|
857 |
-
<tr valign="top">
|
858 |
-
<th scope="row">
|
859 |
-
<?php echo __('Google Play Explicit', 'powerpress'); ?>
|
860 |
-
</th>
|
861 |
-
<td>
|
862 |
-
<select name="Feed[googleplay_explicit]" class="bpp_input_med">
|
863 |
-
<?php
|
864 |
-
$explicit = array(0=> __('No - display nothing', 'powerpress'), 1=>__('Yes - explicit content', 'powerpress') );
|
865 |
-
|
866 |
-
foreach( $explicit as $value => $desc )
|
867 |
-
echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_explicit']==$value?' selected':''). ">$desc</option>\n";
|
868 |
-
|
869 |
-
?>
|
870 |
-
</select>
|
871 |
-
</td>
|
872 |
-
</tr>
|
873 |
-
<tr valign="top">
|
874 |
-
<th scope="row">
|
875 |
-
<?php echo __('Google Play Category', 'powerpress'); ?>
|
876 |
-
<span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
|
877 |
-
</th>
|
878 |
-
<td>
|
879 |
-
<select name="Feed[googleplay_cat]" class="bpp_input_med">
|
880 |
-
<?php
|
881 |
-
|
882 |
-
$MoreCategories = false;
|
883 |
-
|
884 |
-
|
885 |
-
$Categories = powerpress_googleplay_categories();
|
886 |
-
|
887 |
-
echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
|
888 |
-
foreach( $Categories as $value => $desc )
|
889 |
-
echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_cat']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
890 |
-
|
891 |
-
?>
|
892 |
-
</select>
|
893 |
-
</td>
|
894 |
-
</tr>
|
895 |
-
|
896 |
-
</table>
|
897 |
-
<?php
|
898 |
-
}
|
899 |
-
|
900 |
-
function powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs = array() )
|
901 |
-
{
|
902 |
-
// Set default settings (if not set)
|
903 |
-
if( !empty($FeedSettings) )
|
904 |
-
{
|
905 |
-
if( !isset($FeedSettings['itunes_url']) )
|
906 |
-
$FeedSettings['itunes_url'] = '';
|
907 |
-
}
|
908 |
-
if( !isset($General['itunes_url']) )
|
909 |
-
$General['itunes_url'] = '';
|
910 |
-
else if( !isset($FeedSettings['itunes_url']) ) // Should almost never happen
|
911 |
-
$FeedSettings['itunes_url'] = $General['itunes_url'];
|
912 |
-
|
913 |
-
$feed_slug = $FeedAttribs['feed_slug'];
|
914 |
-
$cat_ID = $FeedAttribs['category_id'];
|
915 |
-
|
916 |
-
if( $feed_slug == 'podcast' && $FeedAttribs['type'] == 'general' )
|
917 |
-
{
|
918 |
-
if( empty($FeedSettings['itunes_url']) && !empty($General['itunes_url']) )
|
919 |
-
$FeedSettings['itunes_url'] = $General['itunes_url'];
|
920 |
-
}
|
921 |
-
|
922 |
-
$itunes_feed_url = '';
|
923 |
-
|
924 |
-
switch( $FeedAttribs['type'] )
|
925 |
-
{
|
926 |
-
case 'ttid': {
|
927 |
-
$itunes_feed_url = get_term_feed_link($FeedAttribs['term_taxonomy_id'], $FeedAttribs['taxonomy_type'], 'rss2');
|
928 |
-
}; break;
|
929 |
-
case 'category': {
|
930 |
-
if( !empty($General['cat_casting_podcast_feeds']) )
|
931 |
-
$itunes_feed_url = get_category_feed_link($cat_ID, 'podcast');
|
932 |
-
else
|
933 |
-
$itunes_feed_url = get_category_feed_link($cat_ID);
|
934 |
-
}; break;
|
935 |
-
case 'channel': {
|
936 |
-
$itunes_feed_url = get_feed_link($feed_slug);
|
937 |
-
}; break;
|
938 |
-
case 'post_type': {
|
939 |
-
$itunes_feed_url = get_post_type_archive_feed_link($FeedAttribs['post_type'], $feed_slug);
|
940 |
-
}; break;
|
941 |
-
case 'general':
|
942 |
-
default: {
|
943 |
-
$itunes_feed_url = get_feed_link('podcast');
|
944 |
-
}
|
945 |
-
}
|
946 |
-
|
947 |
-
?>
|
948 |
-
<h3><?php echo __('iTunes Listing Information', 'powerpress'); ?></h3>
|
949 |
-
|
950 |
-
<?php
|
951 |
-
} // end itunes general
|
952 |
-
|
953 |
-
function powerpressadmin_edit_blubrry_services($General, $action_url = false, $action = false)
|
954 |
-
{
|
955 |
-
$DisableStatsInDashboard = false;
|
956 |
-
if( !empty($General['disable_dashboard_stats']) )
|
957 |
-
$DisableStatsInDashboard = true;
|
958 |
-
|
959 |
-
|
960 |
-
if( $action_url == false )
|
961 |
-
$action_url = admin_url('admin.php?action=powerpress-jquery-account');
|
962 |
-
if( $action == false )
|
963 |
-
$action = 'powerpress-jquery-account';
|
964 |
-
?>
|
965 |
-
<h3><?php echo __('Integrate Blubrry Services', 'powerpress'); ?></h3>
|
966 |
-
<ul><li><ul>
|
967 |
-
<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>
|
968 |
-
<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>
|
969 |
-
</ul></li></ul>
|
970 |
-
<div style="margin-left: 40px;">
|
971 |
-
<p style="font-size: 125%;">
|
972 |
-
<strong><a class="button-primary button-blubrry thickbox" title="<?php echo esc_attr(__('Blubrry Services Integration', 'powerpress')); ?>" href="<?php echo wp_nonce_url( $action_url, $action); ?>&KeepThis=true&TB_iframe=true&width=600&height=400&modal=false" target="_blank"><?php echo __('Click here to configure Blubrry Statistics and Hosting services', 'powerpress'); ?></a></strong>
|
973 |
-
</p>
|
974 |
-
<?php
|
975 |
-
if( !empty($General['blubrry_program_keyword']) )
|
976 |
-
{
|
977 |
-
// Check that the redirect is in the settings...
|
978 |
-
$RedirectURL = 'http://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
|
979 |
-
$Error = true;
|
980 |
-
if( stripos($General['redirect1'], $RedirectURL ) !== false )
|
981 |
-
$Error = false;
|
982 |
-
else if( stripos($General['redirect2'], $RedirectURL ) !== false )
|
983 |
-
$Error = false;
|
984 |
-
else if( stripos($General['redirect3'], $RedirectURL ) !== false )
|
985 |
-
$Error = false;
|
986 |
-
if( $Error )
|
987 |
-
{
|
988 |
-
?>
|
989 |
-
<p style="font-weight: bold; color: #CC0000;">
|
990 |
-
<?php
|
991 |
-
echo __('Statistics are not implemented correctly on this blog. Please click the button above to re-configure your services.', 'powerpress');
|
992 |
-
?>
|
993 |
-
</p>
|
994 |
-
<?php
|
995 |
-
}
|
996 |
-
else
|
997 |
-
{
|
998 |
-
?>
|
999 |
-
<p style="font-weight: bold;">
|
1000 |
-
<img src="<?php echo powerpress_get_root_url(); ?>images/Check.png" style="width: 25px; height: 20px;" alt="<?php echo __('Enabled!', 'powerpress'); ?>" />
|
1001 |
-
<?php
|
1002 |
-
if( empty($General['blubrry_hosting']) || $General['blubrry_hosting'] === 'false' )
|
1003 |
-
echo __('Blubrry Statistics Enabled!', 'powerpress');
|
1004 |
-
else
|
1005 |
-
echo __('Blubrry Statistics and Media Hosting Enabled!', 'powerpress');
|
1006 |
-
?>
|
1007 |
-
</p>
|
1008 |
-
<?php
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
<?php
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
<p
|
1035 |
-
|
1036 |
-
|
1037 |
-
<p
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
<?php
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
$
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
<?php
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
<?php
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
<
|
1112 |
-
|
1113 |
-
|
1114 |
-
<?php
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
</div
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
if(
|
1142 |
-
$General
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
</
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
</
|
1233 |
-
</
|
1234 |
-
</
|
1235 |
-
|
1236 |
-
<?php if( !empty($General['
|
1237 |
-
|
1238 |
-
<
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
<
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
<p><label><input type="checkbox" name="
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
<p
|
1275 |
-
|
1276 |
-
|
1277 |
-
</
|
1278 |
-
|
1279 |
-
<
|
1280 |
-
|
1281 |
-
<
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
<
|
1295 |
-
<
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
<p><input type="checkbox"
|
1306 |
-
<div style="margin-left: 24px;">
|
1307 |
-
<p>
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
<p
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
<p><input type="hidden" name="General[
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
</
|
1359 |
-
|
1360 |
-
|
1361 |
-
</
|
1362 |
-
|
1363 |
-
|
1364 |
-
<?php
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
<
|
1375 |
-
<
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
<
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
<
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
</
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
</
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
?>
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
<div class="powerpress-welcome-
|
1425 |
-
<
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
<
|
1460 |
-
|
1461 |
-
</
|
1462 |
-
|
1463 |
-
<?php
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
?>
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
<
|
1531 |
-
<
|
1532 |
-
<
|
1533 |
-
|
1534 |
-
<
|
1535 |
-
|
1536 |
-
|
1537 |
-
<
|
1538 |
-
|
1539 |
-
<
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
<
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
<
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
<
|
1573 |
-
<
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
<
|
1579 |
-
<
|
1580 |
-
|
1581 |
-
</
|
1582 |
-
|
1583 |
-
|
1584 |
-
<
|
1585 |
-
|
1586 |
-
<
|
1587 |
-
|
1588 |
-
|
1589 |
-
<
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
<p
|
1594 |
-
|
1595 |
-
|
1596 |
-
<
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
</
|
1602 |
-
|
1603 |
-
<
|
1604 |
-
<
|
1605 |
-
|
1606 |
-
|
1607 |
-
</
|
1608 |
-
|
1609 |
-
|
1610 |
-
<
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
<
|
1616 |
-
<
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
<
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
<?php
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
}
|
1639 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
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 |
+
$MultiSiteServiceSettings = false;
|
24 |
+
if( is_multisite() )
|
25 |
+
{
|
26 |
+
$MultiSiteSettings = get_site_option('powerpress_multisite');
|
27 |
+
if( !empty($MultiSiteSettings['services_multisite_only']) )
|
28 |
+
{
|
29 |
+
$MultiSiteServiceSettings = true;
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
?>
|
34 |
+
<script type="text/javascript"><!--
|
35 |
+
function CheckRedirect(obj)
|
36 |
+
{
|
37 |
+
if( obj.value )
|
38 |
+
{
|
39 |
+
if( obj.value.indexOf('rawvoice') == -1 && obj.value.indexOf('techpodcasts') == -1 &&
|
40 |
+
obj.value.indexOf('blubrry') == -1 && obj.value.indexOf('podtrac') == -1 )
|
41 |
+
{
|
42 |
+
if( !confirm('<?php echo __('The redirect entered is not recongized as a supported statistics redirect service.', 'powerpress'); ?>\n\n<?php echo __('Are you sure you wish to continue with this redirect url?', 'powerpress'); ?>') )
|
43 |
+
{
|
44 |
+
obj.value = '';
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
49 |
+
return true;
|
50 |
+
}
|
51 |
+
|
52 |
+
function SelectEmbedField(checked)
|
53 |
+
{
|
54 |
+
if( checked )
|
55 |
+
jQuery('#embed_replace_player').removeAttr("disabled");
|
56 |
+
else
|
57 |
+
jQuery('#embed_replace_player').attr("disabled","disabled");
|
58 |
+
}
|
59 |
+
|
60 |
+
jQuery(document).ready(function($) {
|
61 |
+
|
62 |
+
jQuery('#powerpress_advanced_mode_button').click( function(event) {
|
63 |
+
event.preventDefault();
|
64 |
+
jQuery('#powerpress_advanced_mode').val('0');
|
65 |
+
jQuery(this).closest("form").submit();
|
66 |
+
});
|
67 |
+
|
68 |
+
jQuery('#episode_box_player_links_options').change(function () {
|
69 |
+
|
70 |
+
var objectChecked = jQuery('#episode_box_player_links_options').attr('checked');
|
71 |
+
if(typeof jQuery.prop === 'function') {
|
72 |
+
objectChecked = jQuery('#episode_box_player_links_options').prop('checked');
|
73 |
+
}
|
74 |
+
|
75 |
+
if( objectChecked == true ) {
|
76 |
+
jQuery('#episode_box_player_links_options_div').css("display", 'block' );
|
77 |
+
}
|
78 |
+
else {
|
79 |
+
jQuery('#episode_box_player_links_options_div').css("display", 'none' );
|
80 |
+
jQuery('.episode_box_no_player_or_links').attr("checked", false );
|
81 |
+
jQuery('#episode_box_no_player_and_links').attr("checked", false );
|
82 |
+
if(typeof jQuery.prop === 'function') {
|
83 |
+
jQuery('.episode_box_no_player_or_links').prop("checked", false );
|
84 |
+
jQuery('#episode_box_no_player_and_links').prop("checked", false );
|
85 |
+
}
|
86 |
+
}
|
87 |
+
} );
|
88 |
+
|
89 |
+
jQuery('#episode_box_no_player_and_links').change(function () {
|
90 |
+
|
91 |
+
var objectChecked = jQuery(this).attr("checked");
|
92 |
+
if(typeof jQuery.prop === 'function') {
|
93 |
+
objectChecked = jQuery(this).prop("checked");
|
94 |
+
}
|
95 |
+
|
96 |
+
if( objectChecked == true ) {
|
97 |
+
jQuery('.episode_box_no_player_or_links').attr("checked", false );
|
98 |
+
if(typeof jQuery.prop === 'function') {
|
99 |
+
jQuery('.episode_box_no_player_or_links').prop("checked", false );
|
100 |
+
}
|
101 |
+
}
|
102 |
+
} );
|
103 |
+
|
104 |
+
jQuery('.episode_box_no_player_or_links').change(function () {
|
105 |
+
var objectChecked = jQuery(this).attr("checked");
|
106 |
+
if(typeof jQuery.prop === 'function') {
|
107 |
+
objectChecked = jQuery(this).prop("checked");
|
108 |
+
}
|
109 |
+
|
110 |
+
if( objectChecked == true) {
|
111 |
+
jQuery('#episode_box_no_player_and_links').attr("checked", false );
|
112 |
+
if(typeof jQuery.prop === 'function') {
|
113 |
+
jQuery('#episode_box_no_player_and_links').prop("checked", false );
|
114 |
+
}
|
115 |
+
}
|
116 |
+
} );
|
117 |
+
|
118 |
+
jQuery('#episode_box_feature_in_itunes').change( function() {
|
119 |
+
var objectChecked = jQuery('#episode_box_feature_in_itunes').attr('checked');
|
120 |
+
if(typeof jQuery.prop === 'function') {
|
121 |
+
objectChecked = jQuery('#episode_box_feature_in_itunes').prop('checked');
|
122 |
+
}
|
123 |
+
if( objectChecked ) {
|
124 |
+
$("#episode_box_order").attr("disabled", true);
|
125 |
+
} else {
|
126 |
+
$("#episode_box_order").removeAttr("disabled");
|
127 |
+
}
|
128 |
+
});
|
129 |
+
|
130 |
+
} );
|
131 |
+
//-->
|
132 |
+
</script>
|
133 |
+
|
134 |
+
<input type="hidden" name="action" value="powerpress-save-settings" />
|
135 |
+
|
136 |
+
|
137 |
+
<input type="hidden" id="powerpress_advanced_mode" name="General[advanced_mode_2]" value="1" />
|
138 |
+
<input type="hidden" id="save_tab_pos" name="tab" value="<?php echo (empty($_POST['tab'])?0: intval($_POST['tab']) ); ?>" />
|
139 |
+
|
140 |
+
<div id="powerpress_admin_header">
|
141 |
+
<h2><?php echo __('Blubrry PowerPress Settings', 'powerpress'); ?></h2>
|
142 |
+
<span class="powerpress-mode"><?php echo __('Advanced Mode', 'powerpress'); ?>
|
143 |
+
<a href="<?php echo admin_url("admin.php?page=". urlencode(powerpress_admin_get_page()) ."&mode=simple"); ?>" id="powerpress_advanced_mode_button" class="button-primary button-blubrry"><?php echo __('Switch to Simple Mode', 'powerpress'); ?></a>
|
144 |
+
</span>
|
145 |
+
</div>
|
146 |
+
|
147 |
+
<div id="powerpress_settings_page" class="powerpress_tabbed_content">
|
148 |
+
<ul class="powerpress_settings_tabs">
|
149 |
+
<li><a href="#tab0"><span><?php echo htmlspecialchars(__('Welcome', 'powerpress')); ?></span></a></li>
|
150 |
+
<li><a href="#tab1"><span><?php echo htmlspecialchars(__('Episodes', 'powerpress')); ?></span></a></li>
|
151 |
+
<li><a href="#tab2"><span><?php echo htmlspecialchars(__('Services & Stats', 'powerpress')); ?></span></a></li>
|
152 |
+
<li><a href="#tab3"><span><?php echo htmlspecialchars(__('Website', 'powerpress')); ?></span></a></li>
|
153 |
+
<li><a href="#tab4"><span><?php echo htmlspecialchars(__('Feeds', 'powerpress')); ?></span></a></li>
|
154 |
+
<li><a href="#tab5"><span><?php echo htmlspecialchars(__('Apple', 'powerpress')); ?></span></a></li>
|
155 |
+
<li><a href="#tab6"><span><?php echo htmlspecialchars(__('Google', 'powerpress')); ?></span></a></li>
|
156 |
+
<li><a href="#tab7"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
|
157 |
+
<li><a href="#tab-dest"><span><?php echo htmlspecialchars(__('Destinations', 'powerpress')); ?></span></a></li>
|
158 |
+
</ul>
|
159 |
+
|
160 |
+
<div id="tab0" class="powerpress_tab">
|
161 |
+
<?php powerpressadmin_welcome($General); ?>
|
162 |
+
</div>
|
163 |
+
|
164 |
+
<div id="tab1" class="powerpress_tab">
|
165 |
+
<?php
|
166 |
+
powerpressadmin_edit_entry_options($General);
|
167 |
+
powerpressadmin_edit_podpress_options($General);
|
168 |
+
?>
|
169 |
+
</div>
|
170 |
+
|
171 |
+
<div id="tab2" class="powerpress_tab">
|
172 |
+
<?php
|
173 |
+
if( $MultiSiteServiceSettings && defined('POWERPRESS_MULTISITE_VERSION') )
|
174 |
+
{
|
175 |
+
PowerPressMultiSitePlugin::edit_blubrry_services($General);
|
176 |
+
}
|
177 |
+
else
|
178 |
+
{
|
179 |
+
powerpressadmin_edit_blubrry_services($General);
|
180 |
+
powerpressadmin_edit_media_statistics($General);
|
181 |
+
}
|
182 |
+
?>
|
183 |
+
</div>
|
184 |
+
|
185 |
+
<div id="tab3" class="powerpress_tab">
|
186 |
+
<?php
|
187 |
+
powerpressadmin_appearance($General, $FeedSettings);
|
188 |
+
?>
|
189 |
+
</div>
|
190 |
+
|
191 |
+
<div id="tab4" class="powerpress_tab">
|
192 |
+
<?php
|
193 |
+
powerpressadmin_edit_feed_general($FeedSettings, $General);
|
194 |
+
powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs);
|
195 |
+
powerpressadmin_edit_funding($FeedSettings);
|
196 |
+
powerpressadmin_edit_tv($FeedSettings);
|
197 |
+
?>
|
198 |
+
</div>
|
199 |
+
|
200 |
+
<div id="tab5" class="powerpress_tab">
|
201 |
+
<?php
|
202 |
+
powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
|
203 |
+
?>
|
204 |
+
</div>
|
205 |
+
<div id="tab6" class="powerpress_tab">
|
206 |
+
<?php
|
207 |
+
powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs);
|
208 |
+
?>
|
209 |
+
</div>
|
210 |
+
<div id="tab7" class="powerpress_tab">
|
211 |
+
<?php
|
212 |
+
powerpressadmin_edit_artwork($FeedSettings, $General);
|
213 |
+
?>
|
214 |
+
</div>
|
215 |
+
<div id="tab-dest" class="powerpress_tab">
|
216 |
+
<?php
|
217 |
+
powerpressadmin_edit_destinations($FeedSettings, $General, $FeedAttribs);
|
218 |
+
?>
|
219 |
+
</div>
|
220 |
+
|
221 |
+
</div>
|
222 |
+
<div class="clear"></div>
|
223 |
+
|
224 |
+
<?php
|
225 |
+
|
226 |
+
powerpressadmin_advanced_options($General);
|
227 |
+
}
|
228 |
+
|
229 |
+
function powerpressadmin_advanced_options($General)
|
230 |
+
{
|
231 |
+
// Break the bottom section here out into it's own function
|
232 |
+
$ChannelsCheckbox = '';
|
233 |
+
if( !empty($General['custom_feeds']) )
|
234 |
+
$ChannelsCheckbox = ' onclick="alert(\''. __('You must delete all of the Podcast Channels to disable this option.', 'powerpress') .'\');return false;"';
|
235 |
+
$CategoryCheckbox = '';
|
236 |
+
//if( !empty($General['custom_cat_feeds']) ) // Decided ont to include this warning because it may imply that you have to delete the actual category, which is not true.
|
237 |
+
// $CategoryCheckbox = ' onclick="alert(\'You must remove podcasting from the categories to disable this option.\');return false;"';
|
238 |
+
?>
|
239 |
+
<script language="javascript"><!--
|
240 |
+
|
241 |
+
jQuery(document).ready( function() {
|
242 |
+
|
243 |
+
jQuery('.pp-expand-section').click( function(e) {
|
244 |
+
e.preventDefault();
|
245 |
+
|
246 |
+
if( jQuery(this).hasClass('pp-expand-section-expanded') ) {
|
247 |
+
jQuery(this).removeClass('pp-expand-section-expanded');
|
248 |
+
jQuery(this).parent().next('div').hide(400);
|
249 |
+
jQuery(this).blur();
|
250 |
+
} else {
|
251 |
+
jQuery(this).addClass('pp-expand-section-expanded');
|
252 |
+
jQuery(this).parent().next('div').show(400);
|
253 |
+
jQuery(this).blur();
|
254 |
+
}
|
255 |
+
});
|
256 |
+
});
|
257 |
+
|
258 |
+
//-->
|
259 |
+
</script>
|
260 |
+
<div style="margin-left: 10px;">
|
261 |
+
<h3><a href="#" class="pp-expand-section pp-expand-section-expanded"><?php echo __('Advanced Options', 'powerpress'); ?></a></h3>
|
262 |
+
<div style="margin-left: 50px;" >
|
263 |
+
<div>
|
264 |
+
<input type="checkbox" name="NULL[import_podcast]" value="1" checked disabled />
|
265 |
+
<strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_import_feed.php'); ?>"><?php echo __('Import Podcast', 'powerpress'); ?></a></strong> -
|
266 |
+
<?php echo __('Import podcast feed from SoundCloud, LibSyn, PodBean or other podcast service.', 'powerpress'); ?>
|
267 |
+
</div>
|
268 |
+
<div>
|
269 |
+
<input type="checkbox" name="NULL[migrate_media]" value="1" checked disabled />
|
270 |
+
<strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_migrate.php'); ?>"><?php echo __('Migrate Media', 'powerpress'); ?></a></strong> -
|
271 |
+
<?php echo __('Migrate media files to Blubrry Podcast Media Hosting with only a few clicks.', 'powerpress'); ?>
|
272 |
+
</div>
|
273 |
+
<div>
|
274 |
+
<input type="checkbox" name="NULL[podcasting_seo]" value="1" checked disabled />
|
275 |
+
<strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_search.php'); ?>"><?php echo __('Podcasting SEO', 'powerpress'); ?></a></strong> -
|
276 |
+
<?php echo __('Select from 3 different web based audio players.', 'powerpress'); ?>
|
277 |
+
</div>
|
278 |
+
|
279 |
+
<div>
|
280 |
+
<input type="checkbox" name="NULL[player_options]" value="1" checked disabled />
|
281 |
+
<strong><?php echo __('Audio Player Options', 'powerpress'); ?></strong> -
|
282 |
+
<?php echo __('Select from 3 different web based audio players.', 'powerpress'); ?>
|
283 |
+
<span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_player.php&sp=1'); ?>"><?php echo __('configure audio player', 'powerpress'); ?></a>)</span>
|
284 |
+
</div>
|
285 |
+
<div>
|
286 |
+
<input type="checkbox" name="NULL[video_player_options]" value="1" checked disabled />
|
287 |
+
<strong><?php echo __('Video Player Options', 'powerpress'); ?></strong> -
|
288 |
+
<?php echo __('Select from 3 different web based video players.', 'powerpress'); ?>
|
289 |
+
<span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_videoplayer.php&sp=1'); ?>"><?php echo __('configure video player', 'powerpress'); ?></a>)</span>
|
290 |
+
|
291 |
+
</div>
|
292 |
+
<div>
|
293 |
+
<input type="hidden" name="General[channels]" value="0" />
|
294 |
+
<input type="checkbox" name="General[channels]" value="1" <?php echo ( !empty($General['channels']) ?' checked':''); echo $ChannelsCheckbox; ?> />
|
295 |
+
<strong><?php echo __('Custom Podcast Channels', 'powerpress'); ?></strong> -
|
296 |
+
<?php echo __('Manage multiple media files and/or formats to one blog post.', 'powerpress'); ?>
|
297 |
+
<?php if( empty($General['channels']) ) { ?>
|
298 |
+
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
|
299 |
+
<?php } else { ?>
|
300 |
+
<span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_customfeeds.php'); ?>"><?php echo __('configure podcast channels', 'powerpress'); ?></a>)</span>
|
301 |
+
<?php } ?>
|
302 |
+
</div>
|
303 |
+
<div>
|
304 |
+
<input type="hidden" name="General[cat_casting]" value="0" />
|
305 |
+
<input type="checkbox" name="General[cat_casting]" value="1" <?php echo ( !empty($General['cat_casting']) ?' checked':''); echo $CategoryCheckbox; ?> />
|
306 |
+
<strong><?php echo __('Category Podcasting', 'powerpress'); ?></strong> -
|
307 |
+
<?php echo __('Manage podcasting for specific categories.', 'powerpress'); ?>
|
308 |
+
<?php if( empty($General['cat_casting']) ) { ?>
|
309 |
+
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
|
310 |
+
<?php } else { ?>
|
311 |
+
<span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php'); ?>"><?php echo __('configure podcast categories', 'powerpress'); ?></a>)</span>
|
312 |
+
<?php } ?>
|
313 |
+
</div>
|
314 |
+
<div>
|
315 |
+
<input type="checkbox" name="General[metamarks]" value="1" <?php echo ( !empty($General['metamarks']) ?' checked':''); ?> />
|
316 |
+
<strong><?php echo __('Meta Marks', 'powerpress'); ?></strong> -
|
317 |
+
<?php echo __('Add additional meta information to your media for syndication.', 'powerpress'); ?>
|
318 |
+
<?php echo powerpress_help_link('http://www.powerpresspodcast.com/metamarks/'); ?>
|
319 |
+
<span style="font-size: 85%;">(<?php echo __('feature will appear in episode entry box', 'powerpress'); ?>)</span>
|
320 |
+
</div>
|
321 |
+
|
322 |
+
|
323 |
+
<div>
|
324 |
+
<input type="hidden" name="General[taxonomy_podcasting]" value="0" />
|
325 |
+
<input type="checkbox" name="General[taxonomy_podcasting]" value="1" <?php echo ( !empty($General['taxonomy_podcasting']) ?' checked':''); ?> />
|
326 |
+
<strong><?php echo __('Taxonomy Podcasting', 'powerpress'); ?></strong>
|
327 |
+
<span style="font-size: 14px;">(<?php echo __('Feature sponsored by', 'powerpress'); ?> <a href="http://afterbuzztv.com/" target="_blank">AfterBuzzTV.com</a>)</span> -
|
328 |
+
<?php echo __('Manage podcasting for specific taxonomies.', 'powerpress'); ?>
|
329 |
+
<?php if( empty($General['taxonomy_podcasting']) ) { ?>
|
330 |
+
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
|
331 |
+
<?php } else { ?>
|
332 |
+
<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>
|
333 |
+
<?php } ?>
|
334 |
+
</div>
|
335 |
+
<div>
|
336 |
+
<input type="hidden" name="General[posttype_podcasting]" value="0" />
|
337 |
+
<input type="checkbox" name="General[posttype_podcasting]" value="1" <?php echo ( !empty($General['posttype_podcasting']) ?' checked':''); ?> />
|
338 |
+
<strong><?php echo __('Post Type Podcasting', 'powerpress'); ?></strong> -
|
339 |
+
<?php echo __('Manage multiple media files and/or formats to specific post types.', 'powerpress'); ?>
|
340 |
+
<?php if( empty($General['posttype_podcasting']) ) { ?>
|
341 |
+
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
|
342 |
+
<?php } else { ?>
|
343 |
+
<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>
|
344 |
+
<?php } ?>
|
345 |
+
</div>
|
346 |
+
<div>
|
347 |
+
<input type="checkbox" name="General[playlist_player]" value="1" <?php echo ( !empty($General['playlist_player']) ?' checked':''); ?> />
|
348 |
+
<strong><?php echo __('PowerPress Playlist Player', 'powerpress'); ?></strong> -
|
349 |
+
<?php echo __('Create playlists for your podcasts.', 'powerpress'); ?>
|
350 |
+
<span style="font-size: 85%;">(<a href="http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/powerpress-playlist-shortcode/" target="_blank"><?php echo __('learn more', 'powerpress'); ?></a>)</span>
|
351 |
+
</div>
|
352 |
+
</div>
|
353 |
+
</div>
|
354 |
+
|
355 |
+
<?php
|
356 |
+
$link_action_url = admin_url('admin.php?action=powerpress-jquery-account');
|
357 |
+
$link_action = 'powerpress-jquery-account';
|
358 |
+
?>
|
359 |
+
<div style="margin-left: 10px;">
|
360 |
+
<h3><?php echo __('Link Blubrry Account', 'powerpress'); ?></h3>
|
361 |
+
<p style="font-size: 125%;">
|
362 |
+
<strong><a class="button-primary button-blubrry thickbox" title="<?php echo esc_attr(__('Blubrry Services Integration', 'powerpress')); ?>" href="<?php echo wp_nonce_url($link_action_url, $link_action); ?>&KeepThis=true&TB_iframe=true&width=600&height=400&modal=false" target="_blank"><?php echo __('Click here to link Blubrry account', 'powerpress'); ?></a></strong>
|
363 |
+
</p>
|
364 |
+
<p>
|
365 |
+
<?php echo __('Link your blubrry.com account if you have a Blubrry Podcast Hosting or Blubrry Podcast Statistics services.', 'powerpress'); ?>
|
366 |
+
</p>
|
367 |
+
</div>
|
368 |
+
|
369 |
+
<div style="margin-left: 10px;">
|
370 |
+
<h3 style="margin-bottom: 5px;"><?php echo __('Looking for Support, Consulting or Custom Development?', 'powerpress'); ?></h3>
|
371 |
+
<p style="margin: 0 0 0 50px;">
|
372 |
+
<?php echo __('Blubrry offers a variety of options, free and paid, to assist you with your podcasting and Internet media needs. Whether you need your theme customized for podcasting or you want consulting on what video format is best for your audience, we have the staff and knowledge to assist.', 'powerpress'); ?>
|
373 |
+
</p>
|
374 |
+
<p style="margin: 5px 0 0 50px;">
|
375 |
+
<strong><?php echo '<a href="http://create.blubrry.com/support/" target="_blank">'. __('Learn More about Blubrry Support Options', 'powerpress') .'</a>'; ?></strong>
|
376 |
+
</p>
|
377 |
+
</div>
|
378 |
+
|
379 |
+
<?php
|
380 |
+
return;
|
381 |
+
|
382 |
+
// We will not pester folks with this stuff in PowerPress 7.0+
|
383 |
+
|
384 |
+
if( isset($General['timestamp']) && $General['timestamp'] > 0 && $General['timestamp'] < ( time()- (60*60*24*14) ) ) // Lets wait 14 days before we annoy them asking for support
|
385 |
+
{
|
386 |
+
?>
|
387 |
+
<div style="margin-left: 10px;">
|
388 |
+
<h3 style="margin-bottom: 5px;"><?php echo __('Like The Plugin?', 'powerpress'); ?></h3>
|
389 |
+
<p style="margin-top: 0;">
|
390 |
+
<?php echo __('This plugin is great, don\'t you think? If you like the plugin we\'d be ever so grateful if you\'d give it your support. Here\'s how:', 'powerpress'); ?>
|
391 |
+
</p>
|
392 |
+
<ul id="powerpress_support">
|
393 |
+
<li><?php echo sprintf(__('Rate this plugin 5 stars in the %s.', 'powerpress'),
|
394 |
+
'<a href="http://wordpress.org/extend/plugins/powerpress/" target="_blank">'. __('WordPress Plugins Directory', 'powerpress') .'</a>');
|
395 |
+
|
396 |
+
?>
|
397 |
+
</li>
|
398 |
+
<li><?php echo __('Tell the world about PowerPress by writing about it on your blog', 'powerpress'); ?>,
|
399 |
+
<a href="https://twitter.com/home/?status=<?php echo urlencode( __('I\'m podcasting with Blubrry PowerPress (https://blubrry.com/powerpress/) #powerpress #wordpress', 'powerpress') ); ?>" target="_blank"><?php echo __('Twitter', 'powerpress'); ?></a>,
|
400 |
+
<a href="https://www.facebook.com/share.php?u=<?php echo urlencode('https://www.blubrry.com/powerpress'); ?>&t=<?php echo urlencode( __('I podcast with Blubrry PowerPress', 'powerpress')); ?>" target="_blank"><?php echo __('Facebook', 'powerpress'); ?></a>,
|
401 |
+
etc...</li>
|
402 |
+
<li><a href="http://www.blubrry.com/contact.php" target="_blank"><?php echo __('Send us feedback', 'powerpress'); ?></a> (<?php echo __('we love getting suggestions for new features!', 'powerpress'); ?>)</li>
|
403 |
+
</ul>
|
404 |
+
</div>
|
405 |
+
<?php
|
406 |
+
}
|
407 |
+
?>
|
408 |
+
<div style="margin-left: 10px;">
|
409 |
+
<h3 style="margin-bottom: 5px;"><?php echo __('Become a PowerPress Patron!', 'powerpress'); ?></h3>
|
410 |
+
<p style="margin: 0; padding-left: 50px;">
|
411 |
+
<?php echo __('Help support your favorite podcasting plugin via Patreon.', 'powerpress'); ?>
|
412 |
+
</p>
|
413 |
+
<p style="margin-top: 0; padding-left: 50px;"><?php echo '<a href="https://www.patreon.com/blubrry?ty=h" target="_blank">'. __('Visit Blubrry\'s Patreon page', 'powerpress') .'</a>'; ?>
|
414 |
+
</p>
|
415 |
+
</div>
|
416 |
+
<?php
|
417 |
+
}
|
418 |
+
|
419 |
+
function powerpressadmin_edit_entry_options($General)
|
420 |
+
{
|
421 |
+
if( !isset($General['default_url']) )
|
422 |
+
$General['default_url'] = '';
|
423 |
+
if( !isset($General['episode_box_mode']) )
|
424 |
+
$General['episode_box_mode'] = 0; // Default not set, 1 = no duration/file size, 2 = yes duration/file size (default if not set)
|
425 |
+
if( !isset($General['episode_box_embed']) )
|
426 |
+
$General['episode_box_embed'] = 0;
|
427 |
+
if( !isset($General['set_duration']) )
|
428 |
+
$General['set_duration'] = 0;
|
429 |
+
if( !isset($General['set_size']) )
|
430 |
+
$General['set_size'] = 0;
|
431 |
+
if( !isset($General['auto_enclose']) )
|
432 |
+
$General['auto_enclose'] = 0;
|
433 |
+
if( !isset($General['episode_box_player_size']) )
|
434 |
+
$General['episode_box_player_size'] = 0;
|
435 |
+
if( !isset($General['episode_box_closed_captioned']) )
|
436 |
+
$General['episode_box_closed_captioned'] = 0;
|
437 |
+
if( !isset($General['episode_box_order']) )
|
438 |
+
$General['episode_box_order'] = 0;
|
439 |
+
if( !isset($General['episode_box_feature_in_itunes']) )
|
440 |
+
$General['episode_box_feature_in_itunes'] = 0;
|
441 |
+
|
442 |
+
?>
|
443 |
+
<h3><?php echo __('Episode Entry Options', 'powerpress'); ?></h3>
|
444 |
+
|
445 |
+
|
446 |
+
<table class="form-table">
|
447 |
+
<tr valign="top">
|
448 |
+
<th scope="row">
|
449 |
+
|
450 |
+
<?php echo __('Podcast Entry Box', 'powerpress'); ?></th>
|
451 |
+
<td>
|
452 |
+
<p style="margin-top: 5px;">
|
453 |
+
<?php echo __('Configure your podcast episode entry box with the options that fit your needs.', 'powerpress'); ?>
|
454 |
+
</p>
|
455 |
+
<div id="episode_box_mode_adv">
|
456 |
+
|
457 |
+
<p style="margin-top: 15px;"><input class="episode_box_option" name="Null[ignore]" type="checkbox" value="1" checked onclick="return false" onkeydown="return false" /> <?php echo __('Media URL', 'powerpress'); ?>
|
458 |
+
(<?php echo __('Specify URL to episode\'s media file', 'powerpress'); ?>)</p>
|
459 |
+
|
460 |
+
<p style="margin-top: 15px;"><input id="episode_box_mode" class="episode_box_option" name="General[episode_box_mode]" type="checkbox" value="2" <?php if( empty($General['episode_box_mode']) || $General['episode_box_mode'] != 1 ) echo ' checked'; ?> /> <?php echo __('Media File Size and Duration', 'powerpress'); ?>
|
461 |
+
(<?php echo __('Specify episode\'s media file size and duration', 'powerpress'); ?>)</p>
|
462 |
+
|
463 |
+
<p style="margin-top: 15px; margin-bottom: 0;"><input id="episode_box_embed" class="episode_box_option" name="General[episode_box_embed]" type="checkbox" value="1"<?php if( !empty($General['episode_box_embed']) ) echo ' checked'; ?> onclick="SelectEmbedField(this.checked);" /> <?php echo __('Embed Field', 'powerpress'); ?>
|
464 |
+
(<?php echo __('Enter embed code from sites such as YouTube', 'powerpress'); ?>)</p>
|
465 |
+
<p style="margin-top: 5px; margin-left: 20px; font-size: 90%;"><input id="embed_replace_player" class="episode_box_option" name="General[embed_replace_player]" type="checkbox" value="1"<?php if( !empty($General['embed_replace_player']) ) echo ' checked'; ?> /> <?php echo __('Replace Player with Embed', 'powerpress'); ?>
|
466 |
+
(<?php echo __('Do not display default player if embed present for episode.', 'powerpress'); ?>)</p>
|
467 |
+
|
468 |
+
<p style="margin-top: 15px;"><input id="episode_box_player_links_options" class="episode_box_option" name="NULL[episode_box_player_links_options]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_player_and_links']) || !empty($General['episode_box_no_player']) || !empty($General['episode_box_no_links']) ) echo ' checked'; ?> /> <?php echo __('Display Player and Links Options', 'powerpress'); ?>
|
469 |
+
</p>
|
470 |
+
<div id="episode_box_player_links_options_div" style="margin-left: 20px;<?php if( empty($General['episode_box_no_player_and_links']) && empty($General['episode_box_no_player']) && empty($General['episode_box_no_links']) ) echo 'display:none;'; ?>">
|
471 |
+
|
472 |
+
<p style="margin-top: 0px; margin-bottom: 5px;"><input id="episode_box_no_player_and_links" class="episode_box_option" name="General[episode_box_no_player_and_links]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_player_and_links']) ) echo ' checked'; ?> /> <?php echo htmlspecialchars(__('No Player & Links Option', 'powerpress')); ?>
|
473 |
+
(<?php echo __('Disable media player and links on a per episode basis', 'powerpress'); ?>)</p>
|
474 |
+
|
475 |
+
<p style="margin-top: 0; margin-bottom: 0; margin-left: 20px;"><?php echo __('- or -', 'powerpress'); ?></p>
|
476 |
+
|
477 |
+
<p style="margin-top: 5px; margin-bottom: 10px;"><input id="episode_box_no_player" class="episode_box_option episode_box_no_player_or_links" name="General[episode_box_no_player]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_player']) ) echo ' checked'; ?> /> <?php echo __('No Player Option', 'powerpress'); ?>
|
478 |
+
(<?php echo __('Disable media player on a per episode basis', 'powerpress'); ?>)</p>
|
479 |
+
|
480 |
+
<p style="margin-top: 5px; margin-bottom: 20px;"><input id="episode_box_no_links" class="episode_box_option episode_box_no_player_or_links" name="General[episode_box_no_links]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_links']) ) echo ' checked'; ?> /> <?php echo __('No Links Option', 'powerpress'); ?>
|
481 |
+
(<?php echo __('Disable media links on a per episode basis', 'powerpress'); ?>)</p>
|
482 |
+
|
483 |
+
</div>
|
484 |
+
|
485 |
+
<p style="margin-top: 15px;"><input id="episode_box_cover_image" class="episode_box_option" name="General[episode_box_cover_image]" type="checkbox" value="1"<?php if( !empty($General['episode_box_cover_image']) ) echo ' checked'; ?> /> <?php echo __('Poster Image', 'powerpress'); ?>
|
486 |
+
(<?php echo __('Specify URL to poster artwork specific to each episode', 'powerpress'); ?>)</p>
|
487 |
+
|
488 |
+
<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'); ?>
|
489 |
+
(<?php echo __('Customize player width and height on a per episode basis', 'powerpress'); ?>)</p>
|
490 |
+
<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'); ?>
|
491 |
+
(<?php echo __('Leave unchecked to use the first 250 characters of your blog post', 'powerpress'); ?>)</p>
|
492 |
+
<p style="margin-top: 15px;"><input id="episode_box_summary" class="episode_box_option" name="General[episode_box_summary]" type="checkbox" value="1"<?php if( !empty($General['episode_box_summary']) ) echo ' checked'; ?> /> <?php echo __('iTunes Summary Field', 'powerpress'); ?>
|
493 |
+
(<?php echo __('Leave unchecked to use your blog post', 'powerpress'); ?>)</p>
|
494 |
+
|
495 |
+
|
496 |
+
|
497 |
+
<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'); ?>
|
498 |
+
(<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
|
499 |
+
|
500 |
+
<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'); ?>
|
501 |
+
(<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
|
502 |
+
|
503 |
+
|
504 |
+
<p style="margin-top: 15px;"><label><input id="episode_box_itunes_image" 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>
|
505 |
+
(<?php echo __('Leave unchecked to use the image embedded into your media files.', 'powerpress'); ?>)</p>
|
506 |
+
|
507 |
+
<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>
|
508 |
+
(<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
|
509 |
+
|
510 |
+
<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>
|
511 |
+
(<?php echo __('Override the default ordering of episodes on the Apple and Google Podcast directories', 'powerpress'); ?>)</p>
|
512 |
+
<em><strong><?php echo __('If conflicting values are present the directories will use the default ordering.', 'powerpress'); ?></strong></em><br />
|
513 |
+
<em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
|
514 |
+
|
515 |
+
<?php if( empty($General['ios11_fields']) || $General['ios11_fields'] == 2 ) { ?>
|
516 |
+
<p><label><select name="General[ebititle]" class="bpp_input_sm">
|
517 |
+
<?php
|
518 |
+
$linkoptions = array('false'=>__('Hide Field', 'powerpress'),
|
519 |
+
1=>__('Show Field', 'powerpress') );
|
520 |
+
|
521 |
+
foreach( $linkoptions as $value => $desc )
|
522 |
+
echo "\t<option value=\"$value\"". ( !empty($General['episode_box_itunes_title']) && $General['episode_box_itunes_title'] == $value ?' selected':''). ">$desc</option>\n";
|
523 |
+
|
524 |
+
?>
|
525 |
+
</select> <?php echo __('iTunes Episode Title Field', 'powerpress'); ?></label> </p>
|
526 |
+
<em><strong><?php echo __('Specify iTunes episode title separate from podcast feed title.', 'powerpress'); ?></strong></em>
|
527 |
+
<?php } // end episode_box_itunes_title ?>
|
528 |
+
|
529 |
+
<?php if( empty($General['ios11_fields']) || $General['ios11_fields'] == 4 ) { ?>
|
530 |
+
<p><label><select name="General[ebinst]" class="bpp_input_sm">
|
531 |
+
<?php
|
532 |
+
$linkoptions = array('false'=>__('Hide Field', 'powerpress'),
|
533 |
+
1=>__('Show Field', 'powerpress') );
|
534 |
+
|
535 |
+
foreach( $linkoptions as $value => $desc )
|
536 |
+
echo "\t<option value=\"$value\"". ( !empty($General['episode_box_itunes_nst']) && $General['episode_box_itunes_nst'] == $value ?' selected':''). ">$desc</option>\n";
|
537 |
+
|
538 |
+
?>
|
539 |
+
</select> <?php echo __('iTunes Episode Number, Season and Type Fields', 'powerpress'); ?></label> </p>
|
540 |
+
<em><strong><?php echo __('Enter specifics about episode including episode number, season number and type (full, trailer, or bonus).', 'powerpress'); ?></strong></em>
|
541 |
+
<?php } // end episode_box_itunes_title ?>
|
542 |
+
|
543 |
+
<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 Apple and Google Podcasts', 'powerpress'); ?></label>
|
544 |
+
(<?php echo __('Display selected episode at top of your Apple and Google Podcasts listings', 'powerpress'); ?>)</p>
|
545 |
+
<em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
|
546 |
+
<em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
|
547 |
+
|
548 |
+
|
549 |
+
<p style="margin-top: 15px;"><input id="episode_box_gp_desc" class="episode_box_option" name="General[episode_box_gp_desc]" type="checkbox" value="1"<?php if( !empty($General['episode_box_gp_desc']) ) echo ' checked'; ?> /> <?php echo __('Google Play Description Field', 'powerpress'); ?>
|
550 |
+
(<?php echo __('Leave unchecked to use your blog post', 'powerpress'); ?>)</p>
|
551 |
+
<p style="margin-top: 15px;"><input id="episode_box_gp_explicit" class="episode_box_option" name="General[episode_box_gp_explicit]" type="checkbox" value="1"<?php if( !empty($General['episode_box_gp_explicit']) ) echo ' checked'; ?> /> <?php echo __('Google Play Explicit Field', 'powerpress'); ?>
|
552 |
+
(<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
|
553 |
+
|
554 |
+
<fieldset style="border: 1px dashed #333333; margin: 10px 0 10px -20px;">
|
555 |
+
<legend style="margin: 0 20px; padding: 0 5px 5px 5px; font-weight: bold;"><?php echo __('Advanced Options', 'powerpress'); ?></legend>
|
556 |
+
<p style="margin: 15px 0 0 20px;"><label><input id="episode_box_block" class="episode_box_option" name="General[episode_box_block]" type="checkbox" value="1"<?php if( !empty($General['episode_box_block']) ) echo ' checked'; ?> /> <?php echo __('iTunes Block', 'powerpress'); ?> (<?php echo htmlspecialchars('<itunes:block>yes</itunes:block>'); ?>)</label></p>
|
557 |
+
<div style="margin: 0 10px 10px 20px;"><em><strong><?php echo __('Prevent episodes from appearing in iTunes and other diretories that support the iTunes:block tag. Episodes may still appear in other directories and applications.', 'powerpress'); ?></strong></em></div>
|
558 |
+
|
559 |
+
<p style="margin: 15px 0 0 20px;"><label><input id="episode_box_gp_block" class="episode_box_option" name="General[episode_box_gp_block]" type="checkbox" value="1"<?php if( !empty($General['episode_box_gp_block']) ) echo ' checked'; ?> /> <?php echo __('Google Play Block', 'powerpress'); ?> (<?php echo htmlspecialchars('<googleplay:block>yes</itunes:googleplay>'); ?>)</label></p>
|
560 |
+
<div style="margin: 0 10px 10px 20px;"><em><strong><?php echo __('Prevent episodes from appearing in Google Play Music. Episodes may still appear in other directories and applications.', 'powerpress'); ?></strong></em></div>
|
561 |
+
</fieldset>
|
562 |
+
|
563 |
+
</div>
|
564 |
+
|
565 |
+
</td>
|
566 |
+
</tr>
|
567 |
+
</table>
|
568 |
+
<script language="javascript"><!--
|
569 |
+
SelectEmbedField(<?php echo $General['episode_box_embed']; ?>);
|
570 |
+
//-->
|
571 |
+
</script>
|
572 |
+
|
573 |
+
<?php
|
574 |
+
|
575 |
+
$AdvanecdOptions = false;
|
576 |
+
if( !empty($General['default_url']) )
|
577 |
+
$AdvanecdOptions = true;
|
578 |
+
if( !empty($General['set_duration']) )
|
579 |
+
$AdvanecdOptions = true;
|
580 |
+
if( !empty($General['set_size']) )
|
581 |
+
$AdvanecdOptions = true;
|
582 |
+
if( !empty($General['auto_enclose']) )
|
583 |
+
$AdvanecdOptions = true;
|
584 |
+
if( !empty($General['permalink_feeds_only']) )
|
585 |
+
$AdvanecdOptions = true;
|
586 |
+
if( !empty($General['hide_warnings']) )
|
587 |
+
$AdvanecdOptions = true;
|
588 |
+
|
589 |
+
$DefaultMediaURL = false;
|
590 |
+
|
591 |
+
if( !empty($General['default_url']) )
|
592 |
+
$DefaultMediaURL = true;
|
593 |
+
|
594 |
+
if( !$AdvanecdOptions ) {
|
595 |
+
?>
|
596 |
+
<div style="margin-left: 10px; font-weight: bold;" id="advanced_basic_options_show_link"><a href="#" onclick="document.getElementById('advanced_basic_options').style.display='block';document.getElementById('advanced_basic_options_show_link').style.display='none';return false;"><?php echo __('Show Advanced Episode Entry Settings', 'powerpress'); ?></a></div>
|
597 |
+
<?php } ?>
|
598 |
+
<!-- start advanced features -->
|
599 |
+
<div id="advanced_basic_options" <?php echo ($AdvanecdOptions?'':'style="display:none;"'); ?>>
|
600 |
+
<?php if( $DefaultMediaURL || defined('POWERPRESS_DEFAULT_MEDIA_URL') ) { ?>
|
601 |
+
<table class="form-table">
|
602 |
+
<tr valign="top">
|
603 |
+
<th scope="row"><?php echo __('Default Media URL', 'powerpress'); ?></th>
|
604 |
+
<td>
|
605 |
+
<input type="text" style="width: 80%;" name="General[default_url]" value="<?php echo esc_attr($General['default_url']); ?>" maxlength="255" />
|
606 |
+
<p><?php echo __('e.g. http://example.com/mediafolder/', 'powerpress'); ?></p>
|
607 |
+
<p><?php echo __('URL above will prefix entered file names that do not start with \'http://\'. URL above must end with a trailing slash. You may leave blank if you always enter the complete URL to your media when creating podcast episodes.', 'powerpress'); ?>
|
608 |
+
</p>
|
609 |
+
</td>
|
610 |
+
</tr>
|
611 |
+
</table>
|
612 |
+
<?php } ?>
|
613 |
+
|
614 |
+
<div id="episode_entry_settings">
|
615 |
+
<table class="form-table">
|
616 |
+
<tr valign="top">
|
617 |
+
<th scope="row">
|
618 |
+
|
619 |
+
<?php echo __('File Size Default', 'powerpress'); ?></th>
|
620 |
+
<td>
|
621 |
+
<select name="General[set_size]" class="bpp_input_med">
|
622 |
+
<?php
|
623 |
+
$options = array(0=>__('Auto detect file size', 'powerpress'), 1=>__('User specify', 'powerpress') );
|
624 |
+
|
625 |
+
foreach( $options as $value => $desc )
|
626 |
+
echo "\t<option value=\"$value\"". ($General['set_size']==$value?' selected':''). ">$desc</option>\n";
|
627 |
+
|
628 |
+
?>
|
629 |
+
</select> (<?php echo __('specify default file size option when creating a new episode', 'powerpress'); ?>)
|
630 |
+
</td>
|
631 |
+
</tr>
|
632 |
+
|
633 |
+
<tr valign="top">
|
634 |
+
<th scope="row">
|
635 |
+
<?php echo __('Duration Default', 'powerpress'); ?></th>
|
636 |
+
<td>
|
637 |
+
<select name="General[set_duration]" class="bpp_input_med">
|
638 |
+
<?php
|
639 |
+
$options = array(0=>__('Auto detect duration', 'powerpress'), 1=>__('User specify', 'powerpress'), -1=>__('Not specified (not recommended)', 'powerpress') );
|
640 |
+
|
641 |
+
foreach( $options as $value => $desc )
|
642 |
+
echo "\t<option value=\"$value\"". ($General['set_duration']==$value?' selected':''). ">$desc</option>\n";
|
643 |
+
|
644 |
+
?>
|
645 |
+
</select> (<?php echo __('specify default duration option when creating a new episode', 'powerpress'); ?>)
|
646 |
+
</td>
|
647 |
+
</tr>
|
648 |
+
</table>
|
649 |
+
</div>
|
650 |
+
|
651 |
+
<table class="form-table">
|
652 |
+
<tr valign="top">
|
653 |
+
<th scope="row">
|
654 |
+
<?php echo __('Auto Add Media', 'powerpress'); ?></th>
|
655 |
+
<td>
|
656 |
+
<select name="General[auto_enclose]" class="bpp_input_med">
|
657 |
+
<?php
|
658 |
+
$options = array(0=>__('Disabled (default)', 'powerpress'), 1=>__('First media link found in post content', 'powerpress'), 2=>__('Last media link found in post content', 'powerpress') );
|
659 |
+
|
660 |
+
foreach( $options as $value => $desc )
|
661 |
+
echo "\t<option value=\"$value\"". ($General['auto_enclose']==$value?' selected':''). ">$desc</option>\n";
|
662 |
+
|
663 |
+
?>
|
664 |
+
</select>
|
665 |
+
<p><?php echo __('When enabled, the first or last media link found in the post content is automatically added as your podcast episode.', 'powerpress'); ?></p>
|
666 |
+
<p style="margin-bottom: 0;" class="description"><em><?php echo __('NOTE: Use this feature with caution. Links to media files could unintentionally become podcast episodes.', 'powerpress'); ?></em></p>
|
667 |
+
<p><em><?php echo __('WARNING: Episodes created with this feature will <u>not</u> include Duration (total play time) information.', 'powerpress'); ?></em></p>
|
668 |
+
</td>
|
669 |
+
</tr>
|
670 |
+
<tr valign="top">
|
671 |
+
<th scope="row">
|
672 |
+
<?php echo __('Disable Warnings', 'powerpress'); ?></th>
|
673 |
+
<td>
|
674 |
+
<select name="General[hide_warnings]" class="bpp_input_med">
|
675 |
+
<?php
|
676 |
+
$options = array(0=>__('No (default)', 'powerpress'), 1=>__('Yes', 'powerpress') );
|
677 |
+
$current_value = (!empty($General['hide_warnings'])?$General['hide_warnings']:0);
|
678 |
+
foreach( $options as $value => $desc )
|
679 |
+
echo "\t<option value=\"$value\"". ($current_value==$value?' selected':''). ">$desc</option>\n";
|
680 |
+
|
681 |
+
?>
|
682 |
+
</select>
|
683 |
+
<p><?php echo __('Disable warning messages displayed in episode entry box. Errors are still displayed.', 'powerpress'); ?></p>
|
684 |
+
</td>
|
685 |
+
</tr>
|
686 |
+
</table>
|
687 |
+
</div>
|
688 |
+
<!-- end advanced features -->
|
689 |
+
<?php
|
690 |
+
|
691 |
+
|
692 |
+
global $wp_rewrite;
|
693 |
+
if( $wp_rewrite->permalink_structure ) // Only display if permalinks is enabled in WordPress
|
694 |
+
{
|
695 |
+
?>
|
696 |
+
<h3><?php echo __('Permalinks', 'powerpress'); ?></h3>
|
697 |
+
<table class="form-table">
|
698 |
+
<tr valign="top">
|
699 |
+
<th scope="row">
|
700 |
+
<?php echo __('Podcast Permalinks', 'powerpress'); ?></th>
|
701 |
+
<td>
|
702 |
+
<select name="General[permalink_feeds_only]" class="bpp_input_normal">
|
703 |
+
<?php
|
704 |
+
$options = array(0=>__('Default WordPress Behavior', 'powerpress'), 1=>__('Match Feed Name to Page/Category', 'powerpress') );
|
705 |
+
$current_value = (!empty($General['permalink_feeds_only'])?$General['permalink_feeds_only']:0);
|
706 |
+
|
707 |
+
foreach( $options as $value => $desc )
|
708 |
+
echo "\t<option value=\"$value\"". ($current_value==$value?' selected':''). ">$desc</option>\n";
|
709 |
+
|
710 |
+
?>
|
711 |
+
</select>
|
712 |
+
<p><?php echo sprintf(__('When configured, %s/podcast/ is matched to page/category named \'podcast\'.', 'powerpress'), get_bloginfo('url') ); ?></p>
|
713 |
+
</td>
|
714 |
+
</tr>
|
715 |
+
</table>
|
716 |
+
<?php
|
717 |
+
}
|
718 |
+
?>
|
719 |
+
|
720 |
+
|
721 |
+
<?php
|
722 |
+
}
|
723 |
+
|
724 |
+
function powerpressadmin_edit_podpress_options($General)
|
725 |
+
{
|
726 |
+
if( !empty($General['process_podpress']) || powerpress_podpress_episodes_exist() )
|
727 |
+
{
|
728 |
+
if( !isset($General['process_podpress']) )
|
729 |
+
$General['process_podpress'] = 0;
|
730 |
+
if( !isset($General['podpress_stats']) )
|
731 |
+
$General['podpress_stats'] = 0;
|
732 |
+
?>
|
733 |
+
|
734 |
+
<h3><?php echo __('PodPress Options', 'powerpress'); ?></h3>
|
735 |
+
<table class="form-table">
|
736 |
+
<tr valign="top">
|
737 |
+
<th scope="row">
|
738 |
+
|
739 |
+
<?php echo __('PodPress Episodes', 'powerpress'); ?></th>
|
740 |
+
<td>
|
741 |
+
<select name="General[process_podpress]" class="bpp_input_med">
|
742 |
+
<?php
|
743 |
+
$options = array(0=>__('Ignore', 'powerpress'), 1=>__('Include in Posts and Feeds', 'powerpress') );
|
744 |
+
|
745 |
+
foreach( $options as $value => $desc )
|
746 |
+
echo "\t<option value=\"$value\"". ($General['process_podpress']==$value?' selected':''). ">$desc</option>\n";
|
747 |
+
|
748 |
+
?>
|
749 |
+
</select> (<?php echo __('includes podcast episodes previously created in PodPress', 'powerpress'); ?>)
|
750 |
+
</td>
|
751 |
+
</tr>
|
752 |
+
<?php if( !empty($General['podpress_stats']) || powerpress_podpress_stats_exist() ) { ?>
|
753 |
+
<tr valign="top">
|
754 |
+
<th scope="row">
|
755 |
+
|
756 |
+
<?php echo __('PodPress Stats Archive', 'powerpress'); ?></th>
|
757 |
+
<td>
|
758 |
+
<select name="General[podpress_stats]" class="bpp_input_sm">
|
759 |
+
<?php
|
760 |
+
$options = array(0=>__('Hide', 'powerpress'), 1=>__('Display', 'powerpress') );
|
761 |
+
|
762 |
+
foreach( $options as $value => $desc )
|
763 |
+
echo "\t<option value=\"$value\"". ($General['podpress_stats']==$value?' selected':''). ">$desc</option>\n";
|
764 |
+
|
765 |
+
?>
|
766 |
+
</select> (<?php echo __('display archive of old PodPress statistics', 'powerpress'); ?>)
|
767 |
+
</td>
|
768 |
+
</tr>
|
769 |
+
<?php } ?>
|
770 |
+
</table>
|
771 |
+
<?php
|
772 |
+
}
|
773 |
+
}
|
774 |
+
|
775 |
+
|
776 |
+
function powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs = array() )
|
777 |
+
{
|
778 |
+
$feed_slug = $FeedAttribs['feed_slug'];
|
779 |
+
$cat_ID = $FeedAttribs['category_id'];
|
780 |
+
|
781 |
+
// Set default settings (if not set)
|
782 |
+
if( empty($FeedSettings['googleplay_url']) )
|
783 |
+
$FeedSettings['googleplay_url'] = '';
|
784 |
+
if( empty($FeedSettings['googleplay_email']) )
|
785 |
+
$FeedSettings['googleplay_email'] = '';
|
786 |
+
if( empty($FeedSettings['googleplay_author']) )
|
787 |
+
$FeedSettings['googleplay_author'] = '';
|
788 |
+
if( empty($FeedSettings['googleplay_description']) )
|
789 |
+
$FeedSettings['googleplay_description'] = '';
|
790 |
+
if( empty($FeedSettings['googleplay_explicit']) )
|
791 |
+
$FeedSettings['googleplay_explicit'] = '';
|
792 |
+
if( empty($FeedSettings['googleplay_cat']) )
|
793 |
+
$FeedSettings['googleplay_cat'] = '';
|
794 |
+
|
795 |
+
$gp_feed_url = '';
|
796 |
+
switch( $FeedAttribs['type'] )
|
797 |
+
{
|
798 |
+
case 'ttid': {
|
799 |
+
$gp_feed_url = get_term_feed_link($FeedAttribs['term_taxonomy_id'], $FeedAttribs['taxonomy_type'], 'rss2' );
|
800 |
+
}; break;
|
801 |
+
case 'category': {
|
802 |
+
if( !empty($General['cat_casting_podcast_feeds']) )
|
803 |
+
$gp_feed_url = get_category_feed_link($cat_ID, 'podcast');
|
804 |
+
else
|
805 |
+
$gp_feed_url = get_category_feed_link($cat_ID);
|
806 |
+
}; break;
|
807 |
+
case 'channel': {
|
808 |
+
$gp_feed_url = get_feed_link($feed_slug);
|
809 |
+
}; break;
|
810 |
+
case 'post_type': {
|
811 |
+
$gp_feed_url = get_post_type_archive_feed_link($FeedAttribs['post_type'], $feed_slug);
|
812 |
+
}; break;
|
813 |
+
case 'general':
|
814 |
+
default: {
|
815 |
+
$gp_feed_url = get_feed_link('podcast');
|
816 |
+
}
|
817 |
+
}
|
818 |
+
|
819 |
+
?>
|
820 |
+
<h3><?php echo __('Google Play Settings', 'powerpress'); ?> </h3>
|
821 |
+
<table class="form-table">
|
822 |
+
<tr valign="top">
|
823 |
+
<th scope="row">
|
824 |
+
<?php echo __('Google Play Email', 'powerpress'); ?>
|
825 |
+
</th>
|
826 |
+
<td>
|
827 |
+
<input type="text" name="Feed[googleplay_email]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['googleplay_email']); ?>" maxlength="255" />
|
828 |
+
<div>(<?php echo __('Google will email this address when your podcast is accepted to the Google Play Music Podcast directory.', 'powerpress'); ?>)</div>
|
829 |
+
<p><?php echo __('iTunes email setting will be used if left blank.', 'powerpress'); ?></p>
|
830 |
+
</td>
|
831 |
+
</tr>
|
832 |
+
<tr valign="top">
|
833 |
+
<th scope="row">
|
834 |
+
<?php echo __('Google Play Author', 'powerpress'); ?>
|
835 |
+
</th>
|
836 |
+
<td>
|
837 |
+
<input type="text" name="Feed[googleplay_author]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['googleplay_author']); ?>" maxlength="255" />
|
838 |
+
<p><?php echo __('iTunes Author will be used if left blank', 'powerpress'); ?></p>
|
839 |
+
<?php if( !empty($General['seo_itunes']) ) { ?>
|
840 |
+
<p class="description"><?php echo __('Podcasting SEO Suggestion: This field may be indexed for Google Play Music search.', 'powerpress'); ?></p>
|
841 |
+
<?php } ?>
|
842 |
+
</td>
|
843 |
+
</tr>
|
844 |
+
<tr valign="top">
|
845 |
+
<th scope="row">
|
846 |
+
<?php echo __('Google Play Description', 'powerpress'); ?>
|
847 |
+
</th>
|
848 |
+
<td>
|
849 |
+
<p style="margin-top: 5px;"><?php echo __('Your description cannot exceed 4,000 characters in length.', 'powerpress'); ?></p>
|
850 |
+
<textarea name="Feed[googleplay_description]" rows="5" class="bpp-input-normal"><?php echo esc_textarea($FeedSettings['googleplay_description']); ?></textarea>
|
851 |
+
<p><?php echo __('iTunes Summary will be used if left blank', 'powerpress'); ?></p>
|
852 |
+
<?php if( !empty($General['seo_itunes']) ) { ?>
|
853 |
+
<p class="description"><?php echo __('Podcasting SEO Suggestion: This field may be indexed for Google Play Music search.', 'powerpress'); ?></p>
|
854 |
+
<?php } ?>
|
855 |
+
</td>
|
856 |
+
</tr>
|
857 |
+
<tr valign="top">
|
858 |
+
<th scope="row">
|
859 |
+
<?php echo __('Google Play Explicit', 'powerpress'); ?>
|
860 |
+
</th>
|
861 |
+
<td>
|
862 |
+
<select name="Feed[googleplay_explicit]" class="bpp_input_med">
|
863 |
+
<?php
|
864 |
+
$explicit = array(0=> __('No - display nothing', 'powerpress'), 1=>__('Yes - explicit content', 'powerpress') );
|
865 |
+
|
866 |
+
foreach( $explicit as $value => $desc )
|
867 |
+
echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_explicit']==$value?' selected':''). ">$desc</option>\n";
|
868 |
+
|
869 |
+
?>
|
870 |
+
</select>
|
871 |
+
</td>
|
872 |
+
</tr>
|
873 |
+
<tr valign="top">
|
874 |
+
<th scope="row">
|
875 |
+
<?php echo __('Google Play Category', 'powerpress'); ?>
|
876 |
+
<span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
|
877 |
+
</th>
|
878 |
+
<td>
|
879 |
+
<select name="Feed[googleplay_cat]" class="bpp_input_med">
|
880 |
+
<?php
|
881 |
+
|
882 |
+
$MoreCategories = false;
|
883 |
+
|
884 |
+
|
885 |
+
$Categories = powerpress_googleplay_categories();
|
886 |
+
|
887 |
+
echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
|
888 |
+
foreach( $Categories as $value => $desc )
|
889 |
+
echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_cat']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
890 |
+
|
891 |
+
?>
|
892 |
+
</select>
|
893 |
+
</td>
|
894 |
+
</tr>
|
895 |
+
|
896 |
+
</table>
|
897 |
+
<?php
|
898 |
+
}
|
899 |
+
|
900 |
+
function powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs = array() )
|
901 |
+
{
|
902 |
+
// Set default settings (if not set)
|
903 |
+
if( !empty($FeedSettings) )
|
904 |
+
{
|
905 |
+
if( !isset($FeedSettings['itunes_url']) )
|
906 |
+
$FeedSettings['itunes_url'] = '';
|
907 |
+
}
|
908 |
+
if( !isset($General['itunes_url']) )
|
909 |
+
$General['itunes_url'] = '';
|
910 |
+
else if( !isset($FeedSettings['itunes_url']) ) // Should almost never happen
|
911 |
+
$FeedSettings['itunes_url'] = $General['itunes_url'];
|
912 |
+
|
913 |
+
$feed_slug = $FeedAttribs['feed_slug'];
|
914 |
+
$cat_ID = $FeedAttribs['category_id'];
|
915 |
+
|
916 |
+
if( $feed_slug == 'podcast' && $FeedAttribs['type'] == 'general' )
|
917 |
+
{
|
918 |
+
if( empty($FeedSettings['itunes_url']) && !empty($General['itunes_url']) )
|
919 |
+
$FeedSettings['itunes_url'] = $General['itunes_url'];
|
920 |
+
}
|
921 |
+
|
922 |
+
$itunes_feed_url = '';
|
923 |
+
|
924 |
+
switch( $FeedAttribs['type'] )
|
925 |
+
{
|
926 |
+
case 'ttid': {
|
927 |
+
$itunes_feed_url = get_term_feed_link($FeedAttribs['term_taxonomy_id'], $FeedAttribs['taxonomy_type'], 'rss2');
|
928 |
+
}; break;
|
929 |
+
case 'category': {
|
930 |
+
if( !empty($General['cat_casting_podcast_feeds']) )
|
931 |
+
$itunes_feed_url = get_category_feed_link($cat_ID, 'podcast');
|
932 |
+
else
|
933 |
+
$itunes_feed_url = get_category_feed_link($cat_ID);
|
934 |
+
}; break;
|
935 |
+
case 'channel': {
|
936 |
+
$itunes_feed_url = get_feed_link($feed_slug);
|
937 |
+
}; break;
|
938 |
+
case 'post_type': {
|
939 |
+
$itunes_feed_url = get_post_type_archive_feed_link($FeedAttribs['post_type'], $feed_slug);
|
940 |
+
}; break;
|
941 |
+
case 'general':
|
942 |
+
default: {
|
943 |
+
$itunes_feed_url = get_feed_link('podcast');
|
944 |
+
}
|
945 |
+
}
|
946 |
+
|
947 |
+
?>
|
948 |
+
<h3><?php echo __('iTunes Listing Information', 'powerpress'); ?></h3>
|
949 |
+
|
950 |
+
<?php
|
951 |
+
} // end itunes general
|
952 |
+
|
953 |
+
function powerpressadmin_edit_blubrry_services($General, $action_url = false, $action = false)
|
954 |
+
{
|
955 |
+
$DisableStatsInDashboard = false;
|
956 |
+
if( !empty($General['disable_dashboard_stats']) )
|
957 |
+
$DisableStatsInDashboard = true;
|
958 |
+
|
959 |
+
|
960 |
+
if( $action_url == false )
|
961 |
+
$action_url = admin_url('admin.php?action=powerpress-jquery-account');
|
962 |
+
if( $action == false )
|
963 |
+
$action = 'powerpress-jquery-account';
|
964 |
+
?>
|
965 |
+
<h3><?php echo __('Integrate Blubrry Services', 'powerpress'); ?></h3>
|
966 |
+
<ul><li><ul>
|
967 |
+
<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>
|
968 |
+
<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>
|
969 |
+
</ul></li></ul>
|
970 |
+
<div style="margin-left: 40px;">
|
971 |
+
<p style="font-size: 125%;">
|
972 |
+
<strong><a class="button-primary button-blubrry thickbox" title="<?php echo esc_attr(__('Blubrry Services Integration', 'powerpress')); ?>" href="<?php echo wp_nonce_url( $action_url, $action); ?>&KeepThis=true&TB_iframe=true&width=600&height=400&modal=false" target="_blank"><?php echo __('Click here to configure Blubrry Statistics and Hosting services', 'powerpress'); ?></a></strong>
|
973 |
+
</p>
|
974 |
+
<?php
|
975 |
+
if( !empty($General['blubrry_program_keyword']) )
|
976 |
+
{
|
977 |
+
// Check that the redirect is in the settings...
|
978 |
+
$RedirectURL = 'http://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
|
979 |
+
$Error = true;
|
980 |
+
if( stripos($General['redirect1'], $RedirectURL ) !== false )
|
981 |
+
$Error = false;
|
982 |
+
else if( stripos($General['redirect2'], $RedirectURL ) !== false )
|
983 |
+
$Error = false;
|
984 |
+
else if( stripos($General['redirect3'], $RedirectURL ) !== false )
|
985 |
+
$Error = false;
|
986 |
+
if( $Error )
|
987 |
+
{
|
988 |
+
?>
|
989 |
+
<p style="font-weight: bold; color: #CC0000;">
|
990 |
+
<?php
|
991 |
+
echo __('Statistics are not implemented correctly on this blog. Please click the button above to re-configure your services.', 'powerpress');
|
992 |
+
?>
|
993 |
+
</p>
|
994 |
+
<?php
|
995 |
+
}
|
996 |
+
else
|
997 |
+
{
|
998 |
+
?>
|
999 |
+
<p style="font-weight: bold;">
|
1000 |
+
<img src="<?php echo powerpress_get_root_url(); ?>images/Check.png" style="width: 25px; height: 20px;" alt="<?php echo __('Enabled!', 'powerpress'); ?>" />
|
1001 |
+
<?php
|
1002 |
+
if( empty($General['blubrry_hosting']) || $General['blubrry_hosting'] === 'false' )
|
1003 |
+
echo __('Blubrry Statistics Enabled!', 'powerpress');
|
1004 |
+
else
|
1005 |
+
echo __('Blubrry Statistics and Media Hosting Enabled!', 'powerpress');
|
1006 |
+
?>
|
1007 |
+
</p>
|
1008 |
+
<?php if( !empty($General['blubrry_hosting']) && $General['blubrry_hosting'] !== 'false' && !empty($General['blubrry_program_keyword']) ) { ?>
|
1009 |
+
<p style="margin-left: 30px;"><?php echo __('Blubrry Program ID: ', 'powerpress'); ?> <i><?php echo $General['blubrry_program_keyword']; ?></i>
|
1010 |
+
</p><?php } ?>
|
1011 |
+
<?php
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
if( empty($General['blubrry_hosting']) || $General['blubrry_hosting'] === 'false' )
|
1015 |
+
{
|
1016 |
+
?>
|
1017 |
+
<p>
|
1018 |
+
<?php echo __('Recently upgraded to Blubrry Hosting?', 'powerpress'); ?>
|
1019 |
+
<a class="thickbox" title="<?php echo esc_attr(__('Blubrry Services Integration', 'powerpress')); ?>" href="<?php echo admin_url(); echo wp_nonce_url( "admin.php?action=powerpress-jquery-account", 'powerpress-jquery-account'); ?>&KeepThis=true&TB_iframe=true&width=600&height=400&modal=false" target="_blank"><?php echo __('Click here to enter your account information.', 'powerpress'); ?></a>
|
1020 |
+
</p>
|
1021 |
+
<?php
|
1022 |
+
}
|
1023 |
+
}
|
1024 |
+
?>
|
1025 |
+
</div>
|
1026 |
+
<?php
|
1027 |
+
if( empty($General['blubrry_hosting']) || $General['blubrry_hosting'] === 'false' ) // Not signed up for hosting?
|
1028 |
+
{
|
1029 |
+
?>
|
1030 |
+
<div class="blubrry-services">
|
1031 |
+
<div class="blubrry-hosting">
|
1032 |
+
<p class="top-lines"><?php echo __('Need a reliable host for your podcast media?', 'powerpress'); ?></p>
|
1033 |
+
<p><?php echo __('Blubrry Media Hosting packages start at $12.', 'powerpress'); ?></p>
|
1034 |
+
<p><a href="http://create.blubrry.com/resources/podcast-media-hosting/" target="_blank"><?php echo __('Learn More', 'powerpress'); ?></a></p>
|
1035 |
+
</div>
|
1036 |
+
<div class="blubrry-stats">
|
1037 |
+
<p class="top-lines"><?php echo __('Measure your audience for <strong>free</strong> and add more detailed', 'powerpress'); ?></p>
|
1038 |
+
<p><?php echo __('reporting for only $5 per month.', 'powerpress'); ?></p>
|
1039 |
+
<p> </p>
|
1040 |
+
<p><a href="http://create.blubrry.com/resources/podcast-media-download-statistics/" target="_blank"><?php echo __('Learn More', 'powerpress'); ?></a></p>
|
1041 |
+
</div>
|
1042 |
+
<div class="clear"></div>
|
1043 |
+
</div>
|
1044 |
+
<?php
|
1045 |
+
} // end not signed up for hosting
|
1046 |
+
|
1047 |
+
?>
|
1048 |
+
<div style="margin-left: 40px;">
|
1049 |
+
<p style="margin-top: 10px;">
|
1050 |
+
<input name="DisableStatsInDashboard" type="checkbox" value="1"<?php if( $DisableStatsInDashboard == true ) echo ' checked'; ?> />
|
1051 |
+
<?php echo __('Remove Statistics from WordPress Dashboard', 'powerpress'); ?></p>
|
1052 |
+
<p>
|
1053 |
+
<input type="checkbox" id="blubrry_network_mode" value="1" name="General[network_mode]" <?php echo $General['network_mode'] == '1' ? 'checked' : ''; ?> />
|
1054 |
+
<label for="blubrry_network_mode"><?php echo __('Network mode (publish to multiple Blubrry Hosting Accounts)', 'powerpress') ?></label>
|
1055 |
+
</p>
|
1056 |
+
</div>
|
1057 |
+
<?php
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
function powerpressadmin_edit_media_statistics($General)
|
1061 |
+
{
|
1062 |
+
if( !isset($General['redirect1']) )
|
1063 |
+
$General['redirect1'] = '';
|
1064 |
+
if( !isset($General['redirect2']) )
|
1065 |
+
$General['redirect2'] = '';
|
1066 |
+
if( !isset($General['redirect3']) )
|
1067 |
+
$General['redirect3'] = '';
|
1068 |
+
|
1069 |
+
$StatsIntegrationURL = '';
|
1070 |
+
if( !empty($General['blubrry_program_keyword']) )
|
1071 |
+
$StatsIntegrationURL = 'http://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
|
1072 |
+
?>
|
1073 |
+
<div id="blubrry_stats_settings">
|
1074 |
+
<h3><?php echo __('Media Statistics', 'powerpress'); ?></h3>
|
1075 |
+
<div style="margin-left: 40px;">
|
1076 |
+
<p>
|
1077 |
+
<?php echo __('Enter your Redirect URL issued by your media statistics service provider below.', 'powerpress'); ?>
|
1078 |
+
</p>
|
1079 |
+
|
1080 |
+
<div style="position: relative; margin-left: 40px; padding-bottom: 10px;">
|
1081 |
+
<table class="form-table">
|
1082 |
+
<tr valign="top">
|
1083 |
+
<th scope="row">
|
1084 |
+
<?php echo __('Redirect URL 1', 'powerpress'); ?>
|
1085 |
+
</th>
|
1086 |
+
<td>
|
1087 |
+
<input type="text" style="width: 60%;" name="<?php if( stripos($General['redirect1'], $StatsIntegrationURL) !== false ) echo 'NULL[redirect1]'; else echo 'General[redirect1]'; ?>" value="<?php echo esc_attr($General['redirect1']); ?>" onChange="return CheckRedirect(this);" maxlength="255" <?php if( stripos($General['redirect1'], $StatsIntegrationURL) !== false ) { echo ' readOnly="readOnly"'; $StatsIntegrationURL = false; } ?> />
|
1088 |
+
</td>
|
1089 |
+
</tr>
|
1090 |
+
</table>
|
1091 |
+
<?php if( empty($General['redirect2']) && empty($General['redirect3']) ) { ?>
|
1092 |
+
<div style="position: absolute;bottom: -2px;left: -40px;" id="powerpress_redirect2_showlink">
|
1093 |
+
<a href="#" 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>
|
1094 |
+
</div>
|
1095 |
+
<?php } ?>
|
1096 |
+
</div>
|
1097 |
+
|
1098 |
+
|
1099 |
+
<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;">
|
1100 |
+
<table class="form-table">
|
1101 |
+
<tr valign="top">
|
1102 |
+
<th scope="row">
|
1103 |
+
<?php echo __('Redirect URL 2', 'powerpress'); ?>
|
1104 |
+
</th>
|
1105 |
+
<td>
|
1106 |
+
<input type="text" style="width: 60%;" name="<?php if( stripos($General['redirect2'], $StatsIntegrationURL) !== false ) echo 'NULL[redirect2]'; else echo 'General[redirect2]'; ?>" value="<?php echo esc_attr($General['redirect2']); ?>" onblur="return CheckRedirect(this);" maxlength="255" <?php if( stripos($General['redirect2'], $StatsIntegrationURL) !== false ) { echo ' readOnly="readOnly"'; $StatsIntegrationURL = false; } ?> />
|
1107 |
+
</td>
|
1108 |
+
</tr>
|
1109 |
+
</table>
|
1110 |
+
<?php if( $General['redirect3'] == '' ) { ?>
|
1111 |
+
<div style="position: absolute;bottom: -2px;left: -40px;" id="powerpress_redirect3_showlink">
|
1112 |
+
<a href="#" 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>
|
1113 |
+
</div>
|
1114 |
+
<?php } ?>
|
1115 |
+
</div>
|
1116 |
+
|
1117 |
+
<div id="powerpress_redirect3_table" style="<?php if( empty($General['redirect3']) ) echo 'display:none;'; ?> margin-left: 40px;">
|
1118 |
+
<table class="form-table">
|
1119 |
+
<tr valign="top">
|
1120 |
+
<th scope="row">
|
1121 |
+
<?php echo __('Redirect URL 3', 'powerpress'); ?>
|
1122 |
+
</th>
|
1123 |
+
<td>
|
1124 |
+
<input type="text" style="width: 60%;" name="<?php if( stripos($General['redirect3'], $StatsIntegrationURL) !== false ) echo 'NULL[redirect3]'; else echo 'General[redirect3]'; ?>" value="<?php echo esc_attr($General['redirect3']); ?>" onblur="return CheckRedirect(this);" maxlength="255" <?php if( stripos($General['redirect3'], $StatsIntegrationURL) !== false ) echo ' readOnly="readOnly"'; ?> />
|
1125 |
+
</td>
|
1126 |
+
</tr>
|
1127 |
+
</table>
|
1128 |
+
</div>
|
1129 |
+
<style type="text/css">
|
1130 |
+
#TB_window {
|
1131 |
+
border: solid 1px #3D517E;
|
1132 |
+
}
|
1133 |
+
</style>
|
1134 |
+
</div>
|
1135 |
+
</div><!-- end blubrry_stats_settings -->
|
1136 |
+
<?php
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
function powerpressadmin_appearance($General=false, $Feed = false)
|
1140 |
+
{
|
1141 |
+
if( $General === false )
|
1142 |
+
$General = powerpress_get_settings('powerpress_general');
|
1143 |
+
$General = powerpress_default_settings($General, 'appearance');
|
1144 |
+
if( !isset($General['player_function']) )
|
1145 |
+
$General['player_function'] = 1;
|
1146 |
+
if( !isset($General['player_aggressive']) )
|
1147 |
+
$General['player_aggressive'] = 0;
|
1148 |
+
if( !isset($General['new_window_width']) )
|
1149 |
+
$General['new_window_width'] = '';
|
1150 |
+
if( !isset($General['new_window_height']) )
|
1151 |
+
$General['new_window_height'] = '';
|
1152 |
+
if( !isset($General['player_width']) )
|
1153 |
+
$General['player_width'] = '';
|
1154 |
+
if( !isset($General['player_height']) )
|
1155 |
+
$General['player_height'] = '';
|
1156 |
+
if( !isset($General['player_width_audio']) )
|
1157 |
+
$General['player_width_audio'] = '';
|
1158 |
+
if( !isset($General['disable_appearance']) )
|
1159 |
+
$General['disable_appearance'] = false;
|
1160 |
+
if( !isset($General['subscribe_links']) )
|
1161 |
+
$General['subscribe_links'] = true;
|
1162 |
+
if( !isset($General['subscribe_label']) )
|
1163 |
+
$General['subscribe_label'] = '';
|
1164 |
+
|
1165 |
+
|
1166 |
+
/*
|
1167 |
+
$Players = array('podcast'=>__('Default Podcast (podcast)', 'powerpress') );
|
1168 |
+
if( isset($General['custom_feeds']) )
|
1169 |
+
{
|
1170 |
+
foreach( $General['custom_feeds'] as $podcast_slug => $podcast_title )
|
1171 |
+
{
|
1172 |
+
if( $podcast_slug == 'podcast' )
|
1173 |
+
continue;
|
1174 |
+
$Players[$podcast_slug] = sprintf('%s (%s)', $podcast_title, $podcast_slug);
|
1175 |
+
}
|
1176 |
+
}
|
1177 |
+
*/
|
1178 |
+
|
1179 |
+
?>
|
1180 |
+
|
1181 |
+
<!-- start advanced features -->
|
1182 |
+
<?php if( !empty($General['advanced_mode_2']) ) { ?>
|
1183 |
+
<h3><?php echo __('Website Settings', 'powerpress'); ?></h3>
|
1184 |
+
<div id="enable_presentation_settings">
|
1185 |
+
<table class="form-table">
|
1186 |
+
<tr valign="top">
|
1187 |
+
<th scope="row"> </th>
|
1188 |
+
<td>
|
1189 |
+
<ul>
|
1190 |
+
<li><p><label><input type="radio" name="General[disable_appearance]" value="0" <?php if( $General['disable_appearance'] == 0 ) echo 'checked'; ?> onclick="javascript: jQuery('#presentation_settings').css('display', (this.checked?'block':'none') );" /> <?php echo __('Enable PowerPress Media Players and Links', 'powerpress'); ?></label> (<?php echo __('default', 'powerpress'); ?>)</p>
|
1191 |
+
<ul><li>
|
1192 |
+
<p class="description"><?php echo __('PowerPress will add media players and links to your site.', 'powerpress'); ?></p>
|
1193 |
+
</li></ul>
|
1194 |
+
</li>
|
1195 |
+
|
1196 |
+
<li><p><label><input type="radio" name="General[disable_appearance]" value="1" <?php if( $General['disable_appearance'] == 1 ) echo 'checked'; ?> onclick="javascript: jQuery('#presentation_settings').css('display', (this.checked?'none':'block') );" /> <?php echo __('Disable PowerPress Media Players and Links', 'powerpress'); ?></label></p>
|
1197 |
+
<ul><li>
|
1198 |
+
<p class="description"><?php echo __('PowerPress will <u>not</u> add any media players or media links to your site. PowerPress will only be used to add podcasting support to your feeds.', 'powerpress'); ?></p>
|
1199 |
+
</li></ul>
|
1200 |
+
</li>
|
1201 |
+
</ul>
|
1202 |
+
</td>
|
1203 |
+
</tr>
|
1204 |
+
</table>
|
1205 |
+
</div><!-- end enable_presentation_settings -->
|
1206 |
+
<div id="presentation_settings"<?php if($General['disable_appearance']) echo ' style="display: none;"'; ?>>
|
1207 |
+
<!-- start presentation_settings in advanced mode -->
|
1208 |
+
<!-- end advanced features -->
|
1209 |
+
<?php } ?>
|
1210 |
+
|
1211 |
+
<h3><?php echo __('Blog Posts and Pages', 'powerpress'); ?></h3>
|
1212 |
+
|
1213 |
+
|
1214 |
+
<table class="form-table">
|
1215 |
+
<tr valign="top">
|
1216 |
+
<th scope="row"><?php echo htmlspecialchars(__('Display Media & Links', 'powerpress')); ?></th>
|
1217 |
+
<td>
|
1218 |
+
<ul>
|
1219 |
+
<li><p><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'); ?>)</p>
|
1220 |
+
<ul><li>
|
1221 |
+
<p class="description"><?php echo __('Player and media links will appear <u>below</u> your post and page content.', 'powerpress'); ?><p>
|
1222 |
+
</li></ul>
|
1223 |
+
</li>
|
1224 |
+
<li><p><label><input type="radio" name="General[display_player]" value="2" <?php if( $General['display_player'] == 2 ) echo 'checked'; ?> /> <?php echo __('Above page content', 'powerpress'); ?></label></p>
|
1225 |
+
<ul><li>
|
1226 |
+
<p class="description"><?php echo __('Player and media links will appear <u>above</u> your post and page content.', 'powerpress'); ?></p>
|
1227 |
+
</li></ul>
|
1228 |
+
</li>
|
1229 |
+
<li>
|
1230 |
+
<p><label><input type="radio" name="General[display_player]" value="0" <?php if( $General['display_player'] == 0 ) echo 'checked'; ?> /> <?php echo __('Disable', 'powerpress'); ?></label></p>
|
1231 |
+
<ul><li>
|
1232 |
+
<p class="description"><?php echo __('Player and media links will <u>NOT</u> appear in your post and page content. Media player and links can be added manually by using the <i>shortcode</i> below.', 'powerpress'); ?></p>
|
1233 |
+
</li></ul>
|
1234 |
+
</li>
|
1235 |
+
</ul>
|
1236 |
+
<p><input name="General[display_player_excerpt]" type="checkbox" value="1" <?php if( !empty($General['display_player_excerpt']) ) echo 'checked '; ?>/> <?php echo __('Display player / links:', '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>
|
1237 |
+
<input type="hidden" name="General[hide_player_more]" value="0" />
|
1238 |
+
<p><input name="General[hide_player_more]" type="checkbox" value="1" <?php if( !empty($General['hide_player_more']) ) echo 'checked '; ?>/> <?php echo __('Hide player / links:', 'powerpress'); ?> <a href="https://en.support.wordpress.com/more-tag/" title="<?php echo __('Read More tagged posts', 'powerpress'); ?>" target="_blank"><?php echo __('Read More tagged posts', 'powerpress'); ?></a></p>
|
1239 |
+
</td>
|
1240 |
+
</tr>
|
1241 |
+
</table>
|
1242 |
+
|
1243 |
+
<?php if( !empty($General['advanced_mode_2']) ) { ?>
|
1244 |
+
<!-- start advanced features -->
|
1245 |
+
<table class="form-table">
|
1246 |
+
<tr valign="top">
|
1247 |
+
<th scope="row">
|
1248 |
+
<?php echo __('Media Player', 'powerpress'); ?></th>
|
1249 |
+
<td>
|
1250 |
+
|
1251 |
+
<p><label><input type="checkbox" name="PlayerSettings[display_media_player]" value="2" <?php if( $General['player_function'] == 1 || $General['player_function'] == 2 ) echo 'checked '; ?>/> <?php echo __('Display Player', 'powerpress'); ?></label></p>
|
1252 |
+
<?php /* ?>
|
1253 |
+
<p style="margin-left: 35px;"><input type="checkbox" name="General[display_player_disable_mobile]" value="1" <?php if( !empty($General['display_player_disable_mobile']) ) echo 'checked '; ?>/> <?php echo __('Disable Media Player for known mobile devices.', 'powerpress'); ?></p>
|
1254 |
+
<?php */ ?>
|
1255 |
+
<p><?php echo __('Detected mobile and tablet devices use an HTML5 player with a fallback link to download the media.', 'powerpress'); ?></p>
|
1256 |
+
</td>
|
1257 |
+
</tr>
|
1258 |
+
</table>
|
1259 |
+
|
1260 |
+
|
1261 |
+
|
1262 |
+
|
1263 |
+
<table class="form-table">
|
1264 |
+
|
1265 |
+
<tr valign="top">
|
1266 |
+
<th scope="row">
|
1267 |
+
|
1268 |
+
<?php echo __('Media Links', 'powerpress'); ?></th>
|
1269 |
+
<td>
|
1270 |
+
<p style="padding-top: 8px;"><label><input type="checkbox" name="PlayerSettings[display_pinw]" value="3" <?php if( $General['player_function'] == 3 || $General['player_function'] == 1 ) echo 'checked '; ?>/> <?php echo __('Display Play in new Window Link', 'powerpress'); ?></label></p>
|
1271 |
+
|
1272 |
+
<p><label><input type="checkbox" name="PlayerSettings[display_download]" value="1" <?php if( $General['podcast_link'] != 0 ) echo 'checked '; ?>/> <?php echo __('Display Download Link', 'powerpress'); ?></label></p>
|
1273 |
+
|
1274 |
+
<p style="margin-left: 35px;"><input type="checkbox" id="display_download_size" name="PlayerSettings[display_download_size]" value="1" <?php if( $General['podcast_link'] == 2 || $General['podcast_link'] == 3 ) echo 'checked'; ?> onclick="if( !this.checked ) { jQuery('#display_download_duration').removeAttr('checked'); }" /> <?php echo __('Include file size', 'powerpress'); ?>
|
1275 |
+
<input type="checkbox" style="margin-left: 30px;" id="display_download_duration" name="PlayerSettings[display_download_duration]" value="1" <?php if( $General['podcast_link'] == 3 ) echo 'checked'; ?> onclick="if( this.checked ) { jQuery('#display_download_size').attr('checked','checked'); }" /> <?php echo __('Include file size and duration', 'powerpress'); ?></p>
|
1276 |
+
|
1277 |
+
<p><label><input type="checkbox" name="General[podcast_embed]" value="1" <?php if( !empty($General['podcast_embed']) ) echo 'checked '; ?>/> <?php echo __('Display Player Embed Link', 'powerpress'); ?> </label></p>
|
1278 |
+
<p style="margin-left: 35px;">
|
1279 |
+
<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'); ?>
|
1280 |
+
</p>
|
1281 |
+
<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>
|
1282 |
+
</td>
|
1283 |
+
</tr>
|
1284 |
+
</table>
|
1285 |
+
|
1286 |
+
<table class="form-table">
|
1287 |
+
|
1288 |
+
<tr valign="top">
|
1289 |
+
<th scope="row">
|
1290 |
+
<?php echo __('Subscribe Links', 'powerpress'); ?> </th>
|
1291 |
+
<td>
|
1292 |
+
<p style="padding-top: 8px;"><label><input type="checkbox" name="General[subscribe_links]" value="1" <?php if( $General['subscribe_links'] == 1 ) echo 'checked '; ?>/>
|
1293 |
+
<?php echo __('Display subscribe links below player and media links.', 'powerpress'); ?></label></p>
|
1294 |
+
<ul>
|
1295 |
+
<li><label for="subscribe_label">Subscribe label: <input type="text" id="subscribe_label" value="<?php echo esc_attr($General['subscribe_label']); ?>" name="General[subscribe_label]" placeholder="Subscribe:" /></label>
|
1296 |
+
<?php echo __('(leave blank for default)', 'powerpress'); ?>
|
1297 |
+
</li>
|
1298 |
+
</ul>
|
1299 |
+
|
1300 |
+
<p style="padding-top:10px;"><input type="checkbox" name="NULL[subscribe_feature_itunes]" value="1" checked disabled /> <label><?php echo __('Subscribe on Apple Podcasts', 'powerpress'); ?></label></p>
|
1301 |
+
<div style="margin-left: 24px;">
|
1302 |
+
<p><a href="<?php echo 'https://linkmaker.itunes.apple.com/?q='.urlencode( get_bloginfo('name') ); ?>&media=podcasts" target="_blank"><?php echo __('Find your iTunes Subscription URL', 'powerpress'); ?></a></p>
|
1303 |
+
</div>
|
1304 |
+
|
1305 |
+
<p><input type="checkbox" name="NULL[subscribe_feature_android]" value="1" checked disabled /> <label><?php echo __('Subscribe on Android', 'powerpress'); ?></label></p>
|
1306 |
+
<div style="margin-left: 24px;">
|
1307 |
+
<p><a href="http://subscribeonandroid.com/podcasters/" target="_blank"><?php echo __('Learn more about Subscribe on Android', 'powerpress'); ?></a></p>
|
1308 |
+
</div>
|
1309 |
+
|
1310 |
+
<p><input type="hidden" name="General[subscribe_feature_rss]" value="0" /><input type="checkbox" name="General[subscribe_feature_rss]" value="1" id="subscribe_feature_rss" <?php if( !empty($General['subscribe_feature_rss']) || !isset($General['subscribe_feature_rss']) ) echo 'checked '; ?>/> <label for="subscribe_feature_rss"><?php echo __('Subscribe via RSS', 'powerpress'); ?></label></p>
|
1311 |
+
|
1312 |
+
<p><input type="checkbox" id="subscribe_feature_email" name="General[subscribe_feature_email]" value="1" <?php if( !empty($General['subscribe_feature_email']) ) echo 'checked '; ?>/> <label for="subscribe_feature_email"><?php echo __('Subscribe By Email', 'powerpress'); ?></label> </p>
|
1313 |
+
<div style="margin-left: 24px;">
|
1314 |
+
<p>
|
1315 |
+
<?php echo __('Subscribe By Email is a service that allows listeners to subscribe to their favorite podcasts by email.', 'powerpress'); ?>
|
1316 |
+
</p>
|
1317 |
+
<p><a href="http://subscribebyemail.com/podcasters/" target="_blank"><?php echo __('Learn more about Subscribe by Email', 'powerpress'); ?></a></p>
|
1318 |
+
<p><?php echo __('Note: Subscribe by Email does not replace newsletters or mailing lists. It is only for podcast syndication.', 'powerpress'); ?>
|
1319 |
+
</p>
|
1320 |
+
</div>
|
1321 |
+
|
1322 |
+
<p><input type="hidden" name="General[subscribe_feature_gp]" value="0" /><input type="checkbox" id="subscribe_feature_gp" name="General[subscribe_feature_gp]" value="1" <?php if( !empty($General['subscribe_feature_gp']) ) echo 'checked '; ?>/> <label for="subscribe_feature_gp"><?php echo __('Subscribe on Google Podcasts', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
|
1323 |
+
<p><?php echo __('Note: Subscribe on Android includes Google Podcasts.', 'powerpress'); ?>
|
1324 |
+
|
1325 |
+
<p><input type="hidden" name="General[subscribe_feature_stitcher]" value="0" /><input type="checkbox" id="subscribe_feature_stitcher" name="General[subscribe_feature_stitcher]" value="1" <?php if( !empty($General['subscribe_feature_stitcher']) ) echo 'checked '; ?>/> <label for="subscribe_feature_stitcher"><?php echo __('Subscribe on Stitcher', 'powerpress'); ?></label></p>
|
1326 |
+
|
1327 |
+
<p><input type="hidden" name="General[subscribe_feature_tunein]" value="0" /><input type="checkbox" id="subscribe_feature_tunein" name="General[subscribe_feature_tunein]" value="1" <?php if( !empty($General['subscribe_feature_tunein']) ) echo 'checked '; ?>/> <label for="subscribe_feature_tunein"><?php echo __('Subscribe on TuneIn', 'powerpress'); ?></label></p>
|
1328 |
+
|
1329 |
+
<p><input type="hidden" name="General[subscribe_feature_spotify]" value="0" /><input type="checkbox" id="subscribe_feature_spotify" name="General[subscribe_feature_spotify]" value="1" <?php if( !empty($General['subscribe_feature_spotify']) ) echo 'checked '; ?>/> <label for="subscribe_feature_spotify"><?php echo __('Subscribe on Spotify', 'powerpress'); ?></label> <?php echo powerpressadmin_new(); ?></p>
|
1330 |
+
|
1331 |
+
</td>
|
1332 |
+
</tr>
|
1333 |
+
</table>
|
1334 |
+
|
1335 |
+
<?php powerpressadmin_settings_tab_appearance($General, $Feed, false); ?>
|
1336 |
+
<!-- end advanced features -->
|
1337 |
+
<?php } ?>
|
1338 |
+
|
1339 |
+
|
1340 |
+
<table class="form-table">
|
1341 |
+
<tr valign="top">
|
1342 |
+
<th scope="row" style="background-image: url(../wp-includes/images/smilies/icon_exclaim.gif); background-position: 10px 10px; background-repeat: no-repeat; ">
|
1343 |
+
|
1344 |
+
<div style="margin-left: 24px;"><?php echo __('Having Issues?', 'powerpress'); ?></div></th>
|
1345 |
+
<td>
|
1346 |
+
<select name="General[player_aggressive]" class="bpp_input_med">
|
1347 |
+
<?php
|
1348 |
+
$linkoptions = array(0=>__('No, everything is working', 'powerpress'),
|
1349 |
+
1=>__('Yes, please try to fix', 'powerpress'),
|
1350 |
+
2=>__('Yes, alternative fix', 'powerpress'),
|
1351 |
+
3=>__('Yes, excluding excerpts', 'powerpress'),
|
1352 |
+
4=>__('Yes, wp_head check', 'powerpress') );
|
1353 |
+
|
1354 |
+
foreach( $linkoptions as $value => $desc )
|
1355 |
+
echo "\t<option value=\"$value\"". ($General['player_aggressive']==$value?' selected':''). ">$desc</option>\n";
|
1356 |
+
|
1357 |
+
?>
|
1358 |
+
</select> <a href="http://create.blubrry.com/resources/powerpress/powerpress-settings/media-appearance/resolving-plugin-theme-conflict-issues/" target="_blank"><?php echo __('Learn More', 'powerpress'); ?></a>
|
1359 |
+
<p style="margin-top: 5px;">
|
1360 |
+
<?php echo __('Use this option if you are having problems with the players not appearing on some or all of your pages.', 'powerpress'); ?>
|
1361 |
+
</p>
|
1362 |
+
<?php if( !empty($General['advanced_mode_2']) ) { ?>
|
1363 |
+
<p style="margin-top: 20px; margin-bottom:0;">
|
1364 |
+
<?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 latest default WordPress theme (twentyfourteen). For plugins, disable them one by one until the player re-appears, which indicates the last plugin deactivated caused the conflict.', 'powerpress'); ?>
|
1365 |
+
</p>
|
1366 |
+
<?php } ?>
|
1367 |
+
</td>
|
1368 |
+
</tr>
|
1369 |
+
</table>
|
1370 |
+
|
1371 |
+
<?php if( !empty($General['advanced_mode_2']) ) { ?>
|
1372 |
+
<!-- start advanced features -->
|
1373 |
+
<div id="new_window_settings" style="display: <?php echo ( $General['player_function']==1 || $General['player_function']==3 ?'block':'none'); ?>">
|
1374 |
+
<h3><?php echo __('Play in New Window Settings', 'powerpress'); ?></h3>
|
1375 |
+
<table class="form-table">
|
1376 |
+
|
1377 |
+
<tr valign="top">
|
1378 |
+
<th scope="row">
|
1379 |
+
<?php echo __('New Window Width', 'powerpress'); ?>
|
1380 |
+
</th>
|
1381 |
+
<td>
|
1382 |
+
<input type="text" name="General[new_window_width]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo esc_attr($General['new_window_width']); ?>" maxlength="4" />
|
1383 |
+
<?php echo __('Width of new window (leave blank for 420 default)', 'powerpress'); ?>
|
1384 |
+
</td>
|
1385 |
+
</tr>
|
1386 |
+
|
1387 |
+
<tr valign="top">
|
1388 |
+
<th scope="row">
|
1389 |
+
<?php echo __('New Window Height', 'powerpress'); ?>
|
1390 |
+
</th>
|
1391 |
+
<td>
|
1392 |
+
<input type="text" name="General[new_window_height]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo esc_attr($General['new_window_height']); ?>" maxlength="4" />
|
1393 |
+
<?php echo __('Height of new window (leave blank for 240 default)', 'powerpress'); ?>
|
1394 |
+
</td>
|
1395 |
+
</tr>
|
1396 |
+
|
1397 |
+
<tr valign="top">
|
1398 |
+
<th scope="row">
|
1399 |
+
|
1400 |
+
</th>
|
1401 |
+
<td>
|
1402 |
+
|
1403 |
+
<p style="margin: 8px 0 0 0;">
|
1404 |
+
<label><input type="checkbox" name="General[new_window_nofactor]" value="1" <?php if( !empty($General['new_window_nofactor']) ) echo 'checked'; ?> /> <?php echo __('Do not factor in scroll bars', 'powerpress'); ?></label>
|
1405 |
+
</p>
|
1406 |
+
<div style="margin: 0 0 0 20px;"><?php echo __('By default, PowerPress adds to the width and height above to compensate for possible vertical and horizontal scroll bars. Check this option if you do not want PowerPress to compensate for browser scroll bars.', 'powerpress'); ?></div>
|
1407 |
+
</td>
|
1408 |
+
|
1409 |
+
</table>
|
1410 |
+
</div><!-- end new_window_settings -->
|
1411 |
+
|
1412 |
+
</div><!-- end presentation_settings in advanced mode -->
|
1413 |
+
<!-- end presentation settings -->
|
1414 |
+
<!-- end advanced features -->
|
1415 |
+
<?php } ?>
|
1416 |
+
<?php
|
1417 |
+
} // End powerpress_admin_appearance()
|
1418 |
+
|
1419 |
+
|
1420 |
+
function powerpressadmin_welcome($GeneralSettings)
|
1421 |
+
{
|
1422 |
+
?>
|
1423 |
+
<div>
|
1424 |
+
<div class="powerpress-welcome-news">
|
1425 |
+
<h2><?php echo __('Blubrry PowerPress and Community Podcast', 'powerpress'); ?></h2>
|
1426 |
+
<?php powerpressadmin_community_news(); ?>
|
1427 |
+
<p style="margin-bottom: 0; font-size: 85%;">
|
1428 |
+
<input type="checkbox" name="General[disable_dashboard_news]" value="1" <?php echo (empty($GeneralSettings['disable_dashboard_news'])?'':'checked'); ?> /> <?php echo __('Remove from dashboard', 'powerpress'); ?>
|
1429 |
+
</p>
|
1430 |
+
</div>
|
1431 |
+
<div class="powerpress-welcome-highlighted">
|
1432 |
+
<div>
|
1433 |
+
<h2><?php echo __('Highlighted Topics', 'powerpress'); ?></h2>
|
1434 |
+
<?php powerpressadmin_community_highlighted(); ?>
|
1435 |
+
</div>
|
1436 |
+
</div>
|
1437 |
+
<div class="clear"></div>
|
1438 |
+
</div>
|
1439 |
+
<?php
|
1440 |
+
} // End powerpressadmin_welcome()
|
1441 |
+
|
1442 |
+
function powerpressadmin_edit_funding($FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
|
1443 |
+
{
|
1444 |
+
if( !isset($FeedSettings['donate_link']) )
|
1445 |
+
$FeedSettings['donate_link'] = 0;
|
1446 |
+
if( !isset($FeedSettings['donate_url']) )
|
1447 |
+
$FeedSettings['donate_url'] = '';
|
1448 |
+
if( !isset($FeedSettings['donate_label']) )
|
1449 |
+
$FeedSettings['donate_label'] = '';
|
1450 |
+
?>
|
1451 |
+
<!-- Donate link and label -->
|
1452 |
+
<table class="form-table">
|
1453 |
+
<tr valign="top">
|
1454 |
+
<th scope="row">
|
1455 |
+
<?php echo __('Donate Link', 'powerpress'); ?> </th>
|
1456 |
+
<td>
|
1457 |
+
<p style="padding-top: 8px;"><label for="donate_link"><input type="checkbox" id="donate_link" name="Feed[donate_link]" value="1" <?php if( $FeedSettings['donate_link'] == 1 ) echo 'checked '; ?>/>
|
1458 |
+
<?php echo __('Syndicate a donate link with your podcast. Create your own croudfunding page with PayPal donate buttons, or link to a service such as Patreon.', 'powerpress'); ?></label></p>
|
1459 |
+
<ul>
|
1460 |
+
<li><label for="donate_url" style="width: 100px; display:inline-block; text-align: right;">Donate URL:</label> <input type="text" id="donate_url" value="<?php echo esc_attr($FeedSettings['donate_url']); ?>" name="Feed[donate_url]" style="width:50%; max-width: 300px;" />
|
1461 |
+
</li>
|
1462 |
+
<li><label for="donate_label" style="width: 100px; display:inline-block; text-align: right;">Donate label:</label> <input type="text" id="donate_label" value="<?php echo esc_attr($FeedSettings['donate_label']); ?>" name="Feed[donate_label]" style="width: 50%; max-width: 300px;" />
|
1463 |
+
<?php echo __('(optional)', 'powerpress'); ?>
|
1464 |
+
</li>
|
1465 |
+
</ul>
|
1466 |
+
<p><a href="http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/syndicating-a-donate-link-in-your-podcast/" target="_blank"><?php echo __('Learn more about syndicating donate links for podcasting', 'powerpress'); ?></a></p>
|
1467 |
+
</td>
|
1468 |
+
</tr>
|
1469 |
+
</table>
|
1470 |
+
<?php
|
1471 |
+
}
|
1472 |
+
|
1473 |
+
function powerpressadmin_edit_tv($FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
|
1474 |
+
{
|
1475 |
+
if( !isset($FeedSettings['parental_rating']) )
|
1476 |
+
$FeedSettings['parental_rating'] = '';
|
1477 |
+
|
1478 |
+
?>
|
1479 |
+
<h3><?php echo __('T.V. Settings', 'powerpress'); ?></h3>
|
1480 |
+
<table class="form-table">
|
1481 |
+
<tr valign="top">
|
1482 |
+
<th scope="row">
|
1483 |
+
<?php echo __('Parental Rating', 'powerpress'); ?> </th>
|
1484 |
+
<td>
|
1485 |
+
<p><?php echo sprintf(__('A parental rating is used to display your content on %s applications available on Internet connected TV\'s. The TV Parental Rating applies to both audio and video media.', 'powerpress'), '<strong><a href="http://www.blubrry.com/roku_blubrry/" target="_blank">Blubrry</a></strong>'); ?></p>
|
1486 |
+
<?php
|
1487 |
+
$Ratings = array(''=>__('No rating specified', 'powerpress'),
|
1488 |
+
'TV-Y'=>__('Children of all ages', 'powerpress'),
|
1489 |
+
'TV-Y7'=>__('Children 7 years and older', 'powerpress'),
|
1490 |
+
'TV-Y7-FV'=>__('Children 7 years and older [fantasy violence]', 'powerpress'),
|
1491 |
+
'TV-G'=>__('General audience', 'powerpress'),
|
1492 |
+
'TV-PG'=>__('Parental guidance suggested', 'powerpress'),
|
1493 |
+
'TV-14'=>__('May be unsuitable for children under 14 years of age', 'powerpress'),
|
1494 |
+
'TV-MA'=>__('Mature audience - may be unsuitable for children under 17', 'powerpress')
|
1495 |
+
);
|
1496 |
+
$RatingsTips = array(''=>'',
|
1497 |
+
'TV-Y'=>__('Whether animated or live-action, the themes and elements in this program are specifically designed for a very young audience, including children from ages 2-6. These programs are not expected to frighten younger children. Examples of programs issued this rating include Sesame Street, Barney & Friends, Dora the Explorer, Go, Diego, Go! and The Backyardigans.', 'powerpress'),
|
1498 |
+
'TV-Y7'=>__('These shows may or may not be appropriate for some children under the age of 7. This rating may include crude, suggestive humor, mild fantasy violence, or content considered too scary or controversial to be shown to children under seven. Examples include Foster\'s Home for Imaginary Friends, Johnny Test, and SpongeBob SquarePants.', 'powerpress'),
|
1499 |
+
'TV-Y7-FV'=>__('When a show has noticeably more fantasy violence, it is assigned the TV-Y7-FV rating. Action-adventure shows such Pokemon series and the Power Rangers series are assigned a TV-Y7-FV rating.', 'powerpress'),
|
1500 |
+
'TV-G'=>__('Although this rating does not signify a program designed specifically for children, most parents may let younger children watch this program unattended. It contains little or no violence, no strong language and little or no sexual dialogue or situation. Networks that air informational, how-to content, or generally inoffensive content.', 'powerpress'),
|
1501 |
+
'TV-PG'=>__('This rating signifies that the program may be unsuitable for younger children without the guidance of a parent. Many parents may want to watch it with their younger children. Various game shows and most reality shows are rated TV-PG for their suggestive dialog, suggestive humor, and/or coarse language. Some prime-time sitcoms such as Everybody Loves Raymond, Fresh Prince of Bel-Air, The Simpsons, Futurama, and Seinfeld usually air with a TV-PG rating.', 'powerpress'),
|
1502 |
+
'TV-14'=>__('Parents are strongly urged to exercise greater care in monitoring this program and are cautioned against letting children of any age watch unattended. This rating may be accompanied by any of the following sub-ratings:', 'powerpress'),
|
1503 |
+
'TV-MA'=>__('A TV-MA rating means the program may be unsuitable for those below 17. The program may contain extreme graphic violence, strong profanity, overtly sexual dialogue, very coarse language, nudity and/or strong sexual content. The Sopranos is a popular example.', 'powerpress')
|
1504 |
+
);
|
1505 |
+
|
1506 |
+
|
1507 |
+
foreach( $Ratings as $rating => $title )
|
1508 |
+
{
|
1509 |
+
$tip = $RatingsTips[ $rating ];
|
1510 |
+
?>
|
1511 |
+
<div style="margin-bottom: 10px;"><label><input type="radio" name="Feed[parental_rating]" value="<?php echo $rating; ?>" <?php if( $FeedSettings['parental_rating'] == $rating) echo 'checked'; ?> /> <?php if( $rating ) { ?><strong><?php echo $rating; ?></strong><?php } else { ?><strong><?php echo htmlspecialchars($title); ?></strong><?php } ?></label>
|
1512 |
+
<?php if( $rating ) { ?> <span style="margin-left: 8px;"><a href="#" class="powerpress-parental-rating-tip" id="rating_tip_<?php echo $rating; ?>"><?php echo htmlspecialchars($title); ?></a></span><?php } ?>
|
1513 |
+
<p style="margin: 5px 50px; display: none;" id="rating_tip_<?php echo $rating; ?>_p" class="powerpress-parental-rating-tip-p"><?php echo htmlspecialchars($tip); ?></p>
|
1514 |
+
</div>
|
1515 |
+
<?php
|
1516 |
+
}
|
1517 |
+
?>
|
1518 |
+
</td>
|
1519 |
+
</tr>
|
1520 |
+
</table>
|
1521 |
+
<?php
|
1522 |
+
}
|
1523 |
+
|
1524 |
+
function powerpressadmin_edit_artwork($FeedSettings, $General)
|
1525 |
+
{
|
1526 |
+
$SupportUploads = powerpressadmin_support_uploads();
|
1527 |
+
?>
|
1528 |
+
<h3><?php echo __('Artwork and Images', 'powerpress'); ?></h3>
|
1529 |
+
|
1530 |
+
<table class="form-table">
|
1531 |
+
<tr valign="top">
|
1532 |
+
<th scope="row">
|
1533 |
+
<?php echo __('iTunes Image', 'powerpress'); ?>
|
1534 |
+
<span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
|
1535 |
+
<?php echo powerpressadmin_updated( __('recommended size changed February, 2016', 'powerpress') ); ?>
|
1536 |
+
</th>
|
1537 |
+
<td>
|
1538 |
+
<input type="text" id="itunes_image" name="Feed[itunes_image]" style="width: 60%; margin-top: 10px;" value="<?php echo esc_attr( !empty($FeedSettings['itunes_image'])? $FeedSettings['itunes_image']:''); ?>" maxlength="255" />
|
1539 |
+
<a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
|
1540 |
+
|
1541 |
+
<p><?php echo __('iTunes image must be at least 1400 x 1400 pixels in .jpg or .png format. iTunes image must not exceed 3000 x 3000 pixels and must use RGB color space.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?>: http://example.com/images/itunes.jpg
|
1542 |
+
</p>
|
1543 |
+
|
1544 |
+
<p><strong><?php echo __('A square 3000 x 3000 pixel image in .jpg format is recommended.', 'powerpress'); ?></strong></p>
|
1545 |
+
|
1546 |
+
<p>
|
1547 |
+
<?php echo __('This image is for your listing on the Apple podcasts 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'); ?>
|
1548 |
+
</p>
|
1549 |
+
|
1550 |
+
<p class="description"><?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'); ?>
|
1551 |
+
<?php echo sprintf( __('Please contact %s if you are having issues with your image changes not appearing in iTunes.', 'powerpress'), '<a href="https://create.blubrry.com/manual/podcast-promotion/submit-podcast-to-itunes/itunes-support/">'. __('Apple Podcasts Support', 'powerpress') .'</a>'); ?></p>
|
1552 |
+
<?php if( $SupportUploads ) { ?>
|
1553 |
+
|
1554 |
+
<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>
|
1555 |
+
<span style="font-size:85%;">(<?php echo __('Using this option should update your image on iTunes within 24 hours', 'powerpress'); ?>)</span>
|
1556 |
+
</p>
|
1557 |
+
<div style="display:none" id="itunes_image_upload">
|
1558 |
+
<label for="itunes_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" id="itunes_image_file" name="itunes_image_file" /><br />
|
1559 |
+
<?php if( !empty($General['advanced_mode_2']) ) { ?>
|
1560 |
+
<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>
|
1561 |
+
<?php } else { ?>
|
1562 |
+
<input type="hidden" name="itunes_image_checkbox_as_rss" value="1" />
|
1563 |
+
<?php } ?>
|
1564 |
+
</div>
|
1565 |
+
<?php } ?>
|
1566 |
+
</td>
|
1567 |
+
</tr>
|
1568 |
+
</table>
|
1569 |
+
|
1570 |
+
|
1571 |
+
<?php if( !empty($General['advanced_mode_2']) ) { ?>
|
1572 |
+
<table class="form-table">
|
1573 |
+
<tr valign="top">
|
1574 |
+
<th scope="row">
|
1575 |
+
<?php echo __('iTunes Episode Image', 'powerpress'); ?></th>
|
1576 |
+
<td>
|
1577 |
+
|
1578 |
+
<p style="padding-top: 10px;"><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>
|
1579 |
+
<p><?php echo __('Use the program iTunes image above as your iTunes episode image.', 'powerpress'); ?></p>
|
1580 |
+
<p class="description"><?php echo __('NOTE: You must still save artwork into your media files to guarantee your artwork is displayed during playback.', 'powerpress'); ?></p>
|
1581 |
+
</td>
|
1582 |
+
</tr>
|
1583 |
+
|
1584 |
+
<table class="form-table">
|
1585 |
+
<tr valign="top">
|
1586 |
+
<th scope="row">
|
1587 |
+
<?php echo __('Google Play Image', 'powerpress'); ?>
|
1588 |
+
</th>
|
1589 |
+
<td>
|
1590 |
+
<input type="text" id="googleplay_image" name="Feed[googleplay_image]" style="width: 60%; margin-top: 10px;" value="<?php echo esc_attr( !empty($FeedSettings['googleplay_image'])? $FeedSettings['googleplay_image']:''); ?>" maxlength="255" />
|
1591 |
+
<a href="#" onclick="javascript: window.open( document.getElementById('googleplay_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
|
1592 |
+
|
1593 |
+
<p><?php echo __('Google Play image must be at least 1200 x 1200 pixels in .jpg or .png format to be eligible for featuring. Image must not exceed 7000 x 7000 pixels.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?>: http://example.com/images/googleplay.jpg
|
1594 |
+
</p>
|
1595 |
+
|
1596 |
+
<p><strong><?php echo __('Leave this setting blank to use the iTunes image (recommended).', 'powerpress'); ?></strong></p>
|
1597 |
+
|
1598 |
+
<?php if( $SupportUploads ) { ?>
|
1599 |
+
|
1600 |
+
<p><label class="powerpress-normal-font"><input name="googleplay_image_checkbox" type="checkbox" onchange="powerpress_show_field('googleplay_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?></label>
|
1601 |
+
<span style="font-size:85%;">(<?php echo __('Using this option should update your image on Google Play Music within 24 hours', 'powerpress'); ?>)</span>
|
1602 |
+
</p>
|
1603 |
+
<div style="display:none" id="googleplay_image_upload">
|
1604 |
+
<label for="googleplay_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" id="googleplay_image_file" name="googleplay_image_file" /><br />
|
1605 |
+
</div>
|
1606 |
+
<?php } ?>
|
1607 |
+
</td>
|
1608 |
+
</tr>
|
1609 |
+
|
1610 |
+
<tr valign="top">
|
1611 |
+
<th scope="row">
|
1612 |
+
<?php echo __('RSS2 Image', 'powerpress'); ?> <br />
|
1613 |
+
<span style="font-size: 85%; margin-left: 5px;"><?php echo __('Recommendation: Use iTunes image', 'powerpress'); ?></span>
|
1614 |
+
</th>
|
1615 |
+
<td>
|
1616 |
+
<input type="text" id="rss2_image" name="Feed[rss2_image]" style="width: 60%; margin-top: 10px;" value="<?php echo esc_attr( !empty($FeedSettings['rss2_image'])? $FeedSettings['rss2_image']:''); ?>" maxlength="255" />
|
1617 |
+
<a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
|
1618 |
+
|
1619 |
+
<p><?php echo __('Place the URL to the RSS image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> http://mysite.com/images/rss.jpg</p>
|
1620 |
+
|
1621 |
+
<!--
|
1622 |
+
<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>
|
1623 |
+
<p><strong><?php echo __('A square image that is 300 x 300 pixel or larger in .jpg format is recommended.', 'powerpress'); ?></strong></p>
|
1624 |
+
-->
|
1625 |
+
|
1626 |
+
<?php if( $SupportUploads ) { ?>
|
1627 |
+
<div id="rss_image_upload_container">
|
1628 |
+
<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>
|
1629 |
+
<div style="display:none" id="rss_image_upload">
|
1630 |
+
<label for="rss2_image"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="rss2_image_file" />
|
1631 |
+
</div>
|
1632 |
+
</div>
|
1633 |
+
<?php } ?>
|
1634 |
+
</td>
|
1635 |
+
</tr>
|
1636 |
+
</table>
|
1637 |
+
<?php
|
1638 |
+
}
|
1639 |
+
}
|
1640 |
+
|
1641 |
+
|
1642 |
+
function powerpressadmin_edit_destinations($FeedSettings, $General, $FeedAttribs)
|
1643 |
+
{
|
1644 |
+
require_once( dirname(__FILE__).'/views/settings_tab_destinations.php' );
|
1645 |
+
}
|
1646 |
+
|
powerpressadmin-dashboard.php
CHANGED
@@ -1,452 +1,455 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if( !function_exists('add_action') )
|
4 |
-
die("access denied.");
|
5 |
-
|
6 |
-
define('POWERPRESS_FEED_HIGHLIGHTED', 'http://www.powerpresspodcast.com/category/highlighted/feed/?order=ASC');
|
7 |
-
define('POWERPRESS_FEED_NEWS', 'http://www.powerpresspodcast.com/feed/');
|
8 |
-
|
9 |
-
function powerpress_get_news($feed_url, $limit=10)
|
10 |
-
{
|
11 |
-
include_once(ABSPATH . WPINC . '/feed.php');
|
12 |
-
$rss = fetch_feed( $feed_url );
|
13 |
-
|
14 |
-
// If feed doesn't work...
|
15 |
-
if ( is_wp_error($rss) )
|
16 |
-
{
|
17 |
-
require_once( ABSPATH . WPINC . '/class-feed.php' );
|
18 |
-
// Try fetching the feed using CURL directly...
|
19 |
-
$content = powerpress_remote_fopen($feed_url, false, array(), 3, false, true);
|
20 |
-
if( !$content ) {
|
21 |
-
return false;
|
22 |
-
}
|
23 |
-
// Load the content in a fetch_feed object...
|
24 |
-
$rss = new SimplePie();
|
25 |
-
|
26 |
-
$rss->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' );
|
27 |
-
// We must manually overwrite $feed->sanitize because SimplePie's
|
28 |
-
// constructor sets it before we have a chance to set the sanitization class
|
29 |
-
$rss->sanitize = new WP_SimplePie_Sanitize_KSES();
|
30 |
-
|
31 |
-
$rss->set_cache_class( 'WP_Feed_Cache' );
|
32 |
-
$rss->set_file_class( 'WP_SimplePie_File' );
|
33 |
-
$rss->set_raw_data($content);
|
34 |
-
$rss->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $feed_url ) );
|
35 |
-
do_action_ref_array( 'wp_feed_options', array( &$rss, $feed_url ) );
|
36 |
-
$rss->init();
|
37 |
-
$rss->set_output_encoding( get_option( 'blog_charset' ) );
|
38 |
-
$rss->handle_content_type();
|
39 |
-
|
40 |
-
if ( $rss->error() )
|
41 |
-
return false;
|
42 |
-
}
|
43 |
-
|
44 |
-
$rss_items = $rss->get_items( 0, $rss->get_item_quantity( $limit ) );
|
45 |
-
|
46 |
-
// If the feed was erroneously
|
47 |
-
if ( !$rss_items ) {
|
48 |
-
$md5 = md5( $feed_url ); // This is from simple-pie, look at member variable ->cache_name_function
|
49 |
-
delete_transient( 'feed_' . $md5 );
|
50 |
-
delete_transient( 'feed_mod_' . $md5 );
|
51 |
-
$rss->__destruct();
|
52 |
-
unset($rss);
|
53 |
-
$rss = fetch_feed( $feed_url );
|
54 |
-
$rss_items = $rss->get_items( 0, $rss->get_item_quantity( $num ) );
|
55 |
-
$rss->__destruct();
|
56 |
-
unset($rss);
|
57 |
-
}
|
58 |
-
|
59 |
-
return $rss_items;
|
60 |
-
}
|
61 |
-
|
62 |
-
|
63 |
-
function powerpress_dashboard_head()
|
64 |
-
{
|
65 |
-
echo "<script type=\"text/javascript\" src=\"". powerpress_get_root_url() ."player.min.js\"></script>\n";
|
66 |
-
?>
|
67 |
-
<style type="text/css">
|
68 |
-
#blubrry_stats_summary {
|
69 |
-
|
70 |
-
}
|
71 |
-
#blubrry_stats_summary label {
|
72 |
-
width: 40%;
|
73 |
-
max-width: 150px;
|
74 |
-
float: left;
|
75 |
-
}
|
76 |
-
#blubrry_stats_summary h2 {
|
77 |
-
font-size: 14px;
|
78 |
-
margin: 0;
|
79 |
-
padding: 0;
|
80 |
-
}
|
81 |
-
.blubrry_stats_ul {
|
82 |
-
padding-left: 20px;
|
83 |
-
margin-top: 5px;
|
84 |
-
margin-bottom: 10px;
|
85 |
-
}
|
86 |
-
.blubrry_stats_ul li {
|
87 |
-
list-style-type: none;
|
88 |
-
margin: 0px;
|
89 |
-
padding: 0px;
|
90 |
-
}
|
91 |
-
#blubrry_stats_media {
|
92 |
-
display: none;
|
93 |
-
}
|
94 |
-
#blubrry_stats_media_show {
|
95 |
-
text-align: right;
|
96 |
-
font-size: 85%;
|
97 |
-
}
|
98 |
-
#blubrry_stats_media h4 {
|
99 |
-
margin-bottom: 10px;
|
100 |
-
}
|
101 |
-
.blubrry_stats_title {
|
102 |
-
margin-left: 10px;
|
103 |
-
}
|
104 |
-
.blubrry_stats_updated {
|
105 |
-
font-size: 80%;
|
106 |
-
}
|
107 |
-
.powerpress-news-dashboard {
|
108 |
-
/* background-image:url(http://images.blubrry.com/powerpress/blubrry_logo.png);
|
109 |
-
background-repeat: no-repeat;
|
110 |
-
background-position: top right; */
|
111 |
-
}
|
112 |
-
.powerpress-news-dashboard .powerpressNewsPlayer {
|
113 |
-
margin-top: 5px;
|
114 |
-
}
|
115 |
-
</style>
|
116 |
-
<script type="text/javascript"><!--
|
117 |
-
jQuery(document).ready(function($) {
|
118 |
-
jQuery('.powerpress-dashboard-notice').click( function(e) {
|
119 |
-
e.preventDefault();
|
120 |
-
var dash_id = jQuery(this).parents('.postbox').attr('id');
|
121 |
-
jQuery( '#' + dash_id + '-hide' ).prop('checked', false).triggerHandler('click');
|
122 |
-
|
123 |
-
jQuery.ajax( {
|
124 |
-
type: 'POST',
|
125 |
-
url: '<?php echo admin_url(); ?>admin-ajax.php',
|
126 |
-
data: { action: 'powerpress_dashboard_dismiss', dismiss_dash_id : dash_id },
|
127 |
-
success: function(response) {
|
128 |
-
}
|
129 |
-
});
|
130 |
-
});
|
131 |
-
});
|
132 |
-
// --></script>
|
133 |
-
<?php
|
134 |
-
}
|
135 |
-
|
136 |
-
function powerpress_dashboard_stats_content()
|
137 |
-
{
|
138 |
-
$Settings = get_option('powerpress_general');
|
139 |
-
|
140 |
-
if( !empty($Settings['disable_dashboard_stats']) )
|
141 |
-
return; // Lets not do anythign to the dashboard for PowerPress Statistics
|
142 |
-
|
143 |
-
// If using user capabilities...
|
144 |
-
if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
|
145 |
-
return;
|
146 |
-
|
147 |
-
$content = '';
|
148 |
-
$UserPass = ( !empty($Settings['blubrry_auth']) ? $Settings['blubrry_auth']:'');
|
149 |
-
$Keyword = ( !empty($Settings['blubrry_program_keyword']) ? $Settings['blubrry_program_keyword']:'');
|
150 |
-
$StatsCached = get_option('powerpress_stats');
|
151 |
-
if( empty($StatsCached) )
|
152 |
-
$StatsCached = array();
|
153 |
-
if( !empty($StatsCached['content']) )
|
154 |
-
$content = $StatsCached['content'];
|
155 |
-
if( empty($StatsCached['updated']) )
|
156 |
-
$StatsCached['updated'] = 1; // Some time
|
157 |
-
|
158 |
-
// If no content or it's been over 3 hours...
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
$
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
if( $StatsCached['retry_count']
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
$content
|
204 |
-
|
205 |
-
'<a href="http://create.blubrry.com/resources/
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
}
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
if( !
|
290 |
-
return;
|
291 |
-
|
292 |
-
$
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
if( !empty($Settings['
|
300 |
-
$
|
301 |
-
|
302 |
-
if( !empty($Settings['
|
303 |
-
$
|
304 |
-
|
305 |
-
$
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
if(
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
if(
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
if( !
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
$
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
$
|
444 |
-
if(
|
445 |
-
|
446 |
-
$DismissedNotices
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
|
|
|
|
|
|
452 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( !function_exists('add_action') )
|
4 |
+
die("access denied.");
|
5 |
+
|
6 |
+
define('POWERPRESS_FEED_HIGHLIGHTED', 'http://www.powerpresspodcast.com/category/highlighted/feed/?order=ASC');
|
7 |
+
define('POWERPRESS_FEED_NEWS', 'http://www.powerpresspodcast.com/feed/');
|
8 |
+
|
9 |
+
function powerpress_get_news($feed_url, $limit=10)
|
10 |
+
{
|
11 |
+
include_once(ABSPATH . WPINC . '/feed.php');
|
12 |
+
$rss = fetch_feed( $feed_url );
|
13 |
+
|
14 |
+
// If feed doesn't work...
|
15 |
+
if ( is_wp_error($rss) )
|
16 |
+
{
|
17 |
+
require_once( ABSPATH . WPINC . '/class-feed.php' );
|
18 |
+
// Try fetching the feed using CURL directly...
|
19 |
+
$content = powerpress_remote_fopen($feed_url, false, array(), 3, false, true);
|
20 |
+
if( !$content ) {
|
21 |
+
return false;
|
22 |
+
}
|
23 |
+
// Load the content in a fetch_feed object...
|
24 |
+
$rss = new SimplePie();
|
25 |
+
|
26 |
+
$rss->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' );
|
27 |
+
// We must manually overwrite $feed->sanitize because SimplePie's
|
28 |
+
// constructor sets it before we have a chance to set the sanitization class
|
29 |
+
$rss->sanitize = new WP_SimplePie_Sanitize_KSES();
|
30 |
+
|
31 |
+
$rss->set_cache_class( 'WP_Feed_Cache' );
|
32 |
+
$rss->set_file_class( 'WP_SimplePie_File' );
|
33 |
+
$rss->set_raw_data($content);
|
34 |
+
$rss->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $feed_url ) );
|
35 |
+
do_action_ref_array( 'wp_feed_options', array( &$rss, $feed_url ) );
|
36 |
+
$rss->init();
|
37 |
+
$rss->set_output_encoding( get_option( 'blog_charset' ) );
|
38 |
+
$rss->handle_content_type();
|
39 |
+
|
40 |
+
if ( $rss->error() )
|
41 |
+
return false;
|
42 |
+
}
|
43 |
+
|
44 |
+
$rss_items = $rss->get_items( 0, $rss->get_item_quantity( $limit ) );
|
45 |
+
|
46 |
+
// If the feed was erroneously
|
47 |
+
if ( !$rss_items ) {
|
48 |
+
$md5 = md5( $feed_url ); // This is from simple-pie, look at member variable ->cache_name_function
|
49 |
+
delete_transient( 'feed_' . $md5 );
|
50 |
+
delete_transient( 'feed_mod_' . $md5 );
|
51 |
+
$rss->__destruct();
|
52 |
+
unset($rss);
|
53 |
+
$rss = fetch_feed( $feed_url );
|
54 |
+
$rss_items = $rss->get_items( 0, $rss->get_item_quantity( $num ) );
|
55 |
+
$rss->__destruct();
|
56 |
+
unset($rss);
|
57 |
+
}
|
58 |
+
|
59 |
+
return $rss_items;
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
function powerpress_dashboard_head()
|
64 |
+
{
|
65 |
+
echo "<script type=\"text/javascript\" src=\"". powerpress_get_root_url() ."player.min.js\"></script>\n";
|
66 |
+
?>
|
67 |
+
<style type="text/css">
|
68 |
+
#blubrry_stats_summary {
|
69 |
+
|
70 |
+
}
|
71 |
+
#blubrry_stats_summary label {
|
72 |
+
width: 40%;
|
73 |
+
max-width: 150px;
|
74 |
+
float: left;
|
75 |
+
}
|
76 |
+
#blubrry_stats_summary h2 {
|
77 |
+
font-size: 14px;
|
78 |
+
margin: 0;
|
79 |
+
padding: 0;
|
80 |
+
}
|
81 |
+
.blubrry_stats_ul {
|
82 |
+
padding-left: 20px;
|
83 |
+
margin-top: 5px;
|
84 |
+
margin-bottom: 10px;
|
85 |
+
}
|
86 |
+
.blubrry_stats_ul li {
|
87 |
+
list-style-type: none;
|
88 |
+
margin: 0px;
|
89 |
+
padding: 0px;
|
90 |
+
}
|
91 |
+
#blubrry_stats_media {
|
92 |
+
display: none;
|
93 |
+
}
|
94 |
+
#blubrry_stats_media_show {
|
95 |
+
text-align: right;
|
96 |
+
font-size: 85%;
|
97 |
+
}
|
98 |
+
#blubrry_stats_media h4 {
|
99 |
+
margin-bottom: 10px;
|
100 |
+
}
|
101 |
+
.blubrry_stats_title {
|
102 |
+
margin-left: 10px;
|
103 |
+
}
|
104 |
+
.blubrry_stats_updated {
|
105 |
+
font-size: 80%;
|
106 |
+
}
|
107 |
+
.powerpress-news-dashboard {
|
108 |
+
/* background-image:url(http://images.blubrry.com/powerpress/blubrry_logo.png);
|
109 |
+
background-repeat: no-repeat;
|
110 |
+
background-position: top right; */
|
111 |
+
}
|
112 |
+
.powerpress-news-dashboard .powerpressNewsPlayer {
|
113 |
+
margin-top: 5px;
|
114 |
+
}
|
115 |
+
</style>
|
116 |
+
<script type="text/javascript"><!--
|
117 |
+
jQuery(document).ready(function($) {
|
118 |
+
jQuery('.powerpress-dashboard-notice').click( function(e) {
|
119 |
+
e.preventDefault();
|
120 |
+
var dash_id = jQuery(this).parents('.postbox').attr('id');
|
121 |
+
jQuery( '#' + dash_id + '-hide' ).prop('checked', false).triggerHandler('click');
|
122 |
+
|
123 |
+
jQuery.ajax( {
|
124 |
+
type: 'POST',
|
125 |
+
url: '<?php echo admin_url(); ?>admin-ajax.php',
|
126 |
+
data: { action: 'powerpress_dashboard_dismiss', dismiss_dash_id : dash_id },
|
127 |
+
success: function(response) {
|
128 |
+
}
|
129 |
+
});
|
130 |
+
});
|
131 |
+
});
|
132 |
+
// --></script>
|
133 |
+
<?php
|
134 |
+
}
|
135 |
+
|
136 |
+
function powerpress_dashboard_stats_content()
|
137 |
+
{
|
138 |
+
$Settings = get_option('powerpress_general');
|
139 |
+
|
140 |
+
if( !empty($Settings['disable_dashboard_stats']) )
|
141 |
+
return; // Lets not do anythign to the dashboard for PowerPress Statistics
|
142 |
+
|
143 |
+
// If using user capabilities...
|
144 |
+
if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
|
145 |
+
return;
|
146 |
+
|
147 |
+
$content = '';
|
148 |
+
$UserPass = ( !empty($Settings['blubrry_auth']) ? $Settings['blubrry_auth']:'');
|
149 |
+
$Keyword = ( !empty($Settings['blubrry_program_keyword']) ? $Settings['blubrry_program_keyword']:'');
|
150 |
+
$StatsCached = get_option('powerpress_stats');
|
151 |
+
if( empty($StatsCached) )
|
152 |
+
$StatsCached = array();
|
153 |
+
if( !empty($StatsCached['content']) )
|
154 |
+
$content = $StatsCached['content'];
|
155 |
+
if( empty($StatsCached['updated']) )
|
156 |
+
$StatsCached['updated'] = 1; // Some time
|
157 |
+
|
158 |
+
// If no content or it's been over 3 hours...
|
159 |
+
if( !empty($Settings['network_mode']) ) {
|
160 |
+
$content = 'Network mode is enabled, please visit the <a href="https://stats.blubrry.com/" target="_blank">Blubrry.com</a> to see your statistics';
|
161 |
+
}
|
162 |
+
else if( $UserPass && time() > ($StatsCached['updated']+(60*60*3)) )
|
163 |
+
{
|
164 |
+
$success = false;
|
165 |
+
$api_url_array = powerpress_get_api_array();
|
166 |
+
foreach( $api_url_array as $index=> $api_url )
|
167 |
+
{
|
168 |
+
$req_url = sprintf('%s/stats/%s/summary.html?nobody=1', rtrim($api_url, '/'), $Keyword);
|
169 |
+
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
|
170 |
+
|
171 |
+
$new_content = powerpress_remote_fopen($req_url, $UserPass, array(), 2); // Only give this 2 seconds to return results
|
172 |
+
if( !$new_content && $api_url == 'https://api.blubrry.com/' ) { // Lets force cURL and see if that helps...
|
173 |
+
$new_content = powerpress_remote_fopen($req_url, $UserPass, array(), 2, false, true); // Only give this 2 seconds to return results
|
174 |
+
}
|
175 |
+
|
176 |
+
if( $new_content )
|
177 |
+
{
|
178 |
+
update_option('powerpress_stats', array('updated'=>time(), 'content'=>$new_content) );
|
179 |
+
$content = $new_content;
|
180 |
+
$success = true;
|
181 |
+
break;
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
if( $success == false )
|
186 |
+
{
|
187 |
+
if( empty($StatsCached['retry_count']) )
|
188 |
+
$StatsCached['retry_count'] = 1;
|
189 |
+
else if( $StatsCached['retry_count'] < 24 )
|
190 |
+
$StatsCached['retry_count']++;
|
191 |
+
|
192 |
+
if( $StatsCached['retry_count'] > 12 ) // After 36 hours, if we keep failing to authenticate then lets clear the data and display the authentication notice.
|
193 |
+
{
|
194 |
+
$content = '';
|
195 |
+
}
|
196 |
+
// Update the updated flag so it will not try again for 3 hours...
|
197 |
+
update_option('powerpress_stats', array('updated'=>time(), 'content'=>$content, 'retry_count'=>$StatsCached['retry_count'] ) );
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
if( !$UserPass )
|
202 |
+
{
|
203 |
+
$content = sprintf('<p>'. __('Wait a sec! This feature is only available to Blubrry Podcast Community members. Join our community to get %s and access to other valuable %s.', 'powerpress') .'</p>',
|
204 |
+
'<a href="http://create.blubrry.com/resources/podcast-media-download-statistics/basic-statistics/" target="_blank">'. __('Free Podcast Statistics') . '</a>',
|
205 |
+
'<a href="http://create.blubrry.com/resources/" target="_blank">'. __('Services', 'powerpress') . '</a>' );
|
206 |
+
$content .= ' ';
|
207 |
+
$content .= sprintf('<p>'. __('Our %s integrated PowerPress makes podcast publishing simple. Check out the %s on our exciting three-step publishing system!', 'powerpress') .'</p>',
|
208 |
+
'<a href="http://create.blubrry.com/resources/podcast-media-hosting/" target="_blank">'. __('Podcast Hosting', 'powerpress') .'</a>',
|
209 |
+
'<a href="http://create.blubrry.com/resources/powerpress/using-powerpress/blubrry-hosting-with-powerpress/" target="_blank">'. __('Video', 'powerpress') .'</a>' );
|
210 |
+
}
|
211 |
+
else if( empty($content) )
|
212 |
+
{
|
213 |
+
$content = sprintf(__('Error: A network or authentication error occurred. To verify your account, click the link "click here to configure Blubrry Statistics and Hosting services" found in the %s tab.', 'powerpress'), '<a href="'. admin_url("admin.php?page=powerpressadmin_basic") .'#tab2">'.__('Services & Statistics'.'</a>', 'powerpress') );
|
214 |
+
}
|
215 |
+
|
216 |
+
?>
|
217 |
+
<div>
|
218 |
+
<?php
|
219 |
+
echo $content;
|
220 |
+
|
221 |
+
if( $UserPass && empty($Settings['network_mode']) )
|
222 |
+
{
|
223 |
+
?>
|
224 |
+
<div id="blubrry_stats_media_show">
|
225 |
+
<a href="<?php echo admin_url('admin.php'); ?>?action=powerpress-jquery-stats&KeepThis=true&TB_iframe=true&modal=false" title="<?php echo __('Blubrry Media statistics', 'powerpress'); ?>" class="thickbox"><?php echo __('more', 'powerpress'); ?></a>
|
226 |
+
</div>
|
227 |
+
<?php } ?>
|
228 |
+
</div>
|
229 |
+
<?php
|
230 |
+
}
|
231 |
+
|
232 |
+
|
233 |
+
function powerpress_dashboard_news_content()
|
234 |
+
{
|
235 |
+
$Settings = get_option('powerpress_general');
|
236 |
+
|
237 |
+
if( isset($Settings['disable_dashboard_news']) && $Settings['disable_dashboard_news'] == 1 )
|
238 |
+
return; // Lets not do anything to the dashboard for PowerPress News
|
239 |
+
|
240 |
+
powerpressadmin_community_news();
|
241 |
+
}
|
242 |
+
|
243 |
+
function powerpress_dashboard_notice_1_content()
|
244 |
+
{
|
245 |
+
$DismissedNotices = get_option('powerpress_dismissed_notices');
|
246 |
+
|
247 |
+
if( !empty($DismissedNotices[1]) )
|
248 |
+
return; // Lets not do anything to the dashboard for PowerPress Notice
|
249 |
+
|
250 |
+
$message = '<p>'. __('Apple iTunes podcast specifications for show artwork have changed! Your iTunes image should now be 1400 x 1400 in jpg format.', 'powerpress') .'</p>';
|
251 |
+
$message .= '<p><a href="http://www.powerpresspodcast.com/2012/05/10/itunes-podcasting-specifications-changed-may-2012-what-that-means-for-podcasting/" target="_blank">'. __('Learn more about iTunes podcasting changes', 'powerpress') .'</a></p>';
|
252 |
+
|
253 |
+
powerpress_dashboard_notice_message(1, $message );
|
254 |
+
}
|
255 |
+
|
256 |
+
function powerpress_dashboard_notice_2_content()
|
257 |
+
{
|
258 |
+
$DismissedNotices = get_option('powerpress_dismissed_notices');
|
259 |
+
|
260 |
+
if( !empty($DismissedNotices[2]) )
|
261 |
+
return; // Lets not do anything to the dashboard for PowerPress Notice
|
262 |
+
|
263 |
+
$message = '<p>'. __('Due to concerns of possible security exploits, the 1 Pixel Out Audio Player has been removed from PowerPress.', 'powerpress') .'<br />';
|
264 |
+
$message .= '<a href="http://blog.blubrry.com/?p=1163" target="_blank">'. __("Learn More", "powerpress") .'</a></p>';
|
265 |
+
|
266 |
+
powerpress_dashboard_notice_message(2, $message );
|
267 |
+
}
|
268 |
+
|
269 |
+
function powerpress_dashboard_notice_message($notice_id, $message)
|
270 |
+
{
|
271 |
+
echo $message;
|
272 |
+
// Add link to remove this notice.
|
273 |
+
echo '<p><a href="#" id="powerpress_dashboard_notice_'. $notice_id .'_dismiss" class="powerpress-dashboard-notice">'. __('Dismiss', 'powerpress') .'</a></p>';
|
274 |
+
}
|
275 |
+
|
276 |
+
|
277 |
+
function powerpress_feed_text_limit( $text, $limit, $finish = '…') {
|
278 |
+
if( strlen( $text ) > $limit ) {
|
279 |
+
//$text = (function_exists('mb_substr')?mb_substr($text, 0, $limit):substr($text, 0, $limit) );
|
280 |
+
$text = substr( $text, 0, $limit );
|
281 |
+
$text = substr( $text, 0, - ( strlen( strrchr( $text,' ') ) ) );
|
282 |
+
$text .= $finish;
|
283 |
+
}
|
284 |
+
return $text;
|
285 |
+
}
|
286 |
+
|
287 |
+
function powerpress_dashboard_setup()
|
288 |
+
{
|
289 |
+
if( !function_exists('wp_add_dashboard_widget') )
|
290 |
+
return; // We are not in the dashboard!
|
291 |
+
|
292 |
+
if( !empty($_GET['powerpressdash']) && $_GET['powerpressdash'] == 1 )
|
293 |
+
return;
|
294 |
+
|
295 |
+
$Settings = get_option('powerpress_general');
|
296 |
+
$StatsDashboard = true;
|
297 |
+
$NewsDashboard = true;
|
298 |
+
|
299 |
+
if( !empty($Settings['disable_dashboard_stats']) )
|
300 |
+
$StatsDashboard = false; // Lets not do anything to the dashboard for PowerPress Statistics
|
301 |
+
|
302 |
+
if( !empty($Settings['disable_dashboard_news']) )
|
303 |
+
$NewsDashboard = false; // Lets not do anything to the dashboard for PowerPress News
|
304 |
+
|
305 |
+
if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
|
306 |
+
$StatsDashboard = false;
|
307 |
+
|
308 |
+
$user = wp_get_current_user();
|
309 |
+
|
310 |
+
if( !empty($_GET['powerpressdash']) && $_GET['powerpressdash'] == 2 ) {
|
311 |
+
return;
|
312 |
+
}
|
313 |
+
|
314 |
+
if( $NewsDashboard )
|
315 |
+
wp_add_dashboard_widget( 'powerpress_dashboard_news', __( 'Blubrry PowerPress & Community Podcast', 'powerpress'), 'powerpress_dashboard_news_content' );
|
316 |
+
|
317 |
+
if( !empty($_GET['powerpressdash']) && $_GET['powerpressdash'] == 3 ) {
|
318 |
+
return;
|
319 |
+
}
|
320 |
+
|
321 |
+
if( $StatsDashboard )
|
322 |
+
wp_add_dashboard_widget( 'powerpress_dashboard_stats', __( 'Blubrry Podcast Statistics', 'powerpress'), 'powerpress_dashboard_stats_content' );
|
323 |
+
|
324 |
+
if( !empty($_GET['powerpressdash']) && $_GET['powerpressdash'] == 4 ) {
|
325 |
+
return;
|
326 |
+
}
|
327 |
+
|
328 |
+
if( !empty( $user ) ) {
|
329 |
+
$user_options = get_user_option('powerpress_user');
|
330 |
+
if( empty($user_options) || empty($user_options['dashboard_installed']) || $user_options['dashboard_installed'] < 2 )
|
331 |
+
{
|
332 |
+
if( !is_array($user_options) )
|
333 |
+
$user_options = array();
|
334 |
+
|
335 |
+
if( !empty($_GET['powerpressdash']) && $_GET['powerpressdash'] == 5 ) {
|
336 |
+
return;
|
337 |
+
}
|
338 |
+
|
339 |
+
// First time we've seen this setting, so must be first time we've added the widgets, lets stack them at the top for convenience.
|
340 |
+
powerpressadmin_add_dashboard_widgets($user->ID);
|
341 |
+
$user_options['dashboard_installed'] = 2; // version of PowerPress
|
342 |
+
update_user_option($user->ID, "powerpress_user", $user_options, true);
|
343 |
+
}
|
344 |
+
else
|
345 |
+
{
|
346 |
+
if( !empty($_GET['powerpressdash']) && $_GET['powerpressdash'] == 6 ) {
|
347 |
+
return;
|
348 |
+
}
|
349 |
+
|
350 |
+
powerpressadmin_add_dashboard_widgets(false);
|
351 |
+
}
|
352 |
+
}
|
353 |
+
}
|
354 |
+
|
355 |
+
function powerpressadmin_add_dashboard_notice_widget($user_id, $notice_id)
|
356 |
+
{
|
357 |
+
$user_options = get_user_option('meta-box-order_dashboard', $user_id);
|
358 |
+
if( $user_options )
|
359 |
+
{
|
360 |
+
$save = false;
|
361 |
+
if( !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['normal']) && !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['side']) && !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['column3']) && !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['column4']) )
|
362 |
+
{
|
363 |
+
$save = true;
|
364 |
+
$user_options['normal'] = 'powerpress_dashboard_notice_'.$notice_id.','.$user_options['normal'];
|
365 |
+
}
|
366 |
+
|
367 |
+
if( $save )
|
368 |
+
{
|
369 |
+
update_user_option($user_id, "meta-box-order_dashboard", $user_options, true);
|
370 |
+
}
|
371 |
+
}
|
372 |
+
}
|
373 |
+
|
374 |
+
function powerpressadmin_add_dashboard_widgets( $check_user_id = false)
|
375 |
+
{
|
376 |
+
// Only re-order the powerpress widgets if they aren't already on the dashboard:
|
377 |
+
if( $check_user_id )
|
378 |
+
{
|
379 |
+
$user_options = get_user_option('meta-box-order_dashboard', $check_user_id);
|
380 |
+
if( $user_options )
|
381 |
+
{
|
382 |
+
$save = false;
|
383 |
+
if( !preg_match('/powerpress_dashboard_stats/', $user_options['normal']) && !preg_match('/powerpress_dashboard_stats/', $user_options['side']) && !preg_match('/powerpress_dashboard_stats/', $user_options['column3']) && !preg_match('/powerpress_dashboard_stats/', $user_options['column4']) )
|
384 |
+
{
|
385 |
+
$save = true;
|
386 |
+
if( !empty($user_options['side']) )
|
387 |
+
$user_options['side'] = 'powerpress_dashboard_stats,'.$user_options['side'];
|
388 |
+
else
|
389 |
+
$user_options['normal'] = 'powerpress_dashboard_stats,'.$user_options['normal'];
|
390 |
+
}
|
391 |
+
|
392 |
+
if( !preg_match('/powerpress_dashboard_news/', $user_options['normal']) && !preg_match('/powerpress_dashboard_news/', $user_options['side']) && !preg_match('/powerpress_dashboard_news/', $user_options['column3']) && !preg_match('/powerpress_dashboard_news/', $user_options['column4']) )
|
393 |
+
{
|
394 |
+
$save = true;
|
395 |
+
$user_options['normal'] = 'powerpress_dashboard_news,'.$user_options['normal'];
|
396 |
+
}
|
397 |
+
|
398 |
+
if( $save )
|
399 |
+
{
|
400 |
+
update_user_option($check_user_id, "meta-box-order_dashboard", $user_options, true);
|
401 |
+
}
|
402 |
+
}
|
403 |
+
}
|
404 |
+
|
405 |
+
// Reorder for all future users
|
406 |
+
global $wp_meta_boxes;
|
407 |
+
$dashboard_current = $wp_meta_boxes['dashboard']['normal']['core'];
|
408 |
+
|
409 |
+
$dashboard_powerpress = array();
|
410 |
+
for( $i = 0; $i < 20; $i++ )
|
411 |
+
{
|
412 |
+
if( isset( $dashboard_current['powerpress_dashboard_notice_' . $i] ) )
|
413 |
+
{
|
414 |
+
$dashboard_powerpress['powerpress_dashboard_notice_' . $i] = $dashboard_current['powerpress_dashboard_notice_' . $i];
|
415 |
+
unset($dashboard_current['powerpress_dashboard_notice_' . $i]);
|
416 |
+
}
|
417 |
+
}
|
418 |
+
|
419 |
+
if( isset( $dashboard_current['powerpress_dashboard_news'] ) )
|
420 |
+
{
|
421 |
+
$dashboard_powerpress['powerpress_dashboard_news'] = $dashboard_current['powerpress_dashboard_news'];
|
422 |
+
unset($dashboard_current['powerpress_dashboard_news']);
|
423 |
+
}
|
424 |
+
|
425 |
+
if( isset( $dashboard_current['powerpress_dashboard_stats'] ) )
|
426 |
+
{
|
427 |
+
$dashboard_powerpress['powerpress_dashboard_stats'] = $dashboard_current['powerpress_dashboard_stats'];
|
428 |
+
unset($dashboard_current['powerpress_dashboard_stats']);
|
429 |
+
}
|
430 |
+
|
431 |
+
if( count($dashboard_powerpress) > 0 )
|
432 |
+
{
|
433 |
+
$wp_meta_boxes['dashboard']['normal']['core'] = array_merge($dashboard_powerpress, $dashboard_current);
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
add_action('admin_head-index.php', 'powerpress_dashboard_head');
|
438 |
+
add_action('wp_dashboard_setup', 'powerpress_dashboard_setup');
|
439 |
+
|
440 |
+
function powerpress_dashboard_dismiss() // Called by AJAX call
|
441 |
+
{
|
442 |
+
$dismiss_dash_id = $_POST['dismiss_dash_id'];
|
443 |
+
preg_match('/^powerpress_dashboard_notice_(.*)$/i', $dismiss_dash_id, $match );
|
444 |
+
if( empty($match[1]) )
|
445 |
+
exit;
|
446 |
+
$DismissedNotices = get_option('powerpress_dismissed_notices');
|
447 |
+
if( !is_array($DismissedNotices) )
|
448 |
+
$DismissedNotices = array();
|
449 |
+
$DismissedNotices[ $match[1] ] = 1;
|
450 |
+
update_option('powerpress_dismissed_notices', $DismissedNotices);
|
451 |
+
echo 'ok';
|
452 |
+
exit;
|
453 |
+
}
|
454 |
+
|
455 |
?>
|
powerpressadmin-editfeed.php
CHANGED
@@ -1,1198 +1,1378 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if( !function_exists('add_action') )
|
4 |
-
die("access denied.");
|
5 |
-
|
6 |
-
function powerpress_languages()
|
7 |
-
{
|
8 |
-
// List copied from PodPress:
|
9 |
-
$langs = array();
|
10 |
-
$langs['af'] = __('Afrikaans', 'powerpress');
|
11 |
-
$langs['sq'] = __('Albanian', 'powerpress');
|
12 |
-
$langs['ar'] = __('Arabic', 'powerpress');
|
13 |
-
$langs['ar-sa'] = __('Arabic (Saudi Arabia)', 'powerpress');
|
14 |
-
$langs['ar-eg'] = __('Arabic (Egypt)', 'powerpress');
|
15 |
-
$langs['ar-dz'] = __('Arabic (Algeria)', 'powerpress');
|
16 |
-
$langs['ar-tn'] = __('Arabic (Tunisia)', 'powerpress');
|
17 |
-
$langs['ar-ye'] = __('Arabic (Yemen)', 'powerpress');
|
18 |
-
$langs['ar-jo'] = __('Arabic (Jordan)', 'powerpress');
|
19 |
-
$langs['ar-kw'] = __('Arabic (Kuwait)', 'powerpress');
|
20 |
-
$langs['ar-bh'] = __('Arabic (Bahrain)', 'powerpress');
|
21 |
-
$langs['eu'] = __('Basque', 'powerpress');
|
22 |
-
$langs['be'] = __('Belarusian', 'powerpress');
|
23 |
-
$langs['bg'] = __('Bulgarian', 'powerpress');
|
24 |
-
$langs['ca'] = __('Catalan', 'powerpress');
|
25 |
-
$langs['zh-cn'] = __('Chinese (Simplified)', 'powerpress');
|
26 |
-
$langs['zh-tw'] = __('Chinese (Traditional)', 'powerpress');
|
27 |
-
$langs['hr'] = __('Croatian', 'powerpress');
|
28 |
-
$langs['cs'] = __('Czech', 'powerpress');
|
29 |
-
$langs['
|
30 |
-
$langs['
|
31 |
-
$langs['nl
|
32 |
-
$langs['nl-
|
33 |
-
$langs['
|
34 |
-
$langs['en
|
35 |
-
$langs['en-
|
36 |
-
$langs['en-
|
37 |
-
$langs['en-
|
38 |
-
$langs['en-
|
39 |
-
$langs['en-
|
40 |
-
$langs['en-
|
41 |
-
$langs['en-
|
42 |
-
$langs['en-
|
43 |
-
$langs['en-
|
44 |
-
$langs['en-
|
45 |
-
$langs['en-
|
46 |
-
$langs['
|
47 |
-
$langs['
|
48 |
-
$langs['
|
49 |
-
$langs['
|
50 |
-
$langs['fr
|
51 |
-
$langs['fr-
|
52 |
-
$langs['fr-
|
53 |
-
$langs['fr-
|
54 |
-
$langs['fr-
|
55 |
-
$langs['fr-
|
56 |
-
$langs['
|
57 |
-
$langs['
|
58 |
-
$langs['
|
59 |
-
$langs['de
|
60 |
-
$langs['de-
|
61 |
-
$langs['de-
|
62 |
-
$langs['de-
|
63 |
-
$langs['de-
|
64 |
-
$langs['
|
65 |
-
$langs['
|
66 |
-
$langs['
|
67 |
-
$langs['
|
68 |
-
$langs['
|
69 |
-
$langs['
|
70 |
-
$langs['
|
71 |
-
$langs['
|
72 |
-
$langs['
|
73 |
-
$langs['
|
74 |
-
$langs['it-
|
75 |
-
$langs['
|
76 |
-
$langs['
|
77 |
-
$langs['
|
78 |
-
$langs['
|
79 |
-
$langs['
|
80 |
-
$langs['
|
81 |
-
$langs['
|
82 |
-
$langs['pt
|
83 |
-
$langs['pt-
|
84 |
-
$langs['
|
85 |
-
$langs['ro
|
86 |
-
$langs['ro-
|
87 |
-
$langs['
|
88 |
-
$langs['ru
|
89 |
-
$langs['ru-
|
90 |
-
$langs['
|
91 |
-
$langs['
|
92 |
-
$langs['
|
93 |
-
$langs['
|
94 |
-
$langs['es
|
95 |
-
$langs['es-
|
96 |
-
$langs['es-
|
97 |
-
$langs['es-
|
98 |
-
$langs['es-
|
99 |
-
$langs['es-
|
100 |
-
$langs['es-
|
101 |
-
$langs['es-
|
102 |
-
$langs['es-
|
103 |
-
$langs['es-
|
104 |
-
$langs['es-
|
105 |
-
$langs['es-
|
106 |
-
$langs['es-
|
107 |
-
$langs['es-
|
108 |
-
$langs['es-
|
109 |
-
$langs['es-
|
110 |
-
$langs['es-
|
111 |
-
$langs['es-
|
112 |
-
$langs['es-
|
113 |
-
$langs['
|
114 |
-
$langs['sv
|
115 |
-
$langs['sv-
|
116 |
-
$langs['
|
117 |
-
$langs['
|
118 |
-
$langs['
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
$
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
$
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
$
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
$
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
$
|
197 |
-
$
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
$
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
$
|
231 |
-
$
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
$
|
239 |
-
|
240 |
-
echo '<input type="hidden" name="
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
<
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
<li><a href="#
|
266 |
-
<?php
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
<div id="
|
300 |
-
<?php
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
}
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
?>
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
<
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
</
|
381 |
-
<
|
382 |
-
<
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
<?php
|
413 |
-
<
|
414 |
-
|
415 |
-
|
416 |
-
<
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
<
|
425 |
-
<
|
426 |
-
<?php echo __('
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
<
|
435 |
-
<?php echo __('
|
436 |
-
<
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
<
|
444 |
-
<?php
|
445 |
-
<
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
<
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
<
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
<
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
<?php
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
<
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
<?php
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
<?php
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
<
|
566 |
-
|
567 |
-
<?php if( $
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
<?php } ?>
|
572 |
-
</td>
|
573 |
-
</tr>
|
574 |
-
|
575 |
-
<?php
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
<?php
|
586 |
-
(<?php echo __('leave blank to use
|
587 |
-
<?php }
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
<?php
|
598 |
-
|
599 |
-
<
|
600 |
-
<
|
601 |
-
<?php
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
<?php
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
?>
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
<
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
<
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
</
|
641 |
-
</
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
<?php
|
669 |
-
|
670 |
-
|
671 |
-
</
|
672 |
-
|
673 |
-
<
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
<?php
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
<
|
690 |
-
<
|
691 |
-
|
692 |
-
</
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
</
|
697 |
-
|
698 |
-
|
699 |
-
<?php
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
?>
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
if( !isset($FeedSettings['
|
783 |
-
$FeedSettings['
|
784 |
-
if( !isset($FeedSettings['
|
785 |
-
$FeedSettings['
|
786 |
-
if( !isset($FeedSettings['
|
787 |
-
$FeedSettings['
|
788 |
-
if( !isset($FeedSettings['
|
789 |
-
$FeedSettings['
|
790 |
-
|
791 |
-
|
792 |
-
if( !
|
793 |
-
$
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
<tr valign="top">
|
862 |
-
<th scope="row">
|
863 |
-
<?php echo __('iTunes
|
864 |
-
|
865 |
-
|
866 |
-
<
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
</
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
</
|
918 |
-
<?php
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
<
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
<
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
</
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
<
|
959 |
-
|
960 |
-
<
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
<?php
|
976 |
-
|
977 |
-
|
978 |
-
<
|
979 |
-
|
980 |
-
|
981 |
-
<
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
</
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
<
|
1002 |
-
<
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
<
|
1008 |
-
<
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
?>
|
1020 |
-
</select>
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
</
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
?>
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
echo
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
</
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1198 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( !function_exists('add_action') )
|
4 |
+
die("access denied.");
|
5 |
+
|
6 |
+
function powerpress_languages()
|
7 |
+
{
|
8 |
+
// List copied from PodPress:
|
9 |
+
$langs = array();
|
10 |
+
$langs['af'] = __('Afrikaans', 'powerpress');
|
11 |
+
$langs['sq'] = __('Albanian', 'powerpress');
|
12 |
+
$langs['ar'] = __('Arabic', 'powerpress');
|
13 |
+
$langs['ar-sa'] = __('Arabic (Saudi Arabia)', 'powerpress');
|
14 |
+
$langs['ar-eg'] = __('Arabic (Egypt)', 'powerpress');
|
15 |
+
$langs['ar-dz'] = __('Arabic (Algeria)', 'powerpress');
|
16 |
+
$langs['ar-tn'] = __('Arabic (Tunisia)', 'powerpress');
|
17 |
+
$langs['ar-ye'] = __('Arabic (Yemen)', 'powerpress');
|
18 |
+
$langs['ar-jo'] = __('Arabic (Jordan)', 'powerpress');
|
19 |
+
$langs['ar-kw'] = __('Arabic (Kuwait)', 'powerpress');
|
20 |
+
$langs['ar-bh'] = __('Arabic (Bahrain)', 'powerpress');
|
21 |
+
$langs['eu'] = __('Basque', 'powerpress');
|
22 |
+
$langs['be'] = __('Belarusian', 'powerpress');
|
23 |
+
$langs['bg'] = __('Bulgarian', 'powerpress');
|
24 |
+
$langs['ca'] = __('Catalan', 'powerpress');
|
25 |
+
$langs['zh-cn'] = __('Chinese (Simplified)', 'powerpress');
|
26 |
+
$langs['zh-tw'] = __('Chinese (Traditional)', 'powerpress');
|
27 |
+
$langs['hr'] = __('Croatian', 'powerpress');
|
28 |
+
$langs['cs'] = __('Czech', 'powerpress');
|
29 |
+
$langs['cr'] = __('Cree', 'powerpress');
|
30 |
+
$langs['da'] = __('Danish', 'powerpress');
|
31 |
+
$langs['nl'] = __('Dutch', 'powerpress');
|
32 |
+
$langs['nl-be'] = __('Dutch (Belgium)', 'powerpress');
|
33 |
+
$langs['nl-nl'] = __('Dutch (Netherlands)', 'powerpress');
|
34 |
+
$langs['en'] = __('English', 'powerpress');
|
35 |
+
$langs['en-au'] = __('English (Australia)', 'powerpress');
|
36 |
+
$langs['en-bz'] = __('English (Belize)', 'powerpress');
|
37 |
+
$langs['en-ca'] = __('English (Canada)', 'powerpress');
|
38 |
+
$langs['en-ie'] = __('English (Ireland)', 'powerpress');
|
39 |
+
$langs['en-jm'] = __('English (Jamaica)', 'powerpress');
|
40 |
+
$langs['en-nz'] = __('English (New Zealand)', 'powerpress');
|
41 |
+
$langs['en-ph'] = __('English (Phillipines)', 'powerpress');
|
42 |
+
$langs['en-za'] = __('English (South Africa)', 'powerpress');
|
43 |
+
$langs['en-tt'] = __('English (Trinidad)', 'powerpress');
|
44 |
+
$langs['en-gb'] = __('English (United Kingdom)', 'powerpress');
|
45 |
+
$langs['en-us'] = __('English (United States)', 'powerpress');
|
46 |
+
$langs['en-zw'] = __('English (Zimbabwe)', 'powerpress');
|
47 |
+
$langs['et'] = __('Estonian', 'powerpress');
|
48 |
+
$langs['fo'] = __('Faeroese', 'powerpress');
|
49 |
+
$langs['fi'] = __('Finnish', 'powerpress');
|
50 |
+
$langs['fr'] = __('French', 'powerpress');
|
51 |
+
$langs['fr-be'] = __('French (Belgium)', 'powerpress');
|
52 |
+
$langs['fr-ca'] = __('French (Canada)', 'powerpress');
|
53 |
+
$langs['fr-fr'] = __('French (France)', 'powerpress');
|
54 |
+
$langs['fr-lu'] = __('French (Luxembourg)', 'powerpress');
|
55 |
+
$langs['fr-mc'] = __('French (Monaco)', 'powerpress');
|
56 |
+
$langs['fr-ch'] = __('French (Switzerland)', 'powerpress');
|
57 |
+
$langs['gl'] = __('Galician', 'powerpress');
|
58 |
+
$langs['gd'] = __('Gaelic', 'powerpress');
|
59 |
+
$langs['de'] = __('German', 'powerpress');
|
60 |
+
$langs['de-at'] = __('German (Austria)', 'powerpress');
|
61 |
+
$langs['de-de'] = __('German (Germany)', 'powerpress');
|
62 |
+
$langs['de-li'] = __('German (Liechtenstein)', 'powerpress');
|
63 |
+
$langs['de-lu'] = __('German (Luxembourg)', 'powerpress');
|
64 |
+
$langs['de-ch'] = __('German (Switzerland)', 'powerpress');
|
65 |
+
$langs['el'] = __('Greek', 'powerpress');
|
66 |
+
$langs['haw'] = __('Hawaiian', 'powerpress');
|
67 |
+
$langs['he_IL'] = __('Hebrew', 'powerpress');
|
68 |
+
$langs['hu'] = __('Hungarian', 'powerpress');
|
69 |
+
$langs['is'] = __('Icelandic', 'powerpress');
|
70 |
+
$langs['in'] = __('Indonesian', 'powerpress');
|
71 |
+
$langs['ga'] = __('Irish', 'powerpress');
|
72 |
+
$langs['it'] = __('Italian', 'powerpress');
|
73 |
+
$langs['hi'] = __('Hindi', 'powerpress');
|
74 |
+
$langs['it-it'] = __('Italian (Italy)', 'powerpress');
|
75 |
+
$langs['it-ch'] = __('Italian (Switzerland)', 'powerpress');
|
76 |
+
$langs['ja'] = __('Japanese', 'powerpress');
|
77 |
+
$langs['ko'] = __('Korean', 'powerpress');
|
78 |
+
$langs['mk'] = __('Macedonian', 'powerpress');
|
79 |
+
$langs['no'] = __('Norwegian', 'powerpress');
|
80 |
+
$langs['pa'] = __('Punjabi', 'powerpress');
|
81 |
+
$langs['pl'] = __('Polish', 'powerpress');
|
82 |
+
$langs['pt'] = __('Portuguese', 'powerpress');
|
83 |
+
$langs['pt-br'] = __('Portuguese (Brazil)', 'powerpress');
|
84 |
+
$langs['pt-pt'] = __('Portuguese (Portugal)', 'powerpress');
|
85 |
+
$langs['ro'] = __('Romanian', 'powerpress');
|
86 |
+
$langs['ro-mo'] = __('Romanian (Moldova)', 'powerpress');
|
87 |
+
$langs['ro-ro'] = __('Romanian (Romania)', 'powerpress');
|
88 |
+
$langs['ru'] = __('Russian', 'powerpress');
|
89 |
+
$langs['ru-mo'] = __('Russian (Moldova)', 'powerpress');
|
90 |
+
$langs['ru-ru'] = __('Russian (Russia)', 'powerpress');
|
91 |
+
$langs['sr'] = __('Serbian', 'powerpress');
|
92 |
+
$langs['sk'] = __('Slovak', 'powerpress');
|
93 |
+
$langs['sl'] = __('Slovenian', 'powerpress');
|
94 |
+
$langs['es'] = __('Spanish', 'powerpress');
|
95 |
+
$langs['es-ar'] = __('Spanish (Argentina)', 'powerpress');
|
96 |
+
$langs['es-bo'] = __('Spanish (Bolivia)', 'powerpress');
|
97 |
+
$langs['es-cl'] = __('Spanish (Chile)', 'powerpress');
|
98 |
+
$langs['es-co'] = __('Spanish (Colombia)', 'powerpress');
|
99 |
+
$langs['es-cr'] = __('Spanish (Costa Rica)', 'powerpress');
|
100 |
+
$langs['es-do'] = __('Spanish (Dominican Republic)', 'powerpress');
|
101 |
+
$langs['es-ec'] = __('Spanish (Ecuador)', 'powerpress');
|
102 |
+
$langs['es-sv'] = __('Spanish (El Salvador)', 'powerpress');
|
103 |
+
$langs['es-gt'] = __('Spanish (Guatemala)', 'powerpress');
|
104 |
+
$langs['es-hn'] = __('Spanish (Honduras)', 'powerpress');
|
105 |
+
$langs['es-mx'] = __('Spanish (Mexico)', 'powerpress');
|
106 |
+
$langs['es-ni'] = __('Spanish (Nicaragua)', 'powerpress');
|
107 |
+
$langs['es-pa'] = __('Spanish (Panama)', 'powerpress');
|
108 |
+
$langs['es-py'] = __('Spanish (Paraguay)', 'powerpress');
|
109 |
+
$langs['es-pe'] = __('Spanish (Peru)', 'powerpress');
|
110 |
+
$langs['es-pr'] = __('Spanish (Puerto Rico)', 'powerpress');
|
111 |
+
$langs['es-es'] = __('Spanish (Spain)', 'powerpress');
|
112 |
+
$langs['es-uy'] = __('Spanish (Uruguay)', 'powerpress');
|
113 |
+
$langs['es-ve'] = __('Spanish (Venezuela)', 'powerpress');
|
114 |
+
$langs['sv'] = __('Swedish', 'powerpress');
|
115 |
+
$langs['sv-fi'] = __('Swedish (Finland)', 'powerpress');
|
116 |
+
$langs['sv-se'] = __('Swedish (Sweden)', 'powerpress');
|
117 |
+
$langs['ta'] = __('Tamil', 'powerpress');
|
118 |
+
$langs['th'] = __('Thai', 'powerpress');
|
119 |
+
$langs['bo'] = __('Tibetan', 'powerpress');
|
120 |
+
$langs['tr'] = __('Turkish', 'powerpress');
|
121 |
+
$langs['uk'] = __('Ukranian', 'powerpress');
|
122 |
+
$langs['ve'] = __('Venda', 'powerpress');
|
123 |
+
$langs['vi'] = __('Vietnamese', 'powerpress');
|
124 |
+
$langs['zu'] = __('Zulu', 'powerpress');
|
125 |
+
|
126 |
+
return $langs;
|
127 |
+
}
|
128 |
+
|
129 |
+
function powerpress_admin_capabilities()
|
130 |
+
{
|
131 |
+
global $wp_roles;
|
132 |
+
|
133 |
+
$capnames = array();
|
134 |
+
// Get Role List
|
135 |
+
foreach($wp_roles->role_objects as $key => $role) {
|
136 |
+
foreach($role->capabilities as $cap => $grant) {
|
137 |
+
$capnames[$cap] = ucwords( str_replace('_', ' ', $cap) );
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
$capnames = apply_filters( 'powerpress_admin_capabilities', array_unique($capnames) );
|
142 |
+
|
143 |
+
$remove_keys = array('level_0', 'level_1', 'level_2', 'level_3', 'level_4', 'level_5', 'level_6', 'level_7', 'level_8', 'level_9', 'level_10');
|
144 |
+
foreach( $remove_keys as $null=> $key )
|
145 |
+
unset($capnames[ $key ]);
|
146 |
+
asort($capnames);
|
147 |
+
return $capnames;
|
148 |
+
}
|
149 |
+
|
150 |
+
|
151 |
+
// powerpressadmin_editfeed.php
|
152 |
+
function powerpress_admin_editfeed($type='', $type_value = '', $feed_slug = false)
|
153 |
+
{
|
154 |
+
$SupportUploads = powerpressadmin_support_uploads();
|
155 |
+
$General = powerpress_get_settings('powerpress_general');
|
156 |
+
$FeedAttribs = array('type'=>$type, 'feed_slug'=>'', 'category_id'=>0, 'term_taxonomy_id'=>0, 'term_id'=>0, 'taxonomy_type'=>'', 'post_type'=>'');
|
157 |
+
$cat_ID = false; $term_taxonomy_id = false;
|
158 |
+
|
159 |
+
|
160 |
+
$FeedTitle = __('Feed Settings', 'powerpress');
|
161 |
+
|
162 |
+
switch( $type )
|
163 |
+
{
|
164 |
+
case 'channel': {
|
165 |
+
$feed_slug = $type_value;
|
166 |
+
$FeedAttribs['feed_slug'] = $type_value;
|
167 |
+
$FeedSettings = powerpress_get_settings('powerpress_feed_'.$feed_slug);
|
168 |
+
if( !$FeedSettings && $type_value == 'podcast' ) // We are editing the default podcast channel
|
169 |
+
{
|
170 |
+
$FeedSettings = powerpress_get_settings('powerpress_feed');
|
171 |
+
}
|
172 |
+
|
173 |
+
if( !$FeedSettings )
|
174 |
+
{
|
175 |
+
$FeedSettings = array();
|
176 |
+
$FeedSettings['title'] = '';
|
177 |
+
if( !empty($General['custom_feeds'][$feed_slug]) )
|
178 |
+
$FeedSettings['title'] = $General['custom_feeds'][$feed_slug];
|
179 |
+
}
|
180 |
+
$FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
|
181 |
+
|
182 |
+
if( !isset($General['custom_feeds'][$feed_slug]) )
|
183 |
+
$General['custom_feeds'][$feed_slug] = __('Podcast (default)', 'powerpress');
|
184 |
+
|
185 |
+
$FeedTitle = sprintf( 'Podcast Settings for Channel: %s', htmlspecialchars($General['custom_feeds'][$feed_slug]) );
|
186 |
+
echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
|
187 |
+
echo '<input type="hidden" name="action" value="powerpress-save-channel" />';
|
188 |
+
|
189 |
+
}; break;
|
190 |
+
case 'category': {
|
191 |
+
$cat_ID = $type_value;
|
192 |
+
$FeedAttribs['category_id'] = $type_value;
|
193 |
+
$FeedSettings = powerpress_get_settings('powerpress_cat_feed_'.$cat_ID);
|
194 |
+
$FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
|
195 |
+
|
196 |
+
$category = get_category_to_edit($cat_ID);
|
197 |
+
$FeedTitle = sprintf( __('Podcast Settings for Category: %s', 'powerpress'), htmlspecialchars($category->name) );
|
198 |
+
echo sprintf('<input type="hidden" name="cat" value="%s" />', $cat_ID);
|
199 |
+
echo '<input type="hidden" name="action" value="powerpress-save-category" />';
|
200 |
+
|
201 |
+
}; break;
|
202 |
+
case 'ttid': {
|
203 |
+
$term_taxonomy_id = $type_value;
|
204 |
+
$FeedAttribs['term_taxonomy_id'] = $type_value;
|
205 |
+
$FeedSettings = powerpress_get_settings('powerpress_taxonomy_'.$term_taxonomy_id);
|
206 |
+
$FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
|
207 |
+
|
208 |
+
global $wpdb;
|
209 |
+
$term_info = $wpdb->get_results("SELECT term_id, taxonomy FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = $term_taxonomy_id", ARRAY_A);
|
210 |
+
if( !empty( $term_info[0]['term_id']) ) {
|
211 |
+
$term_ID = $term_info[0]['term_id'];
|
212 |
+
$taxonomy_type = $term_info[0]['taxonomy'];
|
213 |
+
$FeedAttribs['term_id'] = $term_ID;
|
214 |
+
$FeedAttribs['taxonomy_type'] = $taxonomy_type;
|
215 |
+
|
216 |
+
$term_object = get_term_to_edit($term_ID, $taxonomy_type);
|
217 |
+
$FeedTitle = sprintf( __('Podcast Settings for Taxonomy Term: %s', 'powerpress'), htmlspecialchars($term_object->name));
|
218 |
+
}
|
219 |
+
else
|
220 |
+
{
|
221 |
+
$FeedTitle = sprintf( __('Podcast Settings for Taxonomy Term: %s', 'powerpress'), 'Term ID '.htmlspecialchars($term_taxonomy_id));
|
222 |
+
}
|
223 |
+
echo sprintf('<input type="hidden" name="ttid" value="%s" />', $term_taxonomy_id);
|
224 |
+
echo '<input type="hidden" name="action" value="powerpress-save-ttid" />';
|
225 |
+
|
226 |
+
}; break;
|
227 |
+
case 'post_type': {
|
228 |
+
|
229 |
+
$FeedAttribs['post_type'] = $type_value;
|
230 |
+
$FeedAttribs['feed_slug'] = $feed_slug;
|
231 |
+
$FeedSettingsArray = powerpress_get_settings('powerpress_posttype_'.$FeedAttribs['post_type']);
|
232 |
+
if( !is_array($FeedSettingsArray[ $feed_slug ]) )
|
233 |
+
$FeedSettingsArray[ $feed_slug ] = array();
|
234 |
+
$FeedSettings = powerpress_default_settings($FeedSettingsArray[ $feed_slug ], 'editfeed_custom');
|
235 |
+
|
236 |
+
//$category = get_category_to_edit($cat_ID);
|
237 |
+
$PostTypeTitle = $FeedAttribs['post_type']; // TODO: Get readable title of post type
|
238 |
+
$FeedTitle = sprintf( __('Podcast Settings for Post Type %s with slug %s', 'powerpress'), htmlspecialchars($PostTypeTitle) , htmlspecialchars($feed_slug));
|
239 |
+
echo sprintf('<input type="hidden" name="podcast_post_type" value="%s" />', $FeedAttribs['post_type']);
|
240 |
+
echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
|
241 |
+
echo '<input type="hidden" name="action" value="powerpress-save-post_type" />';
|
242 |
+
|
243 |
+
}; break;
|
244 |
+
default: {
|
245 |
+
$FeedSettings = powerpress_get_settings('powerpress_feed');
|
246 |
+
$FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
|
247 |
+
echo '<input type="hidden" name="action" value="powerpress-save-settings" />';
|
248 |
+
}; break;
|
249 |
+
}
|
250 |
+
|
251 |
+
|
252 |
+
echo '<h2>'. $FeedTitle .'</h2>';
|
253 |
+
|
254 |
+
if( $cat_ID && (isset($_GET['from_categories']) || isset($_POST['from_categories'])) )
|
255 |
+
{
|
256 |
+
echo '<input type="hidden" name="from_categories" value="1" />';
|
257 |
+
}
|
258 |
+
|
259 |
+
?>
|
260 |
+
<div id="powerpress_settings_page" class="powerpress_tabbed_content">
|
261 |
+
<ul class="powerpress_settings_tabs">
|
262 |
+
<li><a href="#feed_tab_feed"><span><?php echo htmlspecialchars(__('Feed', 'powerpress')); ?></span></a></li>
|
263 |
+
<li><a href="#feed_tab_itunes"><span><?php echo htmlspecialchars(__('Apple', 'powerpress')); ?></span></a></li>
|
264 |
+
<li><a href="#feed_tab_googleplay"><span><?php echo htmlspecialchars(__('Google', 'powerpress')); ?></span></a></li>
|
265 |
+
<li><a href="#feed_tab_artwork"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
|
266 |
+
<?php if( in_array($FeedAttribs['type'], array('category', 'ttid', 'post_type', 'channel') ) ) { ?>
|
267 |
+
<li><a href="#feed_tab_appearance"><span><?php echo htmlspecialchars(__('Website', 'powerpress')); ?></span></a></li>
|
268 |
+
<?php } ?>
|
269 |
+
<li><a href="#feed_tab_destinations"><span><?php echo htmlspecialchars(__('Destinations', 'powerpress')); ?></span></a></li>
|
270 |
+
|
271 |
+
<?php if( in_array($FeedAttribs['type'], array('category', 'ttid', 'post_type', 'channel') ) ) { ?>
|
272 |
+
<li><a href="#feed_tab_other"><span><?php echo htmlspecialchars(__('Other Settings', 'powerpress')); ?></span></a></li>
|
273 |
+
<?php } ?>
|
274 |
+
</ul>
|
275 |
+
|
276 |
+
|
277 |
+
<div id="feed_tab_feed" class="powerpress_tab">
|
278 |
+
<?php
|
279 |
+
powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs );
|
280 |
+
if( !empty($General['advanced_mode_2']) ) {
|
281 |
+
powerpressadmin_edit_funding($FeedSettings, $feed_slug);
|
282 |
+
powerpressadmin_edit_tv($FeedSettings, $feed_slug);
|
283 |
+
}
|
284 |
+
?>
|
285 |
+
</div>
|
286 |
+
|
287 |
+
<div id="feed_tab_itunes" class="powerpress_tab">
|
288 |
+
<?php
|
289 |
+
powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
|
290 |
+
?>
|
291 |
+
</div>
|
292 |
+
|
293 |
+
<div id="feed_tab_googleplay" class="powerpress_tab">
|
294 |
+
<?php
|
295 |
+
powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs);
|
296 |
+
?>
|
297 |
+
</div>
|
298 |
+
|
299 |
+
<div id="feed_tab_artwork" class="powerpress_tab">
|
300 |
+
<?php
|
301 |
+
powerpressadmin_edit_artwork($FeedSettings, $General);
|
302 |
+
?>
|
303 |
+
</div>
|
304 |
+
|
305 |
+
<?php if( $feed_slug || $FeedAttribs['type'] == 'category' || $FeedAttribs['type'] == 'ttid' ) { ?>
|
306 |
+
<div id="feed_tab_appearance" class="powerpress_tab">
|
307 |
+
<?php
|
308 |
+
//powerpressadmin_appearance($General);
|
309 |
+
//if( $feed_slug )
|
310 |
+
// powerpressadmin_edit_appearance_feed($General, $FeedSettings, $feed_slug, $FeedAttribs);
|
311 |
+
|
312 |
+
powerpressadmin_settings_tab_appearance($General, $FeedSettings, $FeedAttribs);
|
313 |
+
?>
|
314 |
+
</div>
|
315 |
+
|
316 |
+
<div id="feed_tab_destinations" class="powerpress_tab">
|
317 |
+
<?php
|
318 |
+
powerpressadmin_edit_destinations($FeedSettings, $General, $FeedAttribs);
|
319 |
+
?>
|
320 |
+
</div>
|
321 |
+
|
322 |
+
<div id="feed_tab_other" class="powerpress_tab">
|
323 |
+
<?php
|
324 |
+
powerpressadmin_settings_tab_other($General, $FeedSettings, $feed_slug, $cat_ID, $FeedAttribs)
|
325 |
+
?>
|
326 |
+
</div>
|
327 |
+
<?php } ?>
|
328 |
+
|
329 |
+
</div>
|
330 |
+
<div class="clear"></div>
|
331 |
+
<?php
|
332 |
+
|
333 |
+
|
334 |
+
}
|
335 |
+
|
336 |
+
function powerpressadmin_edit_podcast_channel($FeedSettings, $General)
|
337 |
+
{
|
338 |
+
// TODO
|
339 |
+
?>
|
340 |
+
<input type="hidden" name="action" value="powerpress-save-customfeed" />
|
341 |
+
<p style="margin-bottom: 0;">
|
342 |
+
<?php echo __('Configure your custom podcast feed.', 'powerpress'); ?>
|
343 |
+
</p>
|
344 |
+
<?php
|
345 |
+
}
|
346 |
+
|
347 |
+
function powerpressadmin_edit_category_feed($FeedSettings, $General)
|
348 |
+
{
|
349 |
+
?>
|
350 |
+
<input type="hidden" name="action" value="powerpress-save-categoryfeedsettings" />
|
351 |
+
<p style="margin-bottom: 0;">
|
352 |
+
<?php echo __('Configure your category feed to support podcasting.', 'powerpress'); ?>
|
353 |
+
</p>
|
354 |
+
<?php
|
355 |
+
}
|
356 |
+
|
357 |
+
function powerpressadmin_edit_feed_general($FeedSettings, $General)
|
358 |
+
{
|
359 |
+
$warning = '';
|
360 |
+
$episode_count = powerpress_get_episode_count('podcast');
|
361 |
+
if( $episode_count == 0 )
|
362 |
+
{
|
363 |
+
$warning = __('WARNING: You must create at least one podcast episode for your podcast feed to be valid.', 'powerpress');
|
364 |
+
}
|
365 |
+
|
366 |
+
if( !isset($FeedSettings['apply_to']) )
|
367 |
+
$FeedSettings['apply_to'] = 1;
|
368 |
+
?>
|
369 |
+
<h3><?php echo __('Podcast Feeds', 'powerpress'); ?></h3>
|
370 |
+
<table class="form-table">
|
371 |
+
|
372 |
+
<tr valign="top">
|
373 |
+
<th scope="row">
|
374 |
+
|
375 |
+
<?php echo __('Enhance Feeds', 'powerpress'); ?></th>
|
376 |
+
<td>
|
377 |
+
<ul>
|
378 |
+
<li><p><label><input type="radio" name="Feed[apply_to]" value="1" <?php if( $FeedSettings['apply_to'] == 1 ) echo 'checked'; ?> /> <?php echo __('Enhance All Feeds', 'powerpress'); ?></label> (<?php echo __('Recommended', 'powerpress'); ?>)</p>
|
379 |
+
<p style="font-size: 100%; margin: 0 0 0 30px;"><?php echo __('Adds podcasting support to all feeds', 'powerpress'); ?></p>
|
380 |
+
</li>
|
381 |
+
<li><p><label><input type="radio" name="Feed[apply_to]" value="2" <?php if( $FeedSettings['apply_to'] == 2 ) echo 'checked'; ?> /> <?php echo __('Enhance Main Feed Only', 'powerpress'); ?></label></p>
|
382 |
+
<p style="font-size: 100%; margin: 0 0 0 30px;"><?php echo __('Adds podcasting support to your main feed only', 'powerpress'); ?></p></li>
|
383 |
+
<li><p><label><input type="radio" name="Feed[apply_to]" value="0" <?php if( $FeedSettings['apply_to'] == 0 ) echo 'checked'; ?> /> <?php echo __('Do Not Enhance Feeds', 'powerpress'); ?></label></p>
|
384 |
+
<p style="font-size: 100%; margin: 0 0 0 30px;"><?php echo __('Feed Settings below will only apply to your podcast channel feeds', 'powerpress'); ?></p></li>
|
385 |
+
</ul>
|
386 |
+
</td>
|
387 |
+
</tr>
|
388 |
+
<tr valign="top">
|
389 |
+
<th scope="row">
|
390 |
+
|
391 |
+
<?php echo __('Podcast Feeds', 'powerpress'); ?></th>
|
392 |
+
<td>
|
393 |
+
<?php if( $warning ) { ?>
|
394 |
+
<span class="powerpress-error" style="background-color: #FFEBE8; border-color: #CC0000; padding: 6px 10px;"><?php echo $warning; ?></span>
|
395 |
+
<?php } ?>
|
396 |
+
<?php
|
397 |
+
|
398 |
+
//$General = get_option('powerpress_general');
|
399 |
+
$Feeds = array('podcast'=> __('Special Podcast only Feed', 'powerpress') );
|
400 |
+
if( isset($General['custom_feeds']['podcast']) )
|
401 |
+
$Feeds = $General['custom_feeds'];
|
402 |
+
else if( isset($General['custom_feeds'])&& is_array($General['custom_feeds']) )
|
403 |
+
$Feeds += $General['custom_feeds'];
|
404 |
+
|
405 |
+
foreach( $Feeds as $feed_slug=> $feed_title )
|
406 |
+
{
|
407 |
+
if( empty($feed_title) )
|
408 |
+
$feed_title = $feed_slug;
|
409 |
+
$edit_link = admin_url( 'admin.php?page=powerpress/powerpressadmin_customfeeds.php&action=powerpress-editfeed&feed_slug=') . $feed_slug;
|
410 |
+
?>
|
411 |
+
<p><?php echo $feed_title; ?>: <a href="<?php echo get_feed_link($feed_slug); ?>" title="<?php echo $feed_title; ?>" target="_blank"><?php echo get_feed_link($feed_slug); ?></a>
|
412 |
+
<?php if( defined('POWERPRESS_FEEDVALIDATOR_URL') ) { ?>
|
413 |
+
| <a href="<?php echo POWERPRESS_FEEDVALIDATOR_URL. urlencode(get_feed_link($feed_slug)); ?>" target="_blank"><?php echo __('validate', 'powerpress'); ?></a>
|
414 |
+
<?php } ?>
|
415 |
+
<?php if( false && $feed_slug != 'podcast' ) { ?>
|
416 |
+
| <a href="<?php echo $edit_link; ?>" title="<?php echo __('Edit Podcast Channel', 'powerpress'); ?>"><?php echo __('edit', 'powerpress'); ?></a>
|
417 |
+
<?php } ?>
|
418 |
+
</p>
|
419 |
+
<?php } ?>
|
420 |
+
<p><?php echo __('These are podcast only feeds suitable for submission podcast directories such as iTunes.', 'powerpress'); ?></p>
|
421 |
+
<p class="description"><?php echo __('Note: We do not recommend submitting your main site feed to podcast directories such as iTunes. iTunes and many other podcast directories work best with feeds that do not have regular blog posts mixed in.', 'powerpress'); ?></p>
|
422 |
+
|
423 |
+
<input type="hidden" name="General[feed_action_hook]" value="0" />
|
424 |
+
<p><label><input type="checkbox" name="General[feed_action_hook]" value="1" <?php if( !empty($General['feed_action_hook']) && $General['feed_action_hook'] == 1 ) echo 'checked '; ?>/> <?php echo __('Do not allow other plugins to modify podcast feeds.', 'powerpress'); ?></label></p>
|
425 |
+
<input type="hidden" name="General[feed_accel]" value="0" />
|
426 |
+
<p><label><input type="checkbox" name="General[feed_accel]" value="1" <?php if( !empty($General['feed_accel']) && $General['feed_accel'] == 1 ) echo 'checked '; ?>/> <?php echo __('Accelerate feed', 'powerpress'); ?></label></p>
|
427 |
+
|
428 |
+
</td>
|
429 |
+
</tr>
|
430 |
+
|
431 |
+
<tr valign="top">
|
432 |
+
<th scope="row">
|
433 |
+
<?php echo __('Feed Discovery', 'powerpress'); ?></th>
|
434 |
+
<td>
|
435 |
+
<p style="margin-top: 10px;"><label><input type="checkbox" name="General[feed_links]" value="1" <?php if( !empty($General['feed_links']) && $General['feed_links'] == 1 ) echo 'checked '; ?>/> <?php echo __('Include podcast feed links in HTML headers.', 'powerpress'); ?></label></p>
|
436 |
+
<p><?php echo __('Adds "feed discovery" links to your web site\'s headers allowing web browsers and feed readers to auto-detect your podcast feeds.', 'powerpress'); ?></p>
|
437 |
+
</td>
|
438 |
+
</tr>
|
439 |
+
|
440 |
+
<tr valign="top">
|
441 |
+
<th scope="row">
|
442 |
+
<?php echo __('WebSub', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></th>
|
443 |
+
<td>
|
444 |
+
<p style="margin-top: 10px;"><label><input type="checkbox" name="General[websub_enabled]" value="1" <?php if( !empty($General['websub_enabled']) && $General['websub_enabled'] == 1 ) echo 'checked '; ?>/> <?php echo __('Enable WebSub', 'powerpress'); ?></label></p>
|
445 |
+
<p><?php echo __('Notifies web subscription hub to push notifications to subscribers. Currently supported by the Blubrry Podcast Directory and Google Podcasts.', 'powerpress'); ?></p>
|
446 |
+
</td>
|
447 |
+
</tr>
|
448 |
+
|
449 |
+
<tr valign="top">
|
450 |
+
<th scope="row">
|
451 |
+
<?php echo __('RSS2 Image', 'powerpress'); ?></th>
|
452 |
+
<td>
|
453 |
+
<input type="hidden" name="General[disable_rss_image]" value="1" />
|
454 |
+
<p><label><input type="checkbox" name="General[disable_rss_image]" value="0" <?php if( empty($General['disable_rss_image']) ) echo 'checked '; ?>/> <?php echo __('Include RSS Image in feeds.', 'powerpress'); ?></label></p>
|
455 |
+
</td>
|
456 |
+
</tr>
|
457 |
+
|
458 |
+
<tr valign="top">
|
459 |
+
<th scope="row">
|
460 |
+
<?php echo __('Emoji', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></th>
|
461 |
+
<td>
|
462 |
+
<?php
|
463 |
+
if( 'utf8mb4' != $GLOBALS['wpdb']->charset )
|
464 |
+
{
|
465 |
+
?>
|
466 |
+
<p style="font-weight: bold; color: #CC0000;">
|
467 |
+
<?php
|
468 |
+
echo __('Emoji may not be supported with your WordPress installation. Please upgrade your database to support utf8mb4 available in WordPress 4.2 and newer.', 'powerpress');
|
469 |
+
?>
|
470 |
+
</p>
|
471 |
+
<?php } ?>
|
472 |
+
<input type="hidden" name="General[rss_emoji]" value="0" />
|
473 |
+
<p><label><input type="checkbox" name="General[rss_emoji]" value="1" <?php if( !empty($General['rss_emoji']) ) echo 'checked '; ?>/> <?php echo __('Include Emoji in feeds.', 'powerpress'); ?></label>
|
474 |
+
<a href="https://create.blubrry.com/resources/powerpress/powerpress-settings/feeds/#emoji" target="_blank"><?php echo __('Learn more', 'powerpress'); ?></p>
|
475 |
+
</p>
|
476 |
+
</td>
|
477 |
+
</tr>
|
478 |
+
|
479 |
+
</table>
|
480 |
+
<?php
|
481 |
+
}
|
482 |
+
|
483 |
+
function powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs = array() )
|
484 |
+
{
|
485 |
+
$SupportUploads = powerpressadmin_support_uploads();
|
486 |
+
if( !isset($FeedSettings['posts_per_rss']) )
|
487 |
+
$FeedSettings['posts_per_rss'] = '';
|
488 |
+
if( !isset($FeedSettings['rss2_image']) )
|
489 |
+
$FeedSettings['rss2_image'] = '';
|
490 |
+
if( !isset($FeedSettings['copyright']) )
|
491 |
+
$FeedSettings['copyright'] = '';
|
492 |
+
if( !isset($FeedSettings['title']) )
|
493 |
+
$FeedSettings['title'] = '';
|
494 |
+
if( !isset($FeedSettings['rss_language']) )
|
495 |
+
$FeedSettings['rss_language'] = '';
|
496 |
+
|
497 |
+
$feed_link = '';
|
498 |
+
switch( $FeedAttribs['type'])
|
499 |
+
{
|
500 |
+
case 'category': {
|
501 |
+
if( !empty($General['cat_casting_podcast_feeds']) )
|
502 |
+
$feed_link = get_category_feed_link($FeedAttribs['category_id'], 'podcast');
|
503 |
+
else // Use the old link
|
504 |
+
$feed_link = get_category_feed_link($FeedAttribs['category_id']);
|
505 |
+
}; break;
|
506 |
+
case 'ttid': {
|
507 |
+
$feed_link = get_term_feed_link($FeedAttribs['term_taxonomy_id'], $FeedAttribs['taxonomy_type'], 'rss2');
|
508 |
+
}; break;
|
509 |
+
case 'post_type': {
|
510 |
+
$feed_link = get_post_type_archive_feed_link($FeedAttribs['post_type'], $FeedAttribs['feed_slug']);
|
511 |
+
}; break;
|
512 |
+
case 'channel': {
|
513 |
+
$feed_link = get_feed_link($FeedAttribs['feed_slug']);
|
514 |
+
}; break;
|
515 |
+
default: {
|
516 |
+
$feed_link = get_feed_link('podcast');
|
517 |
+
}; break;
|
518 |
+
}
|
519 |
+
|
520 |
+
$cat_ID = $FeedAttribs['category_id'];
|
521 |
+
|
522 |
+
if( !empty($FeedAttribs['type']) && ( in_array($FeedAttribs['type'], array('category', 'ttid', 'post_type', 'channel') ) ) )
|
523 |
+
{
|
524 |
+
?>
|
525 |
+
<h3><?php echo __('Feed Information', 'powerpress'); ?></h3>
|
526 |
+
<table class="form-table">
|
527 |
+
<tr valign="top">
|
528 |
+
<th scope="row">
|
529 |
+
<?php echo __('Feed URL', 'powerpress'); ?>
|
530 |
+
</th>
|
531 |
+
<td>
|
532 |
+
<p style="margin-top: 0;" class="description"><a href="<?php echo $feed_link; ?>" target="_blank"><?php echo $feed_link; ?></a>
|
533 |
+
<?php if( defined('POWERPRESS_FEEDVALIDATOR_URL') ) { ?>| <a href="<?php echo POWERPRESS_FEEDVALIDATOR_URL. urlencode( str_replace('&', '&', $feed_link)); ?>" target="_blank"><?php echo __('validate', 'powerpress'); ?></a><?php } ?></p>
|
534 |
+
<?php
|
535 |
+
if( !empty($FeedSettings['premium']) )
|
536 |
+
{
|
537 |
+
echo __('WARNING: This feed is password protected, it cannot be accessed publicly by the iTunes podcast directory or other podcast services.', 'powerpress');
|
538 |
+
} ?>
|
539 |
+
</td>
|
540 |
+
</tr>
|
541 |
+
</table>
|
542 |
+
<?php
|
543 |
+
}
|
544 |
+
?>
|
545 |
+
<h3><?php echo __('Feed Settings', 'powerpress'); ?></h3>
|
546 |
+
<p class="description"><?php echo sprintf(__('Feed settings below apply to feed: %s', 'powerpress'), esc_html($feed_link) ); ?></p>
|
547 |
+
<table class="form-table">
|
548 |
+
|
549 |
+
|
550 |
+
<tr valign="top">
|
551 |
+
<th scope="row">
|
552 |
+
<?php echo __('Feed Title (Show Title)', 'powerpress'); ?>
|
553 |
+
</th>
|
554 |
+
<td>
|
555 |
+
<input type="text" name="Feed[title]" style="width: 60%;" value="<?php echo esc_attr($FeedSettings['title']); ?>" maxlength="255" />
|
556 |
+
<?php if( $cat_ID ) { ?>
|
557 |
+
(<?php echo __('leave blank to use default category title', 'powerpress'); ?>)
|
558 |
+
<?php } else { ?>
|
559 |
+
(<?php echo __('leave blank to use blog title', 'powerpress'); ?>)
|
560 |
+
<?php } ?>
|
561 |
+
<?php if( $FeedAttribs['type'] == 'ttid' ) { } else if( $cat_ID ) {
|
562 |
+
?>
|
563 |
+
<p class="description"><?php echo esc_html(__('Default Category title:', 'powerpress') .' '. get_cat_name($cat_ID) . ' '. apply_filters( 'document_title_separator', '-' ) .' '. get_bloginfo_rss('name') ); ?></p>
|
564 |
+
<?php } else { ?>
|
565 |
+
<p class="description"><?php echo __('Blog title:', 'powerpress') .' '. get_bloginfo_rss('name'); ?></p>
|
566 |
+
<?php } ?>
|
567 |
+
<?php if( !empty($General['seo_itunes']) ) { ?>
|
568 |
+
<p>
|
569 |
+
<em><?php echo __('Podcasting SEO Suggestion: The show title is very important.', 'powerpress'); ?></em>
|
570 |
+
</p>
|
571 |
+
<?php } ?>
|
572 |
+
</td>
|
573 |
+
</tr>
|
574 |
+
|
575 |
+
<?php if( !empty($General['advanced_mode_2']) ) { ?>
|
576 |
+
<!-- start advanced features -->
|
577 |
+
<tr valign="top">
|
578 |
+
<th scope="row">
|
579 |
+
<?php echo __('Feed Description', 'powerpress'); ?>
|
580 |
+
</th>
|
581 |
+
<td>
|
582 |
+
<input type="text" name="Feed[description]" style="width: 60%;" value="<?php echo esc_attr( !empty($FeedSettings['description'])? $FeedSettings['description']:''); ?>" maxlength="1000" />
|
583 |
+
<?php if( $cat_ID ) { ?>
|
584 |
+
(<?php echo __('leave blank to use category description', 'powerpress'); ?>)
|
585 |
+
<?php } else { ?>
|
586 |
+
(<?php echo __('leave blank to use blog description', 'powerpress'); ?>)
|
587 |
+
<?php } ?>
|
588 |
+
</td>
|
589 |
+
</tr>
|
590 |
+
|
591 |
+
<?php
|
592 |
+
if( $FeedAttribs['type'] != 'general' ) // All types exept general settings
|
593 |
+
{
|
594 |
+
?>
|
595 |
+
<tr valign="top">
|
596 |
+
<th scope="row">
|
597 |
+
<?php echo __('Feed Landing Page URL', 'powerpress'); ?> <br />
|
598 |
+
</th>
|
599 |
+
<td>
|
600 |
+
<input type="text" name="Feed[url]" style="width: 60%;" value="<?php echo esc_attr( !empty($FeedSettings['url'])? $FeedSettings['url']:''); ?>" maxlength="255" />
|
601 |
+
<?php if( $cat_ID ) { ?>
|
602 |
+
(<?php echo __('leave blank to use category page', 'powerpress'); ?>)
|
603 |
+
<?php } else { ?>
|
604 |
+
(<?php echo __('leave blank to use home page', 'powerpress'); ?>)
|
605 |
+
<?php } ?>
|
606 |
+
<?php if( $cat_ID ) { ?>
|
607 |
+
<p class="description"><?php echo __('Category page URL', 'powerpress'); ?>: <?php echo get_category_link($cat_ID); ?></p>
|
608 |
+
<?php } else { ?>
|
609 |
+
<p class="description">e.g. <?php echo get_bloginfo('url'); ?>/custom-page/</p>
|
610 |
+
<?php } ?>
|
611 |
+
</td>
|
612 |
+
</tr>
|
613 |
+
<?php } // End not general settings ?>
|
614 |
+
|
615 |
+
<tr valign="top">
|
616 |
+
<th scope="row">
|
617 |
+
<?php echo __('PodcastMirror Feed URL', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?><br />
|
618 |
+
<span style="font-size: 85%; margin-left: 5px;"><a href="https://podcastmirror.com" target="_blank"><?php echo __('learn more', 'powerpress'); ?></a></span>
|
619 |
+
</th>
|
620 |
+
<td>
|
621 |
+
<input type="text" name="Feed[feed_redirect_url]" style="width: 60%;" value="<?php echo esc_attr(!empty($FeedSettings['feed_redirect_url'])? $FeedSettings['feed_redirect_url']:''); ?>" maxlength="100" /> (<?php echo __('leave blank to use built-in feed', 'powerpress'); ?>)
|
622 |
+
<p><?php echo __('Use this option to mirror your podcast feed to provide fast, scalable subscriptions to your show. Service is FeedBurner compatible.', 'powerpress'); ?></p>
|
623 |
+
<?php
|
624 |
+
$link = $feed_link;
|
625 |
+
if( strstr($link, '?') )
|
626 |
+
$link .= "&redirect=no";
|
627 |
+
else
|
628 |
+
$link .= "?redirect=no";
|
629 |
+
?>
|
630 |
+
<p class="description"><?php echo __('Bypass Redirect URL', 'powerpress'); ?>: <a href="<?php echo $link; ?>" target="_blank"><?php echo $link; ?></a></p>
|
631 |
+
</td>
|
632 |
+
</tr>
|
633 |
+
|
634 |
+
<tr valign="top">
|
635 |
+
<th scope="row">
|
636 |
+
<?php echo __('Show the most recent', 'powerpress'); ?>
|
637 |
+
</th>
|
638 |
+
<td>
|
639 |
+
<p><input type="text" name="Feed[posts_per_rss]" style="width: 50px;" value="<?php echo ( !empty($FeedSettings['posts_per_rss'])? $FeedSettings['posts_per_rss']:''); ?>" maxlength="5" /> <?php echo sprintf(__('episodes / posts per feed (site default: %d, maximum: %d)', 'powerpress'), get_option('posts_per_rss'), 300); ?></p>
|
640 |
+
<p style="margin-top: 5px; margin-bottom: 0; font-weight: bold;"><?php echo __('Please enable the <i>Feed Episode Maximizer</i> option to optimize your feed for more than 10 episodes.', 'powerpress'); ?></p>
|
641 |
+
</td>
|
642 |
+
</tr>
|
643 |
+
|
644 |
+
<?php
|
645 |
+
if( in_array($FeedAttribs['type'], array('channel', 'category', 'post_types', 'general')) )
|
646 |
+
{
|
647 |
+
?>
|
648 |
+
<tr valign="top">
|
649 |
+
<th scope="row">
|
650 |
+
<?php echo __('Feed Episode Maximizer', 'powerpress'); ?>
|
651 |
+
</th>
|
652 |
+
<td>
|
653 |
+
<p><input type="checkbox" name="Feed[maximize_feed]" value="1" <?php if( !empty($FeedSettings['maximize_feed']) ) echo 'checked'; ?> />
|
654 |
+
<?php echo __('Maximize the number of episodes while maintaining an optimal feed size.', 'powerpress'); ?> <a href="https://create.blubrry.com/resources/powerpress/powerpress-settings/feeds/#maximizer" target="_blank"><?php echo __('Learn more', 'powerpress'); ?></p>
|
655 |
+
<p></a></p>
|
656 |
+
</td>
|
657 |
+
</tr>
|
658 |
+
<?php
|
659 |
+
}
|
660 |
+
?>
|
661 |
+
|
662 |
+
<tr valign="top">
|
663 |
+
<th scope="row">
|
664 |
+
|
665 |
+
<?php echo __('Feed Language', 'powerpress'); ?></th>
|
666 |
+
<td>
|
667 |
+
<select name="Feed[rss_language]" class="bpp_input_med">
|
668 |
+
<?php
|
669 |
+
$Languages = powerpress_languages();
|
670 |
+
|
671 |
+
echo '<option value="">'. __('Blog Default Language', 'powerpress') .'</option>';
|
672 |
+
foreach( $Languages as $value=> $desc )
|
673 |
+
echo "\t<option value=\"$value\"". ($FeedSettings['rss_language']==$value?' selected':''). ">". esc_attr($desc)."</option>\n";
|
674 |
+
?>
|
675 |
+
</select>
|
676 |
+
<?php
|
677 |
+
$rss_language = get_bloginfo_rss('language');
|
678 |
+
$rss_language = strtolower($rss_language);
|
679 |
+
if( isset($Languages[ $rss_language ]) )
|
680 |
+
{
|
681 |
+
?>
|
682 |
+
<?php echo __('Blog Default', 'powerpress'); ?>: <?php echo $Languages[ $rss_language ]; ?>
|
683 |
+
<?php } else { ?>
|
684 |
+
<?php echo __('Blog Default', 'powerpress'); ?>: <?php echo $rss_language; ?>
|
685 |
+
<?php } ?>
|
686 |
+
</td>
|
687 |
+
</tr>
|
688 |
+
|
689 |
+
<tr valign="top">
|
690 |
+
<th scope="row">
|
691 |
+
<?php echo __('Copyright', 'powerpress'); ?>
|
692 |
+
</th>
|
693 |
+
<td>
|
694 |
+
<input type="text" name="Feed[copyright]" style="width: 60%;" value="<?php echo esc_attr($FeedSettings['copyright']); ?>" maxlength="255" />
|
695 |
+
</td>
|
696 |
+
</tr>
|
697 |
+
<tr valign="top">
|
698 |
+
<th scope="row">
|
699 |
+
<?php echo __('Caching Debug Comments', 'powerpress'); ?>
|
700 |
+
</th>
|
701 |
+
<td>
|
702 |
+
<label><input type="checkbox" name="General[allow_feed_comments]" value="1" <?php if( !empty($General['allow_feed_comments']) ) echo 'checked'; ?> />
|
703 |
+
<?php echo __('Allow WP Super Cache or W3 Total Cache to add HTML Comments to the bottom of your feeds', 'powerpress'); ?></label>
|
704 |
+
(<?php echo __('Recommended unchecked', 'powerpress'); ?>)
|
705 |
+
<p><?php echo __('iTunes is known to have issues with feeds that have HTML comments at the bottom.', 'powerpress'); ?></p>
|
706 |
+
<p style="margin-bottom: 0;" class="description"><?php echo __('NOTE: This setting should only be enabled for debugging purposes.', 'powerpress'); ?></p>
|
707 |
+
</td>
|
708 |
+
</tr>
|
709 |
+
|
710 |
+
<!-- end advanced features -->
|
711 |
+
<?php } ?>
|
712 |
+
</table>
|
713 |
+
|
714 |
+
<!-- Location and frequency information -->
|
715 |
+
<?php
|
716 |
+
if( !isset($FeedSettings['location']) )
|
717 |
+
$FeedSettings['location'] = '';
|
718 |
+
if( !isset($FeedSettings['frequency']) )
|
719 |
+
$FeedSettings['frequency'] = '';
|
720 |
+
?>
|
721 |
+
<?php if( !empty($General['advanced_mode_2']) ) { ?>
|
722 |
+
<!-- start advanced features -->
|
723 |
+
<h3><?php echo __('Basic Show Information', 'powerpress'); ?></h3>
|
724 |
+
<div id="rawvoice_basic_options">
|
725 |
+
<table class="form-table">
|
726 |
+
<tr valign="top">
|
727 |
+
<th scope="row"><?php echo __('Location', 'powerpress'); ?></th>
|
728 |
+
<td>
|
729 |
+
<input type="text" style="width: 300px;" name="Feed[location]" value="<?php echo esc_attr($FeedSettings['location']); ?>" maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?>)
|
730 |
+
<p><?php echo __('e.g. Cleveland, Ohio', 'powerpress'); ?></p>
|
731 |
+
</td>
|
732 |
+
</tr>
|
733 |
+
<tr valign="top">
|
734 |
+
<th scope="row"><?php echo __('Episode Frequency', 'powerpress'); ?></th>
|
735 |
+
<td>
|
736 |
+
<input type="text" style="width: 300px;" name="Feed[frequency]" value="<?php echo esc_attr($FeedSettings['frequency']); ?>" maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?>)
|
737 |
+
<p><?php echo __('e.g. Weekly', 'powerpress'); ?></p>
|
738 |
+
</td>
|
739 |
+
</tr>
|
740 |
+
</table>
|
741 |
+
</div>
|
742 |
+
<!-- end advanced features -->
|
743 |
+
<?php
|
744 |
+
}
|
745 |
+
}
|
746 |
+
|
747 |
+
|
748 |
+
function powerpressadmin_settings_tab_other($General, $FeedSettings, $feed_slug, $cat_ID = false, $FeedAttribs = array() ) {
|
749 |
+
require_once( dirname(__FILE__).'/views/settings_tab_other.php' );
|
750 |
+
}
|
751 |
+
|
752 |
+
function powerpressadmin_settings_tab_appearance($General, $FeedSettings, $FeedAttribs = array()) {
|
753 |
+
require_once( dirname(__FILE__).'/views/settings_tab_appearance.php' );
|
754 |
+
}
|
755 |
+
|
756 |
+
function powerpressadmin_edit_appearance_feed($General, $FeedSettings, $feed_slug)
|
757 |
+
{
|
758 |
+
// Appearance Settings
|
759 |
+
?>
|
760 |
+
<h3><?php echo __('Website Settings', 'powerpress'); ?></h3>
|
761 |
+
<table class="form-table">
|
762 |
+
<tr valign="top">
|
763 |
+
<th scope="row">
|
764 |
+
<?php echo __('Disable Player', 'powerpress'); ?>
|
765 |
+
</th>
|
766 |
+
<td>
|
767 |
+
<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'); ?>
|
768 |
+
<input type="hidden" name="UpdateDisablePlayer" value="<?php echo $feed_slug; ?>" />
|
769 |
+
</td>
|
770 |
+
</tr>
|
771 |
+
</table>
|
772 |
+
<?php
|
773 |
+
|
774 |
+
}
|
775 |
+
|
776 |
+
function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs = array() )
|
777 |
+
{
|
778 |
+
$feed_slug = $FeedAttribs['feed_slug'];
|
779 |
+
$cat_ID = $FeedAttribs['category_id'];
|
780 |
+
|
781 |
+
$SupportUploads = powerpressadmin_support_uploads();
|
782 |
+
if( !isset($FeedSettings['itunes_subtitle']) )
|
783 |
+
$FeedSettings['itunes_subtitle'] = '';
|
784 |
+
if( !isset($FeedSettings['itunes_summary']) )
|
785 |
+
$FeedSettings['itunes_summary'] = '';
|
786 |
+
if( !isset($FeedSettings['itunes_keywords']) )
|
787 |
+
$FeedSettings['itunes_keywords'] = '';
|
788 |
+
if( !isset($FeedSettings['itunes_cat_1']) )
|
789 |
+
$FeedSettings['itunes_cat_1'] = '';
|
790 |
+
if( !isset($FeedSettings['itunes_cat_2']) )
|
791 |
+
$FeedSettings['itunes_cat_2'] = '';
|
792 |
+
if( !isset($FeedSettings['itunes_cat_3']) )
|
793 |
+
$FeedSettings['itunes_cat_3'] = '';
|
794 |
+
if( !isset($FeedSettings['apple_cat_1']) )
|
795 |
+
$FeedSettings['apple_cat_1'] = '';
|
796 |
+
if( !isset($FeedSettings['apple_cat_2']) )
|
797 |
+
$FeedSettings['apple_cat_2'] = '';
|
798 |
+
if( !isset($FeedSettings['apple_cat_3']) )
|
799 |
+
$FeedSettings['apple_cat_3'] = '';
|
800 |
+
if( !isset($FeedSettings['itunes_explicit']) )
|
801 |
+
$FeedSettings['itunes_explicit'] = 0;
|
802 |
+
if( !isset($FeedSettings['itunes_talent_name']) )
|
803 |
+
$FeedSettings['itunes_talent_name'] = '';
|
804 |
+
if( !isset($FeedSettings['email']) )
|
805 |
+
$FeedSettings['email'] = '';
|
806 |
+
if( !isset($FeedSettings['itunes_new_feed_url_podcast']) )
|
807 |
+
$FeedSettings['itunes_new_feed_url_podcast'] = '';
|
808 |
+
if( !isset($FeedSettings['itunes_new_feed_url']) )
|
809 |
+
$FeedSettings['itunes_new_feed_url'] = '';
|
810 |
+
if( !isset($FeedSettings['itunes_type']) )
|
811 |
+
$FeedSettings['itunes_type'] = '';
|
812 |
+
|
813 |
+
$AdvancediTunesSettings = !empty($FeedSettings['itunes_summary']);
|
814 |
+
if( !empty($FeedSettings['itunes_subtitle']) )
|
815 |
+
$AdvancediTunesSettings = true;
|
816 |
+
//Logic to convert old iTunes categories to 2019 ones.
|
817 |
+
$CatArray = array('cat_1' => $FeedSettings['itunes_cat_1'], 'cat_2' => $FeedSettings['itunes_cat_2'], 'cat_3' => $FeedSettings['itunes_cat_3']);
|
818 |
+
$mappings = array('01-00' => '01-00', '01-01' => '01-02', '01-02' => '01-03', '01-03' => '01-04', '01-04' => '01-01',
|
819 |
+
'01-05' => '01-05', '01-06' => '01-06', '02-00' => '02-00', '02-02' => '02-01', '02-03' => '02-03',
|
820 |
+
'03-00' => '03-00', '04-00' => '04-00', '04-04' => '04-03', '07-00' => '07-00', '07-01' => '07-01', '07-04' => '07-06',
|
821 |
+
'08-00' => '09-00', '09-00' => '11-00', '11-00' => '13-00', '11-01' => '13-01', '11-02' => '13-02',
|
822 |
+
'11-03' => '13-03', '11-04' => '13-04', '11-05' => '13-05', '11-07' => '13-07', '12-02' => '14-06',
|
823 |
+
'12-03' => '14-09', '13-00' => '15-00', '13-02' => '15-02', '13-03' => '15-03', '13-04' => '15-04','14-03' => '16-15',
|
824 |
+
'15-00' => '17-00', '16-00' => '19-00');
|
825 |
+
foreach($CatArray as $key => $value) {
|
826 |
+
if(empty($FeedSettings['apple_'.$key])) {
|
827 |
+
if ($value === '02-01') {
|
828 |
+
// Business > Business News (02-01) to News > Business News (11-01)
|
829 |
+
$FeedSettings['apple_' . $key] = '12-01';
|
830 |
+
} else if ($value === '15-02') {
|
831 |
+
// Technology > Tech News (15-02) to News > Tech News (11-07)
|
832 |
+
$FeedSettings['apple_' . $key] = '12-07';
|
833 |
+
} else if ($value === '13-01') {
|
834 |
+
// Society & Culture > History (13-01) to History (08-00)
|
835 |
+
$FeedSettings['apple_' . $key] = '08-00';
|
836 |
+
} else if ($value === '12-01') {
|
837 |
+
// Science & Medicine > Medicine (12-01) to Health > Medicine (07-03)
|
838 |
+
$FeedSettings['apple_' . $key] = '07-03';
|
839 |
+
} else if($value === '05-01') {
|
840 |
+
// Games & Hobbies > Automotive (05-01) to Leisure > Automotive (10-02)
|
841 |
+
$FeedSettings['apple_'. $key] = '10-02';
|
842 |
+
} else if($value === '05-02') {
|
843 |
+
// Games & Hobbies > Aviation (05-02) to Leisure > Aviation (10-03)
|
844 |
+
$FeedSettings['apple_'. $key] = '10-03';
|
845 |
+
} else if($value == '05-03') {
|
846 |
+
// Games & Hobbies > Hobbies (05-03) to Leisure > Hobbies (10-06)
|
847 |
+
$FeedSettings['apple_'. $key] = '10-06';
|
848 |
+
} else if($value == '05-05') {
|
849 |
+
// Games & Hobbies > Video Games (05-05) to Leisure > Video Games (10-08)
|
850 |
+
$FeedSettings['apple_'. $key] = '10-08';
|
851 |
+
} else if (array_key_exists($value, $mappings)) {
|
852 |
+
//Category has a 1:1 mapping
|
853 |
+
$FeedSettings['apple_'. $key] = $mappings[$value];
|
854 |
+
}
|
855 |
+
}
|
856 |
+
}
|
857 |
+
?>
|
858 |
+
|
859 |
+
<h3><?php echo __('Apple Settings', 'powerpress'); ?></h3>
|
860 |
+
<table class="form-table">
|
861 |
+
<tr valign="top">
|
862 |
+
<th scope="row">
|
863 |
+
<?php echo __('iTunes Program Subtitle', 'powerpress'); ?> <br />
|
864 |
+
</th>
|
865 |
+
<td>
|
866 |
+
<input type="text" name="Feed[itunes_subtitle]" style="width: 60%;" value="<?php echo esc_attr($FeedSettings['itunes_subtitle']); ?>" maxlength="255" />
|
867 |
+
</td>
|
868 |
+
</tr>
|
869 |
+
|
870 |
+
<tr valign="top">
|
871 |
+
<th scope="row">
|
872 |
+
|
873 |
+
<?php echo __('iTunes Program Summary', 'powerpress'); ?></th>
|
874 |
+
<td>
|
875 |
+
<p style="margin-top: 5px;"><?php echo __('Your summary cannot exceed 4,000 characters in length and should not include HTML, except for hyperlinks', 'powerpress'); ?></p>
|
876 |
+
|
877 |
+
<textarea name="Feed[itunes_summary]" rows="5" style="width:80%;" ><?php echo esc_textarea($FeedSettings['itunes_summary']); ?></textarea>
|
878 |
+
<div>
|
879 |
+
<input type="hidden" name="General[itunes_cdata]" value="0" />
|
880 |
+
<input type="checkbox" name="General[itunes_cdata]" value="1" <?php echo ( !empty($General['itunes_cdata'])?'checked ':''); ?>/> <?php echo __('Wrap summary values with <![CDATA[ ... ]]> tags', 'powerpress'); ?>
|
881 |
+
</div>
|
882 |
+
</td>
|
883 |
+
</tr>
|
884 |
+
|
885 |
+
<?php
|
886 |
+
if( !empty($General['advanced_mode_2']) )
|
887 |
+
{
|
888 |
+
?>
|
889 |
+
<tr valign="top">
|
890 |
+
<th scope="row">
|
891 |
+
|
892 |
+
<?php echo __('iTunes Episode Summary', 'powerpress'); ?></th>
|
893 |
+
<td>
|
894 |
+
<div style="margin-top: 15px;"><input type="checkbox" name="Feed[enhance_itunes_summary]" value="1" <?php echo ( !empty($FeedSettings['enhance_itunes_summary'])?'checked ':''); ?>/> <?php echo __('Optimize iTunes Summary from Blog Posts', 'powerpress'); ?>
|
895 |
+
</div>
|
896 |
+
<p>
|
897 |
+
<?php echo __('Creates a friendlier view of your post/episode content.', 'powerpress'); ?>
|
898 |
+
</p>
|
899 |
+
</td>
|
900 |
+
</tr>
|
901 |
+
</table>
|
902 |
+
|
903 |
+
|
904 |
+
<table class="form-table">
|
905 |
+
<?php
|
906 |
+
if( !empty($FeedSettings['itunes_keywords']) )
|
907 |
+
{
|
908 |
+
?>
|
909 |
+
<tr valign="top">
|
910 |
+
<th scope="row">
|
911 |
+
<?php echo __('iTunes Program Keywords', 'powerpress'); ?> <br />
|
912 |
+
</th>
|
913 |
+
<td>
|
914 |
+
<input type="text" name="Feed[itunes_keywords]" style="width: 60%;" value="<?php echo esc_attr($FeedSettings['itunes_keywords']); ?>" maxlength="255" />
|
915 |
+
<p><?php echo __('Feature Deprecated by Apple. Keywords above are for your reference only.', 'powerpress'); ?></p>
|
916 |
+
</td>
|
917 |
+
</tr>
|
918 |
+
<?php
|
919 |
+
} // End iTunes keywords
|
920 |
+
} // end advanced mode
|
921 |
+
?>
|
922 |
+
|
923 |
+
<tr valign="top">
|
924 |
+
<fieldset style="border: 1px dashed #333333;">
|
925 |
+
<legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php echo __('Notice', 'powerpress'); ?></legend>
|
926 |
+
<div style="margin-left: 218px; margin-bottom: 10px;">
|
927 |
+
<strong>Apple Categories are changing in August, 2019. Please verify your primary and secondary categories are correct.</strong>
|
928 |
+
</div>
|
929 |
+
</fieldset>
|
930 |
+
<th scope="row">
|
931 |
+
<?php echo __('iTunes Category', 'powerpress'); ?>
|
932 |
+
<span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
|
933 |
+
</th>
|
934 |
+
<td style="width: 30%;">
|
935 |
+
<p><?php echo __('Up to July, 2019', 'powerpress') ?></p>
|
936 |
+
<select name="Feed[itunes_cat_1]" class="bpp_input_med">
|
937 |
+
<?php
|
938 |
+
|
939 |
+
$MoreCategories = false;
|
940 |
+
if( !empty($FeedSettings['itunes_cat_2']) )
|
941 |
+
$MoreCategories = true;
|
942 |
+
else if( !empty($FeedSettings['itunes_cat_3']) )
|
943 |
+
$MoreCategories = true;
|
944 |
+
|
945 |
+
$Categories = powerpress_itunes_categories(true);
|
946 |
+
$AppleCategories = powerpress_apple_categories(true);
|
947 |
+
|
948 |
+
echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
|
949 |
+
|
950 |
+
foreach( $Categories as $value=> $desc )
|
951 |
+
echo "\t<option value=\"$value\"". ($FeedSettings['itunes_cat_1']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
952 |
+
|
953 |
+
reset($Categories);
|
954 |
+
?>
|
955 |
+
</select>
|
956 |
+
<?php
|
957 |
+
if( !$MoreCategories && empty($General['seo_itunes']) ) { ?>
|
958 |
+
<a href="#" onclick="document.getElementById('more_itunes_cats').style.display='block';return false;"><?php echo __('more', 'powerpress'); ?></a>
|
959 |
+
<?php } ?>
|
960 |
+
<p style="width: 250px;">
|
961 |
+
<?php echo __('The category above is where you will appear when browsing iTunes.', 'powerpress'); ?>
|
962 |
+
</p>
|
963 |
+
</td>
|
964 |
+
<td>
|
965 |
+
<p><?php echo __('August, 2019 +', 'powerpress') ?></p>
|
966 |
+
<?php
|
967 |
+
$errorClass = null;
|
968 |
+
if(empty($FeedSettings['itunes_cat_1'])) {
|
969 |
+
//don't show an error if there isn't a corresponding itunes category
|
970 |
+
}
|
971 |
+
else if(empty($FeedSettings['apple_cat_1'])) {
|
972 |
+
$errorClass = "class='pp-form-error'";
|
973 |
+
}
|
974 |
+
?>
|
975 |
+
<select <?php echo $errorClass ?> name="Feed[apple_cat_1]" class="bpp_input_med">
|
976 |
+
<?php
|
977 |
+
|
978 |
+
echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
|
979 |
+
|
980 |
+
foreach( $AppleCategories as $value=> $desc ) {
|
981 |
+
echo "\t<option value=\"$value\"" . ($FeedSettings['apple_cat_1'] == $value ? ' selected' : '') . ">" . htmlspecialchars($desc) . "</option>\n";
|
982 |
+
}
|
983 |
+
reset($Categories);
|
984 |
+
?>
|
985 |
+
</select>
|
986 |
+
<?php
|
987 |
+
if($errorClass == "class='pp-form-error'") {
|
988 |
+
echo '<p style="width: 250px;">';
|
989 |
+
echo __('Please enter an Apple Podcasts category to prepare yourself for the new 2019 categories', 'powerpress');
|
990 |
+
echo '</p>'; }
|
991 |
+
else {
|
992 |
+
echo '<p style="height: 42px;"> </p>';
|
993 |
+
}
|
994 |
+
?>
|
995 |
+
</td>
|
996 |
+
</tr>
|
997 |
+
</table>
|
998 |
+
|
999 |
+
|
1000 |
+
<!-- start advanced features -->
|
1001 |
+
<div id="more_itunes_cats" style="display: <?php echo ( ($MoreCategories||!empty($General['seo_itunes']) )?'block':'none'); ?>;">
|
1002 |
+
<table class="form-table">
|
1003 |
+
<tr valign="top">
|
1004 |
+
<th scope="row">
|
1005 |
+
<?php echo __('iTunes Category 2', 'powerpress'); ?>
|
1006 |
+
</th>
|
1007 |
+
<td style="width: 30%;">
|
1008 |
+
<p><?php echo __('Up to July, 2019', 'powerpress') ?></p>
|
1009 |
+
<select name="Feed[itunes_cat_2]" class="bpp_input_med">
|
1010 |
+
<?php
|
1011 |
+
|
1012 |
+
|
1013 |
+
echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
|
1014 |
+
foreach( $Categories as $value=> $desc )
|
1015 |
+
echo "\t<option value=\"$value\"". ($FeedSettings['itunes_cat_2']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
1016 |
+
|
1017 |
+
reset($Categories);
|
1018 |
+
|
1019 |
+
?>
|
1020 |
+
</select>
|
1021 |
+
<p style="height: 42px;"> </p>
|
1022 |
+
<?php if( !empty($General['seo_itunes']) ) { ?>
|
1023 |
+
<p>
|
1024 |
+
<em><?php echo __('Podcasting SEO Suggestion: Select a second category.', 'powerpress'); ?></em>
|
1025 |
+
</p>
|
1026 |
+
<?php } ?>
|
1027 |
+
|
1028 |
+
</td>
|
1029 |
+
<td>
|
1030 |
+
<?php
|
1031 |
+
$errorClass = null;
|
1032 |
+
if(empty($FeedSettings['itunes_cat_2'])) {
|
1033 |
+
//don't show an error if there isn't a corresponding itunes caregory
|
1034 |
+
}
|
1035 |
+
else if(empty($FeedSettings['apple_cat_2'])) {
|
1036 |
+
$errorClass = "class='pp-form-error'";
|
1037 |
+
}
|
1038 |
+
?>
|
1039 |
+
<p><?php echo __('August, 2019 +', 'powerpress') ?></p>
|
1040 |
+
<select <?php echo $errorClass ?> name="Feed[apple_cat_2]" class="bpp_input_med">
|
1041 |
+
<?php
|
1042 |
+
|
1043 |
+
echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
|
1044 |
+
|
1045 |
+
foreach( $AppleCategories as $value=> $desc ) {
|
1046 |
+
|
1047 |
+
echo "\t<option value=\"$value\"" . ($FeedSettings['apple_cat_2'] == $value ? ' selected' : '') . ">" . htmlspecialchars($desc) . "</option>\n";
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
reset($Categories);
|
1051 |
+
?>
|
1052 |
+
</select>
|
1053 |
+
<?php
|
1054 |
+
if($errorClass == "class='pp-form-error'") {
|
1055 |
+
echo '<p style="width: 250px;">';
|
1056 |
+
echo __('Please enter an Apple Podcasts category to prepare yourself for the new 2019 categories', 'powerpress');
|
1057 |
+
echo '</p>'; }
|
1058 |
+
else {
|
1059 |
+
echo '<p style="height: 42px;"> </p>';
|
1060 |
+
}
|
1061 |
+
?>
|
1062 |
+
<?php if( !empty($General['seo_itunes']) ) { ?>
|
1063 |
+
<p style="height: 42px;"> </p>
|
1064 |
+
<?php } ?>
|
1065 |
+
|
1066 |
+
</td>
|
1067 |
+
|
1068 |
+
</tr>
|
1069 |
+
|
1070 |
+
<tr valign="top">
|
1071 |
+
<th scope="row">
|
1072 |
+
<?php echo __('iTunes Category 3', 'powerpress'); ?>
|
1073 |
+
</th>
|
1074 |
+
<td>
|
1075 |
+
<p><?php echo __('Up to July, 2019', 'powerpress') ?></p>
|
1076 |
+
<select name="Feed[itunes_cat_3]" class="bpp_input_med">
|
1077 |
+
<?php
|
1078 |
+
|
1079 |
+
echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
|
1080 |
+
foreach( $Categories as $value=> $desc )
|
1081 |
+
echo "\t<option value=\"$value\"". ($FeedSettings['itunes_cat_3']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
1082 |
+
|
1083 |
+
reset($Categories);
|
1084 |
+
?>
|
1085 |
+
</select>
|
1086 |
+
<p style="height: 42px;"> </p>
|
1087 |
+
<?php if( !empty($General['seo_itunes']) ) { ?>
|
1088 |
+
<p>
|
1089 |
+
<em><?php echo __('Podcasting SEO Suggestion: Select a third category.', 'powerpress'); ?></em>
|
1090 |
+
</p>
|
1091 |
+
<?php } ?>
|
1092 |
+
</td>
|
1093 |
+
<td>
|
1094 |
+
<?php
|
1095 |
+
$errorClass = null;
|
1096 |
+
if(empty($FeedSettings['itunes_cat_3'])) {
|
1097 |
+
//don't show an error if there isn't a corresponding itunes caregory
|
1098 |
+
}
|
1099 |
+
else if(empty($FeedSettings['apple_cat_3'])) {
|
1100 |
+
$errorClass = "class='pp-form-error'";
|
1101 |
+
}
|
1102 |
+
?>
|
1103 |
+
<p><?php echo __('August, 2019 +', 'powerpress') ?></p>
|
1104 |
+
<select <?php echo $errorClass ?> name="Feed[apple_cat_3]" class="bpp_input_med">
|
1105 |
+
<?php
|
1106 |
+
echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
|
1107 |
+
foreach( $AppleCategories as $value=> $desc ) {
|
1108 |
+
echo "\t<option value=\"$value\"" . ($FeedSettings['apple_cat_3'] == $value ? ' selected' : '') . ">" . htmlspecialchars($desc) . "</option>\n";
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
reset($Categories);
|
1112 |
+
?>
|
1113 |
+
</select>
|
1114 |
+
<?php
|
1115 |
+
if($errorClass == "class='pp-form-error'") {
|
1116 |
+
echo '<p style="width: 250px;">';
|
1117 |
+
echo __('Please enter an Apple Podcasts category to prepare yourself for the new 2019 categories', 'powerpress');
|
1118 |
+
echo '</p>';
|
1119 |
+
}
|
1120 |
+
else {
|
1121 |
+
echo '<p style="height: 42px;"> </p>';
|
1122 |
+
}
|
1123 |
+
?>
|
1124 |
+
<?php if( !empty($General['seo_itunes']) ) { ?>
|
1125 |
+
<p style="height: 42px;"> </p>
|
1126 |
+
<?php } ?>
|
1127 |
+
</td>
|
1128 |
+
</tr>
|
1129 |
+
</table>
|
1130 |
+
</div>
|
1131 |
+
<!-- end advanced features -->
|
1132 |
+
|
1133 |
+
|
1134 |
+
<table class="form-table">
|
1135 |
+
<tr valign="top">
|
1136 |
+
<th scope="row">
|
1137 |
+
<?php echo __('iTunes Explicit', 'powerpress'); ?>
|
1138 |
+
<span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
|
1139 |
+
</th>
|
1140 |
+
<td>
|
1141 |
+
<select name="Feed[itunes_explicit]" style="width: 70%;">
|
1142 |
+
<?php
|
1143 |
+
$explicit = array(0=> __('No option selected', 'powerpress'), 1=>__('Yes - explicit content', 'powerpress'), 2=>__('Clean - no explicit content', 'powerpress'));
|
1144 |
+
|
1145 |
+
foreach( $explicit as $value=> $desc )
|
1146 |
+
echo "\t<option value=\"$value\"". ($FeedSettings['itunes_explicit']==$value?' selected':''). (($FeedSettings['itunes_explicit']!=0&&$value==0)?'disabled':''). ">$desc</option>\n";
|
1147 |
+
|
1148 |
+
?>
|
1149 |
+
</select>
|
1150 |
+
<p>
|
1151 |
+
<em><?php echo __('Note: As of February, 2016, you must select either Yes or Clean.', 'powerpress'); ?></em>
|
1152 |
+
</p>
|
1153 |
+
</td>
|
1154 |
+
</tr>
|
1155 |
+
<?php if( !empty($General['advanced_mode_2']) ) { ?>
|
1156 |
+
<!-- start advanced features -->
|
1157 |
+
<tr valign="top">
|
1158 |
+
<th scope="row">
|
1159 |
+
<?php echo __('iTunes Author Name', 'powerpress'); ?>
|
1160 |
+
</th>
|
1161 |
+
<td>
|
1162 |
+
<input type="text" name="Feed[itunes_talent_name]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['itunes_talent_name']); ?>" maxlength="255" /><br />
|
1163 |
+
<div><input type="checkbox" name="Feed[itunes_author_post]" value="1" <?php echo ( !empty($FeedSettings['itunes_author_post'])?'checked ':''); ?>/> <?php echo __('Use blog post author\'s name for individual episodes.', 'powerpress'); ?></div>
|
1164 |
+
|
1165 |
+
<?php if( !empty($General['seo_itunes']) ) { ?>
|
1166 |
+
<p>
|
1167 |
+
<em><?php echo __('Podcasting SEO Suggestion: Include talent names and nicknames not mentioned in the show title.', 'powerpress'); ?></em>
|
1168 |
+
</p>
|
1169 |
+
<?php } ?>
|
1170 |
+
</td>
|
1171 |
+
</tr>
|
1172 |
+
<!-- end advanced features -->
|
1173 |
+
<?php } ?>
|
1174 |
+
|
1175 |
+
<tr valign="top">
|
1176 |
+
<th scope="row">
|
1177 |
+
<?php echo __('iTunes Email', 'powerpress'); ?>
|
1178 |
+
<span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
|
1179 |
+
</th>
|
1180 |
+
<td>
|
1181 |
+
<input type="text" name="Feed[email]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['email']); ?>" maxlength="255" />
|
1182 |
+
<div>(<?php echo __('iTunes will email this address when your podcast is accepted into the iTunes Directory.', 'powerpress'); ?>)</div>
|
1183 |
+
</td>
|
1184 |
+
</tr>
|
1185 |
+
|
1186 |
+
<?php if( empty($General['ios11_fields']) || $General['ios11_fields'] == 1 ) { ?>
|
1187 |
+
<tr valign="top">
|
1188 |
+
<th scope="row">
|
1189 |
+
<?php echo __('iTunes Type', 'powerpress'); ?>
|
1190 |
+
</th>
|
1191 |
+
<td>
|
1192 |
+
<select name="Feed[itunes_type]" class="bpp_input_med">
|
1193 |
+
<?php
|
1194 |
+
$types = array(''=> __('No option selected', 'powerpress'), 'episodic'=>__('Episodic (default)', 'powerpress'), 'serial'=>__('Serial', 'powerpress'));
|
1195 |
+
|
1196 |
+
foreach( $types as $value=> $desc )
|
1197 |
+
echo "\t<option value=\"$value\"". ($FeedSettings['itunes_type']==$value?' selected':''). ">$desc</option>\n";
|
1198 |
+
|
1199 |
+
?>
|
1200 |
+
</select>
|
1201 |
+
<p>
|
1202 |
+
<em><?php echo __('Episodic: displays latest episode first.', 'powerpress'); ?></em>
|
1203 |
+
</p>
|
1204 |
+
<p>
|
1205 |
+
<em><?php echo __('Serial: displays latest episode last.', 'powerpress'); ?></em>
|
1206 |
+
</p>
|
1207 |
+
</td>
|
1208 |
+
</tr>
|
1209 |
+
<?php } // end type ?>
|
1210 |
+
</table>
|
1211 |
+
|
1212 |
+
<?php if( !empty($General['advanced_mode_2']) ) { ?>
|
1213 |
+
<!-- start advanced features -->
|
1214 |
+
<table class="form-table">
|
1215 |
+
<tr valign="top">
|
1216 |
+
<th scope="row" >
|
1217 |
+
|
1218 |
+
<?php echo __('iTunes New Feed URL', 'powerpress'); ?></th>
|
1219 |
+
<td>
|
1220 |
+
<div id="new_feed_url_step_1" style="display: <?php echo ( !empty($FeedSettings['itunes_new_feed_url']) || !empty($FeedSettings['itunes_new_feed_url_podcast']) ?'none':'block'); ?>;">
|
1221 |
+
<p style="margin-top: 5px;"><strong><a href="#" onclick="return powerpress_new_feed_url_prompt();"><?php echo __('Set iTunes New Feed URL', 'powerpress'); ?></a></strong></p>
|
1222 |
+
<p><strong>
|
1223 |
+
<?php echo __('The iTunes New Feed URL option works primarily for Apple\'s iTunes application only, and should only be used if you are unable to implement a HTTP 301 redirect.', 'powerpress'); ?>
|
1224 |
+
<?php echo __('A 301 redirect will route <u>all podcast clients including iTunes</u> to your new feed address.', 'powerpress'); ?>
|
1225 |
+
</strong>
|
1226 |
+
</p>
|
1227 |
+
<p>
|
1228 |
+
<?php echo __('Learn more:', 'powerpress'); ?> <a href="https://create.blubrry.com/manual/syndicating-your-podcast-rss-feeds/changing-your-podcast-rss-feed-address-url/" target="_blank"><?php echo __('Changing Your Podcast RSS Feed Address (URL)', 'powerpress'); ?></a>
|
1229 |
+
</p>
|
1230 |
+
</div>
|
1231 |
+
<div id="new_feed_url_step_2" style="display: <?php echo ( !empty($FeedSettings['itunes_new_feed_url']) || !empty($FeedSettings['itunes_new_feed_url_podcast']) ?'block':'none'); ?>;">
|
1232 |
+
<p style="margin-top: 5px;"><strong><?php echo __('WARNING: Changes made here are permanent. If the New Feed URL entered is incorrect, you will lose subscribers and will no longer be able to update your listing in the iTunes Store.', 'powerpress'); ?></strong></p>
|
1233 |
+
<p><strong><?php echo __('DO NOT MODIFY THIS SETTING UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING.', 'powerpress'); ?></strong></p>
|
1234 |
+
<p>
|
1235 |
+
<?php echo htmlspecialchars( sprintf(__('Apple recommends you maintain the %s tag in your feed for at least two weeks to ensure that most subscribers will receive the new New Feed URL.', 'powerpress'), '<itunes:new-feed-url>' ) ); ?>
|
1236 |
+
</p>
|
1237 |
+
<p>
|
1238 |
+
<?php
|
1239 |
+
$FeedName = __('Main RSS2 feed', 'powerpress');
|
1240 |
+
$FeedURL = get_feed_link('rss2');
|
1241 |
+
if( $cat_ID )
|
1242 |
+
{
|
1243 |
+
$category = get_category_to_edit($cat_ID);
|
1244 |
+
$FeedName = sprintf( __('%s category feed', 'powerpress'), htmlspecialchars($category->name) );
|
1245 |
+
if( !empty($General['cat_casting_podcast_feeds']) )
|
1246 |
+
$FeedURL = get_category_feed_link($cat_ID, 'podcast');
|
1247 |
+
else
|
1248 |
+
$FeedURL = get_category_feed_link($cat_ID);
|
1249 |
+
}
|
1250 |
+
else if( $feed_slug )
|
1251 |
+
{
|
1252 |
+
if( !empty($General['custom_feeds'][ $feed_slug ]) )
|
1253 |
+
$FeedName = $General['custom_feeds'][ $feed_slug ];
|
1254 |
+
else
|
1255 |
+
$FeedName = __('Podcast', 'powerpress');
|
1256 |
+
$FeedName = trim($FeedName).' '.__('feed', 'powerpress');
|
1257 |
+
$FeedURL = get_feed_link($feed_slug);
|
1258 |
+
}
|
1259 |
+
else if( $FeedAttribs['type'] == 'ttid' )
|
1260 |
+
{
|
1261 |
+
$term_object = get_term_to_edit($FeedAttribs['term_id'],$FeedAttribs['taxonomy_type']);
|
1262 |
+
$FeedName = sprintf( __('%s taxonomy term feed', 'powerpress'), htmlspecialchars($term_object->name) );
|
1263 |
+
$FeedURL = get_term_feed_link($FeedAttribs['term_id'],$FeedAttribs['taxonomy_type'], 'rss2');
|
1264 |
+
}
|
1265 |
+
|
1266 |
+
echo sprintf(__('The New Feed URL value below will be applied to the %s (%s).', 'powerpress'), $FeedName, $FeedURL);
|
1267 |
+
?>
|
1268 |
+
</p>
|
1269 |
+
<p style="margin-bottom: 0;">
|
1270 |
+
<label style="width: 25%; float:left; display:block; font-weight: bold;"><?php echo __('New Feed URL', 'powerpress'); ?></label>
|
1271 |
+
<input type="text" name="Feed[itunes_new_feed_url]" style="width: 55%;" value="<?php echo esc_attr($FeedSettings['itunes_new_feed_url']); ?>" maxlength="255" />
|
1272 |
+
</p>
|
1273 |
+
<p style="margin-left: 25%;margin-top: 0;font-size: 90%;">(<?php echo __('Leave blank for no New Feed URL', 'powerpress'); ?>)</p>
|
1274 |
+
|
1275 |
+
<p><a href="https://create.blubrry.com/manual/syndicating-your-podcast-rss-feeds/changing-your-podcast-rss-feed-address-url/" target="_blank"><?php echo __('More information regarding the iTunes New Feed URL is available here.', 'powerpress'); ?></a></p>
|
1276 |
+
<p>
|
1277 |
+
<?php
|
1278 |
+
if( !$cat_ID && !$feed_slug )
|
1279 |
+
{
|
1280 |
+
if( empty($General['channels']) )
|
1281 |
+
echo sprintf(__('Please activate the \'Custom Podcast Channels\' Advanced Option to set the new-feed-url for your podcast only feed (%s)', 'powerpress'), get_feed_link('podcast') );
|
1282 |
+
else
|
1283 |
+
echo sprintf(__('Please navigate to the \'Custom Podcast Channels\' section to set the new-feed-url for your podcast only feed (%s)', 'powerpress'), get_feed_link('podcast') );
|
1284 |
+
}
|
1285 |
+
?>
|
1286 |
+
</p>
|
1287 |
+
</div>
|
1288 |
+
</td>
|
1289 |
+
</tr>
|
1290 |
+
</table>
|
1291 |
+
|
1292 |
+
<fieldset style="border: 1px dashed #333333;">
|
1293 |
+
<legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php echo __('Advanced Options', 'powerpress'); ?></legend>
|
1294 |
+
|
1295 |
+
<div style="margin-left: 230px; margin-bottom: 10px;">
|
1296 |
+
<p>
|
1297 |
+
<strong style="color: #CC0000; font-weight: bold;"><?php echo __('SETTINGS BELOW HAVE PERMANENT CONSEQUENCES.', 'powerpress'); ?></strong>
|
1298 |
+
</p>
|
1299 |
+
<p style="margin-bottom: 0;">
|
1300 |
+
<?php echo __('Feeds affected', 'powerpress'); ?>:
|
1301 |
+
</p>
|
1302 |
+
<div style="margin-left: 20px;">
|
1303 |
+
<?php
|
1304 |
+
// $General, $feed_slug=false, $cat_ID=false
|
1305 |
+
|
1306 |
+
if( $feed_slug )
|
1307 |
+
{
|
1308 |
+
echo '<a href="';
|
1309 |
+
echo esc_attr( get_feed_link($feed_slug) );
|
1310 |
+
echo '" target="_blank">';
|
1311 |
+
echo esc_html( get_feed_link($feed_slug) );
|
1312 |
+
echo '</a>';
|
1313 |
+
}
|
1314 |
+
else if( $cat_ID )
|
1315 |
+
{
|
1316 |
+
if( !empty($General['cat_casting_podcast_feeds']) )
|
1317 |
+
$feed_url = get_category_feed_link($cat_ID, 'podcast');
|
1318 |
+
else
|
1319 |
+
$feed_url = get_category_feed_link($cat_ID);
|
1320 |
+
echo '<a href="';
|
1321 |
+
echo esc_attr( $feed_url );
|
1322 |
+
echo '" target="_blank">';
|
1323 |
+
echo esc_html( $feed_url );
|
1324 |
+
echo '</a>';
|
1325 |
+
}
|
1326 |
+
else
|
1327 |
+
{
|
1328 |
+
echo '<a href="';
|
1329 |
+
echo esc_attr( get_feed_link('feed') );
|
1330 |
+
echo '" target="_blank">';
|
1331 |
+
echo esc_html( get_feed_link('feed') );
|
1332 |
+
echo '</a>';
|
1333 |
+
|
1334 |
+
if( empty($General['custom_feeds']['podcast']) )
|
1335 |
+
{
|
1336 |
+
echo '<br /><a href="';
|
1337 |
+
echo esc_attr( get_feed_link('podcast') );
|
1338 |
+
echo '" target="_blank">';
|
1339 |
+
echo esc_html( get_feed_link('podcast') );
|
1340 |
+
echo '</a>';
|
1341 |
+
}
|
1342 |
+
}
|
1343 |
+
|
1344 |
+
?>
|
1345 |
+
</div>
|
1346 |
+
|
1347 |
+
</div>
|
1348 |
+
<div id="permanent_itunes_settings">
|
1349 |
+
<table class="form-table">
|
1350 |
+
|
1351 |
+
<tr valign="top">
|
1352 |
+
<th scope="row" >
|
1353 |
+
|
1354 |
+
<span style="margin-left: 10px;"><?php echo __('iTunes Block', 'powerpress'); ?></span></th>
|
1355 |
+
<td>
|
1356 |
+
<input type="checkbox" name="Feed[itunes_block]" value="1" <?php if( !empty($FeedSettings['itunes_block']) ) echo 'checked'; ?> />
|
1357 |
+
<?php echo __('Prevent the entire podcast from appearing in the iTunes Podcast directory.', 'powerpress'); ?>
|
1358 |
+
</td>
|
1359 |
+
</tr>
|
1360 |
+
|
1361 |
+
<tr valign="top">
|
1362 |
+
<th scope="row" >
|
1363 |
+
|
1364 |
+
<span style="margin-left: 10px;"><?php echo __('iTunes Complete', 'powerpress'); ?></span></th>
|
1365 |
+
<td>
|
1366 |
+
<input type="checkbox" name="Feed[itunes_complete]" value="1" <?php if( !empty($FeedSettings['itunes_complete']) ) echo 'checked'; ?> />
|
1367 |
+
<?php echo __('Indicate the completion of a podcast. iTunes will no longer update your listing in the iTunes Podcast directory.', 'powerpress'); ?>
|
1368 |
+
</td>
|
1369 |
+
</tr>
|
1370 |
+
</table>
|
1371 |
+
</div>
|
1372 |
+
</fieldset>
|
1373 |
+
<!-- end advanced features -->
|
1374 |
+
<?php } // end other advanced options ?>
|
1375 |
+
<?php
|
1376 |
+
}
|
1377 |
+
|
1378 |
?>
|
powerpressadmin-jquery.php
CHANGED
@@ -1,948 +1,1090 @@
|
|
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();
|
9 |
-
|
10 |
-
// redirect1
|
11 |
-
// redirect2
|
12 |
-
// redirect3
|
13 |
-
for( $x = 1; $x <= 3; $x++ )
|
14 |
-
{
|
15 |
-
$field = sprintf('redirect%d', $x);
|
16 |
-
if( !empty($Settings[$field]) && stripos($Settings[$field], 'podtrac.com') === false )
|
17 |
-
$NewSettings[$field] = '';
|
18 |
-
}
|
19 |
-
$NewSettings['redirect1'] = $RedirectURL.'/';
|
20 |
-
|
21 |
-
if( count($NewSettings) > 0 )
|
22 |
-
powerpress_save_settings($NewSettings);
|
23 |
-
}
|
24 |
-
|
25 |
-
function powerpress_strip_redirect_urls($url)
|
26 |
-
{
|
27 |
-
$Settings = powerpress_get_settings('powerpress_general');
|
28 |
-
for( $x = 1; $x <= 3; $x++ )
|
29 |
-
{
|
30 |
-
$field = sprintf('redirect%d', $x);
|
31 |
-
if( !empty($Settings[$field]) )
|
32 |
-
{
|
33 |
-
$redirect_no_http = str_replace('http://', '', $Settings[$field]);
|
34 |
-
if( substr($redirect_no_http, -1, 1) != '/' )
|
35 |
-
$redirect_no_http .= '/';
|
36 |
-
$url = str_replace($redirect_no_http, '', $url);
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
return $url;
|
41 |
-
}
|
42 |
-
|
43 |
-
function powerpress_admin_jquery_init()
|
44 |
-
{
|
45 |
-
$Settings = false; // Important, never remove this
|
46 |
-
$Settings = get_option('powerpress_general');
|
47 |
-
|
48 |
-
$Error = false;
|
49 |
-
|
50 |
-
$Programs = false;
|
51 |
-
$Step = 1;
|
52 |
-
|
53 |
-
$action = (isset($_GET['action'])?$_GET['action']: (isset($_POST['action'])?$_POST['action']:false) );
|
54 |
-
if( !$action )
|
55 |
-
return;
|
56 |
-
|
57 |
-
$DeleteFile = false;
|
58 |
-
switch($action)
|
59 |
-
{
|
60 |
-
case 'powerpress-jquery-stats': {
|
61 |
-
|
62 |
-
// Make sure users have permission to access this
|
63 |
-
if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
|
64 |
-
{
|
65 |
-
powerpress_admin_jquery_header( __('Blubrry Media Statistics', 'powerpress') );
|
66 |
-
?>
|
67 |
-
<h2><?php echo __('Blubrry Media Statistics', 'powerpress'); ?></h2>
|
68 |
-
<p><?php echo __('You do not have sufficient permission to manage options.', 'powerpress'); ?></p>
|
69 |
-
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
70 |
-
<?php
|
71 |
-
powerpress_admin_jquery_footer();
|
72 |
-
exit;
|
73 |
-
}
|
74 |
-
else if( !current_user_can('edit_posts') )
|
75 |
-
{
|
76 |
-
powerpress_admin_jquery_header( __('Blubrry Media Statistics', 'powerpress') );
|
77 |
-
powerpress_page_message_add_notice( __('You do not have sufficient permission to view media statistics.', 'powerpress') );
|
78 |
-
powerpress_page_message_print();
|
79 |
-
powerpress_admin_jquery_footer();
|
80 |
-
exit;
|
81 |
-
}
|
82 |
-
|
83 |
-
$StatsCached = get_option('powerpress_stats');
|
84 |
-
|
85 |
-
powerpress_admin_jquery_header( __('Blubrry Media Statistics', 'powerpress') );
|
86 |
-
?>
|
87 |
-
<h2><?php echo __('Blubrry Media Statistics', 'powerpress'); ?></h2>
|
88 |
-
<?php
|
89 |
-
echo $StatsCached['content'];
|
90 |
-
powerpress_admin_jquery_footer();
|
91 |
-
exit;
|
92 |
-
}; break;
|
93 |
-
case 'powerpress-jquery-media-disable': {
|
94 |
-
|
95 |
-
if( !current_user_can('edit_posts') )
|
96 |
-
{
|
97 |
-
powerpress_admin_jquery_header('Uploader');
|
98 |
-
powerpress_page_message_add_notice( __('You do not have sufficient permission to disable this option.', 'powerpress') );
|
99 |
-
powerpress_page_message_print();
|
100 |
-
powerpress_admin_jquery_footer();
|
101 |
-
exit;
|
102 |
-
}
|
103 |
-
|
104 |
-
check_admin_referer('powerpress-jquery-media-disable');
|
105 |
-
|
106 |
-
$DisableSetting = array();
|
107 |
-
$DisableSetting['no_media_url_folder'] = 1;
|
108 |
-
powerpress_save_settings($DisableSetting);
|
109 |
-
|
110 |
-
powerpress_admin_jquery_header( __('Select Media', 'powerpress') );
|
111 |
-
?>
|
112 |
-
<h2><?php echo __('Select Media', 'powerpress'); ?></h2>
|
113 |
-
<p><?php echo __('Blubrry Media Hosting icon will no longer be displayed when editing posts and pages.', 'powerpress'); ?></p>
|
114 |
-
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
115 |
-
<?php
|
116 |
-
powerpress_admin_jquery_footer();
|
117 |
-
exit;
|
118 |
-
|
119 |
-
}; // No break here, let this fall thru..
|
120 |
-
|
121 |
-
case 'powerpress-jquery-hosting': {
|
122 |
-
|
123 |
-
powerpress_admin_jquery_header( __('Blubrry Podcast Media Hosting', 'powerpress') );
|
124 |
-
|
125 |
-
// Congratulations you aleady have hosting!
|
126 |
-
?>
|
127 |
-
<div style="line-height: 32px; height: 32px;"> </div>
|
128 |
-
<iframe src="//www.blubrry.com/pp/" frameborder="0" style="overflow:hidden; overflow-y: hidden;" width="100%" height="480" scrolling="no" seamless="seamless"></iframe>
|
129 |
-
<p><?php echo __('Already have a blubrry hosting account?', 'powerpress'); ?>
|
130 |
-
<strong><a class="button-primary button-blubrry thickbox" title="<?php echo esc_attr(__('Blubrry Services Integration', 'powerpress')); ?>" href="<?php echo wp_nonce_url(admin_url('admin.php?action=powerpress-jquery-account'), 'powerpress-jquery-account'); ?>"><?php echo __('Click here to link Blubrry account', 'powerpress'); ?></a></strong>
|
131 |
-
</p>
|
132 |
-
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
133 |
-
<?php
|
134 |
-
powerpress_admin_jquery_footer();
|
135 |
-
exit;
|
136 |
-
|
137 |
-
}; break;
|
138 |
-
|
139 |
-
case 'powerpress-jquery-media-delete': {
|
140 |
-
|
141 |
-
if( !current_user_can('edit_posts') )
|
142 |
-
{
|
143 |
-
powerpress_admin_jquery_header('Uploader');
|
144 |
-
powerpress_page_message_add_notice( __('You do not have sufficient permission to upload media.', 'powerpress') );
|
145 |
-
powerpress_page_message_print();
|
146 |
-
powerpress_admin_jquery_footer();
|
147 |
-
exit;
|
148 |
-
}
|
149 |
-
|
150 |
-
check_admin_referer('powerpress-jquery-media-delete');
|
151 |
-
$DeleteFile = $_GET['delete'];
|
152 |
-
|
153 |
-
}; // No break here, let this fall thru..
|
154 |
-
|
155 |
-
case 'powerpress-jquery-media': {
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
<
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
<
|
176 |
-
<p><?php echo __('
|
177 |
-
|
178 |
-
|
179 |
-
<
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
{
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
<?php
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
$
|
489 |
-
$
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
<
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
</
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
if(
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
if( $
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
948 |
?>
|
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();
|
9 |
+
|
10 |
+
// redirect1
|
11 |
+
// redirect2
|
12 |
+
// redirect3
|
13 |
+
for( $x = 1; $x <= 3; $x++ )
|
14 |
+
{
|
15 |
+
$field = sprintf('redirect%d', $x);
|
16 |
+
if( !empty($Settings[$field]) && stripos($Settings[$field], 'podtrac.com') === false )
|
17 |
+
$NewSettings[$field] = '';
|
18 |
+
}
|
19 |
+
$NewSettings['redirect1'] = $RedirectURL.'/';
|
20 |
+
|
21 |
+
if( count($NewSettings) > 0 )
|
22 |
+
powerpress_save_settings($NewSettings);
|
23 |
+
}
|
24 |
+
|
25 |
+
function powerpress_strip_redirect_urls($url)
|
26 |
+
{
|
27 |
+
$Settings = powerpress_get_settings('powerpress_general');
|
28 |
+
for( $x = 1; $x <= 3; $x++ )
|
29 |
+
{
|
30 |
+
$field = sprintf('redirect%d', $x);
|
31 |
+
if( !empty($Settings[$field]) )
|
32 |
+
{
|
33 |
+
$redirect_no_http = str_replace('http://', '', $Settings[$field]);
|
34 |
+
if( substr($redirect_no_http, -1, 1) != '/' )
|
35 |
+
$redirect_no_http .= '/';
|
36 |
+
$url = str_replace($redirect_no_http, '', $url);
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
return $url;
|
41 |
+
}
|
42 |
+
|
43 |
+
function powerpress_admin_jquery_init()
|
44 |
+
{
|
45 |
+
$Settings = false; // Important, never remove this
|
46 |
+
$Settings = get_option('powerpress_general');
|
47 |
+
|
48 |
+
$Error = false;
|
49 |
+
|
50 |
+
$Programs = false;
|
51 |
+
$Step = 1;
|
52 |
+
|
53 |
+
$action = (isset($_GET['action'])?$_GET['action']: (isset($_POST['action'])?$_POST['action']:false) );
|
54 |
+
if( !$action )
|
55 |
+
return;
|
56 |
+
|
57 |
+
$DeleteFile = false;
|
58 |
+
switch($action)
|
59 |
+
{
|
60 |
+
case 'powerpress-jquery-stats': {
|
61 |
+
|
62 |
+
// Make sure users have permission to access this
|
63 |
+
if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
|
64 |
+
{
|
65 |
+
powerpress_admin_jquery_header( __('Blubrry Media Statistics', 'powerpress') );
|
66 |
+
?>
|
67 |
+
<h2><?php echo __('Blubrry Media Statistics', 'powerpress'); ?></h2>
|
68 |
+
<p><?php echo __('You do not have sufficient permission to manage options.', 'powerpress'); ?></p>
|
69 |
+
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
70 |
+
<?php
|
71 |
+
powerpress_admin_jquery_footer();
|
72 |
+
exit;
|
73 |
+
}
|
74 |
+
else if( !current_user_can('edit_posts') )
|
75 |
+
{
|
76 |
+
powerpress_admin_jquery_header( __('Blubrry Media Statistics', 'powerpress') );
|
77 |
+
powerpress_page_message_add_notice( __('You do not have sufficient permission to view media statistics.', 'powerpress') );
|
78 |
+
powerpress_page_message_print();
|
79 |
+
powerpress_admin_jquery_footer();
|
80 |
+
exit;
|
81 |
+
}
|
82 |
+
|
83 |
+
$StatsCached = get_option('powerpress_stats');
|
84 |
+
|
85 |
+
powerpress_admin_jquery_header( __('Blubrry Media Statistics', 'powerpress') );
|
86 |
+
?>
|
87 |
+
<h2><?php echo __('Blubrry Media Statistics', 'powerpress'); ?></h2>
|
88 |
+
<?php
|
89 |
+
echo $StatsCached['content'];
|
90 |
+
powerpress_admin_jquery_footer();
|
91 |
+
exit;
|
92 |
+
}; break;
|
93 |
+
case 'powerpress-jquery-media-disable': {
|
94 |
+
|
95 |
+
if( !current_user_can('edit_posts') )
|
96 |
+
{
|
97 |
+
powerpress_admin_jquery_header('Uploader');
|
98 |
+
powerpress_page_message_add_notice( __('You do not have sufficient permission to disable this option.', 'powerpress') );
|
99 |
+
powerpress_page_message_print();
|
100 |
+
powerpress_admin_jquery_footer();
|
101 |
+
exit;
|
102 |
+
}
|
103 |
+
|
104 |
+
check_admin_referer('powerpress-jquery-media-disable');
|
105 |
+
|
106 |
+
$DisableSetting = array();
|
107 |
+
$DisableSetting['no_media_url_folder'] = 1;
|
108 |
+
powerpress_save_settings($DisableSetting);
|
109 |
+
|
110 |
+
powerpress_admin_jquery_header( __('Select Media', 'powerpress') );
|
111 |
+
?>
|
112 |
+
<h2><?php echo __('Select Media', 'powerpress'); ?></h2>
|
113 |
+
<p><?php echo __('Blubrry Media Hosting icon will no longer be displayed when editing posts and pages.', 'powerpress'); ?></p>
|
114 |
+
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
115 |
+
<?php
|
116 |
+
powerpress_admin_jquery_footer();
|
117 |
+
exit;
|
118 |
+
|
119 |
+
}; // No break here, let this fall thru..
|
120 |
+
|
121 |
+
case 'powerpress-jquery-hosting': {
|
122 |
+
|
123 |
+
powerpress_admin_jquery_header( __('Blubrry Podcast Media Hosting', 'powerpress') );
|
124 |
+
|
125 |
+
// Congratulations you aleady have hosting!
|
126 |
+
?>
|
127 |
+
<div style="line-height: 32px; height: 32px;"> </div>
|
128 |
+
<iframe src="//www.blubrry.com/pp/" frameborder="0" style="overflow:hidden; overflow-y: hidden;" width="100%" height="480" scrolling="no" seamless="seamless"></iframe>
|
129 |
+
<p><?php echo __('Already have a blubrry hosting account?', 'powerpress'); ?>
|
130 |
+
<strong><a class="button-primary button-blubrry thickbox" title="<?php echo esc_attr(__('Blubrry Services Integration', 'powerpress')); ?>" href="<?php echo wp_nonce_url(admin_url('admin.php?action=powerpress-jquery-account'), 'powerpress-jquery-account'); ?>"><?php echo __('Click here to link Blubrry account', 'powerpress'); ?></a></strong>
|
131 |
+
</p>
|
132 |
+
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
133 |
+
<?php
|
134 |
+
powerpress_admin_jquery_footer();
|
135 |
+
exit;
|
136 |
+
|
137 |
+
}; break;
|
138 |
+
|
139 |
+
case 'powerpress-jquery-media-delete': {
|
140 |
+
|
141 |
+
if( !current_user_can('edit_posts') )
|
142 |
+
{
|
143 |
+
powerpress_admin_jquery_header('Uploader');
|
144 |
+
powerpress_page_message_add_notice( __('You do not have sufficient permission to upload media.', 'powerpress') );
|
145 |
+
powerpress_page_message_print();
|
146 |
+
powerpress_admin_jquery_footer();
|
147 |
+
exit;
|
148 |
+
}
|
149 |
+
|
150 |
+
check_admin_referer('powerpress-jquery-media-delete');
|
151 |
+
$DeleteFile = $_GET['delete'];
|
152 |
+
|
153 |
+
}; // No break here, let this fall thru..
|
154 |
+
|
155 |
+
case 'powerpress-jquery-media': {
|
156 |
+
|
157 |
+
$QuotaData = false;
|
158 |
+
|
159 |
+
if( !current_user_can('edit_posts') )
|
160 |
+
{
|
161 |
+
powerpress_admin_jquery_header( __('Select Media', 'powerpress') );
|
162 |
+
?>
|
163 |
+
<h2><?php echo __('Select Media', 'powerpress'); ?></h2>
|
164 |
+
<p><?php echo __('You do not have sufficient permission to manage options.', 'powerpress'); ?></p>
|
165 |
+
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
166 |
+
<?php
|
167 |
+
powerpress_admin_jquery_footer();
|
168 |
+
exit;
|
169 |
+
}
|
170 |
+
|
171 |
+
if( empty($Settings['blubrry_auth']) || empty($Settings['blubrry_hosting']) || $Settings['blubrry_hosting'] === 'false' )
|
172 |
+
{
|
173 |
+
powerpress_admin_jquery_header( __('Select Media', 'powerpress') );
|
174 |
+
?>
|
175 |
+
<h2><?php echo __('Select Media', 'powerpress'); ?></h2>
|
176 |
+
<p><?php echo __('Wait a sec! This feature is only available to Blubrry Media Podcast Hosting customers.', 'powerpress'); ?></p>
|
177 |
+
<iframe src="//www.blubrry.com/pp/" frameborder="0" style="overflow:hidden; overflow-y: hidden;" width="100%" height="480" scrolling="no" seamless="seamless"></iframe>
|
178 |
+
<p><?php echo __('Already have a blubrry hosting account?', 'powerpress'); ?>
|
179 |
+
<strong><a class="button-primary button-blubrry thickbox" title="<?php echo esc_attr(__('Blubrry Services Integration', 'powerpress')); ?>" href="<?php echo wp_nonce_url(admin_url('admin.php?action=powerpress-jquery-account'), 'powerpress-jquery-account'); ?>"><?php echo __('Click here to link Blubrry account', 'powerpress'); ?></a></strong>
|
180 |
+
</p>
|
181 |
+
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
182 |
+
<?php
|
183 |
+
powerpress_admin_jquery_footer();
|
184 |
+
exit;
|
185 |
+
}
|
186 |
+
if(empty($Settings['network_mode'])) {
|
187 |
+
$Settings['network_mode'] = '0';
|
188 |
+
}
|
189 |
+
$Msg = false;
|
190 |
+
$blubrryProgramKeyword = $Settings['blubrry_program_keyword'];
|
191 |
+
$userLastPodcast = get_user_meta(get_current_user_id(), 'pp_default_podcast', true);
|
192 |
+
if(!empty($Settings['cat_casting']) && !empty($Settings['custom_cat_feeds']) && count($Settings['custom_cat_feeds']) > 0 && (empty($userLastPodcast) || $userLastPodcast == '!nodefault') && $Settings['network_mode'] == '1') {
|
193 |
+
$blubrryProgramKeyword = '!selectPodcast';
|
194 |
+
}
|
195 |
+
if(!empty($userLastPodcast) && $userLastPodcast != '!nodefault' && $Settings['network_mode'] == '1') {
|
196 |
+
$blubrryProgramKeyword = $userLastPodcast;
|
197 |
+
}
|
198 |
+
if(!empty($_GET['blubrryProgramKeyword'])) {
|
199 |
+
$blubrryProgramKeyword = $_GET['blubrryProgramKeyword'];
|
200 |
+
}
|
201 |
+
if( !empty($_GET['blubrryProgramKeyword']) && !empty($_GET['remSel']) && $_GET['remSel'] == 'true' ) {
|
202 |
+
update_user_meta(get_current_user_id(), 'pp_default_podcast', $blubrryProgramKeyword);
|
203 |
+
$userLastPodcast = $blubrryProgramKeyword;
|
204 |
+
}
|
205 |
+
if( isset($_GET['remSel']) && $_GET['remSel'] == 'false') {
|
206 |
+
update_user_meta(get_current_user_id(), 'pp_default_podcast', '!nodefault');
|
207 |
+
$userLastPodcast = '!nodefault';
|
208 |
+
}
|
209 |
+
if( $DeleteFile )
|
210 |
+
{
|
211 |
+
$json_data = false;
|
212 |
+
$api_url_array = powerpress_get_api_array();
|
213 |
+
foreach( $api_url_array as $index => $api_url )
|
214 |
+
{
|
215 |
+
$req_url = sprintf('%s/media/%s/%s?format=json', rtrim($api_url, '/'), $Settings['blubrry_program_keyword'], $DeleteFile );
|
216 |
+
$req_url = sprintf('%s/media/%s/%s?format=json', rtrim($api_url, '/'), $blubrryProgramKeyword , $DeleteFile );
|
217 |
+
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
|
218 |
+
$json_data = powerpress_remote_fopen($req_url, $Settings['blubrry_auth'], array(), 10, 'DELETE');
|
219 |
+
if( !$json_data && $api_url == 'https://api.blubrry.com/' ) { // Lets force cURL and see if that helps...
|
220 |
+
$json_data = powerpress_remote_fopen($req_url, $Settings['blubrry_auth'], array(), 10, 'DELETE', true); // Only give this 2 seconds to return results
|
221 |
+
}
|
222 |
+
if( $json_data != false )
|
223 |
+
break;
|
224 |
+
}
|
225 |
+
$results = powerpress_json_decode($json_data);
|
226 |
+
|
227 |
+
if( isset($results['text']) )
|
228 |
+
$Msg = $results['text'];
|
229 |
+
else if( isset($results['error']) )
|
230 |
+
$Msg = $results['error'];
|
231 |
+
else
|
232 |
+
$Msg = __('An unknown error occurred deleting media file.', 'powerpress');
|
233 |
+
}
|
234 |
+
|
235 |
+
$json_data = false;
|
236 |
+
$json_data_programs = false;
|
237 |
+
$api_url_array = powerpress_get_api_array();
|
238 |
+
foreach( $api_url_array as $index => $api_url )
|
239 |
+
{
|
240 |
+
$req_url = sprintf('%s/media/%s/index.json?quota=true&published=true', rtrim($api_url, '/'), $blubrryProgramKeyword );
|
241 |
+
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
|
242 |
+
$req_url_programs = sprintf('%s/service/index.json', rtrim($api_url, '/') );
|
243 |
+
$req_url_programs .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'?'. POWERPRESS_BLUBRRY_API_QSA:'');
|
244 |
+
$json_data = powerpress_remote_fopen($req_url, $Settings['blubrry_auth']);
|
245 |
+
$json_data_programs = powerpress_remote_fopen($req_url_programs, $Settings['blubrry_auth']);
|
246 |
+
if( !$json_data && $api_url == 'https://api.blubrry.com/' ) { // Lets force cURL and see if that helps...
|
247 |
+
$json_data = powerpress_remote_fopen($req_url, $Settings['blubrry_auth'], array(), 15, false, true);
|
248 |
+
}
|
249 |
+
else if(!$json_data_programs && $api_url == 'https://api.blubrry.com/') {
|
250 |
+
$json_data_programs = powerpress_remote_fopen($req_url, $Settings['blubrry_auth'], array(), 15, false, true);
|
251 |
+
}
|
252 |
+
if( $json_data != false )
|
253 |
+
break;
|
254 |
+
}
|
255 |
+
|
256 |
+
$results = powerpress_json_decode($json_data);
|
257 |
+
$results_programs = powerpress_json_decode($json_data_programs);
|
258 |
+
if( isset($results_programs['error']) )
|
259 |
+
{
|
260 |
+
$Error = $results_programs['error'];
|
261 |
+
if( strstr($Error, __('currently not available', 'powerpress') ) )
|
262 |
+
{
|
263 |
+
$Error = __('Unable to find podcasts for this account.', 'powerpress');
|
264 |
+
$Error .= '<br /><span style="font-weight: normal; font-size: 12px;">';
|
265 |
+
|
266 |
+
|
267 |
+
$Error .= 'Verify that the email address you enter here matches the email address you used when you listed your podcast on blubrry.com.</span>';
|
268 |
+
}
|
269 |
+
else if( preg_match('/No programs found.*media hosting/i', $results_programs['error']) )
|
270 |
+
{
|
271 |
+
$Error .= '<br/><span style="font-weight: normal; font-size: 12px;">';
|
272 |
+
$Error .= 'Service may take a few minutes to activate.</span>';
|
273 |
+
}
|
274 |
+
}
|
275 |
+
else if( !is_array($results_programs) )
|
276 |
+
{
|
277 |
+
$Error = $json_data_programs;
|
278 |
+
}
|
279 |
+
else {
|
280 |
+
// Get all the programs for this user...
|
281 |
+
foreach ($results_programs as $null => $row) {
|
282 |
+
$Programs[$row['program_keyword']] = $row['program_title'];
|
283 |
+
}
|
284 |
+
}
|
285 |
+
if( $Error ) {
|
286 |
+
powerpress_page_message_add_notice($Error, 'inline', false);
|
287 |
+
}
|
288 |
+
$FeedSlug = sanitize_title($_GET['podcast-feed']);
|
289 |
+
powerpress_admin_jquery_header( __('Select Media', 'powerpress'), true );
|
290 |
+
?>
|
291 |
+
<style>
|
292 |
+
.error {
|
293 |
+
padding: 6px 10px;
|
294 |
+
border 1px solid #ffc599;
|
295 |
+
background-color: #ff9800;
|
296 |
+
color: #fff;
|
297 |
+
font-weight: bold;
|
298 |
+
}
|
299 |
+
</style>
|
300 |
+
<script language="JavaScript" type="text/javascript"><!--
|
301 |
+
|
302 |
+
function SelectMedia(File)
|
303 |
+
{
|
304 |
+
self.parent.document.getElementById('powerpress_url_<?php echo $FeedSlug; ?>').value=File;
|
305 |
+
self.parent.document.getElementById('powerpress_hosting_<?php echo $FeedSlug; ?>').value='1';
|
306 |
+
self.parent.document.getElementById('powerpress_url_<?php echo $FeedSlug; ?>').readOnly=true;
|
307 |
+
self.parent.document.getElementById('powerpress_hosting_note_<?php echo $FeedSlug; ?>').style.display='block';
|
308 |
+
self.parent.document.getElementById('powerpress_program_keyword_<?php echo $FeedSlug; ?>').value= document.querySelector('#blubrry_program_keyword').value;
|
309 |
+
if( self.parent.powerpress_update_for_video )
|
310 |
+
self.parent.powerpress_update_for_video(File, '<?php echo $FeedSlug; ?>');
|
311 |
+
self.parent.tb_remove();
|
312 |
+
}
|
313 |
+
function SelectURL(url)
|
314 |
+
{
|
315 |
+
self.parent.document.getElementById('powerpress_url_<?php echo $FeedSlug; ?>').value=url;
|
316 |
+
self.parent.document.getElementById('powerpress_hosting_<?php echo $FeedSlug; ?>').value='0';
|
317 |
+
self.parent.document.getElementById('powerpress_url_<?php echo $FeedSlug; ?>').readOnly=false;
|
318 |
+
self.parent.document.getElementById('powerpress_hosting_note_<?php echo $FeedSlug; ?>').style.display='none';
|
319 |
+
if( self.parent.powerpress_update_for_video )
|
320 |
+
self.parent.powerpress_update_for_video(url, '<?php echo $FeedSlug; ?>');
|
321 |
+
self.parent.tb_remove();
|
322 |
+
}
|
323 |
+
function DeleteMedia(File)
|
324 |
+
{
|
325 |
+
return confirm('<?php echo __('Delete', 'powerpress'); ?>: '+File+'\n\n<?php echo __('Are you sure you want to delete this media file?', 'powerpress'); ?>');
|
326 |
+
}
|
327 |
+
|
328 |
+
window.onload = function() {
|
329 |
+
const program = document.querySelector('#blubrry_program_keyword');
|
330 |
+
const remember = document.querySelector('#remember_selection');
|
331 |
+
function reloadFrame() {
|
332 |
+
window.location = "<?php echo admin_url('admin.php'); ?>?action=powerpress-jquery-media&blubrryProgramKeyword="+ program.value +"&podcast-feed=<?php echo $FeedSlug; ?>&KeepThis=true&TB_iframe=true&modal=false&remSel=" + remember.checked;
|
333 |
+
}
|
334 |
+
program.addEventListener('change', function() {
|
335 |
+
reloadFrame();
|
336 |
+
});
|
337 |
+
remember.addEventListener('change', function() {
|
338 |
+
reloadFrame();
|
339 |
+
});
|
340 |
+
}
|
341 |
+
//-->
|
342 |
+
</script>
|
343 |
+
<div id="media-header">
|
344 |
+
<?php
|
345 |
+
if (count($Programs) > 1 && $Settings['network_mode'] == '1') {
|
346 |
+
?>
|
347 |
+
<h2><?php echo __('Select Program', 'powerpress'); ?></h2>
|
348 |
+
<span>
|
349 |
+
<select id="blubrry_program_keyword" name="Settings[blubrry_program_keyword]">
|
350 |
+
<option value="!selectPodcast"><?php echo __('Select Program', 'powerpress'); ?></option>
|
351 |
+
<?php
|
352 |
+
foreach ($Programs as $value => $desc)
|
353 |
+
echo "\t<option value=\"$value\"" . ($blubrryProgramKeyword == $value ? ' selected' : '') . ">$desc</option>\n";
|
354 |
+
?>
|
355 |
+
</select>
|
356 |
+
<span <?php echo $blubrryProgramKeyword == '!selectPodcast' ? 'style="visibility: hidden;"' : null ?>>
|
357 |
+
<input type="checkbox" id="remember_selection"
|
358 |
+
name="remember_selection" <?php echo ($userLastPodcast == '!nodefault') ? null : 'checked'; ?>>
|
359 |
+
<label for="remember_selection">Remember Selection</label>
|
360 |
+
</span>
|
361 |
+
</span>
|
362 |
+
<?php
|
363 |
+
} else {
|
364 |
+
?>
|
365 |
+
<input type="hidden" name="Settings[blubrry_program_keyword]" id="blubrry_program_keyword" value="<?php echo htmlspecialchars($blubrryProgramKeyword); ?>" />
|
366 |
+
<?php
|
367 |
+
}
|
368 |
+
?>
|
369 |
+
<h2><?php echo __('Select Media', 'powerpress') ?> <?php echo $blubrryProgramKeyword != '!selectPodcast' ? '- '. $Programs[$blubrryProgramKeyword] : null ?></h2>
|
370 |
+
<?php
|
371 |
+
if( !empty($results['quota']['expires'] ) )
|
372 |
+
{
|
373 |
+
$message = '';
|
374 |
+
if( !empty($results['quota']['expires']['expired']) )
|
375 |
+
{
|
376 |
+
$message = '<p>'. sprintf( __('Media hosting service expired on %s.', 'powerpress'), esc_attr($results['quota']['expires']['readable_date'])) . '</p>';
|
377 |
+
}
|
378 |
+
else
|
379 |
+
{
|
380 |
+
$message = '<p>'. sprintf( __('Media hosting service will expire on %s.', 'powerpress'), esc_attr($results['quota']['expires']['readable_date'])) . '</p>';
|
381 |
+
}
|
382 |
+
|
383 |
+
$message .= '<p style="text-align: center;"><strong><a href="'. $results['quota']['expires']['renew_link'] .'" target="_blank" style="text-decoration: underline;">'. __('Renew Media Hosting Service', 'powerpress') . '</a></strong></p>';
|
384 |
+
powerpress_page_message_add_notice( $message, 'inline', false );
|
385 |
+
powerpress_page_message_print();
|
386 |
+
}
|
387 |
+
else if($blubrryProgramKeyword == '!selectPodcast') {
|
388 |
+
$message = '<p style="text-align: center;"><strong>Please Select A Program</strong></p>';
|
389 |
+
powerpress_page_message_add_notice( $message, 'inline', false );
|
390 |
+
powerpress_page_message_print();
|
391 |
+
}
|
392 |
+
else if( empty($results) )
|
393 |
+
{
|
394 |
+
// Handle the error here.
|
395 |
+
$message = '<h3>'.__('Error', 'powerpress') . '</h3>';
|
396 |
+
global $g_powerpress_remote_error, $g_powerpress_remote_errorno;
|
397 |
+
if( !empty($g_powerpress_remote_errorno) && $g_powerpress_remote_errorno == 401 )
|
398 |
+
$message .= '<p>'. __('Incorrect sign-in email address or password.', 'powerpress').'</p><p>'.__('Verify your account entered under Services and Statistics settings then try again.', 'powerpress') .'</p>';
|
399 |
+
else if( !empty($g_powerpress_remote_error) )
|
400 |
+
$message .= '<p>'.$g_powerpress_remote_error.'</p>';
|
401 |
+
else
|
402 |
+
$message .= '<p>'.__('Unable to connect to service.','powerpress').'</p>';
|
403 |
+
|
404 |
+
// Print an erro here
|
405 |
+
powerpress_page_message_add_notice( $message, 'inline', false );
|
406 |
+
powerpress_page_message_print();
|
407 |
+
}
|
408 |
+
|
409 |
+
if( $Msg )
|
410 |
+
echo '<p>'. $Msg . '</p>';
|
411 |
+
if($blubrryProgramKeyword != '!selectPodcast') {
|
412 |
+
?>
|
413 |
+
<div class="media-upload-link"><a
|
414 |
+
title="<?php echo esc_attr(__('Blubrry Podcast Hosting', 'powerpress')); ?>"
|
415 |
+
href="<?php echo admin_url() . wp_nonce_url("admin.php?action=powerpress-jquery-upload", 'powerpress-jquery-upload'); ?>&blubrryProgramKeyword=<?php echo $blubrryProgramKeyword ?>&podcast-feed=<?php echo $FeedSlug; ?>&keepThis=true&TB_iframe=true&height=350&width=530&modal=false"
|
416 |
+
class="thickbox"><?php echo __('Upload Media File', 'powerpress'); ?></a></div>
|
417 |
+
<p><?php echo __('Select from media files uploaded to blubrry.com', 'powerpress'); ?>:</p>
|
418 |
+
</div>
|
419 |
+
<div id="media-items-container">
|
420 |
+
<div id="media-items">
|
421 |
+
<?php
|
422 |
+
|
423 |
+
if (isset($results['error'])) {
|
424 |
+
echo '<p class="error">' . $results['error'] . '</p>';
|
425 |
+
echo '<p><a href="https://publish.blubrry.com/services/" target="_blank">' . __('Manage your blubrry.com Account', 'powerpress') . '</a></p>';
|
426 |
+
} else if (is_array($results)) {
|
427 |
+
$PublishedList = false;
|
428 |
+
foreach ($results as $index => $data) {
|
429 |
+
if ($index === 'quota') {
|
430 |
+
$QuotaData = $data;
|
431 |
+
continue;
|
432 |
+
}
|
433 |
+
|
434 |
+
if ($PublishedList == false && !empty($data['published'])) {
|
435 |
+
?>
|
436 |
+
<div id="media-published-title">
|
437 |
+
<?php echo __('Last 20 Published media files', 'powerpress'); ?>:
|
438 |
+
</div>
|
439 |
+
<?php
|
440 |
+
$PublishedList = true;
|
441 |
+
}
|
442 |
+
|
443 |
+
?>
|
444 |
+
<div class="media-item <?php echo(empty($data['published']) ? 'media-unpublished' : 'media-published'); ?>">
|
445 |
+
<strong class="media-name"><?php echo htmlspecialchars($data['name']); ?></strong>
|
446 |
+
<cite><?php echo powerpress_byte_size($data['length']); ?></cite>
|
447 |
+
<?php if (!empty($data['published'])) { ?>
|
448 |
+
<div class="media-published-date">
|
449 |
+
· <?php echo __('Published on', 'powerpress'); ?> <?php echo date(get_option('date_format'), $data['last_modified']); ?></div>
|
450 |
+
<?php } ?>
|
451 |
+
<div class="media-item-links">
|
452 |
+
<?php if (!empty($data['published']) && !empty($data['url'])) { ?>
|
453 |
+
<a href="#"
|
454 |
+
onclick="SelectURL('<?php echo $data['url']; ?>'); return false;"><?php echo __('Select', 'powerpress'); ?></a>
|
455 |
+
<?php } else { ?>
|
456 |
+
<?php if (function_exists('curl_init')) { ?>
|
457 |
+
<a href="<?php echo admin_url() . wp_nonce_url("admin.php?action=powerpress-jquery-media-delete", 'powerpress-jquery-media-delete'); ?>&podcast-feed=<?php echo $FeedSlug; ?>&blubrryProgramKeyword=<?php echo urlencode($blubrryProgramKeyword); ?>&delete=<?php echo urlencode($data['name']); ?>"
|
458 |
+
onclick="return DeleteMedia('<?php echo $data['name']; ?>');"><?php echo __('Delete', 'powerpress'); ?></a> |
|
459 |
+
<?php } ?>
|
460 |
+
<a href="#"
|
461 |
+
onclick="SelectMedia('<?php echo $data['name']; ?>'); return false;"><?php echo __('Select', 'powerpress'); ?></a>
|
462 |
+
<?php } ?>
|
463 |
+
</div>
|
464 |
+
</div>
|
465 |
+
<?php
|
466 |
+
}
|
467 |
+
}
|
468 |
+
?>
|
469 |
+
</div><!-- end media-items -->
|
470 |
+
</div><!-- end media-items-container -->
|
471 |
+
<div id="media-footer">
|
472 |
+
<div class="media-upload-link"><a
|
473 |
+
title="<?php echo esc_attr(__('Blubrry Podcast Hosting', 'powerpress')); ?>"
|
474 |
+
href="<?php echo admin_url() . wp_nonce_url("admin.php?action=powerpress-jquery-upload", 'powerpress-jquery-upload'); ?>&blubrryProgramKeyword=<?php echo $blubrryProgramKeyword ?>&podcast-feed=<?php echo $FeedSlug; ?>&keepThis=true&TB_iframe=true&height=350&width=530&modal=false"
|
475 |
+
class="thickbox"><?php echo __('Upload Media File', 'powerpress'); ?></a></div>
|
476 |
+
<?php
|
477 |
+
}
|
478 |
+
if( $QuotaData ) {
|
479 |
+
|
480 |
+
$NextDate = strtotime( $QuotaData['published']['next_date']);
|
481 |
+
?>
|
482 |
+
<?php
|
483 |
+
if( $QuotaData['unpublished']['available'] != $QuotaData['unpublished']['total'] )
|
484 |
+
{
|
485 |
+
//echo '<p>';
|
486 |
+
//echo sprintf( __('You have uploaded %s (%s available) of your %s upload limit.', 'powerpress'),
|
487 |
+
// '<em>'. powerpress_byte_size($QuotaData['unpublished']['used']) .'</em>',
|
488 |
+
// '<em>'. powerpress_byte_size($QuotaData['unpublished']['available']) .'</em>',
|
489 |
+
// '<em>'. powerpress_byte_size($QuotaData['unpublished']['total']) .'</em>' );
|
490 |
+
//echo '</p>';
|
491 |
+
}
|
492 |
+
|
493 |
+
if( $QuotaData['published']['status'] == 'OK' )
|
494 |
+
{
|
495 |
+
?>
|
496 |
+
<p><?php
|
497 |
+
|
498 |
+
if( $QuotaData['published']['available'] > 0 ) // != $QuotaData['published']['total'] )
|
499 |
+
{
|
500 |
+
echo sprintf( __('Publishing space available: %s of (%s %%) of %s/month quota.', 'powerpress'),
|
501 |
+
'<em>'. powerpress_byte_size($QuotaData['published']['available']) .'</em>',
|
502 |
+
//'<em>'. powerpress_byte_size($QuotaData['published']['total']-$QuotaData['published']['available']) .'</em>',
|
503 |
+
'<em>'. round( ($QuotaData['published']['available']/$QuotaData['published']['total'])*100 ) .'</em>',
|
504 |
+
'<em>'. str_replace('.0', '', powerpress_byte_size($QuotaData['published']['total'])) .'</em>' );
|
505 |
+
//echo sprintf( __('You have %s available (%s published in the last 30 days) of your %s publish limit.', 'powerpress'),
|
506 |
+
// '<em>'. powerpress_byte_size($QuotaData['published']['available']) .'</em>',
|
507 |
+
// '<em>'. powerpress_byte_size($QuotaData['published']['total']-$QuotaData['published']['available']) .'</em>',
|
508 |
+
// '<em>'. powerpress_byte_size($QuotaData['published']['total']) .'</em>' );
|
509 |
+
}
|
510 |
+
else if( $QuotaData['published']['available'] == 0 ) // Hosting account frozen
|
511 |
+
{
|
512 |
+
|
513 |
+
}
|
514 |
+
else
|
515 |
+
{
|
516 |
+
echo sprintf( __('You have %s publish space available.', 'powerpress'),
|
517 |
+
'<em>'. powerpress_byte_size($QuotaData['published']['total']) .'</em>' );
|
518 |
+
}
|
519 |
+
?>
|
520 |
+
</p>
|
521 |
+
<p>
|
522 |
+
<?php
|
523 |
+
echo sprintf( __('No-Fault Hosting: You may upload a media file up to %s in size and be within the No-Fault maximum (25%% more than your %s quota).', 'powerpress'),
|
524 |
+
powerpress_byte_size($QuotaData['published']['no_fault_maximum']),
|
525 |
+
str_replace('.0', '', powerpress_byte_size($QuotaData['published']['total'])));
|
526 |
+
echo ' ';
|
527 |
+
echo '<a href="http://create.blubrry.com/resources/podcast-media-hosting/no-fault/" target="_blank">'. __('Learn More', 'powerpress') .'</a>';
|
528 |
+
?>
|
529 |
+
</p>
|
530 |
+
<p><?php
|
531 |
+
if( $QuotaData['published']['available'] != $QuotaData['published']['total'] )
|
532 |
+
{
|
533 |
+
echo sprintf( __('Your quota will reset on %s.', 'powerpress'),
|
534 |
+
date('m/d/Y', $NextDate) );
|
535 |
+
}
|
536 |
+
?>
|
537 |
+
</p>
|
538 |
+
<?php
|
539 |
+
}
|
540 |
+
else if( $QuotaData['published']['status'] == 'UNLIMITED' )
|
541 |
+
{
|
542 |
+
echo '<p>';
|
543 |
+
echo __('Publishing Space Available: Unlimited (Professional Hosting)', 'powerpress');
|
544 |
+
echo '<p>';
|
545 |
+
}
|
546 |
+
else
|
547 |
+
{
|
548 |
+
echo '<p>';
|
549 |
+
echo __('Publishing Space Available: Account has expired', 'powerpress');
|
550 |
+
echo '<p>';
|
551 |
+
}
|
552 |
+
?>
|
553 |
+
<?php } ?>
|
554 |
+
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
555 |
+
</div>
|
556 |
+
|
557 |
+
<?php
|
558 |
+
powerpress_admin_jquery_footer(true);
|
559 |
+
exit;
|
560 |
+
}; break;
|
561 |
+
case 'powerpress-jquery-account-save': {
|
562 |
+
|
563 |
+
if( !current_user_can(POWERPRESS_CAPABILITY_MANAGE_OPTIONS) )
|
564 |
+
{
|
565 |
+
powerpress_admin_jquery_header('Blubrry Services', 'powerpress');
|
566 |
+
powerpress_page_message_add_notice( __('You do not have sufficient permission to manage options.', 'powerpress') );
|
567 |
+
powerpress_page_message_print();
|
568 |
+
powerpress_admin_jquery_footer();
|
569 |
+
exit;
|
570 |
+
}
|
571 |
+
|
572 |
+
check_admin_referer('powerpress-jquery-account');
|
573 |
+
|
574 |
+
$Password = $_POST['Password'];
|
575 |
+
$SaveSettings = $_POST['Settings'];
|
576 |
+
$Password = powerpress_stripslashes($Password);
|
577 |
+
$SaveSettings = powerpress_stripslashes($SaveSettings);
|
578 |
+
|
579 |
+
$Save = false;
|
580 |
+
$Close = false;
|
581 |
+
|
582 |
+
|
583 |
+
if( !empty($_POST['Remove']) )
|
584 |
+
{
|
585 |
+
$SaveSettings['blubrry_username'] = '';
|
586 |
+
$SaveSettings['blubrry_auth'] = '';
|
587 |
+
$SaveSettings['blubrry_program_keyword'] = '';
|
588 |
+
$SaveSettings['blubrry_hosting'] = false;
|
589 |
+
$Close = true;
|
590 |
+
$Save = true;
|
591 |
+
}
|
592 |
+
else
|
593 |
+
{
|
594 |
+
$Programs = array();
|
595 |
+
$ProgramHosting = array();
|
596 |
+
|
597 |
+
// Anytime we change the password we need to test it...
|
598 |
+
$auth = base64_encode( $SaveSettings['blubrry_username'] . ':' . $Password );
|
599 |
+
$json_data = false;
|
600 |
+
$api_url_array = powerpress_get_api_array();
|
601 |
+
foreach( $api_url_array as $index => $api_url )
|
602 |
+
{
|
603 |
+
$req_url = sprintf('%s/service/index.json', rtrim($api_url, '/') );
|
604 |
+
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'?'. POWERPRESS_BLUBRRY_API_QSA:'');
|
605 |
+
$json_data = powerpress_remote_fopen($req_url, $auth);
|
606 |
+
if( !$json_data && $api_url == 'https://api.blubrry.com/' ) { // Lets force cURL and see if that helps...
|
607 |
+
$json_data = powerpress_remote_fopen($req_url, $auth, array(), 15, false, true);
|
608 |
+
}
|
609 |
+
if( $json_data != false )
|
610 |
+
break;
|
611 |
+
}
|
612 |
+
|
613 |
+
if( $json_data )
|
614 |
+
{
|
615 |
+
$results = powerpress_json_decode($json_data);
|
616 |
+
|
617 |
+
if( isset($results['error']) )
|
618 |
+
{
|
619 |
+
$Error = $results['error'];
|
620 |
+
if( strstr($Error, __('currently not available', 'powerpress') ) )
|
621 |
+
{
|
622 |
+
$Error = __('Unable to find podcasts for this account.', 'powerpress');
|
623 |
+
$Error .= '<br /><span style="font-weight: normal; font-size: 12px;">';
|
624 |
+
$Error .= 'Verify that the email address you enter here matches the email address you used when you listed your podcast on blubrry.com.</span>';
|
625 |
+
}
|
626 |
+
else if( preg_match('/No programs found.*media hosting/i', $results['error']) )
|
627 |
+
{
|
628 |
+
$Error .= '<br/><span style="font-weight: normal; font-size: 12px;">';
|
629 |
+
$Error .= 'Service may take a few minutes to activate.</span>';
|
630 |
+
}
|
631 |
+
}
|
632 |
+
else if( !is_array($results) )
|
633 |
+
{
|
634 |
+
$Error = $json_data;
|
635 |
+
}
|
636 |
+
else
|
637 |
+
{
|
638 |
+
// Get all the programs for this user...
|
639 |
+
foreach( $results as $null => $row )
|
640 |
+
{
|
641 |
+
$Programs[ $row['program_keyword'] ] = $row['program_title'];
|
642 |
+
if( $row['hosting'] === true || $row['hosting'] == 'true' )
|
643 |
+
$ProgramHosting[ $row['program_keyword'] ] = true;
|
644 |
+
else
|
645 |
+
$ProgramHosting[ $row['program_keyword'] ] = false;
|
646 |
+
}
|
647 |
+
|
648 |
+
if( count($Programs) > 0 )
|
649 |
+
{
|
650 |
+
$SaveSettings['blubrry_auth'] = $auth;
|
651 |
+
|
652 |
+
if( !empty($SaveSettings['blubrry_program_keyword']) )
|
653 |
+
{
|
654 |
+
powerpress_add_blubrry_redirect($SaveSettings['blubrry_program_keyword']);
|
655 |
+
$SaveSettings['blubrry_hosting'] = $ProgramHosting[ $SaveSettings['blubrry_program_keyword'] ];
|
656 |
+
if( !is_bool($SaveSettings['blubrry_hosting']) )
|
657 |
+
{
|
658 |
+
if( $SaveSettings['blubrry_hosting'] === 'false' || empty($SaveSettings['blubrry_hosting']) )
|
659 |
+
$SaveSettings['blubrry_hosting'] = false;
|
660 |
+
}
|
661 |
+
|
662 |
+
$Save = true;
|
663 |
+
$Close = true;
|
664 |
+
}
|
665 |
+
else if( isset($SaveSettings['blubrry_program_keyword']) ) // Present but empty
|
666 |
+
{
|
667 |
+
$Error = __('You must select a program to continue.', 'powerpress');
|
668 |
+
}
|
669 |
+
else if( count($Programs) == 1 )
|
670 |
+
{
|
671 |
+
foreach( $Programs as $keyword => $title ) {
|
672 |
+
break;
|
673 |
+
}
|
674 |
+
|
675 |
+
$SaveSettings['blubrry_program_keyword'] = $keyword;
|
676 |
+
$SaveSettings['blubrry_hosting'] = $ProgramHosting[ $keyword ];
|
677 |
+
if( !is_bool($SaveSettings['blubrry_hosting']) )
|
678 |
+
{
|
679 |
+
if( $SaveSettings['blubrry_hosting'] === 'false' || empty($SaveSettings['blubrry_hosting']) )
|
680 |
+
$SaveSettings['blubrry_hosting'] = false;
|
681 |
+
}
|
682 |
+
powerpress_add_blubrry_redirect($keyword);
|
683 |
+
$Close = true;
|
684 |
+
$Save = true;
|
685 |
+
}
|
686 |
+
else
|
687 |
+
{
|
688 |
+
$Error = __('Please select your podcast program to continue.', 'powerpress');
|
689 |
+
$Step = 2;
|
690 |
+
$Settings['blubrry_username'] = $SaveSettings['blubrry_username'];
|
691 |
+
}
|
692 |
+
}
|
693 |
+
else
|
694 |
+
{
|
695 |
+
$Error = __('No podcasts for this account are listed on blubrry.com.', 'powerpress');
|
696 |
+
}
|
697 |
+
}
|
698 |
+
}
|
699 |
+
else
|
700 |
+
{
|
701 |
+
global $g_powerpress_remote_error, $g_powerpress_remote_errorno;
|
702 |
+
//$Error = '<h3>'. __('Error', 'powerpress') .'</h3>';
|
703 |
+
if( !empty($g_powerpress_remote_errorno) && $g_powerpress_remote_errorno == 401 )
|
704 |
+
$Error .= '<p>'. __('Incorrect sign-in email address or password.', 'powerpress') .'</p><p>'. __('Verify your account settings then try again.', 'powerpress') .'</p>';
|
705 |
+
else if( !empty($g_powerpress_remote_error) )
|
706 |
+
$Error .= '<p>'.$g_powerpress_remote_error .'</p>';
|
707 |
+
else
|
708 |
+
$Error .= '<p>'.__('Authentication failed.', 'powerpress') .'</p>';
|
709 |
+
}
|
710 |
+
|
711 |
+
if( $Error )
|
712 |
+
{
|
713 |
+
$Error .= '<p style="text-align: center;"><a href="http://create.blubrry.com/resources/powerpress/powerpress-settings/services-stats/" target="_blank">'. __('Click Here For Help','powerpress') .'</a></p>';
|
714 |
+
}
|
715 |
+
}
|
716 |
+
|
717 |
+
if( $Save )
|
718 |
+
$SaveSettings['network_mode'] = (isset($SaveSettings['network_mode'])) ? 1 : 0;
|
719 |
+
powerpress_save_settings($SaveSettings);
|
720 |
+
|
721 |
+
// Clear cached statistics
|
722 |
+
delete_option('powerpress_stats');
|
723 |
+
|
724 |
+
if( $Error )
|
725 |
+
powerpress_page_message_add_notice( $Error, 'inline', false );
|
726 |
+
|
727 |
+
if( $Close )
|
728 |
+
{
|
729 |
+
powerpress_admin_jquery_header( __('Blubrry Services', 'powerpress') );
|
730 |
+
powerpress_page_message_print();
|
731 |
+
?>
|
732 |
+
<p style="display: none; text-align: right; position: absolute; top: 5px; right: 5px; margin: 0; padding:0;"><a href="#" onclick="self.parent.tb_remove(); return false;" title="<?php echo __('Close', 'powerpress'); ?>"><img src="<?php echo admin_url(); ?>/images/no.png" alt="<?php echo __('Close', 'powerpress'); ?>" /></a></p>
|
733 |
+
<h2><?php echo __('Blubrry Services', 'powerpress'); ?></h2>
|
734 |
+
<p style="text-align: center;"><strong><?php echo __('Settings Saved Successfully!', 'powerpress'); ?></strong></p>
|
735 |
+
<p style="text-align: center;">
|
736 |
+
<a href="<?php echo admin_url("admin.php?page=powerpressadmin_basic"); ?>" onclick="self.parent.tb_remove(); return false;" target="_top"><?php echo __('Close', 'powerpress'); ?></a>
|
737 |
+
</p>
|
738 |
+
<script type="text/javascript"><!--
|
739 |
+
|
740 |
+
jQuery(document).ready(function($) {
|
741 |
+
// Upload loading, check the parent window for #blubrry_stats_settings div
|
742 |
+
if( jQuery('#blubrry_stats_settings',parent.document).length )
|
743 |
+
{
|
744 |
+
jQuery('#blubrry_stats_settings',parent.document).html('');
|
745 |
+
}
|
746 |
+
});
|
747 |
+
|
748 |
+
// --></script>
|
749 |
+
<?php
|
750 |
+
powerpress_admin_jquery_footer();
|
751 |
+
exit;
|
752 |
+
}
|
753 |
+
|
754 |
+
|
755 |
+
} // no break here, let the next case catch it...
|
756 |
+
case 'powerpress-jquery-account':
|
757 |
+
{
|
758 |
+
if( !current_user_can(POWERPRESS_CAPABILITY_MANAGE_OPTIONS) )
|
759 |
+
{
|
760 |
+
powerpress_admin_jquery_header( __('Blubrry Services', 'powerpress') );
|
761 |
+
powerpress_page_message_add_notice( __('You do not have sufficient permission to manage options.', 'powerpress') );
|
762 |
+
powerpress_page_message_print();
|
763 |
+
powerpress_admin_jquery_footer();
|
764 |
+
exit;
|
765 |
+
}
|
766 |
+
|
767 |
+
if( !ini_get( 'allow_url_fopen' ) && !function_exists( 'curl_init' ) )
|
768 |
+
{
|
769 |
+
powerpress_admin_jquery_header( __('Blubrry Services', 'powerpress') );
|
770 |
+
powerpress_page_message_add_notice( __('Your server must either have the php.ini setting \'allow_url_fopen\' enabled or have the PHP cURL library installed in order to continue.', 'powerpress') );
|
771 |
+
powerpress_page_message_print();
|
772 |
+
powerpress_admin_jquery_footer();
|
773 |
+
exit;
|
774 |
+
}
|
775 |
+
|
776 |
+
check_admin_referer('powerpress-jquery-account');
|
777 |
+
|
778 |
+
if( !$Settings )
|
779 |
+
$Settings = get_option('powerpress_general');
|
780 |
+
|
781 |
+
if( empty($Settings['blubrry_username']) )
|
782 |
+
$Settings['blubrry_username'] = '';
|
783 |
+
if( empty($Settings['blubrry_hosting']) || $Settings['blubrry_hosting'] === 'false' )
|
784 |
+
$Settings['blubrry_hosting'] = false;
|
785 |
+
if( empty($Settings['blubrry_program_keyword']) )
|
786 |
+
$Settings['blubrry_program_keyword'] = '';
|
787 |
+
if(empty($Settings['network_mode'])) {
|
788 |
+
$Settings['network_mode'] = '0';
|
789 |
+
}
|
790 |
+
|
791 |
+
if( $Programs == false )
|
792 |
+
$Programs = array();
|
793 |
+
|
794 |
+
powerpress_admin_jquery_header( __('Blubrry Services', 'powerpress') );
|
795 |
+
powerpress_page_message_print();
|
796 |
+
?>
|
797 |
+
<form action="<?php echo admin_url('admin.php'); ?>" enctype="multipart/form-data" method="post">
|
798 |
+
<?php wp_nonce_field('powerpress-jquery-account'); ?>
|
799 |
+
<input type="hidden" name="action" value="powerpress-jquery-account-save" />
|
800 |
+
<div id="accountinfo">
|
801 |
+
<h2><?php echo __('Blubrry Services', 'powerpress'); ?></h2>
|
802 |
+
<?php if( $Step == 1 ) { ?>
|
803 |
+
<p>
|
804 |
+
<label for="blubrry_username"><?php echo __('Blubrry User Name (Email)', 'powerpress'); ?></label>
|
805 |
+
<input type="text" id="blubrry_username" name="Settings[blubrry_username]" value="<?php echo esc_attr($Settings['blubrry_username']); ?>" />
|
806 |
+
</p>
|
807 |
+
<p id="password_row">
|
808 |
+
<label for="password_password"><?php echo __('Blubrry Password', 'powerpress'); ?></label>
|
809 |
+
<input type="password" id="password_password" name="Password" value="" />
|
810 |
+
</p>
|
811 |
+
<?php } else { ?>
|
812 |
+
<input type="hidden" name="Settings[blubrry_username]" value="<?php echo esc_attr($Settings['blubrry_username']); ?>" />
|
813 |
+
<input type="hidden" name="Password" value="<?php echo esc_attr($Password); ?>" />
|
814 |
+
<!-- <input type="hidden" name="Settings[blubrry_hosting]" value="<?php echo $Settings['blubrry_hosting']; ?>" /> -->
|
815 |
+
<p>
|
816 |
+
<label for="blubrry_program_keyword"><?php echo __('Select Default Program', 'powerpress'); ?></label>
|
817 |
+
<select id="blubrry_program_keyword" name="Settings[blubrry_program_keyword]">
|
818 |
+
<?php
|
819 |
+
if (count($Programs) > 1 && $Settings['network_mode'] == '1') {
|
820 |
+
?>
|
821 |
+
<option value="no_default"><?php echo __('No Default', 'powerpress'); ?></option>
|
822 |
+
<?php
|
823 |
+
}
|
824 |
+
foreach( $Programs as $value => $desc )
|
825 |
+
echo "\t<option value=\"$value\"". ($Settings['blubrry_program_keyword']==$value?' selected':''). ">$desc</option>\n";
|
826 |
+
?>
|
827 |
+
</select>
|
828 |
+
</p>
|
829 |
+
<p>
|
830 |
+
<label for="blubrry_network_mode"><?php echo __('Network mode (publish to multiple Blubrry Hosting Accounts)', 'powerpress') ?></label>
|
831 |
+
<input type="checkbox" id="blubrry_network_mode" value="1" name="Settings[network_mode]" <?php echo $Settings['network_mode'] == '1' ? 'checked' : ''; ?> />
|
832 |
+
</p>
|
833 |
+
<?php } ?>
|
834 |
+
<p>
|
835 |
+
<input type="submit" name="Save" value="<?php echo __('Save', 'powerpress'); ?>" />
|
836 |
+
<input type="button" name="Cancel" value="<?php echo __('Cancel', 'powerpress'); ?>" onclick="self.parent.tb_remove();" />
|
837 |
+
<input type="submit" name="Remove" value="Remove" style="float: right;" onclick="return confirm('<?php echo __('Remove Blubrry Services Integration, are you sure?', 'powerpress'); ?>');" />
|
838 |
+
</p>
|
839 |
+
</div>
|
840 |
+
</form>
|
841 |
+
<script type="text/javascript"><!--
|
842 |
+
|
843 |
+
|
844 |
+
jQuery(document).ready(function($) {
|
845 |
+
jQuery('#blubrry_network_mode').change( function(event) {
|
846 |
+
if(this.checked) {
|
847 |
+
jQuery("#blubrry_program_keyword").prepend('<option value="no_default"><?php echo __("No Default", "powerpress"); ?></option>');
|
848 |
+
}
|
849 |
+
else {
|
850 |
+
jQuery('#blubrry_program_keyword option[value="no_default"').remove();
|
851 |
+
}
|
852 |
+
|
853 |
+
} );
|
854 |
+
} );
|
855 |
+
//-->
|
856 |
+
</script>
|
857 |
+
<?php
|
858 |
+
powerpress_admin_jquery_footer();
|
859 |
+
exit;
|
860 |
+
}; break;
|
861 |
+
case 'powerpress-jquery-upload': {
|
862 |
+
|
863 |
+
if( !current_user_can('edit_posts') )
|
864 |
+
{
|
865 |
+
powerpress_admin_jquery_header( __('Uploader', 'powerpress') );
|
866 |
+
powerpress_page_message_add_notice( __('You do not have sufficient permission to upload media.','powerpress') );
|
867 |
+
powerpress_page_message_print();
|
868 |
+
powerpress_admin_jquery_footer();
|
869 |
+
exit;
|
870 |
+
}
|
871 |
+
|
872 |
+
check_admin_referer('powerpress-jquery-upload');
|
873 |
+
|
874 |
+
$RedirectURL = false;
|
875 |
+
$Error = false;
|
876 |
+
|
877 |
+
if( !$Settings )
|
878 |
+
$Settings = get_option('powerpress_general');
|
879 |
+
|
880 |
+
if( empty($Settings['blubrry_hosting']) || $Settings['blubrry_hosting'] === 'false' )
|
881 |
+
$Settings['blubrry_hosting'] = false;
|
882 |
+
if( empty($Settings['blubrry_program_keyword']) )
|
883 |
+
$Settings['blubrry_program_keyword'] = '';
|
884 |
+
if( empty($Settings['blubrry_auth']) )
|
885 |
+
$Settings['blubrry_auth'] = '';
|
886 |
+
|
887 |
+
if( empty($Settings['blubrry_hosting']) )
|
888 |
+
{
|
889 |
+
$Error = __('This feature is available to Blubrry Hosting users only.','powerpress');
|
890 |
+
}
|
891 |
+
$blubrryProgramKeyword = $Settings['blubrry_program_keyword'];
|
892 |
+
if( !empty($_GET['blubrryProgramKeyword']) ) {
|
893 |
+
$blubrryProgramKeyword = $_GET['blubrryProgramKeyword'];
|
894 |
+
}
|
895 |
+
if( $Error == false )
|
896 |
+
{
|
897 |
+
$json_data = false;
|
898 |
+
$api_url_array = powerpress_get_api_array();
|
899 |
+
foreach( $api_url_array as $index => $api_url )
|
900 |
+
{
|
901 |
+
$req_url = sprintf('%s/media/%s/upload_session.json', rtrim($api_url, '/'), $blubrryProgramKeyword );
|
902 |
+
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'?'. POWERPRESS_BLUBRRY_API_QSA:'');
|
903 |
+
$json_data = powerpress_remote_fopen($req_url, $Settings['blubrry_auth']);
|
904 |
+
if( !$json_data && $api_url == 'https://api.blubrry.com/' ) { // Lets force cURL and see if that helps...
|
905 |
+
$json_data = powerpress_remote_fopen($req_url, $Settings['blubrry_auth'], array(), 15, false, true);
|
906 |
+
}
|
907 |
+
if( $json_data != false )
|
908 |
+
break;
|
909 |
+
}
|
910 |
+
|
911 |
+
|
912 |
+
$results = powerpress_json_decode($json_data);
|
913 |
+
|
914 |
+
// We need to obtain an upload session for this user...
|
915 |
+
if( isset($results['error']) && strlen($results['error']) > 1 )
|
916 |
+
{
|
917 |
+
$Error = $results['error'];
|
918 |
+
if( strstr($Error, 'currently not available') )
|
919 |
+
$Error = __('Unable to find podcasts for this account.','powerpress');
|
920 |
+
}
|
921 |
+
else if( $results === $json_data )
|
922 |
+
{
|
923 |
+
$Error = $json_data;
|
924 |
+
}
|
925 |
+
else if( !is_array($results) || $results == false )
|
926 |
+
{
|
927 |
+
$Error = $json_data;
|
928 |
+
}
|
929 |
+
else
|
930 |
+
{
|
931 |
+
if( isset($results['url']) && !empty($results['url']) )
|
932 |
+
$RedirectURL = $results['url'];
|
933 |
+
}
|
934 |
+
}
|
935 |
+
|
936 |
+
if( $Error == false && $RedirectURL )
|
937 |
+
{
|
938 |
+
$RedirectURL .= '&ReturnURL=';
|
939 |
+
$RedirectURL .= urlencode( admin_url("admin.php?action=powerpress-jquery-upload-complete") );
|
940 |
+
header("Location: $RedirectURL");
|
941 |
+
exit;
|
942 |
+
}
|
943 |
+
else if( $Error == false )
|
944 |
+
{
|
945 |
+
global $g_powerpress_remote_error, $g_powerpress_remote_errorno;
|
946 |
+
if( !empty($g_powerpress_remote_errorno) && $g_powerpress_remote_errorno == 401 )
|
947 |
+
$Error = '<p>'. __('Incorrect sign-in email address or password.', 'powerpress').'</p><p>'.__('Verify your account entered under Services and Statistics settings then try again.', 'powerpress') .'</p>';
|
948 |
+
else if( !empty($g_powerpress_remote_error) )
|
949 |
+
$Error = '<p>'.$g_powerpress_remote_error .'</p>';
|
950 |
+
else
|
951 |
+
$Error = '<p>'.__('Unable to obtain upload session.','powerpress') .'</p>';
|
952 |
+
}
|
953 |
+
|
954 |
+
powerpress_admin_jquery_header( __('Uploader','powerpress') );
|
955 |
+
echo '<h2>'. __('Uploader','powerpress') .'</h2>';
|
956 |
+
echo '<p>';
|
957 |
+
echo $Error;
|
958 |
+
echo '</p>';
|
959 |
+
?>
|
960 |
+
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
961 |
+
<?php
|
962 |
+
powerpress_admin_jquery_footer();
|
963 |
+
exit;
|
964 |
+
}; break;
|
965 |
+
case 'powerpress-jquery-upload-complete': {
|
966 |
+
|
967 |
+
if( !current_user_can('edit_posts') )
|
968 |
+
{
|
969 |
+
powerpress_admin_jquery_header('Uploader');
|
970 |
+
powerpress_page_message_add_notice( __('You do not have sufficient permission to upload media.', 'powerpress') );
|
971 |
+
powerpress_page_message_print();
|
972 |
+
powerpress_admin_jquery_footer();
|
973 |
+
exit;
|
974 |
+
}
|
975 |
+
// sanitize_title esc_attr esc_html powerpress_esc_html
|
976 |
+
$File = (isset($_GET['File'])? htmlspecialchars($_GET['File']):false);
|
977 |
+
$Message = (isset($_GET['Message'])? htmlspecialchars($_GET['Message']):'');
|
978 |
+
|
979 |
+
powerpress_admin_jquery_header( __('Upload Complete', 'powerpress') );
|
980 |
+
echo '<h2>'. __('Uploader', 'powerpress') .'</h2>';
|
981 |
+
echo '<p>';
|
982 |
+
if( $File )
|
983 |
+
{
|
984 |
+
echo __('File', 'powerpress') .': ';
|
985 |
+
echo $File;
|
986 |
+
echo ' - ';
|
987 |
+
}
|
988 |
+
echo $Message;
|
989 |
+
echo '</p>';
|
990 |
+
?>
|
991 |
+
<p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();"><?php echo __('Close', 'powerpress'); ?></a></p>
|
992 |
+
<?php
|
993 |
+
|
994 |
+
if( empty($Message) )
|
995 |
+
{
|
996 |
+
?>
|
997 |
+
<script language="JavaScript" type="text/javascript"><!--
|
998 |
+
<?php if( $File != '' ) { ?>
|
999 |
+
self.parent.SelectMedia('<?php echo $File ; ?>'); <?php } ?>
|
1000 |
+
self.parent.tb_remove();
|
1001 |
+
//-->
|
1002 |
+
</script>
|
1003 |
+
<?php
|
1004 |
+
}
|
1005 |
+
powerpress_admin_jquery_footer();
|
1006 |
+
exit;
|
1007 |
+
}; break;
|
1008 |
+
case 'powerpress-jquery-pts': {
|
1009 |
+
if( function_exists('powerpress_ajax_pts') )
|
1010 |
+
powerpress_ajax_pts($Settings);
|
1011 |
+
else
|
1012 |
+
echo "Error";
|
1013 |
+
exit;
|
1014 |
+
}; break;
|
1015 |
+
case 'powerpress-jquery-pts-post': {
|
1016 |
+
if( function_exists('powerpress_ajax_pts_post') )
|
1017 |
+
powerpress_ajax_pts_post($Settings);
|
1018 |
+
else
|
1019 |
+
echo "Error";
|
1020 |
+
}; break;
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
function powerpress_admin_jquery_header($title, $jquery = false)
|
1026 |
+
{
|
1027 |
+
if( function_exists('get_current_screen') ) {
|
1028 |
+
$current_screen = get_current_screen();
|
1029 |
+
if( !empty($current_screen) && is_object($current_screen) && $current_screen->is_block_editor() ) {
|
1030 |
+
return;
|
1031 |
+
}
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
|
1035 |
+
header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
|
1036 |
+
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
|
1037 |
+
header( 'Cache-Control: post-check=0, pre-check=0', false );
|
1038 |
+
header( 'Pragma: no-cache' );
|
1039 |
+
|
1040 |
+
$other = false;
|
1041 |
+
if( $jquery )
|
1042 |
+
add_thickbox(); // we use the thckbox for some settings
|
1043 |
+
?>
|
1044 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
1045 |
+
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
|
1046 |
+
<head>
|
1047 |
+
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
|
1048 |
+
<title><?php bloginfo('name') ?> › <?php echo $title; ?> — <?php echo __('WordPress', 'powerpress'); ?></title>
|
1049 |
+
<?php
|
1050 |
+
|
1051 |
+
// In case these functions haven't been included yet...
|
1052 |
+
if( !defined('WP_ADMIN') )
|
1053 |
+
require_once(ABSPATH . 'wp-admin/includes/admin.php');
|
1054 |
+
|
1055 |
+
wp_admin_css( 'css/global' );
|
1056 |
+
wp_admin_css();
|
1057 |
+
if( $jquery )
|
1058 |
+
wp_enqueue_script('utils');
|
1059 |
+
|
1060 |
+
do_action('admin_print_styles');
|
1061 |
+
do_action('admin_print_scripts');
|
1062 |
+
do_action('admin_head');
|
1063 |
+
|
1064 |
+
echo '<!-- done adding extra stuff -->';
|
1065 |
+
|
1066 |
+
?>
|
1067 |
+
<link rel="stylesheet" href="<?php echo powerpress_get_root_url(); ?>css/jquery.css" type="text/css" media="screen" />
|
1068 |
+
<?php if( $other ) echo $other; ?>
|
1069 |
+
</head>
|
1070 |
+
<body>
|
1071 |
+
<div id="container">
|
1072 |
+
<p style="display: none; text-align: right; position: absolute; top: 5px; right: 5px; margin: 0; padding: 0;"><a href="#" onclick="self.parent.tb_remove();" title="<?php echo __('Cancel', 'powerpress'); ?>"><img src="<?php echo admin_url(); ?>/images/no.png" /></a></p>
|
1073 |
+
<?php
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
|
1077 |
+
function powerpress_admin_jquery_footer($jquery = false)
|
1078 |
+
{
|
1079 |
+
if( $jquery )
|
1080 |
+
do_action('admin_print_footer_scripts');
|
1081 |
+
|
1082 |
+
?>
|
1083 |
+
</div><!-- end container -->
|
1084 |
+
</body>
|
1085 |
+
</html>
|
1086 |
+
<?php
|
1087 |
+
exit();
|
1088 |
+
}
|
1089 |
+
|
1090 |
?>
|
powerpressadmin-metabox.php
CHANGED
@@ -208,6 +208,7 @@ function powerpress_meta_box($object, $box)
|
|
208 |
<div id="powerpress_hosting_note_<?php echo $FeedSlug; ?>" style="margin-left: 2px; padding-bottom: 2px; padding-top: 2px; display: <?php echo ( !empty($ExtraData['hosting'])?'block':'none'); ?>"><em><?php echo __('Media file hosted by blubrry.com.', 'powerpress'); ?>
|
209 |
(<a href="#" title="<?php echo __('Remove Blubrry.com hosted media file', 'powerpress'); ?>" onclick="powerpress_remove_hosting('<?php echo $FeedSlug; ?>');return false;"><?php echo __('remove', 'powerpress'); ?></a>)
|
210 |
</em></div>
|
|
|
211 |
|
212 |
<div class="powerpress-hosting-buttons">
|
213 |
<a class="powerpress-hosting-button powerpress-button thickbox" href="<?php echo admin_url('admin.php'); ?>?action=powerpress-jquery-media&podcast-feed=<?php echo $FeedSlug; ?>&KeepThis=true&TB_iframe=true&modal=false" title="<?php echo esc_attr(__('Blubrry Podcast Hosting', 'powerpress')); ?>" class="thickbox">
|
208 |
<div id="powerpress_hosting_note_<?php echo $FeedSlug; ?>" style="margin-left: 2px; padding-bottom: 2px; padding-top: 2px; display: <?php echo ( !empty($ExtraData['hosting'])?'block':'none'); ?>"><em><?php echo __('Media file hosted by blubrry.com.', 'powerpress'); ?>
|
209 |
(<a href="#" title="<?php echo __('Remove Blubrry.com hosted media file', 'powerpress'); ?>" onclick="powerpress_remove_hosting('<?php echo $FeedSlug; ?>');return false;"><?php echo __('remove', 'powerpress'); ?></a>)
|
210 |
</em></div>
|
211 |
+
<input type="hidden" id="powerpress_program_keyword_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][program_keyword]" value="<?php echo !empty($ExtraData['program_keyword']) ? $ExtraData['program_keyword']: '' ; ?>" />
|
212 |
|
213 |
<div class="powerpress-hosting-buttons">
|
214 |
<a class="powerpress-hosting-button powerpress-button thickbox" href="<?php echo admin_url('admin.php'); ?>?action=powerpress-jquery-media&podcast-feed=<?php echo $FeedSlug; ?>&KeepThis=true&TB_iframe=true&modal=false" title="<?php echo esc_attr(__('Blubrry Podcast Hosting', 'powerpress')); ?>" class="thickbox">
|
powerpressadmin-notifications.php
CHANGED
@@ -167,35 +167,37 @@ if( powerpressadmin_notifications_appropriate() ) {
|
|
167 |
$PowerPressNotificationManager = new PowerPress_Notification_Manager(); // Uncomment when we have notices to display
|
168 |
|
169 |
// e.g. usage
|
170 |
-
|
171 |
-
if( !$PowerPressNotificationManager->dismissed_status('spotify-201807') ) {
|
172 |
|
173 |
$message = '';
|
174 |
$message .= '<h2 style="margin: 0; padding; 0; font-size: 115%;">';
|
175 |
-
$message .= __('
|
176 |
$message .= '</h2>';
|
177 |
|
178 |
-
$message .= '<
|
179 |
-
|
180 |
-
$message .= '
|
181 |
-
$message .= powerpressadmin_new();
|
182 |
-
$message .= '<p>PowerPress users who also use <a href="https://create.blubrry.com/resources/podcast-media-hosting/" target="_blank">Blubrry media hosting</a> can now submit their podcast to Spotify. Not a Blubrry hosting customer? Migration is free and easy, and includes free email, phone, and scheduled screen sharing support. Get started with the <a href="https://create.blubrry.com/resources/podcast-media-hosting/migrating-to-blubrry/powerpress-podcasting-plugin-wordpress/" target="_blank">Media Migration Tool</a> built into PowerPress.</p>';
|
183 |
-
|
184 |
-
$message .= '<a href="https://create.blubrry.com/manual/podcast-promotion/submit-podcast-google-podcasts/" target="_blank" class="powerpress-admin-heading">';
|
185 |
-
$message .= 'Google Podcasts';
|
186 |
-
$message .= '</a> ';
|
187 |
-
$message .= powerpressadmin_new();
|
188 |
-
$message .= '<p>Google has launched a new podcast directory that is available through Google search, Google Home smart speakers and the new <a href="https://powerpresspodcast.com/2018/06/25/google-podcasts-app-is-here-yp34/" target="_blank">Google Podcasts</a> app for Android. As long as your podcast website is discoverable by Google search, your podcast will be included in this directory.</p>';
|
189 |
-
//$message .= '<p>Google has launched a new Podcast directory built into Google search. No submission is necessary. As long as your website is discoverable by Google search your podcast will be indexed by Google.</p>';
|
190 |
-
$message .= "\n\n";
|
191 |
|
|
|
192 |
|
193 |
-
$message .= '<
|
194 |
-
$message .= '
|
195 |
-
$message .= '</
|
196 |
-
$message .=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
//$message .= '<p>Google has launched a new Podcast directory built into Google search. No submission is necessary. As long as your website is discoverable by Google search your podcast will be indexed by Google.</p>';
|
198 |
-
|
199 |
|
200 |
//$message .= '<p>Do not forget to update the <a href="'. admin_url("admin.php?page=powerpressadmin_basic#tab-dest") .'">Destinations</a> settings in PowerPress to maximize your podcast distribution.</p>'. "\n\n";
|
201 |
|
@@ -211,9 +213,9 @@ if( powerpressadmin_notifications_appropriate() ) {
|
|
211 |
$message .= ' — <a href="http://www.powerpresspodcast.com/2016/02/19/new-itunes-podcast-directory-recommendations-february-2016/" target="_blank">'. __('Learn More', 'powerpress') .'</a>';
|
212 |
*/
|
213 |
$message .= "\n\n";
|
214 |
-
$message .= '<div style="text-align: center; margin: 5px 0; font-weight: bold;"><i>'. powerpress_review_message() .'</i></div>';
|
215 |
|
216 |
-
$PowerPressNotificationManager->add('
|
217 |
}
|
218 |
|
219 |
}
|
167 |
$PowerPressNotificationManager = new PowerPress_Notification_Manager(); // Uncomment when we have notices to display
|
168 |
|
169 |
// e.g. usage
|
170 |
+
if( !$PowerPressNotificationManager->dismissed_status('apple-categories-201907') ) {
|
|
|
171 |
|
172 |
$message = '';
|
173 |
$message .= '<h2 style="margin: 0; padding; 0; font-size: 115%;">';
|
174 |
+
$message .= __('Apple Podcasts Category Changes, July 2019 - Blubrry PowerPress', 'powerpress');
|
175 |
$message .= '</h2>';
|
176 |
|
177 |
+
$message .= '<p>Apple has changed podcast categories! In mid-August the new categories will be available in the Apple Podcasts directory. For podcasters worried about what will happen to your category listing on Apple podcasts, breathe easy: Apple will map removed subcategories to their top-level category. That means that if you do nothing and your category is affected, you will still, at the very least, be in a top-level category.</p>';
|
178 |
+
|
179 |
+
$message .= '<p><strong class="powerpress-admin-heading">Take advantage of this opportunity!</strong> If your show can take advantage of the new categories, update your categories in PowerPress settings immediately. This change is an opportunity for your show to be of the first in these new categories. ';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
+
$message .= 'Please update your <a href="'. admin_url("admin.php?page=powerpressadmin_basic#tab5") .'" class="powerpress-admin-heading">Apple Podcasts</a> settings in PowerPress to take advantage of the new categories.</p>'. "\n\n";
|
182 |
|
183 |
+
$message .= '<p><a href="https://powerpresspodcast.com/2019/07/17/how-the-2019-apple-podcast-category-changes-affect-for-your-podcast/" target="_blank" class="powerpress-admin-heading">';
|
184 |
+
$message .= 'Learn more about the new Apple Podcast Categories';
|
185 |
+
$message .= '</a></p>';
|
186 |
+
$message .= "\n<style>
|
187 |
+
.powerpress-admin-heading {
|
188 |
+
font-weight: bold;
|
189 |
+
}
|
190 |
+
.powerpress-notice a {
|
191 |
+
text-decoration: underline;
|
192 |
+
}
|
193 |
+
</style>\n";
|
194 |
+
|
195 |
+
//$message .= '<div class="powerpress-admin-heading">';
|
196 |
+
//$message .= 'Destinations Tab and Subscribe Page (Shortcode) and Sidebar Widget Updated';
|
197 |
+
//$message .= '</div> ';
|
198 |
+
//$message .= '<p>Destinations settings in PowerPress have been updated to include Google Podcasts and Spotify. The subscribe pages and sidebar will update with your new destinations.</p>';
|
199 |
//$message .= '<p>Google has launched a new Podcast directory built into Google search. No submission is necessary. As long as your website is discoverable by Google search your podcast will be indexed by Google.</p>';
|
200 |
+
//$message .= "\n\n";
|
201 |
|
202 |
//$message .= '<p>Do not forget to update the <a href="'. admin_url("admin.php?page=powerpressadmin_basic#tab-dest") .'">Destinations</a> settings in PowerPress to maximize your podcast distribution.</p>'. "\n\n";
|
203 |
|
213 |
$message .= ' — <a href="http://www.powerpresspodcast.com/2016/02/19/new-itunes-podcast-directory-recommendations-february-2016/" target="_blank">'. __('Learn More', 'powerpress') .'</a>';
|
214 |
*/
|
215 |
$message .= "\n\n";
|
216 |
+
$message .= '<div style="text-align: center; margin: 5px 0; font-weight: bold;"><i>'. powerpress_review_message(1) .'</i></div>';
|
217 |
|
218 |
+
$PowerPressNotificationManager->add('apple-categories-201907', $message);
|
219 |
}
|
220 |
|
221 |
}
|
powerpressadmin-ping-sites.php
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
<?php
|
2 |
// powerpressadmin-ping-sites.php
|
3 |
-
|
4 |
function powerpressadmin_ping_sites_process()
|
5 |
{
|
6 |
$PingSites = false;
|
@@ -21,11 +20,37 @@
|
|
21 |
{
|
22 |
powerpress_page_message_add_notice( __('No update services selected to add.', 'powerpress') );
|
23 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
function powerpress_admin_ping_sites()
|
27 |
{
|
28 |
$ping_sites = get_option('ping_sites');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
$BlogSites = array('http://rpc.pingomatic.com/'=> __('Ping-o-Matic!', 'powerpress'),
|
30 |
'http://blogsearch.google.com/ping/RPC2'=> __('Google Blog Search', 'powerpress'),
|
31 |
'http://rssrpc.weblogs.com/RPC2'=> __('WebLogs', 'powerpress') );
|
@@ -87,6 +112,18 @@
|
|
87 |
?>
|
88 |
</td>
|
89 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
</table>
|
92 |
<p>
|
1 |
<?php
|
2 |
// powerpressadmin-ping-sites.php
|
|
|
3 |
function powerpressadmin_ping_sites_process()
|
4 |
{
|
5 |
$PingSites = false;
|
20 |
{
|
21 |
powerpress_page_message_add_notice( __('No update services selected to add.', 'powerpress') );
|
22 |
}
|
23 |
+
if(!empty($_POST['PowerPressWebsub']['enable']) && $_POST['PowerPressWebsub']['enable'] == '1') {
|
24 |
+
powerpress_save_settings(array('websub_enabled' => 1), 'powerpress_general');
|
25 |
+
}
|
26 |
+
else {
|
27 |
+
powerpress_save_settings(array('websub_enabled' => 0), 'powerpress_general');
|
28 |
+
}
|
29 |
+
if( !empty($_POST['PowerPressWebsub']['feed']) ) {
|
30 |
+
require_once( 'class.powerpresswebsub.php' );
|
31 |
+
$Websub = new PowerPressWebSub();
|
32 |
+
$success = false;
|
33 |
+
try {
|
34 |
+
$success = $Websub->publish($_POST['PowerPressWebsub']['feed']);
|
35 |
+
} catch (Exception $e) {
|
36 |
+
powerpress_page_message_add_error( $e->getMessage() );
|
37 |
+
}
|
38 |
+
if( $success ) {
|
39 |
+
powerpress_page_message_add_notice( __('Google PubSubHubbub test successful.', 'powerpress') );
|
40 |
+
}
|
41 |
+
}
|
42 |
}
|
43 |
|
44 |
function powerpress_admin_ping_sites()
|
45 |
{
|
46 |
$ping_sites = get_option('ping_sites');
|
47 |
+
$GeneralSettings = powerpress_get_settings('powerpress_general');
|
48 |
+
if(!empty($GeneralSettings['websub_enabled']) && $GeneralSettings['websub_enabled'] == 1) {
|
49 |
+
$websub_enabled = true;
|
50 |
+
}
|
51 |
+
else {
|
52 |
+
$websub_enabled = false;
|
53 |
+
}
|
54 |
$BlogSites = array('http://rpc.pingomatic.com/'=> __('Ping-o-Matic!', 'powerpress'),
|
55 |
'http://blogsearch.google.com/ping/RPC2'=> __('Google Blog Search', 'powerpress'),
|
56 |
'http://rssrpc.weblogs.com/RPC2'=> __('WebLogs', 'powerpress') );
|
112 |
?>
|
113 |
</td>
|
114 |
</tr>
|
115 |
+
<tr valign="top">
|
116 |
+
<th scope="row"><?php echo __('Websub', 'powerpress'); ?></th>
|
117 |
+
<td>
|
118 |
+
<p><?php echo __('Websub allows you to notify podcast directories such as Google Podcasts immediately when you post a new episode', 'powerpress'); ?></p>
|
119 |
+
<p><input name="PowerPressWebsub[enable]" id="PowerPressWebsub[enable]" type="checkbox" value="1" <?php echo $websub_enabled ? 'checked' : '' ?> /><label for="PowerPressWebsub[enable]">Enable? </label></p>
|
120 |
+
<p><?php echo __('You can also update the hub manually below. This is useful for testing purposes.', 'powerpress'); ?></p>
|
121 |
+
<p><label for="PowerPressWebsub[feed]">Feed URL: <input name="PowerPressWebsub[feed]" type="text" /></label><input type="submit" name="testWebsub" class="button-primary button-blubrry" value="Send Test"></p>
|
122 |
+
<?php
|
123 |
+
|
124 |
+
?>
|
125 |
+
</td>
|
126 |
+
</tr>
|
127 |
|
128 |
</table>
|
129 |
<p>
|
powerpressadmin.php
CHANGED
@@ -595,6 +595,8 @@ function powerpress_admin_init()
|
|
595 |
$General['playlist_player'] = 0;
|
596 |
if( !isset($General['metamarks'] ) )
|
597 |
$General['metamarks'] = 0;
|
|
|
|
|
598 |
|
599 |
|
600 |
// Media Presentation Settings
|
@@ -1840,7 +1842,6 @@ function powerpress_edit_post($post_ID, $post)
|
|
1840 |
}
|
1841 |
|
1842 |
$Episodes = ( isset($_POST['Powerpress'])? $_POST['Powerpress'] : false);
|
1843 |
-
|
1844 |
if( $Episodes )
|
1845 |
{
|
1846 |
foreach( $Episodes as $feed_slug => $Powerpress )
|
@@ -1912,7 +1913,7 @@ function powerpress_edit_post($post_ID, $post)
|
|
1912 |
{
|
1913 |
if( $Powerpress['set_size'] == 0 || $Powerpress['set_duration'] == 0 )
|
1914 |
{
|
1915 |
-
$MediaInfo = powerpress_get_media_info($Powerpress['url']);
|
1916 |
if( !isset($MediaInfo['error']) )
|
1917 |
{
|
1918 |
if( $Powerpress['set_size'] == 0 )
|
@@ -1963,7 +1964,6 @@ function powerpress_edit_post($post_ID, $post)
|
|
1963 |
// If we made if this far, we have the content type and file size...
|
1964 |
$EnclosureData = $MediaURL . "\n" . $FileSize . "\n". $ContentType;
|
1965 |
$ToSerialize = array();
|
1966 |
-
|
1967 |
if( !empty($Powerpress['hosting']) )
|
1968 |
$ToSerialize['hosting'] = 1;
|
1969 |
|
@@ -2030,6 +2030,8 @@ function powerpress_edit_post($post_ID, $post)
|
|
2030 |
$ToSerialize['no_links'] = 1;
|
2031 |
if( isset($Powerpress['ishd']) && $Powerpress['ishd'] )
|
2032 |
$ToSerialize['ishd'] = 1;
|
|
|
|
|
2033 |
if( isset($Powerpress['width']) && trim($Powerpress['width']) )
|
2034 |
$ToSerialize['width'] =stripslashes( trim($Powerpress['width']));
|
2035 |
if( isset($Powerpress['height']) && trim($Powerpress['height']) )
|
@@ -2123,14 +2125,57 @@ function powerpress_edit_post($post_ID, $post)
|
|
2123 |
powerpress_metabox_save($post_ID);
|
2124 |
}
|
2125 |
}
|
2126 |
-
|
2127 |
// Anytime the post is marked published, private or scheduled for the future we need to make sure we're making the media available for hosting
|
2128 |
if( $post->post_status == 'publish' || $post->post_status == 'private' || $post->post_status == 'future' )
|
2129 |
{
|
2130 |
if( !empty($GeneralSettings['blubrry_hosting']) && $GeneralSettings['blubrry_hosting'] !== 'false' )
|
2131 |
powerpress_process_hosting($post_ID, $post->post_title); // Call anytime blog post is in the published state
|
2132 |
}
|
2133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2134 |
// And we're done!
|
2135 |
return $post_ID;
|
2136 |
}
|
@@ -2515,6 +2560,7 @@ function powerpress_get_media_info(FeedSlug)
|
|
2515 |
|
2516 |
var Value = jQuery('#powerpress_url_'+FeedSlug).val();
|
2517 |
var Hosting = jQuery('#powerpress_hosting_'+FeedSlug).val();
|
|
|
2518 |
if( Value )
|
2519 |
{
|
2520 |
if( powerpress_check_url(Value, 'powerpress_warning_'+FeedSlug ) )
|
@@ -2523,7 +2569,7 @@ function powerpress_get_media_info(FeedSlug)
|
|
2523 |
jQuery.ajax( {
|
2524 |
type: 'POST',
|
2525 |
url: '<?php echo admin_url(); ?>admin-ajax.php',
|
2526 |
-
data: { action: 'powerpress_media_info', media_url : Value, feed_slug : encodeURIComponent(FeedSlug), hosting: Hosting },
|
2527 |
timeout: (30 * 1000),
|
2528 |
success: function(response) {
|
2529 |
|
@@ -2822,6 +2868,13 @@ function powerpress_media_info_ajax()
|
|
2822 |
$size = 0;
|
2823 |
$duration = '';
|
2824 |
$GeneralSettings = get_option('powerpress_general');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2825 |
|
2826 |
if( strpos($media_url, 'http://') !== 0 && strpos($media_url, 'https://') !== 0 && $hosting != 1 ) // If the url entered does not start with a http:// or https://
|
2827 |
{
|
@@ -2846,7 +2899,7 @@ function powerpress_media_info_ajax()
|
|
2846 |
|
2847 |
// Get media info here...
|
2848 |
if( $hosting )
|
2849 |
-
$MediaInfo = powerpress_get_media_info($media_url);
|
2850 |
else
|
2851 |
$MediaInfo = powerpress_get_media_info_local($media_url, '', 0, '', true);
|
2852 |
|
@@ -3513,6 +3566,10 @@ function powerpress_remote_fopen($url, $basic_auth = false, $post_args = array()
|
|
3513 |
$options['body'] = $post_args;
|
3514 |
$response = wp_remote_post( $url, $options );
|
3515 |
}
|
|
|
|
|
|
|
|
|
3516 |
else
|
3517 |
{
|
3518 |
$response = wp_remote_get( $url, $options );
|
@@ -3606,18 +3663,18 @@ function powerpress_process_hosting($post_ID, $post_title)
|
|
3606 |
|
3607 |
if( strtolower(substr($EnclosureURL, 0, 7) ) != 'http://' && $EpisodeData && !empty($EpisodeData['hosting']) )
|
3608 |
{
|
3609 |
-
|
3610 |
$error = false;
|
3611 |
// First we need to get media information...
|
3612 |
|
3613 |
// If we are working with an Mp3, we can write id3 tags and get the info returned...
|
3614 |
if( ($EnclosureType == 'audio/mpg' || $EnclosureType == 'audio/mpeg') && !empty($Settings['write_tags']) )
|
3615 |
{
|
3616 |
-
$results = powerpress_write_tags($EnclosureURL, $post_title);
|
3617 |
}
|
3618 |
else
|
3619 |
{
|
3620 |
-
$results = powerpress_get_media_info($EnclosureURL);
|
3621 |
}
|
3622 |
|
3623 |
if( is_array($results) && !isset($results['error']) )
|
@@ -3651,7 +3708,7 @@ function powerpress_process_hosting($post_ID, $post_title)
|
|
3651 |
$api_url_array = powerpress_get_api_array();
|
3652 |
foreach( $api_url_array as $index => $api_url )
|
3653 |
{
|
3654 |
-
$req_url = sprintf('%s/media/%s/%s?format=json&publish=true', rtrim($api_url, '/'), urlencode($
|
3655 |
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
|
3656 |
$req_url .= (defined('POWERPRESS_PUBLISH_PROTECTED')?'&protected=true':'');
|
3657 |
$json_data = powerpress_remote_fopen($req_url, $Settings['blubrry_auth'], array(), 60*30); // give this up to 30 minutes, though 3 seocnds to 20 seconds is all one should need.
|
@@ -4031,11 +4088,14 @@ function powerpress_default_settings($Settings, $Section='basic')
|
|
4031 |
return $Settings;
|
4032 |
}
|
4033 |
|
4034 |
-
function powerpress_write_tags($file, $post_title)
|
4035 |
{
|
4036 |
// Use the Blubrry API to write ID3 tags. to the media...
|
4037 |
|
4038 |
$Settings = get_option('powerpress_general');
|
|
|
|
|
|
|
4039 |
|
4040 |
$PostArgs = array();
|
4041 |
$Fields = array('title','artist','album','genre','year','track','composer','copyright','url');
|
@@ -4092,7 +4152,7 @@ function powerpress_write_tags($file, $post_title)
|
|
4092 |
$api_url_array = powerpress_get_api_array();
|
4093 |
foreach( $api_url_array as $index => $api_url )
|
4094 |
{
|
4095 |
-
$req_url = sprintf('%s/media/%s/%s?format=json&id3=true', rtrim($api_url, '/'), urlencode($
|
4096 |
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
|
4097 |
$content = powerpress_remote_fopen($req_url, $Settings['blubrry_auth'], $PostArgs );
|
4098 |
if( !$content && $api_url == 'https://api.blubrry.com/' ) { // Lets force cURL and see if that helps...
|
@@ -4112,14 +4172,17 @@ function powerpress_write_tags($file, $post_title)
|
|
4112 |
return array('error'=>__('Error occurred writing MP3 ID3 Tags.', 'powerpress') );
|
4113 |
}
|
4114 |
|
4115 |
-
function powerpress_get_media_info($file)
|
4116 |
{
|
4117 |
$Settings = get_option('powerpress_general');
|
|
|
|
|
|
|
4118 |
$content = false;
|
4119 |
$api_url_array = powerpress_get_api_array();
|
4120 |
foreach( $api_url_array as $index => $api_url )
|
4121 |
{
|
4122 |
-
$req_url = sprintf('%s/media/%s/%s?format=json&info=true', rtrim($api_url, '/'), urlencode($
|
4123 |
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
|
4124 |
$content = powerpress_remote_fopen($req_url, $Settings['blubrry_auth']);
|
4125 |
if( !$content && $api_url == 'https://api.blubrry.com/' ) { // Lets force cURL and see if that helps...
|
@@ -4615,9 +4678,12 @@ function powerpress_admin_get_page()
|
|
4615 |
return 'powerpressadmin_basic';
|
4616 |
}
|
4617 |
|
4618 |
-
function powerpress_review_message()
|
4619 |
{
|
4620 |
-
|
|
|
|
|
|
|
4621 |
}
|
4622 |
|
4623 |
function powerpress_get_review_link()
|
595 |
$General['playlist_player'] = 0;
|
596 |
if( !isset($General['metamarks'] ) )
|
597 |
$General['metamarks'] = 0;
|
598 |
+
if(!isset($General['network_mode']))
|
599 |
+
$General['network_mode'] = 0;
|
600 |
|
601 |
|
602 |
// Media Presentation Settings
|
1842 |
}
|
1843 |
|
1844 |
$Episodes = ( isset($_POST['Powerpress'])? $_POST['Powerpress'] : false);
|
|
|
1845 |
if( $Episodes )
|
1846 |
{
|
1847 |
foreach( $Episodes as $feed_slug => $Powerpress )
|
1913 |
{
|
1914 |
if( $Powerpress['set_size'] == 0 || $Powerpress['set_duration'] == 0 )
|
1915 |
{
|
1916 |
+
$MediaInfo = powerpress_get_media_info($Powerpress['url'], $Powerpress['program_keyword']);
|
1917 |
if( !isset($MediaInfo['error']) )
|
1918 |
{
|
1919 |
if( $Powerpress['set_size'] == 0 )
|
1964 |
// If we made if this far, we have the content type and file size...
|
1965 |
$EnclosureData = $MediaURL . "\n" . $FileSize . "\n". $ContentType;
|
1966 |
$ToSerialize = array();
|
|
|
1967 |
if( !empty($Powerpress['hosting']) )
|
1968 |
$ToSerialize['hosting'] = 1;
|
1969 |
|
2030 |
$ToSerialize['no_links'] = 1;
|
2031 |
if( isset($Powerpress['ishd']) && $Powerpress['ishd'] )
|
2032 |
$ToSerialize['ishd'] = 1;
|
2033 |
+
if( isset($Powerpress['program_keyword']) && !empty($Powerpress['program_keyword']) )
|
2034 |
+
$ToSerialize['program_keyword'] = $Powerpress['program_keyword'];
|
2035 |
if( isset($Powerpress['width']) && trim($Powerpress['width']) )
|
2036 |
$ToSerialize['width'] =stripslashes( trim($Powerpress['width']));
|
2037 |
if( isset($Powerpress['height']) && trim($Powerpress['height']) )
|
2125 |
powerpress_metabox_save($post_ID);
|
2126 |
}
|
2127 |
}
|
|
|
2128 |
// Anytime the post is marked published, private or scheduled for the future we need to make sure we're making the media available for hosting
|
2129 |
if( $post->post_status == 'publish' || $post->post_status == 'private' || $post->post_status == 'future' )
|
2130 |
{
|
2131 |
if( !empty($GeneralSettings['blubrry_hosting']) && $GeneralSettings['blubrry_hosting'] !== 'false' )
|
2132 |
powerpress_process_hosting($post_ID, $post->post_title); // Call anytime blog post is in the published state
|
2133 |
}
|
2134 |
+
//WebSub implantation
|
2135 |
+
if($post->post_status == 'publish') {
|
2136 |
+
require_once( 'class.powerpresswebsub.php' );
|
2137 |
+
$Websub = new PowerPressWebSub();
|
2138 |
+
$feedUrls = array(); //feed urls that have been updated by this post and that the hub should be notified about.
|
2139 |
+
$postType = get_post_type($post_ID);
|
2140 |
+
|
2141 |
+
if (!empty($GeneralSettings['cat_casting'])) {
|
2142 |
+
foreach (wp_get_post_categories($post_ID) as $id) {
|
2143 |
+
if (!empty($GeneralSettings['cat_casting_podcast_feeds'])) {
|
2144 |
+
array_push($feedUrls, get_category_feed_link($id, 'podcast'));
|
2145 |
+
} else {
|
2146 |
+
array_push($feedUrls, get_category_feed_link($id));
|
2147 |
+
}
|
2148 |
+
}
|
2149 |
+
}
|
2150 |
+
foreach (get_post_meta($post_ID) as $key => $value) {
|
2151 |
+
if ($key === 'enclosure') {
|
2152 |
+
//main feed updated
|
2153 |
+
array_push($feedUrls, get_feed_link('podcast'));
|
2154 |
+
}
|
2155 |
+
else if (!empty($GeneralSettings['channels']) && $postType == 'post' && preg_match("/_(\w{1,}):enclosure/i", $key, $matches) == 1) {
|
2156 |
+
array_push($feedUrls, get_feed_link($matches[1]));
|
2157 |
+
}
|
2158 |
+
}
|
2159 |
+
if (!empty($GeneralSettings['posttype_podcasting'])) {
|
2160 |
+
if ($postType != "page" || $postType != "post") {
|
2161 |
+
$PostTypeSettings = get_option('powerpress_posttype_' . $postType);
|
2162 |
+
if (!empty($PostTypeSettings)) {
|
2163 |
+
foreach ($PostTypeSettings as $feed_slug => $setting) {
|
2164 |
+
array_push($feedUrls, get_post_type_archive_feed_link($postType, $feed_slug));
|
2165 |
+
}
|
2166 |
+
}
|
2167 |
+
}
|
2168 |
+
}
|
2169 |
+
foreach ($feedUrls as $url) {
|
2170 |
+
try {
|
2171 |
+
$Websub->publish($url);
|
2172 |
+
} catch (Exception $e) {
|
2173 |
+
if( defined('WP_DEBUG') && WP_DEBUG ) {
|
2174 |
+
powerpress_page_message_add_error( $e->getMessage() );
|
2175 |
+
}
|
2176 |
+
}
|
2177 |
+
}
|
2178 |
+
}
|
2179 |
// And we're done!
|
2180 |
return $post_ID;
|
2181 |
}
|
2560 |
|
2561 |
var Value = jQuery('#powerpress_url_'+FeedSlug).val();
|
2562 |
var Hosting = jQuery('#powerpress_hosting_'+FeedSlug).val();
|
2563 |
+
var program_keyword = jQuery('#powerpress_program_keyword_'+FeedSlug).val();
|
2564 |
if( Value )
|
2565 |
{
|
2566 |
if( powerpress_check_url(Value, 'powerpress_warning_'+FeedSlug ) )
|
2569 |
jQuery.ajax( {
|
2570 |
type: 'POST',
|
2571 |
url: '<?php echo admin_url(); ?>admin-ajax.php',
|
2572 |
+
data: { action: 'powerpress_media_info', media_url : Value, feed_slug : encodeURIComponent(FeedSlug), hosting: Hosting, program_keyword: program_keyword },
|
2573 |
timeout: (30 * 1000),
|
2574 |
success: function(response) {
|
2575 |
|
2868 |
$size = 0;
|
2869 |
$duration = '';
|
2870 |
$GeneralSettings = get_option('powerpress_general');
|
2871 |
+
$program_keyword = false;
|
2872 |
+
if( !empty($_POST['program_keyword']) ) {
|
2873 |
+
$program_keyword = $_POST['program_keyword'];
|
2874 |
+
}
|
2875 |
+
if( !empty($GeneralSettings['blubrry_program_keyword']) ) {
|
2876 |
+
$program_keyword = $GeneralSettings['blubrry_program_keyword'];
|
2877 |
+
}
|
2878 |
|
2879 |
if( strpos($media_url, 'http://') !== 0 && strpos($media_url, 'https://') !== 0 && $hosting != 1 ) // If the url entered does not start with a http:// or https://
|
2880 |
{
|
2899 |
|
2900 |
// Get media info here...
|
2901 |
if( $hosting )
|
2902 |
+
$MediaInfo = powerpress_get_media_info($media_url, $program_keyword );
|
2903 |
else
|
2904 |
$MediaInfo = powerpress_get_media_info_local($media_url, '', 0, '', true);
|
2905 |
|
3566 |
$options['body'] = $post_args;
|
3567 |
$response = wp_remote_post( $url, $options );
|
3568 |
}
|
3569 |
+
else if($custom_request) {
|
3570 |
+
$options['method'] = $custom_request;
|
3571 |
+
$response = wp_remote_request($url,$options);
|
3572 |
+
}
|
3573 |
else
|
3574 |
{
|
3575 |
$response = wp_remote_get( $url, $options );
|
3663 |
|
3664 |
if( strtolower(substr($EnclosureURL, 0, 7) ) != 'http://' && $EpisodeData && !empty($EpisodeData['hosting']) )
|
3665 |
{
|
3666 |
+
$program_keyword = (!empty($EpisodeData['program_keyword']) ? $EpisodeData['program_keyword'] : $Settings['blubrry_program_keyword'] );
|
3667 |
$error = false;
|
3668 |
// First we need to get media information...
|
3669 |
|
3670 |
// If we are working with an Mp3, we can write id3 tags and get the info returned...
|
3671 |
if( ($EnclosureType == 'audio/mpg' || $EnclosureType == 'audio/mpeg') && !empty($Settings['write_tags']) )
|
3672 |
{
|
3673 |
+
$results = powerpress_write_tags($EnclosureURL, $post_title, $program_keyword);
|
3674 |
}
|
3675 |
else
|
3676 |
{
|
3677 |
+
$results = powerpress_get_media_info($EnclosureURL, $program_keyword);
|
3678 |
}
|
3679 |
|
3680 |
if( is_array($results) && !isset($results['error']) )
|
3708 |
$api_url_array = powerpress_get_api_array();
|
3709 |
foreach( $api_url_array as $index => $api_url )
|
3710 |
{
|
3711 |
+
$req_url = sprintf('%s/media/%s/%s?format=json&publish=true', rtrim($api_url, '/'), urlencode($program_keyword), urlencode($EnclosureURL) );
|
3712 |
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
|
3713 |
$req_url .= (defined('POWERPRESS_PUBLISH_PROTECTED')?'&protected=true':'');
|
3714 |
$json_data = powerpress_remote_fopen($req_url, $Settings['blubrry_auth'], array(), 60*30); // give this up to 30 minutes, though 3 seocnds to 20 seconds is all one should need.
|
4088 |
return $Settings;
|
4089 |
}
|
4090 |
|
4091 |
+
function powerpress_write_tags($file, $post_title, $program_keyword = false)
|
4092 |
{
|
4093 |
// Use the Blubrry API to write ID3 tags. to the media...
|
4094 |
|
4095 |
$Settings = get_option('powerpress_general');
|
4096 |
+
if( empty($program_keyword) && !empty($Settings['blubrry_program_keyword']) ) {
|
4097 |
+
$program_keyword = $Settings['blubrry_program_keyword'];
|
4098 |
+
}
|
4099 |
|
4100 |
$PostArgs = array();
|
4101 |
$Fields = array('title','artist','album','genre','year','track','composer','copyright','url');
|
4152 |
$api_url_array = powerpress_get_api_array();
|
4153 |
foreach( $api_url_array as $index => $api_url )
|
4154 |
{
|
4155 |
+
$req_url = sprintf('%s/media/%s/%s?format=json&id3=true', rtrim($api_url, '/'), urlencode($program_keyword), urlencode($file) );
|
4156 |
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
|
4157 |
$content = powerpress_remote_fopen($req_url, $Settings['blubrry_auth'], $PostArgs );
|
4158 |
if( !$content && $api_url == 'https://api.blubrry.com/' ) { // Lets force cURL and see if that helps...
|
4172 |
return array('error'=>__('Error occurred writing MP3 ID3 Tags.', 'powerpress') );
|
4173 |
}
|
4174 |
|
4175 |
+
function powerpress_get_media_info($file, $program_Keyword = false)
|
4176 |
{
|
4177 |
$Settings = get_option('powerpress_general');
|
4178 |
+
if( empty($program_Keyword) && !empty($Settings['blubrry_program_keyword']) ) {
|
4179 |
+
$program_Keyword = $Settings['blubrry_program_keyword'];
|
4180 |
+
}
|
4181 |
$content = false;
|
4182 |
$api_url_array = powerpress_get_api_array();
|
4183 |
foreach( $api_url_array as $index => $api_url )
|
4184 |
{
|
4185 |
+
$req_url = sprintf('%s/media/%s/%s?format=json&info=true', rtrim($api_url, '/'), urlencode($program_Keyword), urlencode($file) );
|
4186 |
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA')?'&'. POWERPRESS_BLUBRRY_API_QSA:'');
|
4187 |
$content = powerpress_remote_fopen($req_url, $Settings['blubrry_auth']);
|
4188 |
if( !$content && $api_url == 'https://api.blubrry.com/' ) { // Lets force cURL and see if that helps...
|
4678 |
return 'powerpressadmin_basic';
|
4679 |
}
|
4680 |
|
4681 |
+
function powerpress_review_message($type=0)
|
4682 |
{
|
4683 |
+
if( $type == 1 )
|
4684 |
+
return sprintf(__('If you appreciate PowerPress and the features provided, we would greatly appreciate it if you could <a href="%s" target="_blank">leave a review on WordPress.org</a>.', 'powerpress'), 'https://wordpress.org/support/plugin/powerpress/reviews/?rate=5#new-post');
|
4685 |
+
|
4686 |
+
return sprintf(__('Fan of PowerPress? Please show your appreciation by <a href="%s" target="_blank">leaving a review</a>.', 'powerpress'), 'https://wordpress.org/support/plugin/powerpress/reviews/?rate=5#new-post');
|
4687 |
}
|
4688 |
|
4689 |
function powerpress_get_review_link()
|
readme.txt
CHANGED
@@ -1,483 +1,490 @@
|
|
1 |
-
=== PowerPress Podcasting plugin by Blubrry ===
|
2 |
-
Contributors: amandato, blubrry
|
3 |
-
Tags: podcasting, podcast, podcaster, powerpress, itunes, apple, apple podcasts, google podcasts, google play, enclosure, professional, apple, apple tv, ipad, iphone, soundcloud, squarespace, youtube, viddler, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, mp4, m4v, wordpressmu, mu, wordpress mu, multisite, multi site, mediacaster, post, plugin, posts, simple, social, dashboard, TSG, Buzzsprout, MTR, WP-boxCast, CastMyBlog, tgs podcasting, simple podcasting, seriously simple podcasting, seriously-simple-podcasting, serious, seriously, ssp, podlove, podcast.de, clammr, clammr radio, audio player, stitcher, tunein, show, shows, series, docs, documentation, support, free, add-ons, extensions, addons, libsyn, libsyn-podcasting, podbean, podomatic, spreaker
|
4 |
-
Requires at least: 3.6
|
5 |
-
Requires PHP: 5.2
|
6 |
-
Tested up to: 5.2.2
|
7 |
-
Stable tag: 7.
|
8 |
-
Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
|
9 |
-
License: GPLv2 or later
|
10 |
-
|
11 |
-
No. 1 Podcasting plugin for WordPress, with simple & advanced modes, players, subscribe tools, and more! Supports Apple Podcasts, Google, Spotify,..
|
12 |
-
|
13 |
-
== Description ==
|
14 |
-
|
15 |
-
No. 1 Podcasting plugin for WordPress, with simple & advanced modes, players, subscribe tools, and more!
|
16 |
-
|
17 |
-
[youtube https://www.youtube.com/watch?v=twqKrVehY3o]
|
18 |
-
|
19 |
-
Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast page embeds and sidebar widgets, podcasting SEO features, and more! Fully supports Apple Podcasts, Google Podcasts, Stitcher, TuneIn and Blubrry Podcasting directories, as well as all podcast applications and clients. PowerPress users who use Blubrry Podcast Hosting may also [submit their shows to Spotify](https://create.blubrry.com/manual/podcast-promotion/submit-podcast-to-spotify/).
|
20 |
-
|
21 |
-
= Simple Mode =
|
22 |
-
If you are just getting started or feel overwelmed with all the settings and options, switch to Simple mode! PowerPress's Simple Mode will walk you through getting started in 3 easy steps.
|
23 |
-
|
24 |
-
1. Setup your Podcast quickly with only the essential settings
|
25 |
-
1. Create your first Episode
|
26 |
-
1. Submit your podcast to Apple Podcasts (previously iTunes Podcasts)
|
27 |
-
|
28 |
-
When you're ready you can switch to Advanced mode to tap into all the options professionals would want.
|
29 |
-
|
30 |
-
= PowerPress Key Features =
|
31 |
-
- Full Apple Podcasts (previously iTunes Podcasts) & Google Podcasts support: Adds Apple Podcast compliant podcast feeds to your WordPress site.
|
32 |
-
- Integrated HTML5 Media Players: Audio/video Web players with embed support from sites such as YouTube.
|
33 |
-
- NEW: [Skip to Position in Player](https://create.blubrry.com/resources/powerpress/advanced-tools-and-options/skip-to-position-in-player/) shortcode
|
34 |
-
- Subscribe tools: Create subscribe page with our exclusive subscribe shortcode embed and subscribe sidebar widget optimized for responsive websites, high-resolution screens and Apple Retina displays.
|
35 |
-
- Podcasting SEO: Improve discovery of your podcast on search engines such as Google, and with the Apple Podcasts directory.
|
36 |
-
- Podcast Importing: Import your podcast from SoundCloud, LibSyn, PodBean, Squarespace, or other podcast RSS feed.
|
37 |
-
- Migration tools: Quickly migrate from PodPress, TGS Podcasting, Seriously Simple Podcasting, Blogger, or Movable Type without losing episodes.
|
38 |
-
- Multi-podcast support: Create separate podcasts by category (Category Podcasting) or by media format (Podcast Channels).
|
39 |
-
- Post type and taxonomy podcasting: Create podcasts from custom post types and taxonomies.
|
40 |
-
- *Media Statistics: Get FREE Blubrry Media Statistics from your WordPress dashboard.
|
41 |
-
- Multi-languages, locales and emoji support: See [PowerPress in your language](http://create.blubrry.com/resources/powerpress/powerpress-language/) and [Enable Emoji in podcast feeds](https://create.blubrry.com/resources/powerpress/powerpress-settings/feeds/#emoji) for details.
|
42 |
-
|
43 |
-
= Includes Full Apple Podcasts Support! =
|
44 |
-
Blubrry PowerPress fully supports Apple Podcasts (previously iTunes podcasts), which is required for podcasting. PowerPress comes with the following Apple Podcasts specific features:
|
45 |
-
|
46 |
-
* Apple Podcasts compliant podcast feeds: The appropriate tags are added to your feeds so your Apple Podcasts listing looks great.
|
47 |
-
* Optimized Apple Podcasts summary: Converts your blog-post content to a format suited for viewing in Apple Podcasts ([learn more](http://create.blubrry.com/resources/powerpress/powerpress-settings/itunes/)).
|
48 |
-
* Tunes artwork: Upload and manage your Apple Podcasts artwork directly from within PowerPress settings.
|
49 |
-
* Apple Podcasts: Fully supported, including the latest [Apple Podcasts specifications](http://www.powerpresspodcast.com/2012/05/10/itunes-podcasting-specifications-changed-may-2012-what-that-means-for-podcasting/).
|
50 |
-
* Feed Episode Maximizer: Increase the number of episodes viewed on Apple Podcasts while decreasing the byte size of your feeds.
|
51 |
-
|
52 |
-
= Includes Full Google Podcasts Support! =
|
53 |
-
Blubrry PowerPress fully supports the newly launched Google Podcasts directory built into Google search, Google Home smart speakers and Google Podcasts Android app.
|
54 |
-
|
55 |
-
= Integrated Media Players =
|
56 |
-
Blubrry PowerPress includes extensive Web player options to display your podcast audio and video in your Web pages.
|
57 |
-
|
58 |
-
* Audio players: Pick from Blubrry's Media Player, MediaElement.js, or the native HTML5 audio player.
|
59 |
-
* Video players: Pick from MediaElement.js, VideoJS, or the native HTML5 video player.
|
60 |
-
* Positioning: Position player above or below your content.
|
61 |
-
* [Player shortcode](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/shortcode/): Place the player exactly where you want by adding the `[powerpress]` shortcode directly into your post content.
|
62 |
-
* [Playlist player shortcode](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/powerpress-playlist-shortcode/): Include a playlist of your latest podcast episodes utilizing the `[powerpress_playlist]` shortcode in any page or post.
|
63 |
-
* Embeds: Add embeds from sites such as YouTube.
|
64 |
-
* Links: Provide download, play in new window and embed links.
|
65 |
-
* Audio formats supported: mp3, m4a, oga (ogg audio), opus.
|
66 |
-
* Video formats supported: m4v, mp4, webm, ogv (ogg video).
|
67 |
-
|
68 |
-
= Integrated Subscribe Tools =
|
69 |
-
A Blubrry PowerPress exclusive, podcast subscribe tools help you convert Web visitors into podcast subscribers. Subscribe options include:
|
70 |
-
|
71 |
-
* [Subscribe page](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/subscribe-page/): Instantly create a subscribe page with simplified instructions on how to subscribe to your podcast using the PowerPress subscribe page shortcode.
|
72 |
-
* [Subscribe page shortcode](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/powerpress-subscribe-shortcode/): Add the `[powerpress_subscribe]` shortcode to include a mobile-device optimized subscribe embed in any post or page that includes buttons to subscribe on Apple Podcasts, [Subscribe on Android](http://www.subscribeonandroid.com), [Subscribe by Email](http://www.subscribebyemail.com), Stitcher, tuneIn, Spotify, Google Podcasts, via RSS, and an special textbox to easily copy and paste your podcast feed into any podcast application.
|
73 |
-
* Subscribe sidebar widget: Mobile device optimized sidebar buttons to subscribe on Apple Podcasts, [Subscribe on Android](http://www.subscribeonandroid.com), Stitcher, tuneIn, Spotify, Google Podcasts, subscribe by RSS, and a "more subscribe options" button linked to your podcast's subscribe page.
|
74 |
-
* Subscribe links: Subscribe on Apple Podcasts, [Subscribe on Android](http://www.subscribeonandroid.com), [Subscribe by Email](https://www.subscribebyemail.com), subscribe by RSS and a link to your custom subscribe page below every player.
|
75 |
-
* Retina enabled: Subscribe button images optimized for high resolution displays including Apple Retina displays.
|
76 |
-
* Responsive: Subscribe tools are designed for any screen and optimized for touch screens by providing custom buttons that are indrustry standard 48 pixels in height optimized for touch screen use.
|
77 |
-
|
78 |
-
= Integrates with Blubrry's Services =
|
79 |
-
Make your life easier by adding our FREE or paid media hosting and statistics services to streamline your podcast productivity.
|
80 |
-
|
81 |
-
* Quickly access your Blubrry media download statistics from your WordPress dashboard.
|
82 |
-
* Publish Blubrry hosted media directly from your blog.
|
83 |
-
* View Blubrry hosting usage quota from your blog.
|
84 |
-
* Configure how Blubrry writes media (ID3) tags within PowerPress settings.
|
85 |
-
* Post your podcast to Twitter, Facebook, and YouTube.
|
86 |
-
* Migrate all of your media at no additional cost to your Blubrry [Podcast Media Hosting](http://create.blubrry.com/resources/podcast-media-hosting/) account with just a couple clicks.
|
87 |
-
|
88 |
-
The Blubrry basic statistics service is FREE. Our [Premium Statistics Service](https://secure.blubrry.com/podcast-statistics-premium/), which includes [Blubrry 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.
|
89 |
-
|
90 |
-
|
91 |
-
= Advanced Features for those who need more =
|
92 |
-
Want more? We've got more! With a simple click you can enable advanced features and options. Check out some of the advanced features:
|
93 |
-
|
94 |
-
* [Podcasting SEO settings](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/podcasting-seo-settings/): Utilize the Apple and Google feed and HTML tags to improve the discovery of your podcasts and include the necessary meta data in your blog pages for search engines to discover.
|
95 |
-
* Embeds: Provide embeds your audience can take with them (just like YouTube embeds)
|
96 |
-
* Media size and duration detection: Enter your media URL and let the PowerPress do the rest.
|
97 |
-
* Category Casting: Add podcast support to your WordPress category feeds.
|
98 |
-
* Custom Podcast Channels: Distribute multiple formats (audio/video) and versions (short/full length).
|
99 |
-
* Taxonomy Podcasting: Create podcasts for your custom taxonomy tag names including WordPress Tags. (feature sponsored by [AfterBuzzTV.com](http://afterbuzztv.com/))
|
100 |
-
* Post Type Podcasting: Create podcasts for your custom post types.
|
101 |
-
* Premium Podcasting (Requires a membership plugin and/or roles and capabilities plugin to manage)
|
102 |
-
* User Role Management: Control which users in your blog can podcast. (Requires a roles and capabilities plugin to manage)
|
103 |
-
* Diagnostics: Check to see if your server is configured to support all of the available features in PowerPress.
|
104 |
-
* WordPress MultiSite: Blubrry PowerPress is compatible with WordPress MultiSite and can be extended using the [Blubrry PowerPress MultiSite add-on plugin](https://wordpress.org/plugins/powerpress-multisite/).
|
105 |
-
* *Supported syndication 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.
|
106 |
-
|
107 |
-
*Apple Podcasts only supports mp3, m4a, mp4, m4v, pdf and epub.
|
108 |
-
|
109 |
-
= Migrating from PodPress or other podcasting plugin? =
|
110 |
-
Switching to from PodPress to PowerPress is seamless. Simply enable PowerPress then disable PodPress and you're done! PowerPress will continue where plugin your old plugin left off by including your previously created episodes in your feeds and Web pages.
|
111 |
-
|
112 |
-
Please see detailed instructions for migrating from [PodPress](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/migrating-from-podpress-to-powerpress/), [TGS Podcasting Plugin](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/migrating-from-tgs-podcasting-plugin/) and [Seriously Simple Podcasting](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/migrating-from-seriously-simple-podcasting-plugin/).
|
113 |
-
|
114 |
-
Note: Advanced settings such as settings for podcast categories will need to be recreated in PowerPress.
|
115 |
-
|
116 |
-
= Migrating from another service such as LibSyn, PodBeam, SoundCloud, or Squarespace? =
|
117 |
-
Importing your podcast feed into PowerPress is super easy! Simply paste in your RSS feed URL into the PowerPress feed import tool and click import. RSS feed import works with any podcast service and includes additional options for importing from LibSyn, PodBeam, SoundCloud, and Squarespace. You can optionally migrate your media to your Blubrry Podcast Hosting account with only a couple simple clicks.
|
118 |
-
|
119 |
-
= PowerPress in your Language =
|
120 |
-
|
121 |
-
[PowerPress is available in a number of languages](http://create.blubrry.com/resources/powerpress/powerpress-language/). Starting with PowerPress 7.0, translations will be managed through [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/powerpress/) making translations easier to setup and update.
|
122 |
-
|
123 |
-
= PowerPress is looking for translators! =
|
124 |
-
|
125 |
-
[Anyone can help translate PowerPress!](http://create.blubrry.com/resources/powerpress/powerpress-language/translate-powerpress/) If you are intersted in translating PowerPress, please [contact us](https://www.blubrry.com/contact/#translate).
|
126 |
-
|
127 |
-
**Translators will receive the following from us as a thank you for contributing:**
|
128 |
-
|
129 |
-
* Free [Blubrry Professional podcast statistics](http://create.blubrry.com/resources/podcast-media-download-statistics/) account for your podcast.
|
130 |
-
* Name or nickname in the PowerPress readme.txt and in the [PowerPress WordPress.org Translators list](https://wordpress.org/plugins/powerpress/other_notes/) (will give you credit for your contribution)
|
131 |
-
* Website URL (optional, we will link to your website)
|
132 |
-
|
133 |
-
Interested translators please [contact us](https://www.blubrry.com/contact/#translate), include your WordPress.org account name, blubrry account login (if you have one), your name, desired URL, and the language locale(s) you would like to translate.
|
134 |
-
|
135 |
-
= Need Help? =
|
136 |
-
. . . or have some ideas that could improve the plugin?
|
137 |
-
|
138 |
-
* Visit the Blubrry [PowerPress Forum](https://wordpress.org/support/plugin/powerpress) and [Blubrry Resources](http://create.blubrry.com/resources/)
|
139 |
-
* Use the Blubrry [Contact Us](http://www.blubrry.com/contact.php) form
|
140 |
-
* Blubrry [PowerPress Documentation](http://create.blubrry.com/resources/powerpress/)
|
141 |
-
* Check out [The Podcasting Manual](http://create.blubrry.com/manual/) - everything you need to know about podcasting
|
142 |
-
|
143 |
-
= Need More Help? =
|
144 |
-
We now offer one-on-one consulting via GoToMeeting, Skype or phone.
|
145 |
-
[Learn more about Blubrry Consulting Services](http://create.blubrry.com/support/podcast-consulting-services/)
|
146 |
-
|
147 |
-
*PowerPress is developed and maintained by [Blubrry](http://www.blubrry.com), a podcasting company and community owned and operated by podcasters 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.*
|
148 |
-
|
149 |
-
|
150 |
-
== Frequently Asked Questions ==
|
151 |
-
|
152 |
-
= Compatible Themes and Plugins =
|
153 |
-
Most themes and plugins are compatible with PowerPress. PowerPress is developed and tested using the default themes packaged with WordPress including twentyten, twentytwelve, twentythirteen, twentyfourteen, twentyfifteen, and all future versions. These themes use WordPress best practices and adhere to theme rules set by WordPress.org. Any child theme based on these themes should also work without issue.
|
154 |
-
|
155 |
-
If you are having a problem, try [Diagnosing Feed and/or Player Issues](http://create.blubrry.com/resources/powerpress/using-powerpress/diagnosing-feed-andor-player-issues-with-powerpress/).
|
156 |
-
|
157 |
-
If you are having a problem specifically with the player and links, try the "Having issues?" option under PowerPress Settings > Appearance tab. Visit [Resolving Plugin or Theme Conflicts](http://create.blubrry.com/resources/powerpress/powerpress-settings/media-appearance/plugin-theme-conflict-issues/) for details.
|
158 |
-
|
159 |
-
= Premium podcasting themes compatible with PowerPress =
|
160 |
-
[Appendipity Podcast Pro theme](https://www.appendipity.com/themes/podcast-pro-theme/?aid=13) is is designed specifically to take advantage of built-in features, settings and podcast episode meta data in PowerPress. The Blubrry team works with the Appendipity team during beta testing and major WordPress releases to make sure the Podcast Pro theme and PowerPress work together seamlessly.
|
161 |
-
|
162 |
-
|
163 |
-
= Related Plugins =
|
164 |
-
The following plugins may be used in conjunction with PowerPress.
|
165 |
-
|
166 |
-
* [Message Flow](http://wordpress.org/extend/plugins/message-flow/) - generates a CoverFlow-like interface for your blog posts with podcast episodes. For podcasts, use shortocde `[message-flow podcasts_only="true"]`.
|
167 |
-
* [Eli's PowerPress Addon Widget](http://wordpress.org/extend/plugins/podpress-addons/) - Adds a sidebar widget that lists your podcast episodes linked to the play in a new window PowerPress player.
|
168 |
-
* [PowerPress Posts From MySQL](http://wordpress.org/extend/plugins/powerpress-posts-from-mysql/developers/) - Creates blog posts with PowerPress podcast episode information from a MySQL table.
|
169 |
-
* [Featured Podcast Widget](http://wordpress.org/plugins/featured-podcast-widget/), [Home Page](http://www.richardfarrar.com/featured-podcast-widget-for-wordpress/) - A widget that enables you to display your latest podcast from a category or featured podcast utilising the PowerPress plugin's default player.
|
170 |
-
* [Skip to Timestamp](https://wordpress.org/plugins/skip-to-timestamp/) - Skip to Timestamp allows for generating links in your posts that automatically skip to a given time in an audio, video or youtube embed.
|
171 |
-
|
172 |
-
|
173 |
-
= Why doesn't Blubrry PowerPress support multiple enclosures in one feed item/post? =
|
174 |
-
Blubrry PowerPress does not allow you to include multiple media files for one feed item (blog post). This is because each podcatcher handles multiple enclosures in feeds differently. Apple Podcasts will download the first enclosure that it sees in the feed ignoring the rest. Other podcatchers and podcasting directories either pick up the first enclosure or the last in each post item. This inconsistency combined with the fact that [Dave Winer does not recommend multiple enclosures](http://www.reallysimplesyndication.com/2004/12/21) and the [FeedValidator.org recommendation against it](http://www.feedvalidator.org/docs/warning/DuplicateEnclosure.html) is why the Blubrry PowerPress does not support them.
|
175 |
-
|
176 |
-
As a alternative, PowerPress allows you to create additional Custom Podcast Feeds to associate any magnitude of media format and/or length in a blog post to specific custom feeds. For example, you can create one blog post associated to separate video and audio podcast feeds saving you time from entering your show notes twice.
|
177 |
-
|
178 |
-
= Why doesn't Blubrry PowerPress include media statistics built-in? =
|
179 |
-
Blubrry PowerPress does not include media statistics built-in. This is not because Blubrry has its own statistics service, although that's a good reason by itself. Maintaining and calculating statistics is a resource and server intensive task that would add bloat to an otherwise efficient WordPress podcasting plugin. We recommend using your media hosting's web statistics to give you basic download numbers and, if you are seeking more grandular measurements such as client and geographical information for each episode, you're more than welcome to use the [Blubrry Statistics service](http://create.blubrry.com/resources/podcast-media-download-statistics/) as well.
|
180 |
-
|
181 |
-
You may however access your Blubrry Statistics from within your WordPress dashboard.
|
182 |
-
|
183 |
-
= How do you insert the player within a blog post? =
|
184 |
-
You can insert the media player within your blog posts by using the WordPress shortcode feature. The shortcode for PowerPress is `[powerpress]` (all lowercase)
|
185 |
-
|
186 |
-
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"]
|
187 |
-
|
188 |
-
For advanced users with multiple podcast feeds, you may insert the player for a specific feed by specifying the feed slug in the shortcode: [powerpress feed="podcast"]
|
189 |
-
|
190 |
-
If you want to specify a cover image, add an image attribute which points to the specific image url: [powerpress image="http://example.com/path/to/cover_image.jpg"] *Experimental*
|
191 |
-
|
192 |
-
= Why can't you upload large media files? =
|
193 |
-
File uploads are tricky to handle because there are so many web hosting variations with different upload size limits. We recommend using an FTP application to upload large media files. FTP is much more efficient than web based uploads and is typically provided by nearly all web hosting providers.
|
194 |
-
|
195 |
-
= The Media Player does not appear on my site? =
|
196 |
-
. . . or the RSS feed is invalid?
|
197 |
-
|
198 |
-
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.
|
199 |
-
|
200 |
-
|
201 |
-
== Installation ==
|
202 |
-
= Point and Click Installation =
|
203 |
-
1. Sign into your blog, go to the plugins section and click 'Add New'.
|
204 |
-
2. In the search box enter "PowerPress", then click 'Search'.
|
205 |
-
3. Click the 'Install Now' link and proceed to install the plugin.
|
206 |
-
4. Once installed, click 'Activate'.
|
207 |
-
5. Configure your Blubrry PowerPress by going to the **Settings** > **Blubrry PowerPress** page.
|
208 |
-
|
209 |
-
= Manual Installation =
|
210 |
-
To install Blubrry PowerPress manually, follow these steps:
|
211 |
-
|
212 |
-
1. Download [PowerPress from WordPress.org](http://wordpress.org/plugins/powerpress/).
|
213 |
-
2. Extract the downloaded zip file to a temporary folder.
|
214 |
-
3. Copy the entire powerpress folder from the downloaded zip file into the /wp-content/plugins/ folder on your server.
|
215 |
-
4. Activate the "Blubrry PowerPress" plugin in your blog's Plugin Management page.
|
216 |
-
5. Configure your Blubrry PowerPress by going to the **Settings** > **Blubrry PowerPress** page.
|
217 |
-
|
218 |
-
|
219 |
-
== Screenshots ==
|
220 |
-
1. PowerPress's Simple Mode will walk you through setting up your podcast in 3 easy steps.
|
221 |
-
2. Just like blogging, podcasting utilizes blog posting features with the addition of a podcast episode box. Yes, podcasting is that simple!
|
222 |
-
3. PowerPress integrates seamlessly with Blubrry Podcast Hosting's exclusive player.
|
223 |
-
4. PowerPress comes with a built-in subscribe sidebar widget to help your audience subscribe to your podcast.
|
224 |
-
5. PowerPress comes with an editable subscribe page builder with a subscribe embed tool to help your web visitors subscribe.
|
225 |
-
6. PowerPress's Advanced Mode settings let you dig in as deep as you want to with every possible setting for podcasting at your fingertips.
|
226 |
-
7. PowerPress incorporates the built-in WordPress media players into your blog posts and pages.
|
227 |
-
|
228 |
-
|
229 |
-
== Changelog ==
|
230 |
-
|
231 |
-
= Next Major Release Announcements =
|
232 |
-
* We are looking for beta testers! If you would like to beta test future versions of PowerPress, please [contact us](http://www.blubrry.com/contact.php#feedback) with your name and email.
|
233 |
-
|
234 |
-
= Fan of PowerPress and want to show your support? =
|
235 |
-
If you are a fan of PowerPress, we would greatly appreciate it if you could take a moment and [leave us a review on WordPress.org](https://wordpress.org/support/plugin/powerpress/reviews/?rate=5#new-post). Your support is greatly appreciated!
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
*
|
240 |
-
*
|
241 |
-
*
|
242 |
-
*
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
*
|
248 |
-
*
|
249 |
-
*
|
250 |
-
*
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
*
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
*
|
259 |
-
* Fixed
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
*
|
266 |
-
*
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
*
|
271 |
-
*
|
272 |
-
*
|
273 |
-
*
|
274 |
-
*
|
275 |
-
*
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
*
|
280 |
-
*
|
281 |
-
*
|
282 |
-
*
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
*
|
290 |
-
*
|
291 |
-
*
|
292 |
-
*
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
*
|
297 |
-
*
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
*
|
302 |
-
*
|
303 |
-
* Added
|
304 |
-
*
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
*
|
309 |
-
* Added
|
310 |
-
*
|
311 |
-
*
|
312 |
-
*
|
313 |
-
*
|
314 |
-
* Added
|
315 |
-
* Added
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
*
|
320 |
-
*
|
321 |
-
*
|
322 |
-
* Added
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
*
|
327 |
-
*
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
*
|
332 |
-
*
|
333 |
-
*
|
334 |
-
*
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
*
|
339 |
-
*
|
340 |
-
*
|
341 |
-
*
|
342 |
-
*
|
343 |
-
*
|
344 |
-
* Added
|
345 |
-
*
|
346 |
-
*
|
347 |
-
*
|
348 |
-
*
|
349 |
-
*
|
350 |
-
*
|
351 |
-
*
|
352 |
-
*
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
*
|
357 |
-
*
|
358 |
-
*
|
359 |
-
*
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
*
|
364 |
-
*
|
365 |
-
*
|
366 |
-
*
|
367 |
-
*
|
368 |
-
*
|
369 |
-
*
|
370 |
-
*
|
371 |
-
*
|
372 |
-
* Fixed
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
*
|
377 |
-
*
|
378 |
-
*
|
379 |
-
*
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
*
|
389 |
-
*
|
390 |
-
*
|
391 |
-
*
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
*
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
*
|
400 |
-
* Fixed bug where
|
401 |
-
*
|
402 |
-
*
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
*
|
410 |
-
*
|
411 |
-
*
|
412 |
-
*
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
*
|
417 |
-
*
|
418 |
-
*
|
419 |
-
*
|
420 |
-
*
|
421 |
-
*
|
422 |
-
*
|
423 |
-
*
|
424 |
-
*
|
425 |
-
*
|
426 |
-
*
|
427 |
-
*
|
428 |
-
*
|
429 |
-
*
|
430 |
-
*
|
431 |
-
*
|
432 |
-
*
|
433 |
-
*
|
434 |
-
*
|
435 |
-
*
|
436 |
-
*
|
437 |
-
*
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
*
|
471 |
-
*
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== PowerPress Podcasting plugin by Blubrry ===
|
2 |
+
Contributors: amandato, blubrry
|
3 |
+
Tags: podcasting, podcast, podcaster, powerpress, itunes, apple, apple podcasts, google podcasts, google play, enclosure, professional, apple, apple tv, ipad, iphone, soundcloud, squarespace, youtube, viddler, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, mp4, m4v, wordpressmu, mu, wordpress mu, multisite, multi site, mediacaster, post, plugin, posts, simple, social, dashboard, TSG, Buzzsprout, MTR, WP-boxCast, CastMyBlog, tgs podcasting, simple podcasting, seriously simple podcasting, seriously-simple-podcasting, serious, seriously, ssp, podlove, podcast.de, clammr, clammr radio, audio player, stitcher, tunein, show, shows, series, docs, documentation, support, free, add-ons, extensions, addons, libsyn, libsyn-podcasting, podbean, podomatic, spreaker
|
4 |
+
Requires at least: 3.6
|
5 |
+
Requires PHP: 5.2
|
6 |
+
Tested up to: 5.2.2
|
7 |
+
Stable tag: 7.5
|
8 |
+
Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
|
9 |
+
License: GPLv2 or later
|
10 |
+
|
11 |
+
No. 1 Podcasting plugin for WordPress, with simple & advanced modes, players, subscribe tools, and more! Supports Apple Podcasts, Google, Spotify,..
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
No. 1 Podcasting plugin for WordPress, with simple & advanced modes, players, subscribe tools, and more!
|
16 |
+
|
17 |
+
[youtube https://www.youtube.com/watch?v=twqKrVehY3o]
|
18 |
+
|
19 |
+
Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast page embeds and sidebar widgets, podcasting SEO features, and more! Fully supports Apple Podcasts, Google Podcasts, Stitcher, TuneIn and Blubrry Podcasting directories, as well as all podcast applications and clients. PowerPress users who use Blubrry Podcast Hosting may also [submit their shows to Spotify](https://create.blubrry.com/manual/podcast-promotion/submit-podcast-to-spotify/).
|
20 |
+
|
21 |
+
= Simple Mode =
|
22 |
+
If you are just getting started or feel overwelmed with all the settings and options, switch to Simple mode! PowerPress's Simple Mode will walk you through getting started in 3 easy steps.
|
23 |
+
|
24 |
+
1. Setup your Podcast quickly with only the essential settings
|
25 |
+
1. Create your first Episode
|
26 |
+
1. Submit your podcast to Apple Podcasts (previously iTunes Podcasts)
|
27 |
+
|
28 |
+
When you're ready you can switch to Advanced mode to tap into all the options professionals would want.
|
29 |
+
|
30 |
+
= PowerPress Key Features =
|
31 |
+
- Full Apple Podcasts (previously iTunes Podcasts) & Google Podcasts support: Adds Apple Podcast compliant podcast feeds to your WordPress site.
|
32 |
+
- Integrated HTML5 Media Players: Audio/video Web players with embed support from sites such as YouTube.
|
33 |
+
- NEW: [Skip to Position in Player](https://create.blubrry.com/resources/powerpress/advanced-tools-and-options/skip-to-position-in-player/) shortcode
|
34 |
+
- Subscribe tools: Create subscribe page with our exclusive subscribe shortcode embed and subscribe sidebar widget optimized for responsive websites, high-resolution screens and Apple Retina displays.
|
35 |
+
- Podcasting SEO: Improve discovery of your podcast on search engines such as Google, and with the Apple Podcasts directory.
|
36 |
+
- Podcast Importing: Import your podcast from SoundCloud, LibSyn, PodBean, Squarespace, or other podcast RSS feed.
|
37 |
+
- Migration tools: Quickly migrate from PodPress, TGS Podcasting, Seriously Simple Podcasting, Blogger, or Movable Type without losing episodes.
|
38 |
+
- Multi-podcast support: Create separate podcasts by category (Category Podcasting) or by media format (Podcast Channels).
|
39 |
+
- Post type and taxonomy podcasting: Create podcasts from custom post types and taxonomies.
|
40 |
+
- *Media Statistics: Get FREE Blubrry Media Statistics from your WordPress dashboard.
|
41 |
+
- Multi-languages, locales and emoji support: See [PowerPress in your language](http://create.blubrry.com/resources/powerpress/powerpress-language/) and [Enable Emoji in podcast feeds](https://create.blubrry.com/resources/powerpress/powerpress-settings/feeds/#emoji) for details.
|
42 |
+
|
43 |
+
= Includes Full Apple Podcasts Support! =
|
44 |
+
Blubrry PowerPress fully supports Apple Podcasts (previously iTunes podcasts), which is required for podcasting. PowerPress comes with the following Apple Podcasts specific features:
|
45 |
+
|
46 |
+
* Apple Podcasts compliant podcast feeds: The appropriate tags are added to your feeds so your Apple Podcasts listing looks great.
|
47 |
+
* Optimized Apple Podcasts summary: Converts your blog-post content to a format suited for viewing in Apple Podcasts ([learn more](http://create.blubrry.com/resources/powerpress/powerpress-settings/itunes/)).
|
48 |
+
* Tunes artwork: Upload and manage your Apple Podcasts artwork directly from within PowerPress settings.
|
49 |
+
* Apple Podcasts: Fully supported, including the latest [Apple Podcasts specifications](http://www.powerpresspodcast.com/2012/05/10/itunes-podcasting-specifications-changed-may-2012-what-that-means-for-podcasting/).
|
50 |
+
* Feed Episode Maximizer: Increase the number of episodes viewed on Apple Podcasts while decreasing the byte size of your feeds.
|
51 |
+
|
52 |
+
= Includes Full Google Podcasts Support! =
|
53 |
+
Blubrry PowerPress fully supports the newly launched Google Podcasts directory built into Google search, Google Home smart speakers and Google Podcasts Android app.
|
54 |
+
|
55 |
+
= Integrated Media Players =
|
56 |
+
Blubrry PowerPress includes extensive Web player options to display your podcast audio and video in your Web pages.
|
57 |
+
|
58 |
+
* Audio players: Pick from Blubrry's Media Player, MediaElement.js, or the native HTML5 audio player.
|
59 |
+
* Video players: Pick from MediaElement.js, VideoJS, or the native HTML5 video player.
|
60 |
+
* Positioning: Position player above or below your content.
|
61 |
+
* [Player shortcode](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/shortcode/): Place the player exactly where you want by adding the `[powerpress]` shortcode directly into your post content.
|
62 |
+
* [Playlist player shortcode](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/powerpress-playlist-shortcode/): Include a playlist of your latest podcast episodes utilizing the `[powerpress_playlist]` shortcode in any page or post.
|
63 |
+
* Embeds: Add embeds from sites such as YouTube.
|
64 |
+
* Links: Provide download, play in new window and embed links.
|
65 |
+
* Audio formats supported: mp3, m4a, oga (ogg audio), opus.
|
66 |
+
* Video formats supported: m4v, mp4, webm, ogv (ogg video).
|
67 |
+
|
68 |
+
= Integrated Subscribe Tools =
|
69 |
+
A Blubrry PowerPress exclusive, podcast subscribe tools help you convert Web visitors into podcast subscribers. Subscribe options include:
|
70 |
+
|
71 |
+
* [Subscribe page](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/subscribe-page/): Instantly create a subscribe page with simplified instructions on how to subscribe to your podcast using the PowerPress subscribe page shortcode.
|
72 |
+
* [Subscribe page shortcode](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/powerpress-subscribe-shortcode/): Add the `[powerpress_subscribe]` shortcode to include a mobile-device optimized subscribe embed in any post or page that includes buttons to subscribe on Apple Podcasts, [Subscribe on Android](http://www.subscribeonandroid.com), [Subscribe by Email](http://www.subscribebyemail.com), Stitcher, tuneIn, Spotify, Google Podcasts, via RSS, and an special textbox to easily copy and paste your podcast feed into any podcast application.
|
73 |
+
* Subscribe sidebar widget: Mobile device optimized sidebar buttons to subscribe on Apple Podcasts, [Subscribe on Android](http://www.subscribeonandroid.com), Stitcher, tuneIn, Spotify, Google Podcasts, subscribe by RSS, and a "more subscribe options" button linked to your podcast's subscribe page.
|
74 |
+
* Subscribe links: Subscribe on Apple Podcasts, [Subscribe on Android](http://www.subscribeonandroid.com), [Subscribe by Email](https://www.subscribebyemail.com), subscribe by RSS and a link to your custom subscribe page below every player.
|
75 |
+
* Retina enabled: Subscribe button images optimized for high resolution displays including Apple Retina displays.
|
76 |
+
* Responsive: Subscribe tools are designed for any screen and optimized for touch screens by providing custom buttons that are indrustry standard 48 pixels in height optimized for touch screen use.
|
77 |
+
|
78 |
+
= Integrates with Blubrry's Services =
|
79 |
+
Make your life easier by adding our FREE or paid media hosting and statistics services to streamline your podcast productivity.
|
80 |
+
|
81 |
+
* Quickly access your Blubrry media download statistics from your WordPress dashboard.
|
82 |
+
* Publish Blubrry hosted media directly from your blog.
|
83 |
+
* View Blubrry hosting usage quota from your blog.
|
84 |
+
* Configure how Blubrry writes media (ID3) tags within PowerPress settings.
|
85 |
+
* Post your podcast to Twitter, Facebook, and YouTube.
|
86 |
+
* Migrate all of your media at no additional cost to your Blubrry [Podcast Media Hosting](http://create.blubrry.com/resources/podcast-media-hosting/) account with just a couple clicks.
|
87 |
+
|
88 |
+
The Blubrry basic statistics service is FREE. Our [Premium Statistics Service](https://secure.blubrry.com/podcast-statistics-premium/), which includes [Blubrry 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.
|
89 |
+
|
90 |
+
|
91 |
+
= Advanced Features for those who need more =
|
92 |
+
Want more? We've got more! With a simple click you can enable advanced features and options. Check out some of the advanced features:
|
93 |
+
|
94 |
+
* [Podcasting SEO settings](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/podcasting-seo-settings/): Utilize the Apple and Google feed and HTML tags to improve the discovery of your podcasts and include the necessary meta data in your blog pages for search engines to discover.
|
95 |
+
* Embeds: Provide embeds your audience can take with them (just like YouTube embeds)
|
96 |
+
* Media size and duration detection: Enter your media URL and let the PowerPress do the rest.
|
97 |
+
* Category Casting: Add podcast support to your WordPress category feeds.
|
98 |
+
* Custom Podcast Channels: Distribute multiple formats (audio/video) and versions (short/full length).
|
99 |
+
* Taxonomy Podcasting: Create podcasts for your custom taxonomy tag names including WordPress Tags. (feature sponsored by [AfterBuzzTV.com](http://afterbuzztv.com/))
|
100 |
+
* Post Type Podcasting: Create podcasts for your custom post types.
|
101 |
+
* Premium Podcasting (Requires a membership plugin and/or roles and capabilities plugin to manage)
|
102 |
+
* User Role Management: Control which users in your blog can podcast. (Requires a roles and capabilities plugin to manage)
|
103 |
+
* Diagnostics: Check to see if your server is configured to support all of the available features in PowerPress.
|
104 |
+
* WordPress MultiSite: Blubrry PowerPress is compatible with WordPress MultiSite and can be extended using the [Blubrry PowerPress MultiSite add-on plugin](https://wordpress.org/plugins/powerpress-multisite/).
|
105 |
+
* *Supported syndication 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.
|
106 |
+
|
107 |
+
*Apple Podcasts only supports mp3, m4a, mp4, m4v, pdf and epub.
|
108 |
+
|
109 |
+
= Migrating from PodPress or other podcasting plugin? =
|
110 |
+
Switching to from PodPress to PowerPress is seamless. Simply enable PowerPress then disable PodPress and you're done! PowerPress will continue where plugin your old plugin left off by including your previously created episodes in your feeds and Web pages.
|
111 |
+
|
112 |
+
Please see detailed instructions for migrating from [PodPress](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/migrating-from-podpress-to-powerpress/), [TGS Podcasting Plugin](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/migrating-from-tgs-podcasting-plugin/) and [Seriously Simple Podcasting](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/migrating-from-seriously-simple-podcasting-plugin/).
|
113 |
+
|
114 |
+
Note: Advanced settings such as settings for podcast categories will need to be recreated in PowerPress.
|
115 |
+
|
116 |
+
= Migrating from another service such as LibSyn, PodBeam, SoundCloud, or Squarespace? =
|
117 |
+
Importing your podcast feed into PowerPress is super easy! Simply paste in your RSS feed URL into the PowerPress feed import tool and click import. RSS feed import works with any podcast service and includes additional options for importing from LibSyn, PodBeam, SoundCloud, and Squarespace. You can optionally migrate your media to your Blubrry Podcast Hosting account with only a couple simple clicks.
|
118 |
+
|
119 |
+
= PowerPress in your Language =
|
120 |
+
|
121 |
+
[PowerPress is available in a number of languages](http://create.blubrry.com/resources/powerpress/powerpress-language/). Starting with PowerPress 7.0, translations will be managed through [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/powerpress/) making translations easier to setup and update.
|
122 |
+
|
123 |
+
= PowerPress is looking for translators! =
|
124 |
+
|
125 |
+
[Anyone can help translate PowerPress!](http://create.blubrry.com/resources/powerpress/powerpress-language/translate-powerpress/) If you are intersted in translating PowerPress, please [contact us](https://www.blubrry.com/contact/#translate).
|
126 |
+
|
127 |
+
**Translators will receive the following from us as a thank you for contributing:**
|
128 |
+
|
129 |
+
* Free [Blubrry Professional podcast statistics](http://create.blubrry.com/resources/podcast-media-download-statistics/) account for your podcast.
|
130 |
+
* Name or nickname in the PowerPress readme.txt and in the [PowerPress WordPress.org Translators list](https://wordpress.org/plugins/powerpress/other_notes/) (will give you credit for your contribution)
|
131 |
+
* Website URL (optional, we will link to your website)
|
132 |
+
|
133 |
+
Interested translators please [contact us](https://www.blubrry.com/contact/#translate), include your WordPress.org account name, blubrry account login (if you have one), your name, desired URL, and the language locale(s) you would like to translate.
|
134 |
+
|
135 |
+
= Need Help? =
|
136 |
+
. . . or have some ideas that could improve the plugin?
|
137 |
+
|
138 |
+
* Visit the Blubrry [PowerPress Forum](https://wordpress.org/support/plugin/powerpress) and [Blubrry Resources](http://create.blubrry.com/resources/)
|
139 |
+
* Use the Blubrry [Contact Us](http://www.blubrry.com/contact.php) form
|
140 |
+
* Blubrry [PowerPress Documentation](http://create.blubrry.com/resources/powerpress/)
|
141 |
+
* Check out [The Podcasting Manual](http://create.blubrry.com/manual/) - everything you need to know about podcasting
|
142 |
+
|
143 |
+
= Need More Help? =
|
144 |
+
We now offer one-on-one consulting via GoToMeeting, Skype or phone.
|
145 |
+
[Learn more about Blubrry Consulting Services](http://create.blubrry.com/support/podcast-consulting-services/)
|
146 |
+
|
147 |
+
*PowerPress is developed and maintained by [Blubrry](http://www.blubrry.com), a podcasting company and community owned and operated by podcasters 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.*
|
148 |
+
|
149 |
+
|
150 |
+
== Frequently Asked Questions ==
|
151 |
+
|
152 |
+
= Compatible Themes and Plugins =
|
153 |
+
Most themes and plugins are compatible with PowerPress. PowerPress is developed and tested using the default themes packaged with WordPress including twentyten, twentytwelve, twentythirteen, twentyfourteen, twentyfifteen, and all future versions. These themes use WordPress best practices and adhere to theme rules set by WordPress.org. Any child theme based on these themes should also work without issue.
|
154 |
+
|
155 |
+
If you are having a problem, try [Diagnosing Feed and/or Player Issues](http://create.blubrry.com/resources/powerpress/using-powerpress/diagnosing-feed-andor-player-issues-with-powerpress/).
|
156 |
+
|
157 |
+
If you are having a problem specifically with the player and links, try the "Having issues?" option under PowerPress Settings > Appearance tab. Visit [Resolving Plugin or Theme Conflicts](http://create.blubrry.com/resources/powerpress/powerpress-settings/media-appearance/plugin-theme-conflict-issues/) for details.
|
158 |
+
|
159 |
+
= Premium podcasting themes compatible with PowerPress =
|
160 |
+
[Appendipity Podcast Pro theme](https://www.appendipity.com/themes/podcast-pro-theme/?aid=13) is is designed specifically to take advantage of built-in features, settings and podcast episode meta data in PowerPress. The Blubrry team works with the Appendipity team during beta testing and major WordPress releases to make sure the Podcast Pro theme and PowerPress work together seamlessly.
|
161 |
+
|
162 |
+
|
163 |
+
= Related Plugins =
|
164 |
+
The following plugins may be used in conjunction with PowerPress.
|
165 |
+
|
166 |
+
* [Message Flow](http://wordpress.org/extend/plugins/message-flow/) - generates a CoverFlow-like interface for your blog posts with podcast episodes. For podcasts, use shortocde `[message-flow podcasts_only="true"]`.
|
167 |
+
* [Eli's PowerPress Addon Widget](http://wordpress.org/extend/plugins/podpress-addons/) - Adds a sidebar widget that lists your podcast episodes linked to the play in a new window PowerPress player.
|
168 |
+
* [PowerPress Posts From MySQL](http://wordpress.org/extend/plugins/powerpress-posts-from-mysql/developers/) - Creates blog posts with PowerPress podcast episode information from a MySQL table.
|
169 |
+
* [Featured Podcast Widget](http://wordpress.org/plugins/featured-podcast-widget/), [Home Page](http://www.richardfarrar.com/featured-podcast-widget-for-wordpress/) - A widget that enables you to display your latest podcast from a category or featured podcast utilising the PowerPress plugin's default player.
|
170 |
+
* [Skip to Timestamp](https://wordpress.org/plugins/skip-to-timestamp/) - Skip to Timestamp allows for generating links in your posts that automatically skip to a given time in an audio, video or youtube embed.
|
171 |
+
|
172 |
+
|
173 |
+
= Why doesn't Blubrry PowerPress support multiple enclosures in one feed item/post? =
|
174 |
+
Blubrry PowerPress does not allow you to include multiple media files for one feed item (blog post). This is because each podcatcher handles multiple enclosures in feeds differently. Apple Podcasts will download the first enclosure that it sees in the feed ignoring the rest. Other podcatchers and podcasting directories either pick up the first enclosure or the last in each post item. This inconsistency combined with the fact that [Dave Winer does not recommend multiple enclosures](http://www.reallysimplesyndication.com/2004/12/21) and the [FeedValidator.org recommendation against it](http://www.feedvalidator.org/docs/warning/DuplicateEnclosure.html) is why the Blubrry PowerPress does not support them.
|
175 |
+
|
176 |
+
As a alternative, PowerPress allows you to create additional Custom Podcast Feeds to associate any magnitude of media format and/or length in a blog post to specific custom feeds. For example, you can create one blog post associated to separate video and audio podcast feeds saving you time from entering your show notes twice.
|
177 |
+
|
178 |
+
= Why doesn't Blubrry PowerPress include media statistics built-in? =
|
179 |
+
Blubrry PowerPress does not include media statistics built-in. This is not because Blubrry has its own statistics service, although that's a good reason by itself. Maintaining and calculating statistics is a resource and server intensive task that would add bloat to an otherwise efficient WordPress podcasting plugin. We recommend using your media hosting's web statistics to give you basic download numbers and, if you are seeking more grandular measurements such as client and geographical information for each episode, you're more than welcome to use the [Blubrry Statistics service](http://create.blubrry.com/resources/podcast-media-download-statistics/) as well.
|
180 |
+
|
181 |
+
You may however access your Blubrry Statistics from within your WordPress dashboard.
|
182 |
+
|
183 |
+
= How do you insert the player within a blog post? =
|
184 |
+
You can insert the media player within your blog posts by using the WordPress shortcode feature. The shortcode for PowerPress is `[powerpress]` (all lowercase)
|
185 |
+
|
186 |
+
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"]
|
187 |
+
|
188 |
+
For advanced users with multiple podcast feeds, you may insert the player for a specific feed by specifying the feed slug in the shortcode: [powerpress feed="podcast"]
|
189 |
+
|
190 |
+
If you want to specify a cover image, add an image attribute which points to the specific image url: [powerpress image="http://example.com/path/to/cover_image.jpg"] *Experimental*
|
191 |
+
|
192 |
+
= Why can't you upload large media files? =
|
193 |
+
File uploads are tricky to handle because there are so many web hosting variations with different upload size limits. We recommend using an FTP application to upload large media files. FTP is much more efficient than web based uploads and is typically provided by nearly all web hosting providers.
|
194 |
+
|
195 |
+
= The Media Player does not appear on my site? =
|
196 |
+
. . . or the RSS feed is invalid?
|
197 |
+
|
198 |
+
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.
|
199 |
+
|
200 |
+
|
201 |
+
== Installation ==
|
202 |
+
= Point and Click Installation =
|
203 |
+
1. Sign into your blog, go to the plugins section and click 'Add New'.
|
204 |
+
2. In the search box enter "PowerPress", then click 'Search'.
|
205 |
+
3. Click the 'Install Now' link and proceed to install the plugin.
|
206 |
+
4. Once installed, click 'Activate'.
|
207 |
+
5. Configure your Blubrry PowerPress by going to the **Settings** > **Blubrry PowerPress** page.
|
208 |
+
|
209 |
+
= Manual Installation =
|
210 |
+
To install Blubrry PowerPress manually, follow these steps:
|
211 |
+
|
212 |
+
1. Download [PowerPress from WordPress.org](http://wordpress.org/plugins/powerpress/).
|
213 |
+
2. Extract the downloaded zip file to a temporary folder.
|
214 |
+
3. Copy the entire powerpress folder from the downloaded zip file into the /wp-content/plugins/ folder on your server.
|
215 |
+
4. Activate the "Blubrry PowerPress" plugin in your blog's Plugin Management page.
|
216 |
+
5. Configure your Blubrry PowerPress by going to the **Settings** > **Blubrry PowerPress** page.
|
217 |
+
|
218 |
+
|
219 |
+
== Screenshots ==
|
220 |
+
1. PowerPress's Simple Mode will walk you through setting up your podcast in 3 easy steps.
|
221 |
+
2. Just like blogging, podcasting utilizes blog posting features with the addition of a podcast episode box. Yes, podcasting is that simple!
|
222 |
+
3. PowerPress integrates seamlessly with Blubrry Podcast Hosting's exclusive player.
|
223 |
+
4. PowerPress comes with a built-in subscribe sidebar widget to help your audience subscribe to your podcast.
|
224 |
+
5. PowerPress comes with an editable subscribe page builder with a subscribe embed tool to help your web visitors subscribe.
|
225 |
+
6. PowerPress's Advanced Mode settings let you dig in as deep as you want to with every possible setting for podcasting at your fingertips.
|
226 |
+
7. PowerPress incorporates the built-in WordPress media players into your blog posts and pages.
|
227 |
+
|
228 |
+
|
229 |
+
== Changelog ==
|
230 |
+
|
231 |
+
= Next Major Release Announcements =
|
232 |
+
* We are looking for beta testers! If you would like to beta test future versions of PowerPress, please [contact us](http://www.blubrry.com/contact.php#feedback) with your name and email.
|
233 |
+
|
234 |
+
= Fan of PowerPress and want to show your support? =
|
235 |
+
If you are a fan of PowerPress, we would greatly appreciate it if you could take a moment and [leave us a review on WordPress.org](https://wordpress.org/support/plugin/powerpress/reviews/?rate=5#new-post). Your support is greatly appreciated!
|
236 |
+
|
237 |
+
= 7.5 =
|
238 |
+
* Released on 7/23/2019
|
239 |
+
* Added new Apple categories announced in July. The new Apple Categories will be made available on Apple Podcasts mid August, 2019.
|
240 |
+
* Added Multi-program Blubrry Podcast Hosting, perfect for Category podcasting.
|
241 |
+
* Added *Update Google PubSubHubbub*, lets Google Podcasts and other podcast directory services when your podcast publishes new episodes.
|
242 |
+
* Added support for various languages to podcast as including "Thai" and "Vietnamese".
|
243 |
+
|
244 |
+
|
245 |
+
= 7.4.4 =
|
246 |
+
* Releasd on 6/21/2019
|
247 |
+
* Fixed bug introduced in last update that calculated the total number of episodes when viewing podcasts in channels and post types in PowerPress admin. (Thanks @edzila60610 for bringing to our attention!)
|
248 |
+
* Removed all mentions of Google+. (Thanks @k_abel for bringing to our attention!)
|
249 |
+
* Fixed notice message getting cut off for the "Clear Plugins Update Cache" option under "Tools". (Thanks @k_abel for bringing to our attention!)
|
250 |
+
* Added option `archive`="true" for the `powerpress_subscribe` shortcode to allow for the shortcode to be added to archive/category pages.
|
251 |
+
|
252 |
+
|
253 |
+
= 7.4.3 =
|
254 |
+
* Released on 6/12/2019
|
255 |
+
* Updated labels for Subscribe buttons and links in admin.
|
256 |
+
* Note: Apple has announced the end of life for iTunes desktop (except for Windows). PowerPress will be removing iTunes desktop specific features where they conflict with the Apple Podcasts iOS app.
|
257 |
+
* Enhanced iTunes summary updated, optimized for latest iOS podcasts app. It is now designed for Apple Podcasts iOS app rather than for iTunes desktop. (Thanks Robin for your assistance!)
|
258 |
+
* Force feed discovery on homepage only to use default podcast feed for Google Search.
|
259 |
+
* Fixed bug with deleting media files hosted on Blubrry Podcast hosting.
|
260 |
+
* Fixed bug with posts with revisions being part of the total number of episodes when viewing podcast feeds in PowerPress settings.
|
261 |
+
* Fixed bug with skipto position time not getting included in feed show notes. (Thanks @tszt for bringing to our attention!)
|
262 |
+
|
263 |
+
|
264 |
+
= 7.4.2 =
|
265 |
+
* Released on 4/26/2019
|
266 |
+
* Fixed `T_FUNCTION` bug for PHP 5.2 (not an issue if you have PHP 5.3 or newer)
|
267 |
+
|
268 |
+
|
269 |
+
= 7.4.1 =
|
270 |
+
* Released on 4/10/2019
|
271 |
+
* Added logic to authentication email addresses differently for premium password protected podcasts.
|
272 |
+
* Added support for YoastSEO and Google Podcasts (Thanks @sunkast for bringing to our attention!)
|
273 |
+
* Removed use of `create_function` to fix damaged serialized data created by the old PodPress plugin. (Thanks @oilmanmag and Dimitris for bringing to our attention!)
|
274 |
+
* Fixed `esc_attr()`bug with podpress import.
|
275 |
+
* Added Tamil (ta) as a podcast feed language option. Thanks KT for requesting! If you do not see your language pelase contact us we will add it!
|
276 |
+
* Changed feed join query to solve conflict with the Affiliate Disclosure Pro plugin. (Thanks @ndnakashima for bringing to our attention!)
|
277 |
+
* New functionality for Taxonomy podcasting and the `powerpress_subscribe` shortcode (Thanks @tristanmason for testing!)
|
278 |
+
* Fixed taxonomy bugs with the playlist player shortcodes (Thanks @tristanmason for the code and helping us test!)
|
279 |
+
* PowerPress playlist player can now be ordered in ascending order with attribute order="asc" (Thanks @tristanmason for the code and helping us test!)
|
280 |
+
* Fixed bug with skipto shortcode leaving a blank value in feeds. (Thanks @tszt for bringing to our attention!)
|
281 |
+
* Skipto timestamp now uses the timestamp exactly as you entered it as the label as long as it has at least one colon to separate minutes from seconds.
|
282 |
+
* Fixed bug for post type podcasting in the situation where there can be multiple post types for blog posts or pages. (Thanks @shawnogordo for the bug fix!)
|
283 |
+
|
284 |
+
|
285 |
+
= 7.4 =
|
286 |
+
* Released on 10/03/2018
|
287 |
+
* NEW: [Skip to Position in Player](https://create.blubrry.com/resources/powerpress/advanced-tools-and-options/skip-to-position-in-player/) shortcode, quickly skip to a position in your audio episodes from your show notes. e.g. `[skipto time="2:34"]` [Learn more](https://create.blubrry.com/resources/powerpress/advanced-tools-and-options/skip-to-position-in-player/)
|
288 |
+
* MEW: Emoji in show notes! You can now enter Emoji characters into the show notes to appear in podcast apps. Enable option in Feed settings tab. Previously WordPress converst Emoji to images which are not displayed in podcast apps. [Learn more](https://create.blubrry.com/resources/powerpress/powerpress-settings/feeds/#emoji)
|
289 |
+
* Added option to override the Google Podcasts subscribe URL.
|
290 |
+
* Enhanced VideoObject, a feature in Podcasting SEO.
|
291 |
+
* Improved base64 encoding Google Podcasts Subscribe URLs. (Thanks Daniel Lewis for the heads up!)
|
292 |
+
* Removed option `Append show title to episode titles` per request from Apple.
|
293 |
+
|
294 |
+
|
295 |
+
= 7.3 =
|
296 |
+
* Released on 07/10/2018
|
297 |
+
* Spotify and Google Podcasts subscribe links added to Destinations.
|
298 |
+
* PowerPress users using [Blubrry Podcast Hosting](https://create.blubrry.com/resources/podcast-media-hosting/) may now submit shows to Spotify!
|
299 |
+
* Added PodcastMirror setting, a modern alternative to FeedBurner. Learn more about [PodcastMirror](https://podcastmirror.com/) at [podcastmirror.com](https://podcastmirror.com/)
|
300 |
+
* Converted loop logic from each() to foreach() for PHP 7.3+ / 8.0+ compatibility.
|
301 |
+
* Improved logic for playlist player to appear better when certain settings are not set.
|
302 |
+
* Moved the enqueue script ('jquery-ui-tabs') logic so it only loads in the powerpress admin pages. (Thanks @keenanpayne for the code change!)
|
303 |
+
* Added define option `POWERPRESS_POSTTYPE_MIXING`, when set to true podcast channels for the default podcast feed will mix all post types of type post with the default podcast feed. (Thanks @eos-rose for bringing to our attention)
|
304 |
+
* Fixed bug with translation and javascript alert messages. (Thanks Enrico for reporting the bug!)
|
305 |
+
|
306 |
+
|
307 |
+
= 7.2 =
|
308 |
+
* Released on 12/13/2017
|
309 |
+
* Added code to allow customization of Blubrry player style and colors.
|
310 |
+
* Added code to set no-cache headers in AJAX calls.
|
311 |
+
* Updated code to fixed bug where new iTunes episode title field may not save with some web hosting platforms using mod security with PHP 5.x. (Thanks @glark, Karren, and others for helping us fix the issue!)
|
312 |
+
* Changed the menu slug name for editing PowerPress settings.
|
313 |
+
* Removed safe mode logic for older versions of PHP. (Thanks @BrentO for reporting)
|
314 |
+
* Added logic to support feeds with bbpress. (Thanks @mubashiriqbal for bringing to our attention!)
|
315 |
+
* Added missing argument for get_post_type_object() in powerpress-subscribe (Thanks John for bring to our attention)
|
316 |
+
* Added disable iOS 11 field options under tools to help diagnose issue with some websites that show a 404 page when editing settings since the iOS11 fields were introduced.
|
317 |
+
* Changed the names of the new iOS11 fields that were getting caught by Mod Security for some users.
|
318 |
+
* Fixed bug with Taxonomy podcasting statistics redirects not being compatible with versions of WordPress older than 4.5 (Thanks @fmnowling for bringing to our attention!)
|
319 |
+
* iTunes Maximizer option 11+ older episodes now includes the iTunes summary by default to reflect changes with iOS11. (Thanks Daniel Lewis for the suggestion!)
|
320 |
+
* Fixed link to powerpress translation page which was returning 404
|
321 |
+
* Added CastFeedValidator.com links for validating podcast feeds.
|
322 |
+
* Added Hindi and Punjabi to list of Podcast feed langauges (Thanks @blueblast for requesting the languages to be added)
|
323 |
+
|
324 |
+
|
325 |
+
= 7.1.1 =
|
326 |
+
* Released on 08/24/2017
|
327 |
+
* NOTE: There is no urgency to update to this version unless you can benefit from bug fixes listed.
|
328 |
+
* BETA COMING SOON: PowerPress 7.2 Beta will be available within 24-72 hours. Please visit https://create.blubrry.com/resources/powerpress/powerpress-beta/ for more details.
|
329 |
+
* Added logic to prevent the W3 Total Cache plugin from minifying podcast feeds. (Thanks @allimaple for bringing to our attention)
|
330 |
+
* Fixed warning messages in the getid3 library so they comply with PHP 7.1+. (Thanks @mahe for letting us know about the problem)
|
331 |
+
* Fixed error verifying URLs for file formats not supported by iTunes.
|
332 |
+
* Feed import now compatible with Spreaker podcast feeds.
|
333 |
+
* Added code when including the subscribe CSS file to make sure it's always included with various WordPress updates (Thanks Tim for the code fix!)
|
334 |
+
* Added checkbox in Blubrry Player configuration for making iTunes Episode image use optional with player. Unchecked by default.
|
335 |
+
|
336 |
+
|
337 |
+
= 7.1 =
|
338 |
+
* Released on 7/11/2017
|
339 |
+
* Added support for iOS 11!
|
340 |
+
* iTunes type added, specify episodic or serial for your podcast program (for iOS 11).
|
341 |
+
* iTunes episode title, number, season and type added for your episodes (for iOS 11).
|
342 |
+
* Subscribe on iTunes changed to Subscribe on Apple Podcasts, links have been enhanced to highlight episodes.
|
343 |
+
* Blubrry Podcast Media Hosting and HTTPS: Media URLs are now automatically converted to HTTPS.
|
344 |
+
* Added compatibility for the SG CachePress plugin. PowerPress will clear the cache if there was an error. (Thanks @grudesky for getting us in touch with developers!)
|
345 |
+
* Fixed error with creating the subscribe page in some languages (Thanks @edithmayerhofer for bringing to our attention).
|
346 |
+
* Better error reporting when importing podcast feed images.
|
347 |
+
* Verify media option improvements, mp3 duration is now detected even faster in most cases!
|
348 |
+
* Added logic to prevent notice messages with the subscribe_shortcode and newest versions of PHP. (Thanks @mahe for bringing to our attention)
|
349 |
+
* Added "Hide player / links: Read more tagged posts" option, hides the player and links on pages with the read more link. (Thanks @calebsg0 for the suggestion!)
|
350 |
+
* Google play schema URL updated.
|
351 |
+
* Added "redirect_rule" list of post types not used for podcasting. For compatibility with the "Safe Redirect Manager" plugin.
|
352 |
+
* Blubrry Player now uses the episode itunes image if set. The URLs to the images must be https:// in order to appear on social networking sites.
|
353 |
+
* Windows Media Player in browser support has been removed. Microsoft Edge browser does not support Windows Media Player in the browser.
|
354 |
+
* New logic added for dealing with Internet Explorer / Edge browser preloading media when using the MediaElement.js player.
|
355 |
+
* Fixed PHP warning message if media size in bytes is zero when displaying file size with player links.
|
356 |
+
* No longer using self closing XML for iTunes Categories.
|
357 |
+
* iTunes subscribe itpc:// links are no longer supported.
|
358 |
+
* Editing default podcast channel now imports global settings by default if blank. (Thanks Robin for bringing to our attention!)
|
359 |
+
* RSS Podcast feed Import error message added when the PHP XML library is not available. (Thanks @hgetrost for bringing to our attention!)
|
360 |
+
|
361 |
+
|
362 |
+
= 7.0.4 =
|
363 |
+
* Released on 2/18/2017
|
364 |
+
* NOTE: There is no urgency to update to this version unless you can benefit from the new import options, top level iTunes category options, or bug fixes listed.
|
365 |
+
* Playlist player bug fix: When ids="" are specified, episodes are now listed in the order entered rather than by date. (Thanks Zach Herbert for bringing to our attention!)
|
366 |
+
* Updated the `powerpress_subscribe` shortcode to include the latest iTunes button in svg format and added the iTunes small badge. Use attribute itunes_badge="true" to display iTunes badge.
|
367 |
+
* Changed import feed code to use the current author ID rather than hard coded to 1. (Thanks @tund3r for the bug fix!)
|
368 |
+
* Import feed for libsyn updated. (Thanks @tund3r for the code fix!)
|
369 |
+
* Import feed advanced option "Remove query strings from media URLs" added. (Thanks @tund3r!)
|
370 |
+
* Fixed rare PHP Notice unserialize() on line 3094 error that may happen if the podcast episode serialized data is not present. (Thanks @hmseb for pointing out the notice to us!)
|
371 |
+
* Added colon ":" to list of characters that can be in a valid media URL. (Thanks AfterBuzzTV.com! for the heads up!)
|
372 |
+
* Fixed notice message that can appear when using the media objects with the powerpress shortcode. (Thanks @srumery for reporting the problem!)
|
373 |
+
* Fixed issue with dashboard failing to load in some cases due to news feed being blocked by web server. (Thanks Jacob K. for helping us debug the problem!)
|
374 |
+
* iTunes categories with subcategories are no longer strictly enforced. If you want to select "Art" without selecting a sub category you now can. Selecting a category with a sub category is still optimal.
|
375 |
+
* Added ability to import a podcast feed to a post type podcast feed or to a podcast channel.
|
376 |
+
* Added ability to set the post status when importing a podcast feed. (Thanks @hgetrost for the feature suggestion!)
|
377 |
+
* Added compatibility with the [Custom Post Widget](https://wordpress.org/plugins/custom-post-widget/) plugin. (Thanks @aparentdesign for letting us know about the problem)
|
378 |
+
* Fixed bug where ogg audio was not using the correct audio player. (Thanks @joeress for letting us know about the bug)
|
379 |
+
* Fixed bug with import not matching episode media URLs correctly. (Thanks @hgetrost for bringing to our attention)
|
380 |
+
|
381 |
+
|
382 |
+
= 7.0.3 =
|
383 |
+
* Released 9/13/2016
|
384 |
+
* Fixed issue when editing channel/category/post type podcast settings double escaping & character. (Thanks Robin Brinkler for bringing to our attention!)
|
385 |
+
* Added checks for OpenSSL and cURL SSL support to the Diagnostics page.
|
386 |
+
* PowerPress "Verify" option now works with MemberPress. (Thanks MemberPress for the code!)
|
387 |
+
* Added new debugging define `POWERPRESS_DEBUG_QUERIES`, displays SQL queries at the bottom of the feed for diagnostic purposes.
|
388 |
+
* Feed option to not allow other plugins from modyfing podcast feeds now bypasses the `the_content` and `the_excerpt` filters.
|
389 |
+
* Added 2 new define options for podcast feeds and HTTPS. For example, it is possible to host your website via HTTPS but serve the feed via HTTP. (Thanks @Fastmover for the patch that inspired this option)
|
390 |
+
* `define('POWERPRESS_FEEDS_FORCE_HTTPS', true);` when added to wp-config.php forces all media links and iTunes images to use HTTPS.
|
391 |
+
* `define('POWERPRESS_FEEDS_FORCE_HTTP', true);` when added to wp-config.php forces all media links and iTunes images to use HTTP.
|
392 |
+
|
393 |
+
|
394 |
+
= 7.0.2 =
|
395 |
+
* Released on 7/22/2016
|
396 |
+
* Fixed bug with new Blubrry Player not displaying show notes button.
|
397 |
+
* Added TuneIn subscribe URL option. (Thanks @kgagne for bringing to our attention!)
|
398 |
+
* Removed the PHP 5.2 or older error message in the getid3 library. (Thanks davidpmariano for the heads up!)
|
399 |
+
* Fixed bug where podcast channels with a blank feed title do not apply specific channel settings like the website link. (Thanks Robin Brinkler for bringing to our attention!)
|
400 |
+
* Fixed bug where category episodes were not using the category settings like they used to if only one category is selected. (Thanks Jason Bryant for explaining the situation for us to reproduce the problem!)
|
401 |
+
* Added additional logic to better handle category podcasting when strict category podcasting is not enabled.
|
402 |
+
* Removed itunes:summary when Feed Maximizer on (this was the behavior before 7.0). iTunes summary is a duplicate of the RSS description. To include itunes summary in maximizer mode, please add `define('POWERPRESS_MAXIMIZER_INCLUDE_ITUNES_SUMMARY', true);` in your wp-config.php.
|
403 |
+
|
404 |
+
|
405 |
+
= 7.0.1 =
|
406 |
+
* Released on 6/20/2016
|
407 |
+
* Fixed bug where verify media could fail with "unable to determine file format" caused by getid3 library update. (Thanks @budgetnerd for bringing to our attention!)
|
408 |
+
* Re-added the itpc links for subscribe on iTunes when no iTunes subscribe URL provided. For those who wanted this, please notice itpc does not work on iOS devices.
|
409 |
+
* Statistics redirects that do not end with a / will now work. We add a slash if no slash is present.
|
410 |
+
* Removed February 2016 iTunes notice message.
|
411 |
+
* Subscribe by Email, on Google Play and Stitcher options removed for premium podcast feeds.
|
412 |
+
* Subscribe links will no longer appear when episode no links option checked. (Thanks @360woodworking for bringing to our attention)
|
413 |
+
|
414 |
+
|
415 |
+
= 7.0 =
|
416 |
+
* Released on 6/6/2016
|
417 |
+
* Added Google Play Music to subscribe page shortcode embed and sidebar widget.
|
418 |
+
* Added Stitcher to subscribe page shortcode embed and sidebar widget.
|
419 |
+
* New: Strict Category Podcasting. Select a specific category to each episode for statistics tracking and subscription links.
|
420 |
+
* New: Podcast only category feeds. You can now mix blog posts with podcast episodes in your podast categories.
|
421 |
+
* New: Blubrry Audio Player. Modern podcast audio player complete with subscribe and share tools. For Blubrry Hosting customers only.
|
422 |
+
* Updated the getid3 library to latest version.
|
423 |
+
* Embed link enhanced to use provided embed. If an embed is placed into an episode, the embed link below the player will use that embed as well.
|
424 |
+
* Fixed bug where post type podcast feed with slug 'podcast' will also get the default podcast feed settings (Thanks steveportigal for bringing to our attention).
|
425 |
+
* Fixed bug with WP 4.5 dropping the `rss-http` content type "text/xml".
|
426 |
+
* Added shortcode attribute `ids=""` so you can specify post IDs for the playlist player to display exclusively. (Thanks John Haspel for the feature suggestion!)
|
427 |
+
* RSS import now sets the blog post content from the iTunes summary if no description or content:encoded was found in the feed. (Thanks @synthtony for letting us know about the situation)
|
428 |
+
* RSS import function calls to `mb_stripos()` will fallback to `stripos()` if the PHP mb (Multibyte String) library not available. (Thanks Glen Donohu for bringing to our attention!)
|
429 |
+
* Import to podcast category option added.
|
430 |
+
* Added audio ac3 and dts to media detection getid3 library (these are not podcast safe formats though we can detect their meta information).
|
431 |
+
* Improved logic for setting the iTunes subtitle and iTunes summary from blog post excerpts and blog post content if no custom iTunes summary and/or subtitle is set.
|
432 |
+
* Improved feed logic to minimize SQL queries
|
433 |
+
* Feed Maximizer option now applies to category podcast only feeds.
|
434 |
+
* Renamed "Appearance" settings to "Website" settings
|
435 |
+
* Added "Destination" settings for podcast directories and apps
|
436 |
+
* You can now select from pages when setting your Subscribe Page.
|
437 |
+
* Changed labels for Podcasting SEO guidance to include word "Podcasting" so not to confuse with "Web SEO".
|
438 |
+
* Updated Podcasting SEO guidance to reflect how search works in Google Play Music (Thanks Daniel Lewis for confirming what is indexed!)
|
439 |
+
* Changed wording for Podcasting SEO guidance with Author field, replaced "slogans" with "nicknames" so it is more clear that we mean slogans for talent on the show.
|
440 |
+
* Removed logic to fallback to the HTML5 player for mobile devices. This was only needed when Flash based players were used.
|
441 |
+
* Quicktime Embed option for m4a audio removed due to security concerns with Quicktime.
|
442 |
+
* SWF embed support dropped.
|
443 |
+
* Embed link now toggles embed box when clicked multiple times.
|
444 |
+
* ATTENTION: The 1 pixel out audio player will be removed from PowerPress 7.1.
|
445 |
+
|
446 |
+
= Additional PowerPress Version History =
|
447 |
+
Please visit the [PowerPress Version History](http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/powerpress-version-history/) page for history prior to version 6.0.
|
448 |
+
|
449 |
+
== Upgrade Notice ==
|
450 |
+
ATTENTION: The 1 pixel out audio player will be removed from PowerPress 7.1.
|
451 |
+
|
452 |
+
== Contributors ==
|
453 |
+
Angelo Mandato, CIO [Blubrry](http://www.blubrry.com) - Plugin founder, architect and lead developer
|
454 |
+
|
455 |
+
Pat McSweeny, PHP Developer - Developed initial version (v0.1.0) of plugin
|
456 |
+
|
457 |
+
Jerry Stephens, [Way of the Geek](http://wayofthegeek.org) - Contributed initial code fix for excerpt bug resolved in v0.6.1, wrote initial code for the 4 new flash players.
|
458 |
+
|
459 |
+
Darcy Fiander, [Rooty Radio](http://rootyradio.com) - Fixed bug with category links to FeedValidator.org and category title warning when validating category feeds.
|
460 |
+
|
461 |
+
Joel Haasnoot, [Personal Blog](http://waarisdetrein.nl/joelhaasnoot/) - Developed PodPress archive statistics.
|
462 |
+
|
463 |
+
Nicolas Bouliane, [Personal Blog](http://nicolasbouliane.com/) - contributed code for `get_the_powerpress_all_players()` function.
|
464 |
+
|
465 |
+
|
466 |
+
== Translators ==
|
467 |
+
* Danish translation for v1.0.11+ by [Team Blogos](http://wordpress.blogos.dk/s%C3%B8g-efter-downloads/?did=280) - Latest translation available [here](http://wordpress.blogos.dk/s%C3%B8g-efter-downloads/?did=280)
|
468 |
+
* French translation for v1.0.11+ by [Aur�lien Denis](http://wpchannel.com/) - Aur�lien is looking for assistance maintaining the French translation, email wpchannel [at] gmail.com if interested.
|
469 |
+
* Simplified Chinese for v1.0.12+ by [webmote](http://codeex.cn) - From webmote: Welcome to use the plugin. Very good! and then hope you to access my site.
|
470 |
+
* Italian translation for v2.0.4+ by [Umberto Sartori](http://veneziadoc.net/)
|
471 |
+
* Romanian translation for v2.0.4+ by Alexander Ovsov (Web Geek Sciense: http://webhostinggeeks.com/science/)
|
472 |
+
* Russian translation for v4.0.5+ by [Igor Mercury](http://www.nightdiary.ru/)
|
473 |
+
* Brazilian Portuguese translation for v6.0+ by [Leo Lopes from Radiofobia](http://radiofobia.com.br/)
|
474 |
+
|
475 |
+
|
476 |
+
== Tips and Tutorials ==
|
477 |
+
* [Using PowerPress outside the Loop](http://blog.nicolasbouliane.com/?p=1695) - by [Nicolas Bouliane](http://blog.nicolasbouliane.com/)
|
478 |
+
* [The PowerPress Podcast](http://www.powerpresspodcast.com/) - by [Blubrry](http://www.blubrry.com/)
|
479 |
+
|
480 |
+
Please [contact blubrry](http://www.blubrry.com/contact.php) with the link to your tips or tutorial for PowerPress and we'll add them to the list above.
|
481 |
+
|
482 |
+
== Feedback ==
|
483 |
+
[http://create.blubrry.com/resources/powerpress/](http://create.blubrry.com/resources/powerpress/)
|
484 |
+
|
485 |
+
== Support ==
|
486 |
+
[http://create.blubrry.com/support/](http://create.blubrry.com/support/)
|
487 |
+
|
488 |
+
== Blubrry Social ==
|
489 |
+
|
490 |
+
[Twitter](https://twitter.com/blubrry) - [Facebook](https://www.facebook.com/blubrry) - [YouTube](https://www.youtube.com/channel/UC9sE1Yz2deZiGAP67xYx9Xg)
|