This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpowerpressadmin-basic.php
1751 lines (1535 loc) · 92.2 KB
/
powerpressadmin-basic.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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
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
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
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
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
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
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
<?php
function powerpress_admin_basic()
{
$FeedAttribs = array('type'=>'general', 'feed_slug'=>'', 'category_id'=>0, 'term_taxonomy_id'=>0, 'term_id'=>0, 'taxonomy_type'=>'', 'post_type'=>'');
// feed_slug = channel
$General = powerpress_get_settings('powerpress_general');
$General = powerpress_default_settings($General, 'basic');
if( !isset($General['advanced_mode_2']) )
$General['advanced_mode_2'] = true;
$FeedSettings = powerpress_get_settings('powerpress_feed');
$FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
$CustomFeed = get_option('powerpress_feed_'.'podcast'); // Get the custom podcast feed settings saved in the database
if( $CustomFeed ) // If they enabled custom podast channels...
{
$FeedSettings = powerpress_merge_empty_feed_settings($CustomFeed, $FeedSettings);
$FeedAttribs['channel_podcast'] = true;
}
$MultiSiteServiceSettings = false;
if( is_multisite() )
{
$MultiSiteSettings = get_site_option('powerpress_multisite');
if( !empty($MultiSiteSettings['services_multisite_only']) )
{
$MultiSiteServiceSettings = true;
}
}
?>
<script type="text/javascript"><!--
function CheckRedirect(obj)
{
if( obj.value )
{
if( obj.value.indexOf('rawvoice') == -1 && obj.value.indexOf('techpodcasts') == -1 &&
obj.value.indexOf('blubrry') == -1 && obj.value.indexOf('podtrac') == -1 )
{
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'); ?>') )
{
obj.value = '';
return false;
}
}
}
return true;
}
function SelectEmbedField(checked)
{
if( checked )
jQuery('#embed_replace_player').removeAttr("disabled");
else
jQuery('#embed_replace_player').attr("disabled","disabled");
}
jQuery(document).ready(function($) {
jQuery('#powerpress_advanced_mode_button').click( function(event) {
event.preventDefault();
jQuery('#powerpress_advanced_mode').val('0');
jQuery(this).closest("form").submit();
});
jQuery('#episode_box_player_links_options').change(function () {
var objectChecked = jQuery('#episode_box_player_links_options').attr('checked');
if(typeof jQuery.prop === 'function') {
objectChecked = jQuery('#episode_box_player_links_options').prop('checked');
}
if( objectChecked == true ) {
jQuery('#episode_box_player_links_options_div').css("display", 'block' );
}
else {
jQuery('#episode_box_player_links_options_div').css("display", 'none' );
jQuery('.episode_box_no_player_or_links').attr("checked", false );
jQuery('#episode_box_no_player_and_links').attr("checked", false );
if(typeof jQuery.prop === 'function') {
jQuery('.episode_box_no_player_or_links').prop("checked", false );
jQuery('#episode_box_no_player_and_links').prop("checked", false );
}
}
} );
jQuery('#episode_box_no_player_and_links').change(function () {
var objectChecked = jQuery(this).attr("checked");
if(typeof jQuery.prop === 'function') {
objectChecked = jQuery(this).prop("checked");
}
if( objectChecked == true ) {
jQuery('.episode_box_no_player_or_links').attr("checked", false );
if(typeof jQuery.prop === 'function') {
jQuery('.episode_box_no_player_or_links').prop("checked", false );
}
}
} );
jQuery('.episode_box_no_player_or_links').change(function () {
var objectChecked = jQuery(this).attr("checked");
if(typeof jQuery.prop === 'function') {
objectChecked = jQuery(this).prop("checked");
}
if( objectChecked == true) {
jQuery('#episode_box_no_player_and_links').attr("checked", false );
if(typeof jQuery.prop === 'function') {
jQuery('#episode_box_no_player_and_links').prop("checked", false );
}
}
} );
jQuery('#episode_box_feature_in_itunes').change( function() {
var objectChecked = jQuery('#episode_box_feature_in_itunes').attr('checked');
if(typeof jQuery.prop === 'function') {
objectChecked = jQuery('#episode_box_feature_in_itunes').prop('checked');
}
if( objectChecked ) {
$("#episode_box_order").attr("disabled", true);
} else {
$("#episode_box_order").removeAttr("disabled");
}
});
} );
//-->
</script>
<input type="hidden" name="action" value="powerpress-save-settings" />
<input type="hidden" id="powerpress_advanced_mode" name="General[advanced_mode_2]" value="1" />
<input type="hidden" id="save_tab_pos" name="tab" value="<?php echo (empty($_POST['tab'])?0: intval($_POST['tab']) ); ?>" />
<div id="powerpress_admin_header">
<h2><?php echo __('Blubrry PowerPress Settings', 'powerpress'); ?></h2>
<span class="powerpress-mode"><?php echo __('Advanced Mode', 'powerpress'); ?>
<a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_basic.php&mode=simple"); ?>" id="powerpress_advanced_mode_button" class="button-primary"><?php echo __('Switch to Simple Mode', 'powerpress'); ?></a>
</span>
</div>
<div id="powerpress_settings_page" class="powerpress_tabbed_content">
<ul class="powerpress_settings_tabs">
<li><a href="#tab0"><span><?php echo htmlspecialchars(__('Welcome', 'powerpress')); ?></span></a></li>
<li><a href="#tab1"><span><?php echo htmlspecialchars(__('Basic Settings', 'powerpress')); ?></span></a></li>
<li><a href="#tab2"><span><?php echo htmlspecialchars(__('Services & Stats', 'powerpress')); ?></span></a></li>
<li><a href="#tab3"><span><?php echo htmlspecialchars(__('Media Appearance', 'powerpress')); ?></span></a></li>
<li><a href="#tab4"><span><?php echo htmlspecialchars(__('Feeds', 'powerpress')); ?></span></a></li>
<li><a href="#tab5"><span><?php echo htmlspecialchars(__('iTunes', 'powerpress')); ?></span></a></li>
<li><a href="#tab6" style="position: relative;"><span style="margin-right: 25px;"><?php echo htmlspecialchars(__('Google Play', 'powerpress')); ?></span> <span style="position: absolute; top: 0; right: 2px;"><?php echo powerpressadmin_new(); ?></a></span></li>
<li><a href="#tab7"><span><?php echo htmlspecialchars(__('Artwork', 'powerpress')); ?></span></a></li>
</ul>
<div id="tab0" class="powerpress_tab">
<?php powerpressadmin_welcome($General); ?>
</div>
<div id="tab1" class="powerpress_tab">
<?php
powerpressadmin_edit_entry_options($General);
powerpressadmin_edit_podpress_options($General);
?>
</div>
<div id="tab2" class="powerpress_tab">
<?php
if( $MultiSiteServiceSettings && defined('POWERPRESS_MULTISITE_VERSION') )
{
PowerPressMultiSitePlugin::edit_blubrry_services($General);
}
else
{
powerpressadmin_edit_blubrry_services($General);
powerpressadmin_edit_media_statistics($General);
}
?>
</div>
<div id="tab3" class="powerpress_tab">
<?php
powerpressadmin_appearance($General, $FeedSettings);
?>
</div>
<div id="tab4" class="powerpress_tab">
<?php
powerpressadmin_edit_feed_general($FeedSettings, $General);
powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs);
powerpressadmin_edit_funding($FeedSettings);
powerpressadmin_edit_tv($FeedSettings);
?>
</div>
<div id="tab5" class="powerpress_tab">
<?php
powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs);
powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
?>
</div>
<div id="tab6" class="powerpress_tab">
<?php
powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs);
?>
</div>
<div id="tab7" class="powerpress_tab">
<?php
powerpressadmin_edit_artwork($FeedSettings, $General);
?>
</div>
</div>
<div class="clear"></div>
<?php
powerpressadmin_advanced_options($General);
}
function powerpressadmin_advanced_options($General)
{
// Break the bottom section here out into it's own function
$ChannelsCheckbox = '';
if( !empty($General['custom_feeds']) )
$ChannelsCheckbox = ' onclick="alert(\''. __('You must delete all of the Podcast Channels to disable this option.', 'powerpress') .'\');return false;"';
$CategoryCheckbox = '';
//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.
// $CategoryCheckbox = ' onclick="alert(\'You must remove podcasting from the categories to disable this option.\');return false;"';
?>
<div style="margin-left: 10px;">
<h3><?php echo __('Advanced Options', 'powerpress'); ?></h3>
<div style="margin-left: 50px;">
<div>
<input type="checkbox" name="NULL[player_options]" value="1" checked disabled />
<strong><?php echo __('Audio Player Options', 'powerpress'); ?></strong> -
<?php echo __('Select from 3 different web based audio players.', 'powerpress'); ?>
<span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_player.php'); ?>"><?php echo __('configure audio player', 'powerpress'); ?></a>)</span>
</div>
<div>
<input type="checkbox" name="NULL[video_player_options]" value="1" checked disabled />
<strong><?php echo __('Video Player Options', 'powerpress'); ?></strong> -
<?php echo __('Select from 3 different web based video players.', 'powerpress'); ?>
<span style="font-size: 85%;">(<a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_videoplayer.php'); ?>"><?php echo __('configure video player', 'powerpress'); ?></a>)</span>
</div>
<div>
<input type="hidden" name="General[channels]" value="0" />
<input type="checkbox" name="General[channels]" value="1" <?php echo ( !empty($General['channels']) ?' checked':''); echo $ChannelsCheckbox; ?> />
<strong><?php echo __('Custom Podcast Channels', 'powerpress'); ?></strong> -
<?php echo __('Manage multiple media files and/or formats to one blog post.', 'powerpress'); ?>
<?php if( empty($General['channels']) ) { ?>
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
<?php } else { ?>
<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>
<?php } ?>
</div>
<div>
<input type="hidden" name="General[cat_casting]" value="0" />
<input type="checkbox" name="General[cat_casting]" value="1" <?php echo ( !empty($General['cat_casting']) ?' checked':''); echo $CategoryCheckbox; ?> />
<strong><?php echo __('Category Podcasting', 'powerpress'); ?></strong> -
<?php echo __('Manage podcasting for specific categories.', 'powerpress'); ?>
<?php if( empty($General['cat_casting']) ) { ?>
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
<?php } else { ?>
<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>
<?php } ?>
</div>
<div>
<input type="checkbox" name="General[metamarks]" value="1" <?php echo ( !empty($General['metamarks']) ?' checked':''); ?> />
<strong><?php echo __('Meta Marks', 'powerpress'); ?></strong> -
<?php echo __('Add additional meta information to your media for syndication.', 'powerpress'); ?>
<?php echo powerpress_help_link('http://www.powerpresspodcast.com/metamarks/'); ?>
<span style="font-size: 85%;">(<?php echo __('feature will appear in episode entry box', 'powerpress'); ?>)</span>
</div>
<div>
<input type="hidden" name="General[taxonomy_podcasting]" value="0" />
<input type="checkbox" name="General[taxonomy_podcasting]" value="1" <?php echo ( !empty($General['taxonomy_podcasting']) ?' checked':''); ?> />
<strong><?php echo __('Taxonomy Podcasting', 'powerpress'); ?></strong>
<span style="font-size: 14px;">(<?php echo __('Feature sponsored by', 'powerpress'); ?> <a href="http://afterbuzztv.com/" target="_blank">AfterBuzzTV.com</a>)</span> -
<?php echo __('Manage podcasting for specific taxonomies.', 'powerpress'); ?>
<?php if( empty($General['taxonomy_podcasting']) ) { ?>
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
<?php } else { ?>
<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>
<?php } ?>
</div>
<div>
<input type="hidden" name="General[posttype_podcasting]" value="0" />
<input type="checkbox" name="General[posttype_podcasting]" value="1" <?php echo ( !empty($General['posttype_podcasting']) ?' checked':''); ?> />
<strong><?php echo __('Post Type Podcasting', 'powerpress'); ?></strong> -
<?php echo __('Manage multiple media files and/or formats to specific post types.', 'powerpress'); ?>
<?php if( empty($General['posttype_podcasting']) ) { ?>
<span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)</span>
<?php } else { ?>
<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>
<?php } ?>
</div>
<div>
<input type="checkbox" name="General[playlist_player]" value="1" <?php echo ( !empty($General['playlist_player']) ?' checked':''); ?> />
<strong><?php echo __('PowerPress Playlist Player', 'powerpress'); ?></strong> <?php echo powerpressadmin_new(); ?> -
<?php echo __('Create playlists for your podcasts.', 'powerpress'); ?>
<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>
</div>
</div>
</div>
<?php
$link_action_url = admin_url('admin.php?action=powerpress-jquery-account');
$link_action = 'powerpress-jquery-account';
?>
<div style="margin-left: 10px;">
<h3><?php echo __('Link Blubrry Account', 'powerpress'); ?></h3>
<p style="font-size: 125%;">
<strong><a class="button-primary 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>
</p>
<p>
<?php echo __('Link your blubrry.com account if you have a Blubrry Podcast Hosting or Blubrry Podcast Statistics services.', 'powerpress'); ?>
</p>
</div>
<div style="margin-left: 10px;">
<h3 style="margin-bottom: 5px;"><?php echo __('Looking for Support, Consulting or Custom Development?', 'powerpress'); ?></h3>
<p style="margin: 0 0 0 50px;">
<?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'); ?>
</p>
<p style="margin: 5px 0 0 50px;">
<strong><?php echo '<a href="http://create.blubrry.com/support/" target="_blank">'. __('Learn More about Blubrry Support Options', 'powerpress') .'</a>'; ?></strong>
</p>
</div>
<div style="margin-left: 10px;">
<h3 style="margin-bottom: 5px;"><?php echo __('Want your own iOS and Android podcast apps?', 'powerpress'); ?></h3>
<p style="margin: 0 0 0 50px;">
<?php echo __('Blubrry has partnered with Reactor by AppPresser to provide iOS and Android apps for PowerPress powered podcasts. With Reactor, you are able to build, design and retain control of your app to highlight your podcast content, and provide access to value-add content from your website.', 'powerpress'); ?>
</p>
<p style="margin: 5px 0 0 50px;">
<strong><?php echo '<a href="http://create.blubrry.com/resources/partners/reactor-ios-android-podcast-apps-powerpress/" target="_blank">'. __('Learn More about Reactor iOS and Android podcast apps for PowerPress', 'powerpress') .'</a>'; ?></strong>
</p>
</div>
<div style="margin-left: 10px;">
<?php powerpresspartner_clammr_info(); ?>
</div>
<?php
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
{
?>
<div style="margin-left: 10px;">
<h3 style="margin-bottom: 5px;"><?php echo __('Like The Plugin?', 'powerpress'); ?></h3>
<p style="margin-top: 0;">
<?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'); ?>
</p>
<ul id="powerpress_support">
<li><?php echo sprintf(__('Rate this plugin 5 stars in the %s.', 'powerpress'),
'<a href="http://wordpress.org/extend/plugins/powerpress/" target="_blank">'. __('WordPress Plugins Directory', 'powerpress') .'</a>');
?>
</li>
<li><?php echo __('Tell the world about PowerPress by writing about it on your blog', 'powerpress'); ?>,
<a href="http://twitter.com/home/?status=<?php echo urlencode( __('I\'m podcasting with Blubrry PowerPress (http://blubrry.com/powerpress/) #powerpress #wordpress', 'powerpress') ); ?>" target="_blank"><?php echo __('Twitter', 'powerpress'); ?></a>,
<a href="http://www.facebook.com/share.php?u=<?php echo urlencode('http://www.blubrry.com/powerpress'); ?>&t=<?php echo urlencode( __('I podcast with Blubrry PowerPress', 'powerpress')); ?>" target="_blank"><?php echo __('Facebook', 'powerpress'); ?></a>,
<a href="https://plus.google.com/share?url==<?php echo urlencode('http://www.blubrry.com/powerpress'); ?>" target="_blank"><?php echo __('Google+', 'powerpress'); ?></a>,
etc...</li>
<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>
</ul>
</div>
<?php
}
?>
<div style="margin-left: 10px;">
<h3 style="margin-bottom: 5px;"><?php echo __('Become a PowerPress Patron!', 'powerpress'); ?></h3>
<p style="margin: 0; padding-left: 50px;">
<?php echo __('Help support your favorite podcasting plugin via Patreon.', 'powerpress'); ?>
</p>
<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>'; ?>
</p>
</div>
<?php
}
function powerpressadmin_edit_entry_options($General)
{
if( !isset($General['default_url']) )
$General['default_url'] = '';
if( !isset($General['episode_box_mode']) )
$General['episode_box_mode'] = 0; // Default not set, 1 = no duration/file size, 2 = yes duration/file size (default if not set)
if( !isset($General['episode_box_embed']) )
$General['episode_box_embed'] = 0;
if( !isset($General['set_duration']) )
$General['set_duration'] = 0;
if( !isset($General['set_size']) )
$General['set_size'] = 0;
if( !isset($General['auto_enclose']) )
$General['auto_enclose'] = 0;
if( !isset($General['episode_box_player_size']) )
$General['episode_box_player_size'] = 0;
if( !isset($General['episode_box_closed_captioned']) )
$General['episode_box_closed_captioned'] = 0;
if( !isset($General['episode_box_order']) )
$General['episode_box_order'] = 0;
if( !isset($General['episode_box_feature_in_itunes']) )
$General['episode_box_feature_in_itunes'] = 0;
?>
<h3><?php echo __('Episode Entry Options', 'powerpress'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php echo __('Podcast Entry Box', 'powerpress'); ?></th>
<td>
<p style="margin-top: 5px;">
<?php echo __('Configure your podcast episode entry box with the options that fit your needs.', 'powerpress'); ?>
</p>
<div id="episode_box_mode_adv">
<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'); ?>
(<?php echo __('Specify URL to episode\'s media file', 'powerpress'); ?>)</p>
<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'); ?>
(<?php echo __('Specify episode\'s media file size and duration', 'powerpress'); ?>)</p>
<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'); ?>
(<?php echo __('Enter embed code from sites such as YouTube', 'powerpress'); ?>)</p>
<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'); ?>
(<?php echo __('Do not display default player if embed present for episode.', 'powerpress'); ?>)</p>
<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'); ?>
</p>
<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;'; ?>">
<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')); ?>
(<?php echo __('Disable media player and links on a per episode basis', 'powerpress'); ?>)</p>
<p style="margin-top: 0; margin-bottom: 0; margin-left: 20px;"><?php echo __('- or -', 'powerpress'); ?></p>
<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'); ?>
(<?php echo __('Disable media player on a per episode basis', 'powerpress'); ?>)</p>
<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'); ?>
(<?php echo __('Disable media links on a per episode basis', 'powerpress'); ?>)</p>
</div>
<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'); ?>
(<?php echo __('Specify URL to poster artwork specific to each episode', 'powerpress'); ?>)</p>
<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'); ?>
(<?php echo __('Customize player width and height on a per episode basis', 'powerpress'); ?>)</p>
<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'); ?>
(<?php echo __('Leave unchecked to use the first 250 characters of your blog post', 'powerpress'); ?>)</p>
<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'); ?>
(<?php echo __('Leave unchecked to use your blog post', 'powerpress'); ?>)</p>
<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'); ?>
(<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
<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'); ?>
(<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
<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> <?php echo powerpressadmin_new(); ?>
(<?php echo __('Leave unchecked to use the image embedded into your media files.', 'powerpress'); ?>)</p>
<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>
(<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
<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>
(<?php echo __('Override the default ordering of episodes on the iTunes and Google Play Music podcast directories', 'powerpress'); ?>)</p>
<em><strong><?php echo __('If conflicting values are present the directories will use the default ordering.', 'powerpress'); ?></strong></em><br />
<em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
<p style="margin-top: 15px;"><label><input id="episode_box_feature_in_itunes" class="episode_box_option" name="General[episode_box_feature_in_itunes]" type="checkbox" value="1"<?php if( !empty($General['episode_box_feature_in_itunes']) ) echo ' checked'; ?> /> <?php echo __('Feature Episode in iTunes and Google Play Music', 'powerpress'); ?></label>
(<?php echo __('Display selected episode at top of your iTunes and Google Play Music directory listings', 'powerpress'); ?>)</p>
<em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
<em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
<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'); ?>
(<?php echo __('Leave unchecked to use your blog post', 'powerpress'); ?>)</p>
<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'); ?>
(<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
<fieldset style="border: 1px dashed #333333; margin: 10px 0 10px -20px;">
<legend style="margin: 0 20px; padding: 0 5px 5px 5px; font-weight: bold;"><?php echo __('Warning', 'powerpress'); ?></legend>
<p style="margin: 5px 10px 0 20px;">
<strong style="color: #CC0000;"><?php echo __('USE THE FOLLOWING SETTINGS AT YOUR OWN RISK.', 'powerpress'); ?></strong>
</p>
<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>
<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>
<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>
<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>
</fieldset>
</div>
</td>
</tr>
</table>
<script language="javascript"><!--
SelectEmbedField(<?php echo $General['episode_box_embed']; ?>);
//-->
</script>
<?php
$AdvanecdOptions = false;
if( !empty($General['default_url']) )
$AdvanecdOptions = true;
if( !empty($General['set_duration']) )
$AdvanecdOptions = true;
if( !empty($General['set_size']) )
$AdvanecdOptions = true;
if( !empty($General['auto_enclose']) )
$AdvanecdOptions = true;
if( !empty($General['permalink_feeds_only']) )
$AdvanecdOptions = true;
if( !empty($General['hide_warnings']) )
$AdvanecdOptions = true;
$DefaultMediaURL = false;
if( !empty($General['default_url']) )
$DefaultMediaURL = true;
if( !$AdvanecdOptions ) {
?>
<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>
<?php } ?>
<!-- start advanced features -->
<div id="advanced_basic_options" <?php echo ($AdvanecdOptions?'':'style="display:none;"'); ?>>
<?php if( $DefaultMediaURL || defined('POWERPRESS_DEFAULT_MEDIA_URL') ) { ?>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php echo __('Default Media URL', 'powerpress'); ?></th>
<td>
<input type="text" style="width: 80%;" name="General[default_url]" value="<?php echo esc_attr($General['default_url']); ?>" maxlength="250" />
<p><?php echo __('e.g. http://example.com/mediafolder/', 'powerpress'); ?></p>
<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'); ?>
</p>
</td>
</tr>
</table>
<?php } ?>
<div id="episode_entry_settings">
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php echo __('File Size Default', 'powerpress'); ?></th>
<td>
<select name="General[set_size]" class="bpp_input_med">
<?php
$options = array(0=>__('Auto detect file size', 'powerpress'), 1=>__('User specify', 'powerpress') );
while( list($value,$desc) = each($options) )
echo "\t<option value=\"$value\"". ($General['set_size']==$value?' selected':''). ">$desc</option>\n";
?>
</select> (<?php echo __('specify default file size option when creating a new episode', 'powerpress'); ?>)
</td>
</tr>
<tr valign="top">
<th scope="row">
<?php echo __('Duration Default', 'powerpress'); ?></th>
<td>
<select name="General[set_duration]" class="bpp_input_med">
<?php
$options = array(0=>__('Auto detect duration', 'powerpress'), 1=>__('User specify', 'powerpress'), -1=>__('Not specified (not recommended)', 'powerpress') );
while( list($value,$desc) = each($options) )
echo "\t<option value=\"$value\"". ($General['set_duration']==$value?' selected':''). ">$desc</option>\n";
?>
</select> (<?php echo __('specify default duration option when creating a new episode', 'powerpress'); ?>)
</td>
</tr>
</table>
</div>
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php echo __('Auto Add Media', 'powerpress'); ?></th>
<td>
<select name="General[auto_enclose]" class="bpp_input_med">
<?php
$options = array(0=>__('Disabled (default)', 'powerpress'), 1=>__('First media link found in post content', 'powerpress'), 2=>__('Last media link found in post content', 'powerpress') );
while( list($value,$desc) = each($options) )
echo "\t<option value=\"$value\"". ($General['auto_enclose']==$value?' selected':''). ">$desc</option>\n";
?>
</select>
<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>
<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>
<p><em><?php echo __('WARNING: Episodes created with this feature will <u>not</u> include Duration (total play time) information.', 'powerpress'); ?></em></p>
</td>
</tr>
<tr valign="top">
<th scope="row">
<?php echo __('Disable Warnings', 'powerpress'); ?></th>
<td>
<select name="General[hide_warnings]" class="bpp_input_med">
<?php
$options = array(0=>__('No (default)', 'powerpress'), 1=>__('Yes', 'powerpress') );
$current_value = (!empty($General['hide_warnings'])?$General['hide_warnings']:0);
while( list($value,$desc) = each($options) )
echo "\t<option value=\"$value\"". ($current_value==$value?' selected':''). ">$desc</option>\n";
?>
</select>
<p><?php echo __('Disable warning messages displayed in episode entry box. Errors are still displayed.', 'powerpress'); ?></p>
</td>
</tr>
</table>
</div>
<!-- end advanced features -->
<?php
global $wp_rewrite;
if( $wp_rewrite->permalink_structure ) // Only display if permalinks is enabled in WordPress
{
?>
<h3><?php echo __('Permalinks', 'powerpress'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php echo __('Podcast Permalinks', 'powerpress'); ?></th>
<td>
<select name="General[permalink_feeds_only]" class="bpp_input_med">
<?php
$options = array(0=>__('Default WordPress Behavior', 'powerpress'), 1=>__('Match Feed Name to Page/Category', 'powerpress') );
$current_value = (!empty($General['permalink_feeds_only'])?$General['permalink_feeds_only']:0);
while( list($value,$desc) = each($options) )
echo "\t<option value=\"$value\"". ($current_value==$value?' selected':''). ">$desc</option>\n";
?>
</select>
<p><?php echo sprintf(__('When configured, %s/podcast/ is matched to page/category named \'podcast\'.', 'powerpress'), get_bloginfo('url') ); ?></p>
</td>
</tr>
</table>
<?php
}
?>
<?php
}
function powerpressadmin_edit_podpress_options($General)
{
if( !empty($General['process_podpress']) || powerpress_podpress_episodes_exist() )
{
if( !isset($General['process_podpress']) )
$General['process_podpress'] = 0;
if( !isset($General['podpress_stats']) )
$General['podpress_stats'] = 0;
?>
<h3><?php echo __('PodPress Options', 'powerpress'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php echo __('PodPress Episodes', 'powerpress'); ?></th>
<td>
<select name="General[process_podpress]" class="bpp_input_med">
<?php
$options = array(0=>__('Ignore', 'powerpress'), 1=>__('Include in Posts and Feeds', 'powerpress') );
while( list($value,$desc) = each($options) )
echo "\t<option value=\"$value\"". ($General['process_podpress']==$value?' selected':''). ">$desc</option>\n";
?>
</select> (<?php echo __('includes podcast episodes previously created in PodPress', 'powerpress'); ?>)
</td>
</tr>
<?php if( !empty($General['podpress_stats']) || powerpress_podpress_stats_exist() ) { ?>
<tr valign="top">
<th scope="row">
<?php echo __('PodPress Stats Archive', 'powerpress'); ?></th>
<td>
<select name="General[podpress_stats]" class="bpp_input_sm">
<?php
$options = array(0=>__('Hide', 'powerpress'), 1=>__('Display', 'powerpress') );
while( list($value,$desc) = each($options) )
echo "\t<option value=\"$value\"". ($General['podpress_stats']==$value?' selected':''). ">$desc</option>\n";
?>
</select> (<?php echo __('display archive of old PodPress statistics', 'powerpress'); ?>)
</td>
</tr>
<?php } ?>
</table>
<?php
}
}
function powerpressadmin_edit_googleplay($FeedSettings, $General, $FeedAttribs = array() )
{
$feed_slug = $FeedAttribs['feed_slug'];
$cat_ID = $FeedAttribs['category_id'];
// Set default settings (if not set)
if( empty($FeedSettings['googleplay_url']) )
$FeedSettings['googleplay_url'] = '';
if( empty($FeedSettings['googleplay_email']) )
$FeedSettings['googleplay_email'] = '';
if( empty($FeedSettings['googleplay_author']) )
$FeedSettings['googleplay_author'] = '';
if( empty($FeedSettings['googleplay_description']) )
$FeedSettings['googleplay_description'] = '';
if( empty($FeedSettings['googleplay_explicit']) )
$FeedSettings['googleplay_explicit'] = '';
if( empty($FeedSettings['googleplay_cat']) )
$FeedSettings['googleplay_cat'] = '';
$gp_feed_url = '';
switch( $FeedAttribs['type'] )
{
case 'ttid':
case 'category': {
$gp_feed_url = get_category_feed_link($cat_ID);
}; break;
case 'channel': {
$gp_feed_url = get_feed_link($feed_slug);
}; break;
case 'post_type': {
$gp_feed_url = get_post_type_archive_feed_link($FeedAttribs['post_type'], $feed_slug);
}; break;
case 'general':
default: {
$gp_feed_url = get_feed_link('podcast');
}
}
?>
<h3><?php echo __('Google Play Settings', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php echo __('Google Play Listing URL', 'powerpress'); ?></th>
<td>
<input type="text" style="width: 80%;" name="Feed[googleplay_url]" value="<?php echo esc_attr($FeedSettings['googleplay_url']); ?>" maxlength="250" />
<p><?php echo __('Your listing URL will be issued to you from Google Play Music.', 'powerpress'); ?></p>
<!-- <p><?php echo sprintf(__('e.g. %s', 'powerpress'), 'http://itunes.apple.com/podcast/title-of-podcast/id<strong>000000000</strong>'); ?></p> -->
<p><?php echo sprintf( __('Click the following link to %s.', 'powerpress'), '<a href="http://create.blubrry.com/manual/podcast-promotion/publish-podcast-google-play-music-podcast-portal/?podcast-feed='. urlencode($gp_feed_url) .'" target="_blank">'. __('Publish a Podcast on Google Play Music', 'powerpress') .'</a>'); ?>
</p>
<p>
<?php echo __('Recommended feed to submit to Google Play Music: ', 'powerpress'); ?>
<?php echo esc_html($gp_feed_url); ?>
</p>
</td>
</tr>
<tr valign="top">
<th scope="row">
<?php echo __('Google Play Email', 'powerpress'); ?>
<span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
</th>
<td>
<input type="text" name="Feed[googleplay_email]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['googleplay_email']); ?>" maxlength="250" />
<div>(<?php echo __('Google will email this address when your podcast is accepted into the Google Play Music Podcast Directory.', 'powerpress'); ?>)</div>
</td>
</tr>
<tr valign="top">
<th scope="row">
<?php echo __('Google Play Author', 'powerpress'); ?>
</th>
<td>
<input type="text" name="Feed[googleplay_author]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['googleplay_author']); ?>" maxlength="250" />
<div>(<?php echo __('iTunes Author will be used if left blank', 'powerpress'); ?>)</div>
</td>
</tr>
<tr valign="top">
<th scope="row">
<?php echo __('Google Play Description', 'powerpress'); ?>
</th>
<td>
<p style="margin-top: 5px;"><?php echo __('Your description cannot exceed 4,000 characters in length.', 'powerpress'); ?></p>
<textarea name="Feed[googleplay_description]" rows="5" style="width:80%;" ><?php echo esc_textarea($FeedSettings['googleplay_description']); ?></textarea>
<div>(<?php echo __('iTunes Summary will be used if left blank', 'powerpress'); ?>)</div>
</td>
</tr>
<tr valign="top">
<th scope="row">
<?php echo __('Google Play Explicit', 'powerpress'); ?>
</th>
<td>
<select name="Feed[googleplay_explicit]" class="bpp_input_med">
<?php
$explicit = array(0=> __('No - display nothing', 'powerpress'), 1=>__('Yes - explicit content', 'powerpress') );
while( list($value,$desc) = each($explicit) )
echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_explicit']==$value?' selected':''). ">$desc</option>\n";
?>
</select>
</td>
</tr>
<tr valign="top">
<th scope="row">
<?php echo __('Google Play Category', 'powerpress'); ?>
<span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?></span>
</th>
<td>
<select name="Feed[googleplay_cat]" class="bpp_input_med">
<?php
$MoreCategories = false;
$Categories = powerpress_googleplay_categories();
echo '<option value="">'. __('Select Category', 'powerpress') .'</option>';
while( list($value,$desc) = each($Categories) )
echo "\t<option value=\"$value\"". ($FeedSettings['googleplay_cat']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
?>
</select>
</td>
</tr>
</table>
<?php
}
function powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs = array() )
{
// Set default settings (if not set)
if( !empty($FeedSettings) )
{
if( !isset($FeedSettings['itunes_url']) )
$FeedSettings['itunes_url'] = '';
}
if( !isset($General['itunes_url']) )
$General['itunes_url'] = '';
else if( !isset($FeedSettings['itunes_url']) ) // Should almost never happen
$FeedSettings['itunes_url'] = $General['itunes_url'];
$feed_slug = $FeedAttribs['feed_slug'];
$cat_ID = $FeedAttribs['category_id'];
if( $feed_slug == 'podcast' && $FeedAttribs['type'] == 'general' )
{
if( empty($FeedSettings['itunes_url']) && !empty($General['itunes_url']) )
$FeedSettings['itunes_url'] = $General['itunes_url'];
}
$itunes_feed_url = '';
switch( $FeedAttribs['type'] )
{
case 'ttid':
case 'category': {
$itunes_feed_url = get_category_feed_link($cat_ID);
}; break;
case 'channel': {
$itunes_feed_url = get_feed_link($feed_slug);
}; break;
case 'post_type': {
$itunes_feed_url = get_post_type_archive_feed_link($FeedAttribs['post_type'], $feed_slug);
}; break;
case 'general':
default: {
$itunes_feed_url = get_feed_link('podcast');
}
}
?>
<h3><?php echo __('iTunes Listing Information', 'powerpress'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php echo __('iTunes Subscription URL', 'powerpress'); ?></th>
<td>
<input type="text" style="width: 80%;" name="Feed[itunes_url]" value="<?php echo esc_attr($FeedSettings['itunes_url']); ?>" maxlength="250" />
<p><?php echo sprintf(__('e.g. %s', 'powerpress'), 'http://itunes.apple.com/podcast/title-of-podcast/id<strong>000000000</strong>'); ?></p>
<p><?php echo sprintf( __('Click the following link to %s.', 'powerpress'), '<a href="http://create.blubrry.com/manual/podcast-promotion/submit-podcast-to-itunes/?podcast-feed='. urlencode($itunes_feed_url) .'" target="_blank">'. __('Publish a Podcast on iTunes', 'powerpress') .'</a>'); ?>
<?php echo __('iTunes will email your Subscription URL to the <em>iTunes Email</em> entered below when your podcast is accepted into the iTunes Directory.', 'powerpress'); ?>
</p>
<p>
<?php echo __('Recommended feed to submit to iTunes: ', 'powerpress'); ?>
<?php echo esc_html($itunes_feed_url); ?>
</p>
</td>
</tr>
</table>
<?php
} // end itunes general
function powerpressadmin_edit_blubrry_services($General, $action_url = false, $action = false)
{
$DisableStatsInDashboard = false;
if( !empty($General['disable_dashboard_stats']) )
$DisableStatsInDashboard = true;
if( $action_url == false )
$action_url = admin_url('admin.php?action=powerpress-jquery-account');
if( $action == false )
$action = 'powerpress-jquery-account';
?>
<h3><?php echo __('Integrate Blubrry Services', 'powerpress'); ?></h3>
<ul><li><ul>
<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>
<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>
</ul></li></ul>
<div style="margin-left: 40px;">
<p style="font-size: 125%;">
<strong><a class="button-primary 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>
</p>
<?php
if( !empty($General['blubrry_program_keyword']) )
{
// Check that the redirect is in the settings...
$RedirectURL = 'http://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
$Error = true;
if( stripos($General['redirect1'], $RedirectURL ) !== false )
$Error = false;
else if( stripos($General['redirect2'], $RedirectURL ) !== false )
$Error = false;
else if( stripos($General['redirect3'], $RedirectURL ) !== false )
$Error = false;
if( $Error )
{
?>
<p style="font-weight: bold; color: #CC0000;">
<?php
echo __('Statistics are not implemented correctly on this blog. Please click the button above to re-configure your services.', 'powerpress');
?>
</p>
<?php
}
else
{
?>
<p style="font-weight: bold;">
<img src="<?php echo powerpress_get_root_url(); ?>images/Check.png" style="width: 25px; height: 20px;" alt="<?php echo __('Enabled!', 'powerpress'); ?>" />
<?php
if( empty($General['blubrry_hosting']) || $General['blubrry_hosting'] === 'false' )
echo __('Blubrry Statistics Enabled!', 'powerpress');
else
echo __('Blubrry Statistics and Media Hosting Enabled!', 'powerpress');
?>
</p>
<?php
}
if( empty($General['blubrry_hosting']) || $General['blubrry_hosting'] === 'false' )
{
?>
<p>
<?php echo __('Recently upgraded to Blubrry Hosting?', 'powerpress'); ?>
<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>
</p>
<?php
}
}
?>
</div>
<?php
if( empty($General['blubrry_hosting']) || $General['blubrry_hosting'] === 'false' ) // Not signed up for hosting?
{
?>
<div class="blubrry-services">
<div class="blubrry-hosting">
<p class="top-lines"><?php echo __('Need a reliable host for your podcast media?', 'powerpress'); ?></p>
<p><?php echo __('Blubrry Media Hosting packages start at $12.', 'powerpress'); ?></p>
<p><a href="http://create.blubrry.com/resources/podcast-media-hosting/" target="_blank"><?php echo __('Learn More', 'powerpress'); ?></a></p>
</div>
<div class="blubrry-stats">
<p class="top-lines"><?php echo __('Measure your audience for <strong>free</strong> and add more detailed', 'powerpress'); ?></p>
<p><?php echo __('reporting for only $5 per month.', 'powerpress'); ?></p>
<p> </p>
<p><a href="http://create.blubrry.com/resources/podcast-media-download-statistics/" target="_blank"><?php echo __('Learn More', 'powerpress'); ?></a></p>
</div>
<div class="clear"></div>
</div>
<?php
} // end not signed up for hosting