forked from wp-plugins/radio-station
-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
options.php
1435 lines (1307 loc) · 49.3 KB
/
options.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
// =============================
// === Radio Station Options ===
// =============================
if ( !defined( 'ABSPATH' ) ) exit;
// ------------------
// Set Plugin Options
// ------------------
$options = array(
// === Broadcast ===
// --- [Player] Streaming URL ---
'streaming_url' => array(
'type' => 'text',
'options' => 'URL',
'label' => __( 'Streaming URL', 'radio-station' ),
'default' => '',
'helper' => __( 'Enter the Streaming URL for your Radio Station. This is used in the Radio Player and discoverable via Data Feeds.', 'radio-station' ),
'tab' => 'general',
'section' => 'broadcast',
),
// --- [Player] Stream Format ---
'streaming_format' => array(
'type' => 'select',
'options' => $formats,
'label' => __( 'Streaming Format', 'radio-station' ),
'default' => 'aac',
'helper' => __( 'Select streaming format for streaming URL.', 'radio-station' ),
'tab' => 'general',
'section' => 'broadcast',
),
// --- [Player] Fallback Stream URL ---
'fallback_url' => array(
'type' => 'text',
'options' => 'URL',
'label' => __( 'Fallback Stream URL', 'radio-station' ),
'default' => '',
'helper' => __( 'Enter an alternative Streaming URL for Player fallback.', 'radio-station' ),
'tab' => 'general',
'section' => 'broadcast',
),
// --- [Player] Fallback Stream Format ---
'fallback_format' => array(
'type' => 'select',
'options' => $formats,
'label' => __( 'Fallback Format', 'radio-station' ),
'default' => 'ogg',
'helper' => __( 'Select streaming fallback for fallback URL.', 'radio-station' ),
'tab' => 'general',
'section' => 'broadcast',
),
// --- Main Radio Language ---
'radio_language' => array(
'type' => 'select',
'options' => $languages,
'label' => __( 'Main Broadcast Language', 'radio-station' ),
'default' => '',
'helper' => __( 'Select the main language used on your Radio Station.', 'radio-station' ),
'tab' => 'general',
'section' => 'broadcast',
),
// --- Ping Netmix Directory ---
// note: disabled by default for WordPress.org repository compliance
// 2.5.0: moved from feeds to broadcast section
'ping_netmix_directory' => array(
'type' => 'checkbox',
'label' => __( 'Ping Netmix Directory', 'radio-station' ),
'default' => '',
'value' => 'yes',
'helper' => __( 'If you have a Netmix Directory listing, enable this to ping the directory whenever you update your schedule.', 'radio-station' ),
'tab' => 'general',
'section' => 'broadcast',
),
// === Station ===
// --- [Player] Station Title ---
// 2.3.3.8: added station title field
'station_title' => array(
'type' => 'text',
'label' => __( 'Station Title', 'radio-station' ),
'default' => '',
'helper' => __( 'Name of your Radio Station. For use in Stream Player and Data Feeds.', 'radio-station' ),
'tab' => 'general',
'section' => 'station',
),
// --- [Player] Station Image ---
// 2.3.3.8: added station logo image field
'station_image' => array(
'type' => 'image',
'label' => __( 'Station Logo Image', 'radio-station' ),
'default' => '',
'helper' => __( 'Add a logo image for your Radio Station. Please ensure image is square before uploading. Recommended size 256 x 256', 'radio-station' ),
'tab' => 'general',
'section' => 'station',
),
// --- Timezone Location ---
'timezone_location' => array(
'type' => 'select',
'options' => $timezones,
'label' => __( 'Location Timezone', 'radio-station' ),
'default' => '',
'helper' => __( 'Select your Broadcast Location for Radio Timezone display.', 'radio-station' ),
'tab' => 'general',
'section' => 'station',
),
// --- Clock Time Format ---
'clock_time_format' => array(
'type' => 'select',
'options' => array(
'12' => __( '12 Hour Format', 'radio-station' ),
'24' => __( '24 Hour Format', 'radio-station' ),
),
'label' => __( 'Clock Time Format', 'radio-station' ),
'default' => '12',
'helper' => __( 'Default Time Format for display output. Can be overridden in each shortcode or widget.', 'radio-station' ),
'tab' => 'general',
'section' => 'station',
),
// --- Station Phone Number ---
// 2.3.3.6: added station phone number option
'station_phone' => array(
'type' => 'text',
'options' => 'PHONE',
'label' => __( 'Station Phone', 'radio-station' ),
'default' => '',
'helper' => __( 'Main call in phone number for the Station (for requests etc.)', 'radio-station' ),
'tab' => 'general',
'section' => 'station',
),
// --- Phone for Shows ---
// 2.3.3.6: added default to station phone option
'shows_phone' => array(
'type' => 'checkbox',
'default' => '',
'value' => 'yes',
'label' => __( 'Show Phone Display', 'radio-station' ),
'helper' => __( 'Display Station phone number on Shows where a Show phone number is not set.', 'radio-station' ),
'tab' => 'general',
'section' => 'station',
),
// --- Station Email Address ---
// 2.3.3.8: added station email address option
'station_email' => array(
'type' => 'email',
'default' => '',
'label' => __( 'Station Email', 'radio-station' ),
'helper' => __( 'Main email address for the Station (for requests etc.)', 'radio-station' ),
'tab' => 'general',
'section' => 'station',
),
// --- Email for Shows ---
// 2.3.3.8: added default to email address option
'shows_email' => array(
'type' => 'checkbox',
'default' => '',
'value' => 'yes',
'label' => __( 'Show Email Display', 'radio-station' ),
'helper' => __( 'Display Station email address on Shows where a Show email address is not set.', 'radio-station' ),
'tab' => 'general',
'section' => 'station',
),
// === Feeds ===
// --- REST Data Routes ---
'enable_data_routes' => array(
'type' => 'checkbox',
'label' => __( 'Enable Data Routes', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Enables Station Data Routes via WordPress REST API.', 'radio-station' ),
'tab' => 'general',
'section' => 'feeds',
),
// --- Data Feed Links ---
'enable_data_feeds' => array(
'type' => 'checkbox',
'label' => __( 'Enable Data Feeds', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Enable Station Data Feeds via WordPress Feed links.', 'radio-station' ),
'tab' => 'general',
'section' => 'feeds',
),
// === Performance ===
// 2.4.0.6: separated performance section
// --- Shift Conflict Checker ---
// 2.5.6: added setting for conflict checker
'conflict_checker' => array(
'type' => 'checkbox',
'label' => __( 'Shift Conflict Checker', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Check for Shift conflicts when saving Show shift times.', 'radio-station' ),
'tab' => 'general',
'section' => 'performance',
),
// --- Disable Transients ---
// 2.4.0.6: change label from Clear Transients
'clear_transients' => array(
'type' => 'checkbox',
'label' => __( 'Disable Transients', 'radio-station' ),
'default' => '',
'value' => 'yes',
'helper' => __( 'Clear Schedule transients with every pageload. Less efficient but more reliable.', 'radio-station' ),
'tab' => 'general',
'section' => 'performance',
),
// --- Transient Caching ---
'transient_caching' => array(
'type' => 'checkbox',
'label' => __( 'Show Transients', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Use Show Transient Data to improve Schedule calculation performance.', 'radio-station' ),
'tab' => 'general',
'section' => 'performance',
'pro' => true,
),
// --- Show Shift Feeds ---
/* 'show_shift_feeds' => array(
'type' => 'checkbox',
'label' => __( 'Show Shift Feeds', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Convert RSS Feeds for a single Show to a Show shift feed, allowing a visitor to subscribe to a Show feed to be notified of Show shifts.', 'radio-station' ),
'tab' => 'general',
'section' => 'feeds',
'pro' => true,
), */
// === Basic Stream Player ===
// --- Defaults Note ---
// 2.5.0: added note about defaults being overrideable in widgets
'player_defaults_note' => array(
'type' => 'note',
'label' => __( 'Player Defaults Note', 'radio-station' ),
'helper' => __( 'Note that you can override these defaults in specific Player Widgets.', 'radio-station' ),
'tab' => 'player',
'section' => 'basic',
),
// --- [Player] Player Title ---
'player_title' => array(
'type' => 'checkbox',
'label' => __( 'Display Station Title', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Display your Radio Station Title in Player by default.', 'radio-station' ),
'tab' => 'player',
'section' => 'basic',
),
// --- [Player] Player Image ---
'player_image' => array(
'type' => 'checkbox',
'label' => __( 'Display Station Image', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Display your Radio Station Image in Player by default.', 'radio-station' ),
'tab' => 'player',
'section' => 'basic',
),
// --- [Player] Player Script ---
// 2.4.0.3: change script default to jplayer
// 2.5.7: disable howler script (browser incompatibilities)
'player_script' => array(
'type' => 'select',
'label' => __( 'Player Script', 'radio-station' ),
'default' => 'jplayer',
'options' => array(
'jplayer' => __( 'jPlayer', 'radio-station' ),
// 'howler' => __( 'Howler', 'radio-station' ),
'amplitude' => __( 'Amplitude', 'radio-station' ),
),
'helper' => __( 'Default audio script to use for playback in the Player.', 'radio-station' ),
'tab' => 'player',
'section' => 'basic',
),
// --- [Player] Fallback Scripts ---
// 2.4.0.3: added fallback enable/disable switching
// 2.4.0.3: fixed option label from Player Script
// 2.5.7: disable howler script (browser incompatibilities)
'player_fallbacks' => array(
'type' => 'multicheck',
'label' => __( 'Fallback Scripts', 'radio-station' ),
'default' => array( 'amplitude', 'howler', 'jplayer' ),
'options' => array(
'jplayer' => __( 'jPlayer', 'radio-station' ),
// 'howler' => __( 'Howler', 'radio-station' ),
'amplitude' => __( 'Amplitude', 'radio-station' ),
),
'helper' => __( 'Enabled fallback audio scripts to try when the default Player script fails.', 'radio-station' ),
'tab' => 'player',
'section' => 'basic',
),
// --- [Player] Player Theme ---
'player_theme' => array(
'type' => 'select',
'label' => __( 'Default Player Theme', 'radio-station' ),
'default' => 'light',
'options' => array(
'light' => __( 'Light', 'radio-station' ),
'dark' => __( 'Dark', 'radio-station' ),
),
'helper' => __( 'Default Player Controls theme style.', 'radio-station' ),
'tab' => 'player',
'section' => 'basic',
),
// --- [Player] Player Buttons ---
'player_buttons' => array(
'type' => 'select',
'label' => __( 'Default Player Buttons', 'radio-station' ),
'default' => 'rounded',
'options' => array(
'circular' => __( 'Circular Buttons', 'radio-station' ),
'rounded' => __( 'Rounded Buttons', 'radio-station' ),
'square' => __( 'Square Buttons', 'radio-station' ),
),
'helper' => __( 'Default Player Buttons shape style.', 'radio-station' ),
'tab' => 'player',
'section' => 'basic',
),
// --- [Player] Volume Controls ---
// 2.4.0.3: added enable/disable volume controls option
// 2.5.0: default to volume slider only
'player_volumes' => array(
'type' => 'multicheck',
'label' => __( 'Volume Controls', 'radio-station' ),
'default' => array( 'slider' ),
'options' => array(
'slider' => __( 'Volume Slider', 'radio-station' ),
'updown' => __( 'Volume Plus / Minus', 'radio-station' ),
'mute' => __( 'Mute Volume Toggle', 'radio-station' ),
'max' => __( 'Maximize Volume', 'radio-station' ),
),
'helper' => __( 'Which volume controls to display in the Player by default.', 'radio-station' ),
'tab' => 'player',
'section' => 'basic',
),
// --- [Player] Player Debug Mode ---
'player_debug' => array(
'type' => 'checkbox',
'label' => __( 'Player Debug Mode', 'radio-station' ),
'default' => '',
'value' => 'yes',
'helper' => __( 'Output player debug information in browser javascript console.', 'radio-station' ),
'tab' => 'player',
'section' => 'basic',
),
// === Player Colours ===
// --- [Pro/Player] Playing Highlight Color ---
'player_playing_color' => array(
'type' => 'color',
'label' => __( 'Playing Icon Highlight Color', 'radio-station' ),
'default' => '#70E070',
'helper' => __( 'Default highlight color to use for Play button icon when playing.', 'radio-station' ),
'tab' => 'player',
'section' => 'colors',
'pro' => true,
),
// --- [Pro/Player] Control Icons Highlight Color ---
'player_buttons_color' => array(
'type' => 'color',
'label' => __( 'Control Icons Highlight Color', 'radio-station' ),
'default' => '#00A0E0',
'helper' => __( 'Default highlight color to use for Control button icons when active.', 'radio-station' ),
'tab' => 'player',
'section' => 'colors',
'pro' => true,
),
// --- [Pro/Player] Volume Knob Color ---
'player_thumb_color' => array(
'type' => 'color',
'label' => __( 'Volume Knob Color', 'radio-station' ),
'default' => '#80C080',
'helper' => __( 'Default Knob Color for Player Volume Slider.', 'radio-station' ),
'tab' => 'player',
'section' => 'colors',
'pro' => true,
),
// --- [Pro/Player] Volume Track Color ---
'player_range_color' => array(
'type' => 'coloralpha',
'label' => __( 'Volume Track Color', 'radio-station' ),
'default' => '#80C080',
'helper' => __( 'Default Track Color for Player Volume Slider.', 'radio-station' ),
'tab' => 'player',
'section' => 'colors',
'pro' => true,
),
// === Advanced Stream Player ===
// --- [Player] Player Volume ---
'player_volume' => array(
'type' => 'number',
'label' => __( 'Player Start Volume', 'radio-station' ),
'default' => 77,
'min' => 0,
'step' => 1,
'max' => 100,
'helper' => __( 'Initial volume for when the Player starts playback.', 'radio-station' ),
'tab' => 'player',
'section' => 'advanced',
'pro' => false,
),
// --- [Player] Single Player ---
'player_single' => array(
'type' => 'checkbox',
'label' => __( 'Single Player at Once', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Stop any existing Player instances on the page or in other windows or tabs when a Player is started.', 'radio-station' ),
'tab' => 'player',
'section' => 'advanced',
'pro' => false,
),
// --- [Pro/Player] Player Autoresume ---
'player_autoresume' => array(
'type' => 'checkbox',
'label' => __( 'Autoresume Playback', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Attempt to resume playback if visitor was playing. Only triggered when the user first interacts with the page.', 'radio-station' ),
'tab' => 'player',
'section' => 'advanced',
'pro' => true,
),
// --- [Pro/Player] Popup Player Button ---
// 2.5.0: enabled popup player button
'player_popup' => array(
'type' => 'checkbox',
'label' => __( 'Popup Player Button', 'radio-station' ),
'default' => '',
'value' => 'yes',
'helper' => __( 'Add button to open Popup Player in separate window.', 'radio-station' ),
'tab' => 'player',
'section' => 'advanced',
'pro' => true,
),
// === Sitewide Player Bar ===
// --- Player Bar Note ---
'player_bar_note' => array(
'type' => 'note',
'label' => __( 'Bar Defaults Note', 'radio-station' ),
'helper' => __( 'The Bar Player uses the default configurations set above.', 'radio-station' )
. ' ' . __( 'You can override these in specific Player Widgets.', 'radio-station' ),
'tab' => 'player',
'section' => 'bar',
),
// --- [Pro/Player] Sitewide Player Bar ---
'player_bar' => array(
'type' => 'select',
'label' => __( 'Sitewide Player Bar', 'radio-station' ),
'default' => 'off',
'options' => array(
'off' => __( 'No Player Bar', 'radio-station' ),
'top' => __( 'Top Player Bar', 'radio-station' ),
'bottom' => __( 'Bottom Player Bar', 'radio-station' ),
),
'tab' => 'player',
'section' => 'bar',
'helper' => __( 'Add a fixed position Player Bar which displays Sitewide.', 'radio-station' ),
'pro' => true,
),
// --- [Pro/Player] Player Bar Height ---
'player_bar_height' => array(
'type' => 'number',
'min' => 40,
'max' => 400,
'step' => 1,
'label' => __( 'Player Bar Height', 'radio-station' ),
'default' => 80,
'tab' => 'player',
'section' => 'bar',
'helper' => __( 'Set the height of the Sitewide Player Bar in pixels.', 'radio-station' ),
'pro' => true,
),
// --- [Pro/Player] Fade In Player Bar ---
'player_bar_fadein' => array(
'type' => 'number',
'label' => __( 'Fade In Player Bar', 'radio-station' ),
'default' => 2500,
'min' => 0,
'step' => 100,
'max' => 10000,
'helper' => __( 'Number of milliseconds after Page load over which to fade in Player Bar. Use 0 for instant display.', 'radio-station' ),
'tab' => 'player',
'section' => 'bar',
'pro' => true,
),
// --- [Pro/Player] Continuous Playback ---
// 2.4.0.1: fix for missing value field
'player_bar_continuous' => array(
'type' => 'checkbox',
'label' => __( 'Continuous Playback', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Uninterrupted Sitewide Bar playback while user is navigating between pages! Pages are loaded in background and faded in while Player Bar persists.', 'radio-station' )
. ' <a href="' . RADIO_STATION_DOCS_URL . 'player/#pro-continous-player-integration" target="_blank">' . __( 'Click here for setup notes.', 'radio-station' ) . '</a>',
'tab' => 'player',
'section' => 'bar',
'pro' => true,
),
// --- [Pro/Player] Player Page Fade ---
'player_bar_pagefade' => array(
'type' => 'number',
'label' => __( 'Page Fade Time', 'radio-station' ),
'default' => 2000,
'min' => 0,
'step' => 100,
'max' => 10000,
'helper' => __( 'Number of milliseconds over which to fade in new Pages (when continuous playback is enabled.) Use 0 for instant display.', 'radio-station' ),
'tab' => 'player',
'section' => 'bar',
'pro' => true,
),
// --- [Pro/Player] Page Load Timeout ---
// 2.4.0.3: add page load timeout option
'player_bar_timeout' => array(
'type' => 'number',
'label' => __( 'Page Load Timeout', 'teleporter' ),
'default' => 7000,
'min' => 0,
'step' => 500,
'max' => 20000,
'helper' => __( 'Number of milliseconds to wait for new Page to load before fading in anyway (when continuous playback is enabled.)', 'radio-station' ),
'tab' => 'player',
'section' => 'bar',
'pro' => true,
),
// --- [Pro/Player] Bar Player Text Color ---
'player_bar_text' => array(
'type' => 'color',
'label' => __( 'Bar Player Text Color', 'radio-station' ),
'default' => '#FFFFFF',
'helper' => __( 'Text color for the fixed position Sitewide Bar Player.', 'radio-station' ),
'tab' => 'player',
'section' => 'bar',
'pro' => true,
),
// --- [Pro/Player] Bar Player Background Color ---
'player_bar_background' => array(
'type' => 'coloralpha',
'label' => __( 'Bar Player Background Color', 'radio-station' ),
'default' => 'rgba(0,0,0,255)',
'helper' => __( 'Background color for the fixed position Sitewide Bar Player.', 'radio-station' ),
'tab' => 'player',
'section' => 'bar',
'pro' => true,
),
// --- [Pro/Player] Display Current Show ---
// 2.4.0.3: added for current show display
'player_bar_currentshow' => array(
'type' => 'checkbox',
'label' => __( 'Display Current Show', 'radio-station' ),
'value' => 'yes',
'default' => 'yes',
'tab' => 'player',
'section' => 'bar',
'helper' => __( 'Display the Current Show in the Player Bar.', 'radio-station' ),
'pro' => true,
),
// --- [Pro/Player] Display Metadata ---
// 2.4.0.3: added for now playing metadata display
'player_bar_nowplaying' => array(
'type' => 'checkbox',
'label' => __( 'Display Now Playing', 'radio-station' ),
'value' => 'yes',
'default' => 'yes',
'tab' => 'player',
'section' => 'bar',
'helper' => __( 'Display the currently playing song in the Player Bar, if a supported metadata format is available. (Icy Meta, Icecast, Shoutcast 1/2, Current Playlist)', 'radio-station' ),
'pro' => true,
),
// --- [Pro/Player] Track Animation ---
// 2.5.0: added track animation option
'player_bar_track_animation' => array(
'type' => 'select',
'label' => __( 'Track Animation', 'radio-station' ),
'default' => 'backandforth',
'options' => array(
'none' => __( 'No Animation', 'radio-station' ),
'lefttoright' => __( 'Left to Right Ticker', 'radio-station' ),
'righttoleft' => __( 'Right to Left Ticker', 'radio-station' ),
'backandforth' => __( 'Back and Forth', 'radio-station' ),
),
'tab' => 'player',
'section' => 'bar',
'helper' => __( 'How to animate the currently playing track display.', 'radio-station' ),
'pro' => true,
),
// --- [Pro/Player] Metadata URL ---
// 2.4.0.3: added for alternative stream metadata URL
'player_bar_metadata' => array(
'type' => 'text',
'options' => 'URL',
'label' => __( 'Metadata URL', 'radio-station' ),
'default' => '',
'tab' => 'player',
'section' => 'bar',
'helper' => __( 'Now playing metadata is normally retrieved via the Stream URL. Use this setting if you need to provide an alternative metadata location.', 'radio-station' ),
'pro' => true,
),
// --- [Pro/Player] Store Track Metadata ---
// 2.5.6: added option to store stream
'player_store_metadata' => array(
'type' => 'checkbox',
'label' => __( 'Store Track Metadata?', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'tab' => 'player',
'section' => 'bar',
'helper' => __( 'Save now playing track metadata in a separate database table for later use.', 'radio-station' ),
'pro' => true,
),
// === Master Schedule Page ===
// --- Schedule Page ---
'schedule_page' => array(
'type' => 'select',
'options' => 'PAGEID',
'label' => __( 'Master Schedule Page', 'radio-station' ),
'default' => '',
'helper' => __( 'Select the Page you are displaying the Master Schedule on.', 'radio-station' ),
'tab' => 'pages',
'section' => 'schedule',
),
// --- Automatic Schedule Display ---
'schedule_auto' => array(
'type' => 'checkbox',
'label' => __( 'Automatic Display', 'radio-station' ),
'default' => 'yes',
'value' => 'yes',
'helper' => __( 'Replaces selected page content with Master Schedule. Alternatively customize with the shortcode: ', 'radio-station' ) . ' [master-schedule]',
'tab' => 'pages',
'section' => 'schedule',
),
// --- Default Schedule View ---
'schedule_view' => array(
'type' => 'select',
'label' => __( 'Schedule View Default', 'radio-station' ),
'default' => 'table',
'options' => array(
'table' => __( 'Table View', 'radio-station' ),
'list' => __( 'List View', 'radio-station' ),
'div' => __( 'Divs View', 'radio-station' ),
'tabs' => __( 'Tabbed View', 'radio-station' ),
'default' => __( 'Legacy Table', 'radio-station' ),
),
'helper' => __( 'View type to use for automatic display on Master Schedule Page.', 'radio-station' ),
'tab' => 'pages',
'section' => 'schedule',
),
// --- Schedule Clock Display ---
'schedule_clock' => array(
'type' => 'select',
'label' => __( 'Schedule Clock?', 'radio-station' ),
'default' => 'clock',
'options' => array(
'' => __( 'None', 'radio-station' ),
'clock' => __( 'Clock', 'radio-station' ),
'timezone' => __( 'Timezone', 'radio-station' ),
),
'helper' => __( 'Radio Time section display above program Schedule.', 'radio-station' ),
'tab' => 'pages',
'section' => 'schedule',
),
// --- [Pro/Plus] Schedule Switcher ---
'schedule_switcher' => array(
'type' => 'checkbox',
'label' => __( 'View Switching', 'radio-station' ),
'default' => '',
'value' => 'yes',
'helper' => __( 'Enable View Switching on the automatic Master Schedule page.', 'radio-station' ),
'tab' => 'pages',
'section' => 'schedule',
'pro' => true,
),
// --- [Pro/Plus] Available Views ---
// 2.3.2: added additional views option
'schedule_views' => array(
'type' => 'multicheck',
'label' => __( 'Available Views', 'radio-station' ),
// note: unstyled list view not included in defaults
'default' => array( 'table', 'calendar' ),
'value' => 'yes',
'options' => array(
'table' => __( 'Table View', 'radio-station' ),
'tabs' => __( 'Tabbed View', 'radio-station' ),
'list' => __( 'List View', 'radio-station' ),
'grid' => __( 'Grid View', 'radio-station' ),
'calendar' => __( 'Calendar View', 'radio-station' ),
),
'helper' => __( 'Switcher Views available on automatic Master Schedule page.', 'radio-station' ),
'tab' => 'pages',
'section' => 'schedule',
'pro' => true,
),
// --- [Pro/Plus] Time Spaced Grid View ---
// 2.4.0.4: added grid view time spacing option
'schedule_timegrid' => array(
'type' => 'checkbox',
'label' => __( 'Time Spaced Grid', 'radio-station' ),
'default' => '',
'value' => 'yes',
'helper' => __( 'Enable Grid View option for equalized time spacing and background imsges.', 'radio-station' ),
'tab' => 'pages',
'section' => 'schedule',
'pro' => true,
),
// === Show Pages ===
// --- Show Blocks Position ---
'show_block_position' => array(
'type' => 'select',
'label' => __( 'Info Blocks Position', 'radio-station' ),
'options' => array(
'left' => __( 'Float Left', 'radio-station' ),
'right' => __( 'Float Right', 'radio-station' ),
'top' => __( 'Float Top', 'radio-station' ),
),
'default' => 'left',
'helper' => __( 'Where to position Show info blocks relative to Show Page content.', 'radio-station' ),
'tab' => 'pages',
'section' => 'show',
),
// ---- Show Section Layout ---
'show_section_layout' => array(
'type' => 'select',
'label' => __( 'Show Content Layout', 'radio-station' ),
'options' => array(
'tabbed' => __( 'Tabbed', 'radio-station' ),
'standard' => __( 'Standard', 'radio-station' ),
),
'default' => 'tabbed',
'helper' => __( 'How to display extra sections below Show description. In content tabs or standard layout down the page.', 'radio-station' ),
'tab' => 'pages',
'section' => 'show',
),
// --- Show Header Image ---
// 2.3.2: added plural to option label
'show_header_image' => array(
'type' => 'checkbox',
'label' => __( 'Content Header Images', 'radio-station' ),
'value' => 'yes',
'default' => '',
'helper' => __( 'If your chosen template does not display the Featured Image, enable this and use the Content Header Image box on the Show edit screen instead.', 'radio-station' ),
'tab' => 'pages',
'section' => 'show',
),
// --- Latest Show Posts ---
// 'show_latest_posts' => array(
// 'type' => 'numeric',
// 'label' => __( 'Latest Show Posts', 'radio-station' ),
// 'step' => 1,
// 'min' => 0,
// 'max' => 100,
// 'default' => 3,
// 'helper' => __( 'Number of Latest Blog Posts to display above Show Page tabs.', 'radio-station' ),
// 'tab' => 'pages',
// 'section' => 'show',
// ),
// --- Show Posts Per Page ---
'show_posts_per_page' => array(
'type' => 'numeric',
'label' => __( 'Posts per Page', 'radio-station' ),
'step' => 1,
'min' => 0,
'max' => 1000,
'default' => 10,
'helper' => __( 'Linked Show Posts per page on the Show Page tab/display.', 'radio-station' ),
'tab' => 'pages',
'section' => 'show',
),
// --- Show Playlists per Page ---
'show_playlists_per_page' => array(
'type' => 'numeric',
'step' => 1,
'min' => 0,
'max' => 1000,
'label' => __( 'Playlists per Page', 'radio-station' ),
'default' => 10,
'helper' => __( 'Playlists per page on the Show Page tab/display', 'radio-station' ),
'tab' => 'pages',
'section' => 'show',
),
// --- [Pro] Show Episodes per Page ---
'show_episodes_per_page' => array(
'type' => 'number',
'label' => __( 'Episodes per Page', 'radio-station' ),
'step' => 1,
'min' => 1,
'max' => 1000,
'default' => 10,
'helper' => __( 'Number of Show Episodes per page on the Show page tab/display.', 'radio-station' ),
'tab' => 'pages',
'section' => 'show',
'pro' => true,
),
// --- [Pro] Combined Team Tab ---
// 2.4.0.7: added combined team grid option
// 2.5.7: updated to add option to remove team display
'combined_team_tab' => array(
'type' => 'select',
'label' => __( 'Team Tab Display', 'radio-station' ),
'default' => 'yes',
'options' => array(
'off' => __( 'No Team Display', 'radio-station' ),
'' => __( 'Separate Role Tabs', 'radio-station' ),
'yes' => __( 'Combined Team List', 'radio-station' ),
// 'grid' => __( 'Combined Team Grid', 'radio-station' ),
),
'helper' => __( 'How to display Show team members (eg. hosts, producers) on a Show page.', 'radio-station' ),
'tab' => 'pages',
'section' => 'show',
'pro' => true,
),
// === Profile Pages ===
// 2.3.3.9: added proflie page settings
// --- [Pro/Plus] Profile Blocks Position ---
'profile_block_position' => array(
'type' => 'select',
'label' => __( 'Info Blocks Position', 'radio-station' ),
'options' => array(
'left' => __( 'Float Left', 'radio-station' ),
'right' => __( 'Float Right', 'radio-station' ),
'top' => __( 'Float Top', 'radio-station' ),
),
'default' => 'left',
'helper' => __( 'Where to position Profile info blocks relative to Profile Page content.', 'radio-station' ),
'tab' => 'pages',
'section' => 'profile',
'pro' => true,
),
// ---- [Pro/Plus] Profile Section Layout ---
'profile_section_layout' => array(
'type' => 'select',
'label' => __( 'Profile Content Layout', 'radio-station' ),
'options' => array(
'tabbed' => __( 'Tabbed', 'radio-station' ),
'standard' => __( 'Standard', 'radio-station' ),
),
'default' => 'tabbed',
'helper' => __( 'How to display extra sections below Profile description. In content tabs or standard layout down the page.', 'radio-station' ),
'tab' => 'pages',
'section' => 'profile',
'pro' => true,
),
// === Episode Pages ===
// 2.3.3.9: added episode page settings
// --- [Pro] Episode Blocks Position ---
'episode_block_position' => array(
'type' => 'select',
'label' => __( 'Info Blocks Position', 'radio-station' ),
'options' => array(
'left' => __( 'Float Left', 'radio-station' ),
'right' => __( 'Float Right', 'radio-station' ),
'top' => __( 'Float Top', 'radio-station' ),
),
'default' => 'left',
'helper' => __( 'Where to position Episode info blocks relative to Episode Page content.', 'radio-station' ),
'tab' => 'pages',
'section' => 'episode',
'pro' => true,
),
// ---- [Pro] Episode Section Layout ---
'episode_section_layout' => array(
'type' => 'select',
'label' => __( 'Episode Content Layout', 'radio-station' ),
'options' => array(
'tabbed' => __( 'Tabbed', 'radio-station' ),
'standard' => __( 'Standard', 'radio-station' ),
),
'default' => 'tabbed',
'helper' => __( 'How to display extra sections below Episode description. In content tabs or standard layout down the page.', 'radio-station' ),
'tab' => 'pages',
'section' => 'episode',
'pro' => true,
),
// --- [Pro] Use Latest Episode ---
'episode_use_latest' => array(
'type' => 'checkbox',
'label' => __( 'Use Latest Episode', 'radio-station' ),
'value' => 'yes',
'default' => 'yes',
'helper' => __( 'Automatically use the latest Episode URL for the player embed on the Show page.', 'radio-station' ),
'tab' => 'pages',
'section' => 'episode',
'pro' => true,
),
// ==== Post Type Archives ===
// 2.4.0.6: move archives to separate tab
// 2.4.0.6: added post type archives section
// --- Shows Archive Page ---
'show_archive_page' => array(
'label' => __( 'Shows Archive Page', 'radio-station' ),
'type' => 'select',
'options' => 'PAGEID',
'default' => '',
'helper' => __( 'Select the Page for displaying the Show archive list.', 'radio-station' ),
'tab' => 'archives',
'section' => 'posttypes',
),
// --- Automatic Display ---
'show_archive_auto' => array(
'label' => __( 'Automatic Display', 'radio-station' ),
'type' => 'checkbox',
'value' => 'yes',
'default' => 'yes',
'helper' => __( 'Replaces selected page content with default Show Archive. Alternatively customize display using the shortcode:', 'radio-station' ) . ' [shows-archive]',
'tab' => 'archives',
'section' => 'posttypes',
),
// ? --- Redirect Shows Archive --- ?
// 'show_archive_override' => array(
// 'label' => __( 'Redirect Shows Archive', 'radio-station' ),
// 'type' => 'checkbox',
// 'value' => 'yes',
// 'default' => '',