PluginProbe
Radio Station by netmix® – Manage and play your Show Schedule in WordPress! / trunk
Radio Station by netmix® – Manage and play your Show Schedule in WordPress! vtrunk
2.7.1 trunk 2.2.6 2.2.7 2.2.8 2.3.0 2.3.1 2.3.2 2.3.3 2.3.3.1 2.3.3.2 2.3.3.3 2.3.3.4 2.3.3.5 2.3.3.6 2.3.3.7 2.3.3.8 2.3.3.9 2.4.0 2.4.0.3 2.4.0.4 2.4.0.5 2.4.0.6 2.4.0.7 2.4.0.8 All 44 releases
radio-station / options.php

options.php in Radio Station by netmix® – Manage and play your Show Schedule in WordPress! trunk, at options.php

1,921 lines 77.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // =============================
4 // === Radio Station Options ===
5 // =============================
6
7 // ---------------------------
8 // Plugin Admin Options Filter
9 // ---------------------------
10 // 2.5.18: added filter for admin options
11 add_action( 'plugins_loaded', 'radio_station_load_admin_options' );
12 function radio_station_load_admin_options() {
13 add_filter( 'radio_station_options', 'radio_station_admin_options' );
14 function radio_station_admin_options( $options ) {
15 $admin = is_admin();
16 $options = radio_station_plugin_options( $admin );
17 return $options;
18 }
19 }
20
21 // ------------------
22 // Set Plugin Options
23 // ------------------
24 add_filter( 'radio_station_plugin_options', 'radio_station_plugin_options' );
25 function radio_station_plugin_options( $admin = false ) {
26
27 $timezones = radio_station_get_timezone_options( true, $admin );
28 $languages = radio_station_get_language_options( true, $admin );
29 $formats = radio_station_get_stream_formats();
30
31 // 2.6.16: add am/pm translations for schedule_start_hour
32 if ( $admin ) {
33 $am = radio_station_translate_meridiem( 'am' );
34 $pm = radio_station_translate_meridiem( 'pm' );
35 }
36
37 // 2.5.18: check pro defines for player preview URLs
38 if ( defined( 'RADIO_STATION_PRO_FILE' ) ) {
39 $pro_file = RADIO_STATION_PRO_FILE;
40 } elseif ( defined( 'STREAM_PLAYER_PRO_FILE' ) ) {
41 $pro_file = STREAM_PLAYER_PRO_FILE;
42 } else {
43 $pro_file = RADIO_STATION_FILE;
44 }
45
46 // 2.5.18: set player preview HTML
47 $player_preview_html = $admin ? '<div class="play-pause-button preview-image"></div><div class="volume-controls"><div class="preview-button volume-button mute-button"></div><div class="volume-button minus-button"></div><div class="volume-slider-wrapper"><div class="volume-slider-bg"></div><input type="range" class="volume-slider" max="100" min="0" value="%%player_volume%%"><div class="volume-thumb"></div></div><div class="volume-button plus-button"></div><div class="preview-button volume-button max-button"></div></div></div>' : '';
48
49 // 2.5.18: set player preview CSS
50 $player_preview_css = $admin ? '/* Play/Pause Button */
51 %%target%% .play-pause-button {display: inline-block; vertical-align: middle; width: 64px; height: 64px; background-size: 100% 100%; cursor: pointer;}
52 %%target%%.light .play-pause-button, %%target%%.dark .play-pause-button {background-image: url("' . esc_url( plugins_url( '/player/images/%%player_theme%%-play-%%player_buttons%%.png', RADIO_STATION_FILE ) ) . '");}
53 %%target%%.light .play-pause-button.active, %%target%%.dark .play-pause-button.active {background-image: url("' . esc_url( plugins_url( '/images/%%player_theme%%-pause-%%player_buttons%%.png', RADIO_STATION_FILE ) ) . '");}
54 %%target%% .play-pause-button {background-image: url("' . esc_url( plugins_url( '/images/%%player_theme%%-play-%%player_buttons%%.png', $pro_file ) ) . '");}
55 %%target%% .play-pause-button.active {background-image: url("' . esc_url( plugins_url( '/images/%%player_theme%%-pause-%%player_buttons%%.png', $pro_file ) ) . '");}
56 /* Volume Controls */
57 %%target%% .volume-controls {display: inline-block; vertical-align: middle; margin-left: 40px;}
58 %%target%% .volume-button {width: 18px; height: 18px; padding: 0; margin: 0; background-size: 36px; background-repeat: no-repeat; background-image: url("' . esc_url( plugins_url( '/images/volume-controls-%%player_theme%%-%%player_buttons%%.png', $pro_file ) ) . '");}
59 %%target%%.semisolid .volume-button {background-image: url("' . esc_url( plugins_url( '/images/volume-controls-%%player_theme%%-solid.png', $pro_file ) ) . '");}
60 %%target%%.light .volume-button, %%target%%.dark .preview-button {background-image: url("' . esc_url( plugins_url( '/player/images/volume-controls-%%player_theme%%-%%player_buttons%%.png', RADIO_STATION_FILE ) ) . '");}
61 %%target%%.light.semisolid .volume-button, %%target%%.dark.semisolid .preview-button {background-image: url("' . esc_url( plugins_url( '/player/images/volume-controls-%%player_theme%%-solid.png', RADIO_STATION_FILE ) ) . '");}
62 %%target%% .volume-button:hover {opacity: 0.99; scale: 1.1;}
63 %%target%% .mute-button {display: none;} %%target%%.mute .mute-button {display: inline-block; vertical-align: middle; background-position: 0 0;}
64 %%target%%.mute .mute-button.active, %%target%%.mute .mute-button:hover {background-position: -18px -18px;}
65 %%target%% .minus-button {display: none;} %%target%%.updown .minus-button {display: inline-block; vertical-align: middle; background-position: 0 -72px;}
66 %%target%%.updown .minus-button:hover {background-position: -18px -72px;}
67 %%target%% .volume-slider-bg {display: none;} %%target%%.slider .volume-slider-bg {display: inline-block; vertical-align: middle; }
68 %%target%% .plus-button {display: none;} %%target%%.updown .plus-button {display: inline-block; vertical-align: middle; background-position: 0 -54px;}
69 %%target%%.updown .plus-button:hover {background-position: 0 -54px;}
70 %%target%% .max-button {display: none;} %%target%%.mute .max-button {display: inline-block; vertical-align: middle; background-position: 0 -36px;;}
71 %%target%%.max .max-button.active, %%target%%.max .max-button:hover {background-position: -18px -36px;}
72 /* Volume Slider */
73 %%target%% .volume-slider-wrapper {position: relative; height: 30px; opacity: 0.85; display: inline-block; vertical-align: middle; width: 150px;}
74 %%target%% .volume-slider-bg {width: calc((%%player_volume%% / 100) * 130px);}
75 %%target%% .volume-slider-wrapper:hover {opacity: 0.99;}
76 %%target%% .volume-slider {width: 100%;}
77 %%target%% .volume-thumb {display: none; width: 18px;}
78 /* Range Input */
79 %%target%% input[type=range] {height: 100%; margin: 0; background-color: transparent; vertical-align: middle; -webkit-appearance: none; border: none;}
80 %%target%% input[type=range]:focus {outline: none; box-shadow: none;}
81 %%target%% input[type=range]::-moz-focus-inner, %%target%% .volume-controls input[type=range]::-moz-focus-outer {outline: none; box-shadow: none;}
82 /* Range Thumb */
83 %%target%% input[type=range]::-webkit-slider-thumb {width: 18px; height: 18px; cursor: pointer; border: 1px solid rgba(128, 128, 128, 0.5); border-radius: 9px; z-index: 2; -webkit-appearance: none; background: %%player_thumb_color%%;}
84 %%target%% input[type=range]::-moz-range-thumb {width: 18px; height: 18px; cursor: pointer; border: 1px solid rgba(128, 128, 128, 0.5); border-radius: 9px; z-index: 2; background: %%player_thumb_color%%;}
85 %%target%% input[type=range]::-ms-thumb {width: 18px; height: 18px; cursor: pointer; border: 1px solid rgba(128, 128, 128, 0.5); border-radius: 9px; z-index: 2; margin-top: 0px; background: %%player_thumb_color%%;}
86 %%target%%.rounded input[type=range]::-webkit-slider-thumb {border-radius: 5px !important;}
87 %%target%%.square input[type=range]::-webkit-slider-thumb {border-radius: 0px !important;}
88 %%target%% input[type=range]::-ms-tooltip {display: none;}
89 /* Range Track */
90 %%target%% .volume-slider-bg {position: absolute; top: 10px; bottom: 10px; overflow: hidden; height: 10px; margin-left: 9px; z-index: 1; border: 1px solid rgba(128, 128, 128, 0.5); border-radius: 3px; background: %%player_range_color%%;
91 %%target%% input[type=range]::-webkit-slider-runnable-track {height: 9px; background: transparent; -webkit-appearance: none; color: transparent}
92 %%target%% input[type=range]::-moz-range-track {height: 9px; background: transparent; color: transparent;}
93 %%target%% input[type=range]::-ms-track {height: 9px; color: transparent; background: transparent; border-color: transparent;}
94 /* @supports (-ms-ime-align:auto) { %%target%% input[type=range] {margin: 0;} */
95 ' : '';
96
97 $options = array(
98
99 // === Stream ===
100
101 // --- [Player] Streaming URL ---
102 'streaming_url' => array(
103 'type' => 'text',
104 'options' => 'URL',
105 'label' => $admin ? __( 'Streaming URL', 'radio-station' ) : '',
106 'default' => '',
107 'helper' => $admin ? __( 'Enter the Streaming URL for your Radio Station. This is used in the Radio Player and discoverable via Data Feeds.', 'radio-station' ) : '',
108 'tab' => 'general',
109 'section' => 'stream',
110 ),
111
112 // --- [Player] Stream Format ---
113 'streaming_format' => array(
114 'type' => 'select',
115 'options' => $formats,
116 'label' => $admin ? __( 'Streaming Format', 'radio-station' ) : '',
117 'default' => 'aac',
118 'helper' => $admin ? __( 'Select streaming format for streaming URL.', 'radio-station' ) : '',
119 'tab' => 'general',
120 'section' => 'stream',
121 ),
122
123 // --- [Player] Fallback Stream URL ---
124 'fallback_url' => array(
125 'type' => 'text',
126 'options' => 'URL',
127 'label' => $admin ? __( 'Fallback Stream URL', 'radio-station' ) : '',
128 'default' => '',
129 'helper' => $admin ? __( 'Enter an alternative Streaming URL for Player fallback.', 'radio-station' ) : '',
130 'tab' => 'general',
131 'section' => 'stream',
132 ),
133
134 // --- [Player] Fallback Stream Format ---
135 'fallback_format' => array(
136 'type' => 'select',
137 'options' => $formats,
138 'label' => $admin ? __( 'Fallback Format', 'radio-station' ) : '',
139 'default' => 'ogg',
140 'helper' => $admin ? __( 'Select streaming fallback for fallback URL.', 'radio-station' ) : '',
141 'tab' => 'general',
142 'section' => 'stream',
143 ),
144
145 // --- [Player] Stream GeoBlocking ---
146 // TODO: conditional display of blacklist/whitelist fields
147 'stream_geo_blocking' => array(
148 'label' => $admin ? __( 'GeoIP Stream Blocking', 'radio-station' ) : '',
149 'type' => 'select',
150 'options' => array(
151 '' => $admin ? __( 'No GeoIP Blocking', 'radio-station' ) : '',
152 'live365' => $admin ? __( 'Live365 (only US, UK, Canada, Mexico)', 'radio-station' ) : '',
153 // 'blacklist' => $admin ? __( 'Custom Country Blacklist', 'radio-station' ) : '',
154 // 'whitelist' => $admin ? __( 'Custom Country Whitelist', 'radio-station' ) : '',
155 // 'both' => $admin ? __( 'Blacklist and Whitelist', 'radio-station' ) : '',
156 ),
157 'default' => '',
158 'helper' => $admin ? __( 'Block streaming according to country, detected by user IP address.', 'radio-station' ) : '',
159 'tab' => 'general',
160 'section' => 'stream',
161 'pro' => true,
162 ),
163
164 // --- StreamGuys Rewind ---
165 // 2.5.18: added option for SG rewind support
166 'stream_sg_rewind' => array(
167 'label' => $admin ? __( 'SG Rewind', 'radio-station' ) : '',
168 'type' => 'checkbox',
169 'value' => 'yes',
170 'default' => '',
171 'helper' => $admin ? __( 'Enable stream support for StreamGuys Rewind service.', 'radio-station' ) : '',
172 'tab' => 'general',
173 'section' => 'broadcast',
174 'pro' => true,
175 ),
176
177 // --- StreamGuys Endpoint ---
178 // 2.5.18: added option for SG rewind support
179 'stream_sg_endpoint' => array(
180 'label' => $admin ? __( 'Rewind Endpoint', 'radio-station' ) : '',
181 'type' => 'text',
182 'default' => '',
183 'helper' => $admin ? __( 'Endpoint URL for StreamGuys Rewind service.', 'radio-station' ) : '',
184 'tab' => 'general',
185 'section' => 'broadcast',
186 'pro' => true,
187 ),
188
189
190 // === Broadcast ===
191
192 // --- Main Radio Language ---
193 'radio_language' => array(
194 'type' => 'select',
195 'options' => $languages,
196 'label' => $admin ? __( 'Main Broadcast Language', 'radio-station' ) : '',
197 'default' => '',
198 'helper' => $admin ? __( 'Select the main language used on your Radio Station.', 'radio-station' ) : '',
199 'tab' => 'general',
200 'section' => 'broadcast',
201 ),
202
203 // --- Timezone Location ---
204 'timezone_location' => array(
205 'type' => 'select',
206 'options' => $timezones,
207 'label' => $admin ? __( 'Location Timezone', 'radio-station' ) : '',
208 'default' => '',
209 'helper' => $admin ? __( 'Select your Broadcast Location for Radio Timezone display.', 'radio-station' ) : '',
210 'tab' => 'general',
211 'section' => 'broadcast',
212 ),
213
214 // --- Clock Time Format ---
215 'clock_time_format' => array(
216 'type' => 'select',
217 'options' => array(
218 '12' => $admin ? __( '12 Hour Format', 'radio-station' ) : '',
219 '24' => $admin ? __( '24 Hour Format', 'radio-station' ) : '',
220 ),
221 'label' => $admin ? __( 'Clock Time Format', 'radio-station' ) : '',
222 'default' => '12',
223 'helper' => $admin ? __( 'Default Time Format for display output. Can be overridden in each shortcode or widget.', 'radio-station' ) : '',
224 'tab' => 'general',
225 'section' => 'broadcast',
226 ),
227
228 // --- Station Frequency ---
229 // 2.5.18: added station frequency option
230 'station_frequency' => array(
231 'type' => 'text',
232 'label' => $admin ? __( 'Station Frequency', 'radio-station' ) : '',
233 'default' => '',
234 'helper' => $admin ? __( 'Your station frequency as a number.', 'radio-station' ) : '',
235 'tab' => 'general',
236 'section' => 'broadcast',
237 ),
238
239 // --- Station Band ---
240 // 2.5.18: added station band option
241 'station_band' => array(
242 'type' => 'select',
243 'label' => $admin ? __( 'Frequency Band', 'radio-station' ) : '',
244 'options' => array(
245 '' => $admin ? __( 'n/a', 'radio-station' ) : '',
246 'fm' => $admin ? __( 'FM', 'radio-station' ) : '',
247 'am' => $admin ? __( 'AM', 'radio-station' ) : '',
248 'dab' => $admin ? __( 'DAB', 'radio-station' ) : '',
249 ),
250 'default' => '',
251 'helper' => $admin ? __( 'Your station frequency band identifier.', 'radio-station' ) : '',
252 'tab' => 'general',
253 'section' => 'broadcast',
254 ),
255
256 // --- Service Identifier ---
257 // TODO: service identifier for RadioDNS
258 /* 'service_identifier' => array(
259 'type' => 'text',
260 'label' => $admin ? __( 'Service Identifier', 'radio-station' ) : '',
261 'default' => '',
262 'helper' => $admin ? __( 'RadioDNS Service Identifier.', 'radio-station' ) : '',
263 'tab' => 'general',
264 'section' => 'station',
265 ), */
266
267 // --- Ping Netmix Directory ---
268 // note: disabled by default for WordPress.org repository compliance
269 'ping_netmix_directory' => array(
270 'type' => 'checkbox',
271 'label' => $admin ? __( 'Ping Netmix Directory', 'radio-station' ) : '',
272 'default' => '',
273 'value' => 'yes',
274 'helper' => $admin ? __( 'Enable this to ping the Netmix Directory whenever you update your schedule.', 'radio-station' ) : '',
275 'tab' => 'general',
276 'section' => 'broadcast',
277 ),
278
279 // === Station ===
280
281 // --- Station Title ---
282 // 2.3.3.8: added station title field
283 'station_title' => array(
284 'type' => 'text',
285 'label' => $admin ? __( 'Station Title', 'radio-station' ) : '',
286 'default' => '',
287 'helper' => $admin ? __( 'Name of your Radio Station. For use in Stream Player and Data Feeds.', 'radio-station' ) : '',
288 'tab' => 'general',
289 'section' => 'station',
290 ),
291
292 // --- Station Tagline ---
293 // 2.5.18: added station tagline
294 'station_tagline' => array(
295 'type' => 'text',
296 'label' => $admin ? __( 'Station Tagline', 'radio-station' ) : '',
297 'default' => '',
298 'helper' => $admin ? __( 'Tagline for your Radio Station. (eg. 24/7 Greatest Hits.)', 'radio-station' ) : '',
299 'tab' => 'general',
300 'section' => 'station',
301 ),
302
303 // --- Station Callsign ---
304 // 2.5.18: added station callsign field
305 'station_callsign' => array(
306 'type' => 'text',
307 'label' => $admin ? __( 'Station Callsign', 'radio-station' ) : '',
308 'default' => '',
309 'helper' => $admin ? __( 'Short callsign for your Radio Station. (eg. TOP.)', 'radio-station' ) : '',
310 'tab' => 'general',
311 'section' => 'station',
312 ),
313
314 // --- Station Image ---
315 // 2.3.3.8: added station logo image field
316 'station_image' => array(
317 'type' => 'image',
318 'label' => $admin ? __( 'Station Logo Image', 'radio-station' ) : '',
319 'default' => '',
320 'helper' => $admin ? __( 'Add a logo image for your Radio Station. Please ensure image is square before uploading. Recommended size 256 x 256', 'radio-station' ) : '',
321 'tab' => 'general',
322 'section' => 'station',
323 ),
324
325 // --- Station Location ---
326 // 2.5.18: added station location option
327 'station_location' => array(
328 'type' => 'text',
329 'label' => $admin ? __( 'Station Location', 'radio-station' ) : '',
330 'default' => '',
331 'helper' => $admin ? __( 'Text display to inform users of your station location.', 'radio-station' ) : '',
332 'tab' => 'general',
333 'section' => 'station',
334 ),
335
336 // --- Station Phone Number ---
337 // 2.3.3.6: added station phone number option
338 'station_phone' => array(
339 'type' => 'text',
340 'options' => 'PHONE',
341 'label' => $admin ? __( 'Station Phone', 'radio-station' ) : '',
342 'default' => '',
343 'helper' => $admin ? __( 'Main call in phone number for the Station (for requests etc.)', 'radio-station' ) : '',
344 'tab' => 'general',
345 'section' => 'station',
346 ),
347
348 // --- Station Text Number ---
349 // 2.5.18: added station text in number
350 'station_text' => array(
351 'type' => 'text',
352 'options' => 'PHONE',
353 'label' => $admin ? __( 'Station Text', 'radio-station' ) : '',
354 'default' => '',
355 'helper' => $admin ? __( 'Text line phone number for the Station (for requests etc.)', 'radio-station' ) : '',
356 'tab' => 'general',
357 'section' => 'station',
358 ),
359
360 // --- Station Email Address ---
361 // 2.3.3.8: added station email address option
362 // TODO: allow for contact page URL instead ?
363 'station_email' => array(
364 'type' => 'email',
365 'default' => '',
366 'label' => $admin ? __( 'Station Email', 'radio-station' ) : '',
367 'helper' => $admin ? __( 'Main email address for the Station (for requests etc.)', 'radio-station' ) : '',
368 // . ' ' . __( 'Alternatively, enter the URL for your contact page.' , 'radio-station' )
369 'tab' => 'general',
370 'section' => 'station',
371 ),
372
373 // === Feeds ===
374
375 // --- REST Data Routes ---
376 'enable_data_routes' => array(
377 'type' => 'checkbox',
378 'label' => $admin ? __( 'Enable Data Routes', 'radio-station' ) : '',
379 'default' => 'yes',
380 'value' => 'yes',
381 'helper' => $admin ? __( 'Enables Station Data Routes via WordPress REST API.', 'radio-station' ) : '',
382 'tab' => 'general',
383 'section' => 'feeds',
384 ),
385
386 // --- Data Feed Links ---
387 'enable_data_feeds' => array(
388 'type' => 'checkbox',
389 'label' => $admin ? __( 'Enable Data Feeds', 'radio-station' ) : '',
390 'default' => 'yes',
391 'value' => 'yes',
392 'helper' => $admin ? __( 'Enable Station Data Feeds via WordPress Feed links.', 'radio-station' ) : '',
393 'tab' => 'general',
394 'section' => 'feeds',
395 ),
396
397 // --- Show Shift Feeds ---
398 /* 'show_shift_feeds' => array(
399 'type' => 'checkbox',
400 'label' => $admin ? __( 'Show Shift Feeds', 'radio-station' ) : '',
401 'default' => 'yes',
402 'value' => 'yes',
403 'helper' => $admin ? __( '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' ) : '',
404 'tab' => 'general',
405 'section' => 'feeds',
406 'pro' => true,
407 ), */
408
409 // === Performance ===
410 // 2.4.0.6: separated performance section
411
412 // --- Shift Conflict Checker ---
413 // 2.5.6: added setting for conflict checker
414 'conflict_checker' => array(
415 'type' => 'checkbox',
416 'label' => $admin ? __( 'Shift Conflict Checker', 'radio-station' ) : '',
417 'default' => 'yes',
418 'value' => 'yes',
419 'helper' => $admin ? __( 'Check for Shift conflicts when saving Show shift times.', 'radio-station' ) : '',
420 'tab' => 'general',
421 'section' => 'performance',
422 ),
423
424 // --- Disable Transients ---
425 // 2.4.0.6: change label from Clear Transients
426 'clear_transients' => array(
427 'type' => 'checkbox',
428 'label' => $admin ? __( 'Disable Transients', 'radio-station' ) : '',
429 'default' => '',
430 'value' => 'yes',
431 'helper' => $admin ? __( 'Clear Schedule transients with every pageload. Less efficient but more reliable.', 'radio-station' ) : '',
432 'tab' => 'general',
433 'section' => 'performance',
434 ),
435
436 // --- Transient Caching ---
437 'transient_caching' => array(
438 'type' => 'checkbox',
439 'label' => $admin ? __( 'Show Transients', 'radio-station' ) : '',
440 'default' => 'yes',
441 'value' => 'yes',
442 'helper' => $admin ? __( 'Use Show Transient Data to improve Schedule calculation performance.', 'radio-station' ) : '',
443 'tab' => 'general',
444 'section' => 'performance',
445 'pro' => true,
446 ),
447
448 // === Basic Stream Player ===
449
450 // --- Defaults Note ---
451 // 2.5.0: added note about defaults being overrideable in widgets
452 'player_defaults_note' => array(
453 'type' => 'note',
454 'label' => $admin ? __( 'Player Defaults Note', 'radio-station' ) : '',
455 'helper' => $admin ? __( 'Note that you can override these defaults in specific Player Shortcodes or Widgets.', 'radio-station' ) : '',
456 'tab' => 'player',
457 'section' => 'basic',
458 ),
459
460 // --- [Player] Preview Display ---
461 'player_preview' => array(
462 'type' => 'preview',
463 'label' => $admin ? __( 'Player Preview', 'radio-station' ) : '',
464 'html' => $player_preview_html,
465 'css' => $player_preview_css,
466 'classes' => '%%player_theme%%,%%player_buttons%%,%%player_volumes%%',
467 'tab' => 'player',
468 'section' => 'basic',
469 ),
470
471 // --- [Player] Player Title ---
472 // TODO: option to display callsign instead ?
473 'player_title' => array(
474 'type' => 'checkbox',
475 'label' => $admin ? __( 'Display Station Title', 'radio-station' ) : '',
476 'default' => 'yes',
477 'value' => 'yes',
478 'helper' => $admin ? __( 'Display your Radio Station Title in Player by default.', 'radio-station' ) : '',
479 'tab' => 'player',
480 'section' => 'basic',
481 ),
482
483 // --- [Player] Player Image ---
484 'player_image' => array(
485 'type' => 'checkbox',
486 'label' => $admin ? __( 'Display Station Image', 'radio-station' ) : '',
487 'default' => 'yes',
488 'value' => 'yes',
489 'helper' => $admin ? __( 'Display your Radio Station Image in Player by default.', 'radio-station' ) : '',
490 'tab' => 'player',
491 'section' => 'basic',
492 ),
493
494 // --- [Player] Player Meta ---
495 // 2.5.18: added station meta display options
496 'player_meta' => array(
497 'type' => 'multicheck',
498 'label' => $admin ? __( 'Display Station Meta', 'radio-station' ) : '',
499 'options' => array(
500 'tagline' => $admin ? __( 'Tagline', 'radio-station' ) : '',
501 'frequency' => $admin ? __( 'Frequency', 'radio-station' ) : '',
502 'location' => $admin ? __( 'Location', 'radio-station' ) : '',
503 'timezone' => $admin ? __( 'Timezone', 'radio-station' ) : '',
504 ),
505 'default' => array( 'frequency' ),
506 'helper' => $admin ? __( 'Display your Radio Station Meta in Player by default.', 'radio-station' ) : '',
507 'tab' => 'player',
508 'section' => 'basic',
509 ),
510
511 // --- [Player] Player Script ---
512 // 2.4.0.3: change script default to jplayer
513 // 2.5.7: disable howler script (browser incompatibilities)
514 'player_script' => array(
515 'type' => 'select',
516 'label' => $admin ? __( 'Player Script', 'radio-station' ) : '',
517 'default' => 'jplayer',
518 'options' => array(
519 'amplitude' => $admin ? __( 'Amplitude', 'radio-station' ) : '',
520 'jplayer' => $admin ? __( 'jPlayer', 'radio-station' ) : '',
521 // 'howler' => $admin ? __( 'Howler', 'radio-station' ) : '',
522 ),
523 'helper' => $admin ? __( 'Default audio script to use for playback in the Player.', 'radio-station' ) : '',
524 'tab' => 'player',
525 'section' => 'basic',
526 ),
527
528 // --- [Player] Fallback Scripts ---
529 // 2.4.0.3: added fallback enable/disable switching
530 // 2.4.0.3: fixed option label from Player Script
531 // 2.5.7: disable howler script (browser incompatibilities)
532 'player_fallbacks' => array(
533 'type' => 'multicheck',
534 'label' => $admin ? __( 'Fallback Scripts', 'radio-station' ) : '',
535 'default' => array( 'amplitude', 'jplayer' ),
536 'options' => array(
537 'amplitude' => $admin ? __( 'Amplitude', 'radio-station' ) : '',
538 'jplayer' => $admin ? __( 'jPlayer', 'radio-station' ) : '',
539 // 'howler' => $admin ? __( 'Howler', 'radio-station' ) : '',
540 ),
541 'helper' => $admin ? __( 'Enabled fallback audio scripts to try when the default Player script fails.', 'radio-station' ) : '',
542 'tab' => 'player',
543 'section' => 'basic',
544 ),
545
546 // --- [Player] Player Theme ---
547 'player_theme' => array(
548 'type' => 'select',
549 'label' => $admin ? __( 'Default Control Theme', 'radio-station' ) : '',
550 'default' => 'light',
551 'options' => array(
552 'light' => $admin ? __( 'Light', 'radio-station' ) : '',
553 'dark' => $admin ? __( 'Dark', 'radio-station' ) : '',
554 ),
555 'helper' => $admin ? __( 'Default Player Controls theme style. (Color spectrum options available in Pro.)', 'radio-station' ) : '',
556 'preview' => array(
557 'type' => 'image',
558 'width' => 32,
559 'height' => 32,
560 'sources' => array(
561 'light' => plugins_url( 'player/images/light-play-%%player_buttons%%.png', RADIO_STATION_FILE ),
562 'dark' => plugins_url( 'player/images/dark-play-%%player_buttons%%.png', RADIO_STATION_FILE ),
563 ),
564 'sources-alt' => array(
565 'light' => plugins_url( 'player/images/light-pause-%%player_buttons%%.png', RADIO_STATION_FILE ),
566 'dark' => plugins_url( 'player/images/dark-pause-%%player_buttons%%.png', RADIO_STATION_FILE ),
567 ),
568 'css' => '#preview-player_preview .play-pause-button {background-image: url("%%images_url%%/%%player_theme%%-play-%%player_buttons%%.png") !important;}
569 #preview-player_preview .play-pause-button.active, #preview-player_preview .play-pause-button:hover {background-image: url("%%images_url%%/%%player_theme%%-pause-%%player_buttons%%.png") !important;}
570 #preview-player_theme {background-image: url("%%images_url%%/%%player_theme%%-play-%%player_buttons%%.png") !important;}
571 #preview-player_theme.active, #preview-player_theme:hover {background-image: url("%%images_url%%/%%player_theme%%-pause-%%player_buttons%%.png") !important;}',
572 'settings' => 'player_theme,player_buttons',
573 ),
574 'tab' => 'player',
575 'section' => 'basic',
576 ),
577
578 // --- [Player] Player Buttons ---
579 // 2.5.15: change default to circular
580 // 2.5.18: added solid button images options
581 'player_buttons' => array(
582 'type' => 'select',
583 'label' => $admin ? __( 'Default Player Buttons', 'radio-station' ) : '',
584 'default' => 'circular',
585 'options' => array(
586 'solid' => $admin ? __( 'Solid Buttons (No Outline)', 'radio-station' ) : '',
587 'semisolid' => $admin ? __( 'Solid Buttons (Transparent Outline)', 'radio-station' ) : '',
588 'circular' => $admin ? __( 'Hollow Circular Buttons', 'radio-station' ) : '',
589 'rounded' => $admin ? __( 'Hollow Rounded Buttons', 'radio-station' ) : '',
590 'square' => $admin ? __( 'Hollow Square Buttons', 'radio-station' ) : '',
591 ),
592 'helper' => $admin ? __( 'Default Player Buttons shape style.', 'radio-station' ) : '',
593 'preview' => array(
594 'linked' => 'player_theme',
595 ),
596 'tab' => 'player',
597 'section' => 'basic',
598 ),
599
600 // --- [Player] Volume Controls ---
601 // 2.4.0.3: added enable/disable volume controls option
602 // 2.5.0: default to volume slider only
603 'player_volumes' => array(
604 'type' => 'multicheck',
605 'label' => $admin ? __( 'Volume Controls', 'radio-station' ) : '',
606 'default' => array( 'slider' ),
607 'suffix' => '%',
608 'options' => array(
609 'slider' => $admin ? __( 'Volume Slider', 'radio-station' ) : '',
610 'updown' => $admin ? __( 'Volume Plus / Minus', 'radio-station' ) : '',
611 'mute' => $admin ? __( 'Mute Volume Toggle', 'radio-station' ) : '',
612 'max' => $admin ? __( 'Maximize Volume', 'radio-station' ) : '',
613 ),
614 'helper' => $admin ? __( 'Which volume controls to display in the Player by default.', 'radio-station' ) : '',
615 'tab' => 'player',
616 'section' => 'basic',
617 ),
618
619 // --- [Player] Player Debug Mode ---
620 'player_debug' => array(
621 'type' => 'checkbox',
622 'label' => $admin ? __( 'Player Debug Mode', 'radio-station' ) : '',
623 'default' => '',
624 'value' => 'yes',
625 'helper' => $admin ? __( 'Output player debug information in browser javascript console.', 'radio-station' ) : '',
626 'tab' => 'player',
627 'section' => 'basic',
628 ),
629
630 // === Player Colours ===
631
632 // --- [Pro/Player] Playing Highlight Color ---
633 'player_playing_color' => array(
634 'type' => 'color',
635 'label' => $admin ? __( 'Playing Icon Highlight Color', 'radio-station' ) : '',
636 'default' => '#70D070',
637 'helper' => $admin ? __( 'Default highlight color to use for Play button icon when playing.', 'radio-station' ) : '',
638 'tab' => 'player',
639 'section' => 'colors',
640 'pro' => true,
641 ),
642
643 // --- [Pro/Player] Control Icons Highlight Color ---
644 'player_buttons_color' => array(
645 'type' => 'color',
646 'label' => $admin ? __( 'Control Icons Highlight Color', 'radio-station' ) : '',
647 'default' => '#00A0E0',
648 'helper' => $admin ? __( 'Default highlight color to use for Control button icons when active.', 'radio-station' ) : '',
649 'tab' => 'player',
650 'section' => 'colors',
651 'pro' => true,
652 ),
653
654 // --- [Pro/Player] Volume Knob Color ---
655 'player_thumb_color' => array(
656 'type' => 'color',
657 'label' => $admin ? __( 'Volume Knob Color', 'radio-station' ) : '',
658 'default' => '#80C080',
659 'helper' => $admin ? __( 'Default Knob Color for Player Volume Slider.', 'radio-station' ) : '',
660 'preview' => array(
661 'css' => '#preview-player_preview .volume-slider-wrapper input[type=range]::-webkit-slider-thumb {background: %%player_thumb_color%% !important;};
662 #preview-player_preview .volume-slider-wrapper input[type=range]::-moz-range-thumb {background: %%player_thumb_color%% !important;}
663 #preview-player_preview .volume-slider-wrapper input[type=range]::-ms-thumb {background: %%player_thumb_color%% !important;}',
664 ),
665 'tab' => 'player',
666 'section' => 'colors',
667 'pro' => true,
668 ),
669
670 // --- [Pro/Player] Volume Track Color ---
671 'player_range_color' => array(
672 'type' => 'coloralpha',
673 'label' => $admin ? __( 'Volume Track Color', 'radio-station' ) : '',
674 'default' => '#80C080',
675 'helper' => $admin ? __( 'Default Track Color for Player Volume Slider.', 'radio-station' ) : '',
676 'preview' => array(
677 'css' => '#preview-player_preview .volume-slider-bg {background: %%player_range_color%% !important;}'
678 ),
679 'tab' => 'player',
680 'section' => 'colors',
681 'pro' => true,
682 ),
683
684 // === Advanced Stream Player ===
685
686 // --- [Player] Player Volume ---
687 'player_volume' => array(
688 'type' => 'number',
689 'label' => $admin ? __( 'Player Start Volume', 'radio-station' ) : '',
690 'default' => 77,
691 'min' => 0,
692 'step' => 1,
693 'max' => 100,
694 'helper' => $admin ? __( 'Initial volume for when the Player starts playback.', 'radio-station' ) : '',
695 'tab' => 'player',
696 'section' => 'advanced',
697 'pro' => false,
698 ),
699
700 // --- [Player] Single Player ---
701 'player_single' => array(
702 'type' => 'checkbox',
703 'label' => $admin ? __( 'Single Player at Once', 'radio-station' ) : '',
704 'default' => 'yes',
705 'value' => 'yes',
706 'helper' => $admin ? __( 'Stop any existing Player instances on the page or in other windows or tabs when a Player is started.', 'radio-station' ) : '',
707 'tab' => 'player',
708 'section' => 'advanced',
709 'pro' => false,
710 ),
711
712 // --- [Pro/Player] Player Autoresume ---
713 // 2.5.15: change autoresume default to off so activated manually
714 // 2.5.16: updated helper text
715 'player_autoresume' => array(
716 'type' => 'checkbox',
717 'label' => $admin ? __( 'Autoresume Playback', 'radio-station' ) : '',
718 'default' => '',
719 'value' => 'on',
720 'helper' => $admin ? __( 'On return to site or page reload, ask the user to resume stream playback if they were playing the stream previously, using a popup a modal dialogue box.', 'radio-station' ) : '',
721 'tab' => 'player',
722 'section' => 'advanced',
723 'pro' => true,
724 ),
725
726 // --- [Pro/Player] Popup Player Button ---
727 // 2.5.0: enabled popup player button
728 'player_popup' => array(
729 'type' => 'checkbox',
730 'label' => $admin ? __( 'Popup Player Button', 'radio-station' ) : '',
731 'default' => '',
732 'value' => 'yes',
733 'helper' => $admin ? __( 'Add button to open Popup Player in separate window.', 'radio-station' ) : '',
734 'tab' => 'player',
735 'section' => 'advanced',
736 'pro' => true,
737 ),
738
739 // === Sitewide Player Bar ===
740
741 // --- Player Bar Note ---
742 'player_bar_note' => array(
743 'type' => 'note',
744 'label' => $admin ? __( 'Bar Defaults Note', 'radio-station' ) : '',
745 'helper' => $admin ? __( 'The Bar Player uses the default configurations set above.', 'radio-station' )
746 . ' ' . __( 'You can override these in specific Player Widgets.', 'radio-station' ) : '',
747 'tab' => 'player',
748 'section' => 'bar',
749 ),
750
751 // --- [Pro/Player] Sitewide Player Bar ---
752 'player_bar' => array(
753 'type' => 'select',
754 'label' => $admin ? __( 'Sitewide Player Bar', 'radio-station' ) : '',
755 'default' => 'off',
756 'options' => array(
757 'off' => $admin ? __( 'No Player Bar', 'radio-station' ) : '',
758 'top' => $admin ? __( 'Top Player Bar', 'radio-station' ) : '',
759 'bottom' => $admin ? __( 'Bottom Player Bar', 'radio-station' ) : '',
760 ),
761 'tab' => 'player',
762 'section' => 'bar',
763 'helper' => $admin ? __( 'Add a fixed position Player Bar which displays Sitewide.', 'radio-station' ) : '',
764 'pro' => true,
765 ),
766
767 // --- [Pro/Player] Player Bar Height ---
768 // 2.5.15: add px suffix
769 'player_bar_height' => array(
770 'type' => 'number',
771 'min' => 40,
772 'max' => 400,
773 'step' => 1,
774 'label' => $admin ? __( 'Player Bar Height', 'radio-station' ) : '',
775 'default' => 80,
776 'suffix' => 'px',
777 'tab' => 'player',
778 'section' => 'bar',
779 'helper' => $admin ? __( 'Set the height of the Sitewide Player Bar in pixels.', 'radio-station' ) : '',
780 'pro' => true,
781 ),
782
783 // --- [Pro/Player] Responsive Mode ---
784 // 2.5.18: added option for responsive expander bar
785 'player_bar_responsive' => array(
786 'type' => 'select',
787 'label' => $admin ? __( 'Bar Responsive Mode', 'radio-station' ) : '',
788 'options' => array(
789 'left-right' => $admin ? __( 'Horizontal Arrows', 'radio-station' ) : '',
790 'expander' => $admin ? __( 'Vertical Expander', 'radio-station' ) : '',
791 ),
792 'default' => 'left-right',
793 'tab' => 'player',
794 'section' => 'bar',
795 'helper' => $admin ? __( 'Player Bar responsive mode for mobile overflow sections.', 'radio-station' ) : '',
796 'pro' => true,
797 ),
798
799 // --- [Pro/Player] Fade In Player Bar ---
800 'player_bar_fadein' => array(
801 'type' => 'number',
802 'label' => $admin ? __( 'Fade In Player Bar', 'radio-station' ) : '',
803 'default' => 2500,
804 'min' => 0,
805 'step' => 100,
806 'max' => 10000,
807 'suffix' => 'ms',
808 'helper' => $admin ? __( 'Number of milliseconds after Page load over which to fade in Player Bar. Use 0 for instant display.', 'radio-station' ) : '',
809 'tab' => 'player',
810 'section' => 'bar',
811 'pro' => true,
812 ),
813
814 // --- [Pro/Player] Continuous Playback ---
815 // 2.4.0.1: fix for missing value field
816 'player_bar_continuous' => array(
817 'type' => 'checkbox',
818 'label' => $admin ? __( 'Continuous Playback', 'radio-station' ) : '',
819 'default' => 'yes',
820 'value' => 'yes',
821 'helper' => $admin ? __( '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>' : '',
822 'tab' => 'player',
823 'section' => 'bar',
824 'pro' => true,
825 ),
826
827 // --- [Pro/Player] Player Page Fade ---
828 'player_bar_pagefade' => array(
829 'type' => 'number',
830 'label' => $admin ? __( 'Page Fade Time', 'radio-station' ) : '',
831 'default' => 2000,
832 'min' => 0,
833 'step' => 100,
834 'max' => 10000,
835 'suffix' => 'ms',
836 'helper' => $admin ? __( 'Number of milliseconds over which to fade in new Pages (when continuous playback is enabled.) Use 0 for instant display.', 'radio-station' ) : '',
837 'tab' => 'player',
838 'section' => 'bar',
839 'pro' => true,
840 ),
841
842 // --- [Pro/Player] Page Load Timeout ---
843 // 2.4.0.3: add page load timeout option
844 'player_bar_timeout' => array(
845 'type' => 'number',
846 'label' => $admin ? __( 'Page Load Timeout', 'radio-station' ) : '',
847 'default' => 7000,
848 'min' => 0,
849 'step' => 500,
850 'max' => 20000,
851 'suffix' => 'ms',
852 'helper' => $admin ? __( 'Number of milliseconds to wait for new Page to load before fading in anyway or prompting (if continuous playback is enabled.)', 'radio-station' ) : '',
853 'tab' => 'player',
854 'section' => 'bar',
855 'pro' => true,
856 ),
857
858 // --- [Pro/Player] Page Load Prompt ---
859 // 2.5.18: add timeout/error prompt
860 'player_bar_prompt' => array(
861 'type' => 'select',
862 'label' => $admin ? __( 'Load Fail Prompt', 'radio-station' ) : '',
863 'default' => '404',
864 'options' => array(
865 '' => $admin ? __( 'Off', 'radio-station' ) : '',
866 'yes' => $admin ? __( 'Prompt on Timeout only', 'radio-station' ) : '',
867 '404' => $admin ? __( 'Prompt on 404 Not Found only', 'radio-station' ) : '',
868 '404t' => $admin ? __( 'Prompt on 404 or Timeout', 'radio-station' ) : '',
869 'all' => $admin ? __( 'Prompt on Timeout or any Error', 'radio-station' ) : '',
870 ),
871 'helper' => $admin ? __( 'Whether to show a user prompt on page timeout and/or when there is an error (if continuous playback is enabled.)', 'radio-station' ) : '',
872 'tab' => 'player',
873 'section' => 'bar',
874 'pro' => true,
875 ),
876
877 // --- [Pro/Player] Bar Player Text Color ---
878 'player_bar_text' => array(
879 'type' => 'color',
880 'label' => $admin ? __( 'Bar Player Text Color', 'radio-station' ) : '',
881 'default' => '#FFFFFF',
882 'helper' => $admin ? __( 'Text color for the fixed position Sitewide Bar Player.', 'radio-station' ) : '',
883 'tab' => 'player',
884 'section' => 'bar',
885 'pro' => true,
886 ),
887
888 // --- [Pro/Player] Bar Player Background Color ---
889 // 2.5.18: fix default alpha value from 255 to 1
890 'player_bar_background' => array(
891 'type' => 'coloralpha',
892 'label' => $admin ? __( 'Bar Player Background Color', 'radio-station' ) : '',
893 'default' => 'rgba(0,0,0,1)',
894 'helper' => $admin ? __( 'Background color for the fixed position Sitewide Bar Player.', 'radio-station' ) : '',
895 'tab' => 'player',
896 'section' => 'bar',
897 'pro' => true,
898 ),
899
900 // --- [Pro/Player] Display Current Show ---
901 // 2.4.0.3: added for current show display
902 'player_bar_currentshow' => array(
903 'type' => 'checkbox',
904 'label' => $admin ? __( 'Display Current Show', 'radio-station' ) : '',
905 'value' => 'yes',
906 'default' => 'yes',
907 'tab' => 'player',
908 'section' => 'bar',
909 'helper' => $admin ? __( 'Display the Current Show in the Player Bar.', 'radio-station' ) : '',
910 'pro' => true,
911 ),
912
913 // --- [Pro/Player] Show Meta ---
914 // 2.5.18: added show meta display option
915 'player_bar_showmeta' => array(
916 'type' => 'multicheck',
917 'label' => $admin ? __( 'Show Meta Display', 'radio-station' ) : '',
918 'options' => array(
919 'hosts' => $admin ? __( 'Hosts', 'radio-station' ) : '',
920 'producers' => $admin ? __( 'Producers', 'radio-station' ) : '',
921 'shift' => $admin ? __( 'Shift Time', 'radio-station' ) : '',
922 // 'remaining' => $admin ? __( 'Remaining Time', 'radio-station' ) : '',
923 // 'description' => $admin ? __( 'Description', 'radio-station' ) : '',
924 ),
925 'default' => array( 'hosts', 'shift' ),
926 'tab' => 'player',
927 'section' => 'bar',
928 'helper' => $admin ? __( 'Show meta to display in the Player Bar.', 'radio-station' ) : '',
929 'pro' => true,
930 ),
931
932 // --- [Pro/Player] Display Metadata ---
933 // 2.4.0.3: added for now playing metadata display
934 'player_bar_nowplaying' => array(
935 'type' => 'checkbox',
936 'label' => $admin ? __( 'Display Now Playing', 'radio-station' ) : '',
937 'value' => 'yes',
938 'default' => 'yes',
939 'tab' => 'player',
940 'section' => 'bar',
941 'helper' => $admin ? __( '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' ) : '',
942 'pro' => true,
943 ),
944
945 // --- [Pro/Player] Track Animation ---
946 // 2.5.0: added track animation option
947 'player_bar_track_animation' => array(
948 'type' => 'select',
949 'label' => $admin ? __( 'Track Animation', 'radio-station' ) : '',
950 'default' => 'backandforth',
951 'options' => array(
952 'none' => $admin ? __( 'No Animation', 'radio-station' ) : '',
953 'lefttoright' => $admin ? __( 'Left to Right Ticker', 'radio-station' ) : '',
954 'righttoleft' => $admin ? __( 'Right to Left Ticker', 'radio-station' ) : '',
955 'backandforth' => $admin ? __( 'Back and Forth', 'radio-station' ) : '',
956 ),
957 'tab' => 'player',
958 'section' => 'bar',
959 'helper' => $admin ? __( 'How to animate the currently playing track display.', 'radio-station' ) : '',
960 'pro' => true,
961 ),
962
963 // --- [Pro/Player] Metadata URL ---
964 // 2.4.0.3: added for alternative stream metadata URL
965 'player_bar_metadata' => array(
966 'type' => 'text',
967 'options' => 'URL',
968 'label' => $admin ? __( 'Metadata URL', 'radio-station' ) : '',
969 'default' => '',
970 'tab' => 'player',
971 'section' => 'bar',
972 'helper' => $admin ? __( 'Now playing metadata is normally retrieved via the Stream URL. Use this setting if you need to provide an alternative metadata location.', 'radio-station' ) : '',
973 'pro' => true,
974 ),
975
976 // --- [Pro/Player] Store Track Metadata ---
977 // 2.5.6: added option to store stream
978 'player_store_metadata' => array(
979 'type' => 'checkbox',
980 'label' => $admin ? __( 'Store Track Metadata?', 'radio-station' ) : '',
981 'default' => 'yes',
982 'value' => 'yes',
983 'tab' => 'player',
984 'section' => 'bar',
985 'helper' => $admin ? __( 'Save now playing track metadata in a separate database table for later use.', 'radio-station' ) : '',
986 'pro' => true,
987 ),
988
989 // === Master Schedule Page ===
990
991 // --- Schedule Page ---
992 'schedule_page' => array(
993 'type' => 'select',
994 'options' => 'PAGEID',
995 'label' => $admin ? __( 'Master Schedule Page', 'radio-station' ) : '',
996 'default' => '',
997 'helper' => $admin ? __( 'Select the Page you are displaying the Master Schedule on.', 'radio-station' ) : '',
998 'tab' => 'pages',
999 'section' => 'schedule',
1000 ),
1001
1002 // --- Automatic Schedule Display ---
1003 'schedule_auto' => array(
1004 'type' => 'checkbox',
1005 'label' => $admin ? __( 'Automatic Display', 'radio-station' ) : '',
1006 'default' => 'yes',
1007 'value' => 'yes',
1008 'helper' => $admin ? __( 'Replaces selected page content with Master Schedule. Alternatively customize with the shortcode: ', 'radio-station' ) . ' [master-schedule]' : '',
1009 'tab' => 'pages',
1010 'section' => 'schedule',
1011 ),
1012
1013 // --- Default Schedule View ---
1014 'schedule_view' => array(
1015 'type' => 'select',
1016 'label' => $admin ? __( 'Schedule View Default', 'radio-station' ) : '',
1017 'default' => 'table',
1018 'options' => array(
1019 'table' => $admin ? __( 'Table View', 'radio-station' ) : '',
1020 'list' => $admin ? __( 'List View', 'radio-station' ) : '',
1021 'div' => $admin ? __( 'Divs View', 'radio-station' ) : '',
1022 'tabs' => $admin ? __( 'Tabbed View', 'radio-station' ) : '',
1023 'default' => $admin ? __( 'Legacy Table', 'radio-station' ) : '',
1024 ),
1025 'helper' => $admin ? __( 'View type to use for automatic display on Master Schedule Page.', 'radio-station' ) : '',
1026 'tab' => 'pages',
1027 'section' => 'schedule',
1028 ),
1029
1030 // --- Schedule Clock Display ---
1031 'schedule_clock' => array(
1032 'type' => 'select',
1033 'label' => $admin ? __( 'Schedule Clock?', 'radio-station' ) : '',
1034 'default' => 'clock',
1035 'options' => array(
1036 '' => $admin ? __( 'None', 'radio-station' ) : '',
1037 'clock' => $admin ? __( 'Clock', 'radio-station' ) : '',
1038 'timezone' => $admin ? __( 'Timezone', 'radio-station' ) : '',
1039 ),
1040 'helper' => $admin ? __( 'Radio Time section display above program Schedule.', 'radio-station' ) : '',
1041 'tab' => 'pages',
1042 'section' => 'schedule',
1043 ),
1044
1045 // --- Schedule AJAX Load ---
1046 // 2.5.10.1: added schedule AJAX load default
1047 'schedule_ajax' => array(
1048 'type' => 'checkbox',
1049 'label' => $admin ? __( 'AJAX Load?', 'radio-station' ) : '',
1050 'default' => 'yes',
1051 'value' => 'yes',
1052 'helper' => $admin ? __( 'Whether to load schedule display via AJAX by default.', 'radio-station' ) : '',
1053 'tab' => 'pages',
1054 'section' => 'schedule',
1055 ),
1056
1057 // --- [Pro/Plus] Schedule Switcher ---
1058 'schedule_switcher' => array(
1059 'type' => 'checkbox',
1060 'label' => $admin ? __( 'View Switching', 'radio-station' ) : '',
1061 'default' => '',
1062 'value' => 'yes',
1063 'helper' => $admin ? __( 'Enable View Switching on the automatic Master Schedule page.', 'radio-station' ) : '',
1064 'tab' => 'pages',
1065 'section' => 'schedule',
1066 'pro' => true,
1067 ),
1068
1069 // --- [Pro/Plus] Available Views ---
1070 // 2.3.2: added additional views option
1071 'schedule_views' => array(
1072 'type' => 'multicheck',
1073 'label' => $admin ? __( 'Available Views', 'radio-station' ) : '',
1074 // note: unstyled list view not included in defaults
1075 'default' => array( 'table', 'calendar' ),
1076 'value' => 'yes',
1077 'options' => array(
1078 'table' => $admin ? __( 'Table View', 'radio-station' ) : '',
1079 'tabs' => $admin ? __( 'Tabbed View', 'radio-station' ) : '',
1080 'list' => $admin ? __( 'List View', 'radio-station' ) : '',
1081 'grid' => $admin ? __( 'Grid View', 'radio-station' ) : '',
1082 'calendar' => $admin ? __( 'Calendar View', 'radio-station' ) : '',
1083 ),
1084 'helper' => $admin ? __( 'Switcher Views available on automatic Master Schedule page.', 'radio-station' ) : '',
1085 'tab' => 'pages',
1086 'section' => 'schedule',
1087 'pro' => true,
1088 ),
1089
1090 // --- [Pro/Plus] Time Spaced Grid View ---
1091 // 2.4.0.4: added grid view time spacing option
1092 'schedule_timegrid' => array(
1093 'type' => 'checkbox',
1094 'label' => $admin ? __( 'Time Spaced Grid', 'radio-station' ) : '',
1095 'default' => '',
1096 'value' => 'yes',
1097 'helper' => $admin ? __( 'Enable Grid View option for equalized time spacing and background imsges.', 'radio-station' ) : '',
1098 'tab' => 'pages',
1099 'section' => 'schedule',
1100 'pro' => true,
1101 ),
1102
1103 // --- schedule start hour ---
1104 'schedule_start_hour' => array(
1105 'label' => $admin ? __( 'Display Start Hour', 'radio-station' ) : '',
1106 'type' => 'select',
1107 'options' => array(
1108 0 => $admin ? __( 'Midnight', 'radio-station' ) : 'Midnight',
1109 1 => $admin ? '1 ' . $am : '1 am',
1110 2 => $admin ? '2 ' . $am : '2 am',
1111 3 => $admin ? '3 ' . $am : '3 am',
1112 4 => $admin ? '4 ' . $am : '4 am',
1113 5 => $admin ? '5 ' . $am : '5 am',
1114 6 => $admin ? '6 ' . $am : '6 am',
1115 7 => $admin ? '7 ' . $am : '7 am',
1116 8 => $admin ? '8 ' . $am : '8 am',
1117 9 => $admin ? '9 ' . $am : '9 am',
1118 10 => $admin ? '10 ' . $am : '10 am',
1119 11 => $admin ? '11 ' . $am : '11 am',
1120 12 => $admin ? __( 'Noon', 'radio-station' ) : 'Noon',
1121 13 => $admin ? '1 ' . $pm : '1 pm',
1122 14 => $admin ? '2 ' . $pm : '2 pm',
1123 15 => $admin ? '3 ' . $pm : '3 pm',
1124 16 => $admin ? '4 ' . $pm : '4 pm',
1125 17 => $admin ? '5 ' . $pm : '5 pm',
1126 18 => $admin ? '6 ' . $pm : '6 pm',
1127 19 => $admin ? '7 ' . $pm : '7 pm',
1128 20 => $admin ? '8 ' . $pm : '8 pm',
1129 21 => $admin ? '9 ' . $pm : '9 pm',
1130 22 => $admin ? '10 ' . $pm : '10 pm',
1131 23 => $admin ? '11 ' . $pm : '11 pm',
1132 ),
1133 'default' => '0',
1134 'helper' => $admin ? __( 'Schedule displays will start from this hour instead of midnight.', 'radio-station' ) : '',
1135 'tab' => 'pages',
1136 'section' => 'schedule',
1137 'pro' => true,
1138 ),
1139
1140 // === Show Pages ===
1141
1142 // --- Show Blocks Position ---
1143 'show_block_position' => array(
1144 'type' => 'select',
1145 'label' => $admin ? __( 'Info Blocks Position', 'radio-station' ) : '',
1146 'options' => array(
1147 'left' => $admin ? __( 'Float Left', 'radio-station' ) : '',
1148 'right' => $admin ? __( 'Float Right', 'radio-station' ) : '',
1149 'top' => $admin ? __( 'Float Top', 'radio-station' ) : '',
1150 ),
1151 'default' => 'left',
1152 'helper' => $admin ? __( 'Where to position Show info blocks relative to Show Page content.', 'radio-station' ) : '',
1153 'tab' => 'pages',
1154 'section' => 'show',
1155 ),
1156
1157 // ---- Show Section Layout ---
1158 'show_section_layout' => array(
1159 'type' => 'select',
1160 'label' => $admin ? __( 'Show Content Layout', 'radio-station' ) : '',
1161 'options' => array(
1162 'tabbed' => $admin ? __( 'Tabbed', 'radio-station' ) : '',
1163 'standard' => $admin ? __( 'Standard', 'radio-station' ) : '',
1164 ),
1165 'default' => 'tabbed',
1166 'helper' => $admin ? __( 'How to display extra sections below Show description. In content tabs or standard layout down the page.', 'radio-station' ) : '',
1167 'tab' => 'pages',
1168 'section' => 'show',
1169 ),
1170
1171 // ---- Show Player ---
1172 // 2.5.15: added show player selection
1173 'show_player' => array(
1174 'type' => 'select',
1175 'label' => $admin ? __( 'Latest Show Player', 'radio-station' ) : '',
1176 'options' => array(
1177 'radio_player' => $admin ? __( 'Radio Station Stream Player', 'radio-station' ) : '',
1178 'media_elements' => $admin ? __( 'MediaElements (WordPress)', 'radio-station' ) : '',
1179 ),
1180 'default' => 'media_elements',
1181 'helper' => $admin ? __( 'Which player to use on the Show pages for the latest show recording.', 'radio-station' ) : '',
1182 'tab' => 'pages',
1183 'section' => 'show',
1184 ),
1185
1186 // --- Show Player Theme ---
1187 // 2.5.15: added show player theme selection
1188 'show_player_theme' => array(
1189 'type' => 'select',
1190 'label' => $admin ? __( 'Show Player Theme', 'radio-station' ) : '',
1191 'default' => '',
1192 'options' => array(
1193 '' => $admin ? __( 'Player Default', 'radio-station' ) : '',
1194 'light' => $admin ? __( 'Light', 'radio-station' ) : '',
1195 'dark' => $admin ? __( 'Dark', 'radio-station' ) : '',
1196 ),
1197 'helper' => $admin ? __( 'Show Player Controls theme style (Radio Station Stream Player only,)', 'radio-station' ) : '',
1198 'tab' => 'pages',
1199 'section' => 'show',
1200 ),
1201
1202 // --- Phone for Shows ---
1203 // 2.3.3.6: added default to station phone option
1204 // 2.5.18: moved from station section
1205 'shows_phone' => array(
1206 'type' => 'checkbox',
1207 'default' => '',
1208 'value' => 'yes',
1209 'label' => $admin ? __( 'Show Phone Default', 'radio-station' ) : '',
1210 'helper' => $admin ? __( 'Display Station phone number on Shows where a Show phone number is not set.', 'radio-station' ) : '',
1211 'tab' => 'pages',
1212 'section' => 'show',
1213 ),
1214
1215 // --- Text for Shows ---
1216 // 2.5.18: add text number default to station text option
1217 'shows_text' => array(
1218 'type' => 'checkbox',
1219 'default' => '',
1220 'value' => 'yes',
1221 'label' => $admin ? __( 'Show Text Default', 'radio-station' ) : '',
1222 'helper' => $admin ? __( 'Display Station text number on Shows where a Show text number is not set.', 'radio-station' ) : '',
1223 'tab' => 'pages',
1224 'section' => 'show',
1225 ),
1226
1227 // --- Email for Shows ---
1228 // 2.3.3.8: added default to email address option
1229 // 2.5.18: moved from station section
1230 'shows_email' => array(
1231 'type' => 'checkbox',
1232 'default' => '',
1233 'value' => 'yes',
1234 'label' => $admin ? __( 'Show Email Display', 'radio-station' ) : '',
1235 'helper' => $admin ? __( 'Display Station email address on Shows where a Show email address is not set.', 'radio-station' ) : '',
1236 'tab' => 'pages',
1237 'section' => 'show',
1238 ),
1239
1240 // TODO: Show RSS / Calendar Links ?
1241
1242 // --- Latest Show Posts ---
1243 // 'show_latest_posts' => array(
1244 // 'type' => 'numeric',
1245 // 'label' => $admin ? __( 'Latest Show Posts', 'radio-station' ) : '',
1246 // 'step' => 1,
1247 // 'min' => 0,
1248 // 'max' => 100,
1249 // 'default' => 3,
1250 // 'helper' => $admin ? __( 'Number of Latest Blog Posts to display above Show Page tabs.', 'radio-station' ) : '',
1251 // 'tab' => 'pages',
1252 // 'section' => 'show',
1253 // ),
1254
1255 // --- Show Posts Per Page ---
1256 'show_posts_per_page' => array(
1257 'type' => 'numeric',
1258 'label' => $admin ? __( 'Posts per Page', 'radio-station' ) : '',
1259 'step' => 1,
1260 'min' => 0,
1261 'max' => 1000,
1262 'default' => 10,
1263 'helper' => $admin ? __( 'Linked Show Posts per page on the Show Page tab/display.', 'radio-station' ) : '',
1264 'tab' => 'pages',
1265 'section' => 'show',
1266 ),
1267
1268 // --- Show Playlists per Page ---
1269 'show_playlists_per_page' => array(
1270 'type' => 'numeric',
1271 'step' => 1,
1272 'min' => 0,
1273 'max' => 1000,
1274 'label' => $admin ? __( 'Playlists per Page', 'radio-station' ) : '',
1275 'default' => 10,
1276 'helper' => $admin ? __( 'Playlists per page on the Show Page tab/display', 'radio-station' ) : '',
1277 'tab' => 'pages',
1278 'section' => 'show',
1279 ),
1280
1281 // --- [Pro] Show Episodes per Page ---
1282 'show_episodes_per_page' => array(
1283 'type' => 'number',
1284 'label' => $admin ? __( 'Episodes per Page', 'radio-station' ) : '',
1285 'step' => 1,
1286 'min' => 1,
1287 'max' => 1000,
1288 'default' => 10,
1289 'helper' => $admin ? __( 'Number of Show Episodes per page on the Show page tab/display.', 'radio-station' ) : '',
1290 'tab' => 'pages',
1291 'section' => 'show',
1292 'pro' => true,
1293 ),
1294
1295 // --- [Pro] Combined Team Tab ---
1296 // 2.4.0.7: added combined team grid option
1297 // 2.5.7: updated to add option to remove team display
1298 'combined_team_tab' => array(
1299 'type' => 'select',
1300 'label' => $admin ? __( 'Team Tab Display', 'radio-station' ) : '',
1301 'default' => 'yes',
1302 'options' => array(
1303 'off' => $admin ? __( 'No Team Display', 'radio-station' ) : '',
1304 '' => $admin ? __( 'Separate Role Tabs', 'radio-station' ) : '',
1305 'yes' => $admin ? __( 'Combined Team List', 'radio-station' ) : '',
1306 // 'grid' => $admin ? __( 'Combined Team Grid', 'radio-station' ) : '',
1307 ),
1308 'helper' => $admin ? __( 'How to display Show team members (eg. hosts, producers) on a Show page.', 'radio-station' ) : '',
1309 'tab' => 'pages',
1310 'section' => 'show',
1311 'pro' => true,
1312 ),
1313
1314 // --- Show Header Image ---
1315 // 2.3.2: added plural to option label
1316 'show_header_image' => array(
1317 'type' => 'checkbox',
1318 'label' => $admin ? __( 'Content Header Images', 'radio-station' ) : '',
1319 'value' => 'yes',
1320 'default' => '',
1321 'helper' => $admin ? __( 'If your theme template does not display the Featured Image, enable this and use the Content Header Image box on the Show edit screen instead.', 'radio-station' ) : '',
1322 'tab' => 'pages',
1323 'section' => 'show',
1324 ),
1325
1326 // === Profile Pages ===
1327 // 2.3.3.9: added proflie page settings
1328
1329 // --- [Pro/Plus] Profile Blocks Position ---
1330 'profile_block_position' => array(
1331 'type' => 'select',
1332 'label' => $admin ? __( 'Info Blocks Position', 'radio-station' ) : '',
1333 'options' => array(
1334 'left' => $admin ? __( 'Float Left', 'radio-station' ) : '',
1335 'right' => $admin ? __( 'Float Right', 'radio-station' ) : '',
1336 'top' => $admin ? __( 'Float Top', 'radio-station' ) : '',
1337 ),
1338 'default' => 'left',
1339 'helper' => $admin ? __( 'Where to position Profile info blocks relative to Profile Page content.', 'radio-station' ) : '',
1340 'tab' => 'pages',
1341 'section' => 'profile',
1342 'pro' => true,
1343 ),
1344
1345 // ---- [Pro/Plus] Profile Section Layout ---
1346 'profile_section_layout' => array(
1347 'type' => 'select',
1348 'label' => $admin ? __( 'Profile Content Layout', 'radio-station' ) : '',
1349 'options' => array(
1350 'tabbed' => $admin ? __( 'Tabbed', 'radio-station' ) : '',
1351 'standard' => $admin ? __( 'Standard', 'radio-station' ) : '',
1352 ),
1353 'default' => 'tabbed',
1354 'helper' => $admin ? __( 'How to display extra sections below Profile description. In content tabs or standard layout down the page.', 'radio-station' ) : '',
1355 'tab' => 'pages',
1356 'section' => 'profile',
1357 'pro' => true,
1358 ),
1359
1360 // === Episode Pages ===
1361 // 2.3.3.9: added episode page settings
1362
1363 // --- [Pro] Episode Blocks Position ---
1364 'episode_block_position' => array(
1365 'type' => 'select',
1366 'label' => $admin ? __( 'Info Blocks Position', 'radio-station' ) : '',
1367 'options' => array(
1368 'left' => $admin ? __( 'Float Left', 'radio-station' ) : '',
1369 'right' => $admin ? __( 'Float Right', 'radio-station' ) : '',
1370 'top' => $admin ? __( 'Float Top', 'radio-station' ) : '',
1371 ),
1372 'default' => 'left',
1373 'helper' => $admin ? __( 'Where to position Episode info blocks relative to Episode Page content.', 'radio-station' ) : '',
1374 'tab' => 'pages',
1375 'section' => 'episode',
1376 'pro' => true,
1377 ),
1378
1379 // ---- [Pro] Episode Section Layout ---
1380 'episode_section_layout' => array(
1381 'type' => 'select',
1382 'label' => $admin ? __( 'Episode Content Layout', 'radio-station' ) : '',
1383 'options' => array(
1384 'tabbed' => $admin ? __( 'Tabbed', 'radio-station' ) : '',
1385 'standard' => $admin ? __( 'Standard', 'radio-station' ) : '',
1386 ),
1387 'default' => 'tabbed',
1388 'helper' => $admin ? __( 'How to display extra sections below Episode description. In content tabs or standard layout down the page.', 'radio-station' ) : '',
1389 'tab' => 'pages',
1390 'section' => 'episode',
1391 'pro' => true,
1392 ),
1393
1394 // ---- [Pro] Episode Player ---
1395 // 2.5.15: added episode player selection
1396 'episode_player' => array(
1397 'type' => 'select',
1398 'label' => $admin ? __( 'Episode Player', 'radio-station' ) : '',
1399 'options' => array(
1400 'radio_player' => $admin ? __( 'Radio Station Stream Player', 'radio-station' ) : '',
1401 'media_elements' => $admin ? __( 'MediaElements (WordPress)', 'radio-station' ) : '',
1402 ),
1403 'default' => 'radio_player',
1404 'helper' => $admin ? __( 'Which player to use on the Episode pages for the Episode recording.', 'radio-station' ) : '',
1405 'tab' => 'pages',
1406 'section' => 'episode',
1407 'pro' => true,
1408 ),
1409
1410 // --- [Pro] Episode Player Theme ---
1411 // 2.5.15: added episode player theme selection
1412 'episode_player_theme' => array(
1413 'type' => 'select',
1414 'label' => $admin ? __( 'Episode Player Theme', 'radio-station' ) : '',
1415 'default' => '',
1416 'options' => array(
1417 '' => $admin ? __( 'Player Default', 'radio-station' ) : '',
1418 'light' => $admin ? __( 'Light', 'radio-station' ) : '',
1419 'dark' => $admin ? __( 'Dark', 'radio-station' ) : '',
1420 ),
1421 'helper' => $admin ? __( 'Episode Player Controls theme style (Radio Station Stream Player only,)', 'radio-station' ) : '',
1422 'tab' => 'pages',
1423 'section' => 'episode',
1424 'pro' => true,
1425 ),
1426
1427 // --- [Pro] Use Latest Episode ---
1428 'episode_use_latest' => array(
1429 'type' => 'checkbox',
1430 'label' => $admin ? __( 'Use Latest Episode', 'radio-station' ) : '',
1431 'value' => 'yes',
1432 'default' => 'yes',
1433 'helper' => $admin ? __( 'Automatically use the latest Episode URL for the player embed on the Show page.', 'radio-station' ) : '',
1434 'tab' => 'pages',
1435 'section' => 'episode',
1436 'pro' => true,
1437 ),
1438
1439 // ==== Post Type Archives ===
1440 // 2.4.0.6: move archives to separate tab
1441 // 2.4.0.6: added post type archives section
1442
1443 // --- Shows Archive Page ---
1444 'show_archive_page' => array(
1445 'label' => $admin ? __( 'Shows Archive Page', 'radio-station' ) : '',
1446 'type' => 'select',
1447 'options' => 'PAGEID',
1448 'default' => '',
1449 'helper' => $admin ? __( 'Select the Page for displaying the Show archive list.', 'radio-station' ) : '',
1450 'tab' => 'archives',
1451 'section' => 'posttypes',
1452 ),
1453
1454 // --- Automatic Display ---
1455 'show_archive_auto' => array(
1456 'label' => $admin ? __( 'Automatic Display', 'radio-station' ) : '',
1457 'type' => 'checkbox',
1458 'value' => 'yes',
1459 'default' => 'yes',
1460 'helper' => $admin ? __( 'Replaces selected page content with default Show Archive. Alternatively customize display using the shortcode:', 'radio-station' ) . ' [shows-archive]' : '',
1461 'tab' => 'archives',
1462 'section' => 'posttypes',
1463 ),
1464
1465 // ? --- Redirect Shows Archive --- ?
1466 // 'show_archive_override' => array(
1467 // 'label' => $admin ? __( 'Redirect Shows Archive', 'radio-station' ) : '',
1468 // 'type' => 'checkbox',
1469 // 'value' => 'yes',
1470 // 'default' => '',
1471 // 'helper' => $admin ? __( 'Redirect Custom Post Type Archive for Shows to Shows Archive Page.', 'radio-station' ) : '',
1472 // 'tab' => 'archives',
1473 // 'section' => 'posttypes',
1474 // ),
1475
1476 // --- Overrides Archive Page ---
1477 'override_archive_page' => array(
1478 'label' => $admin ? __( 'Overrides Archive Page', 'radio-station' ) : '',
1479 'type' => 'select',
1480 'options' => 'PAGEID',
1481 'default' => '',
1482 'helper' => $admin ? __( 'Select the Page for displaying the Override archive list.', 'radio-station' ) : '',
1483 'tab' => 'archives',
1484 'section' => 'posttypes',
1485 ),
1486
1487 // --- Automatic Display ---
1488 'override_archive_auto' => array(
1489 'label' => $admin ? __( 'Automatic Display', 'radio-station' ) : '',
1490 'type' => 'checkbox',
1491 'value' => 'yes',
1492 'default' => 'yes',
1493 'helper' => $admin ? __( 'Replaces selected page content with default Override Archive. Alternatively customize display using the shortcode:', 'radio-station' ) . ' [overrides-archive]' : '',
1494 'tab' => 'archives',
1495 'section' => 'posttypes',
1496 ),
1497
1498 // ? --- Redirect Overrides Archive --- ?
1499 // 'override_archive_override' => array(
1500 // 'label' => $admin ? __( 'Redirect Overrides Archive', 'radio-station' ) : '',
1501 // 'type' => 'checkbox',
1502 // 'value' => 'yes',
1503 // 'default' => '',
1504 // 'helper' => $admin ? __( 'Redirect Custom Post Type Archive for Overrides to Overrides Archive Page.', 'radio-station' ) : '',
1505 // 'tab' => 'archives',
1506 // 'section' => 'posttypes',
1507 // ),
1508
1509 // --- Playlists Archive Page ---
1510 'playlist_archive_page' => array(
1511 'label' => $admin ? __( 'Playlists Archive Page', 'radio-station' ) : '',
1512 'type' => 'select',
1513 'options' => 'PAGEID',
1514 'default' => '',
1515 'helper' => $admin ? __( 'Select the Page for displaying the Playlist archive list.', 'radio-station' ) : '',
1516 'tab' => 'archives',
1517 'section' => 'posttypes',
1518 ),
1519
1520 // --- Automatic Display ---
1521 'playlist_archive_auto' => array(
1522 'label' => $admin ? __( 'Automatic Display', 'radio-station' ) : '',
1523 'type' => 'checkbox',
1524 'value' => 'yes',
1525 'default' => 'yes',
1526 'helper' => $admin ? __( 'Replaces selected page content with default Playlist Archive. Alternatively customize display using the shortcode:', 'radio-station' ) . ' [playlists-archive]' : '',
1527 'tab' => 'archives',
1528 'section' => 'posttypes',
1529 ),
1530
1531 // ? --- Redirect Playlists Archive --- ?
1532 // 'playlist_archive_override' => array(
1533 // 'label' => $admin ? __( 'Redirect Playlists Archive', 'radio-station' ) : '',
1534 // 'type' => 'checkbox',
1535 // 'value' => 'yes',
1536 // 'default' => '',
1537 // 'helper' => $admin ? __( 'Redirect Custom Post Type Archive for Playlists to Playlist Archive Page.', 'radio-station' ) : '',
1538 // 'tab' => 'archives',
1539 // 'section' => 'posttypes',
1540 // ),
1541
1542 // --- [Pro] Episodes Archive Page ---
1543 // 2.5.8: added episodes archive page option
1544 'episode_archive_page' => array(
1545 'label' => $admin ? __( 'Episodes Archive Page', 'radio-station' ) : '',
1546 'type' => 'select',
1547 'options' => 'PAGEID',
1548 'default' => '',
1549 'helper' => $admin ? __( 'Select the Page for displaying the Episode archive list.', 'radio-station' ) : '',
1550 'tab' => 'archives',
1551 'section' => 'posttypes',
1552 'pro' => true,
1553 ),
1554
1555 // --- [Pro] Automatic Display ---
1556 // 2.5.8: added episodes archive automatic display option
1557 'episode_archive_auto' => array(
1558 'label' => $admin ? __( 'Automatic Display', 'radio-station' ) : '',
1559 'type' => 'checkbox',
1560 'value' => 'yes',
1561 'default' => 'yes',
1562 'helper' => $admin ? __( 'Replaces selected page content with default Episode Archive. Alternatively customize display using the shortcode:', 'radio-station' ) . ' [episodes-archive]' : '',
1563 'tab' => 'archives',
1564 'section' => 'posttypes',
1565 'pro' => true,
1566 ),
1567
1568 // --- [Pro] Team Archive Page ---
1569 // 2.4.0.6: added option for team archive page
1570 'team_archive_page' => array(
1571 'label' => $admin ? __( 'Team Archive Page', 'radio-station' ) : '',
1572 'type' => 'select',
1573 'options' => 'PAGEID',
1574 'default' => '',
1575 'helper' => $admin ? __( 'Select the Page for displaying the Team archive list.', 'radio-station' ) : '',
1576 'tab' => 'archives',
1577 'section' => 'posttypes',
1578 'pro' => true,
1579 ),
1580
1581 // --- [Pro] Automatic Display ---
1582 // 2.4.0.6: added option for team archive page
1583 'team_archive_auto' => array(
1584 'label' => $admin ? __( 'Automatic Display', 'radio-station' ) : '',
1585 'type' => 'select',
1586 'options' => array(
1587 '' => $admin ? __( 'Off', 'radio-station' ) : '',
1588 'yes' => $admin ? __( 'List', 'radio-station' ) : '',
1589 'grid' => $admin ? __( 'Grid', 'radio-station' ) : '',
1590 ),
1591 'value' => 'yes',
1592 'default' => 'yes',
1593 'helper' => $admin ? __( 'Replaces selected page content with default Team Archive. Alternatively customize display using the shortcode:', 'radio-station' ) . ' [teams-archive]' : '',
1594 'tab' => 'archives',
1595 'section' => 'posttypes',
1596 'pro' => true,
1597 ),
1598
1599 // === Taxonomy Archives ===
1600 // 2.4.0.6: added taxonomy archives section
1601
1602 // --- Genres Archive Page ---
1603 'genre_archive_page' => array(
1604 'label' => $admin ? __( 'Genres Archive Page', 'radio-station' ) : '',
1605 'type' => 'select',
1606 'options' => 'PAGEID',
1607 'default' => '',
1608 'helper' => $admin ? __( 'Select the Page for displaying the Genre archive list.', 'radio-station' ) : '',
1609 'tab' => 'archives',
1610 'section' => 'taxonomies',
1611 ),
1612
1613 // --- Automatic Display ---
1614 'genre_archive_auto' => array(
1615 'label' => $admin ? __( 'Automatic Display', 'radio-station' ) : '',
1616 'type' => 'checkbox',
1617 'value' => 'yes',
1618 'default' => 'yes',
1619 'helper' => $admin ? __( 'Replaces selected page content with default Genre Archive. Alternatively customize display using the shortcode:', 'radio-station' ) . ' [genres-archive]' : '',
1620 'tab' => 'archives',
1621 'section' => 'taxonomies',
1622 ),
1623
1624 // ? --- Redirect Genres Archives --- ?
1625 // 'genre_archive_override' => array(
1626 // 'label' => $admin ? __( 'Redirect Genres Archive', 'radio-station' ) : '',
1627 // 'type' => 'checkbox',
1628 // 'value' => 'yes',
1629 // 'default' => '',
1630 // 'helper' => $admin ? __( 'Redirect Taxonomy Archive for Genres to Genres Archive Page.', 'radio-station' ) : '',
1631 // 'tab' => 'archives',
1632 // 'section' => 'taxonomies',
1633 // ),
1634
1635 // --- Languages Archive Page ---
1636 // 2.3.3.9: added language archive page
1637 'language_archive_page' => array(
1638 'label' => $admin ? __( 'Languages Archive Page', 'radio-station' ) : '',
1639 'type' => 'select',
1640 'options' => 'PAGEID',
1641 'default' => '',
1642 'helper' => $admin ? __( 'Select the Page for displaying the Language archive list.', 'radio-station' ) : '',
1643 'tab' => 'archives',
1644 'section' => 'taxonomies',
1645 ),
1646
1647 // --- Automatic Display ---
1648 // 2.3.3.9: added language archive automatic page
1649 'language_archive_auto' => array(
1650 'label' => $admin ? __( 'Automatic Display', 'radio-station' ) : '',
1651 'type' => 'checkbox',
1652 'value' => 'yes',
1653 'default' => 'yes',
1654 'helper' => $admin ? __( 'Replaces selected page content with default Language Archive. Alternatively customize display using the shortcode:', 'radio-station' ) . ' [languages-archive]' : '',
1655 'tab' => 'archives',
1656 'section' => 'taxonomies',
1657 ),
1658
1659 // ? --- Redirect Languages Archives --- ?
1660 // 'language_archive_override' => array(
1661 // 'label' => $admin ? __( 'Redirect Genres Archive', 'radio-station' ) : '',
1662 // 'type' => 'checkbox',
1663 // 'value' => 'yes',
1664 // 'default' => '',
1665 // 'helper' => $admin ? __( 'Redirect Taxonomy Archive for Languages to Languages Archive Page.', 'radio-station' ) : '',
1666 // 'tab' => 'archives',
1667 // 'section' => 'taxonomies',
1668 // ),
1669
1670 // TODO: guest archive pages
1671
1672
1673 // === Single Templates ===
1674
1675 // --- Templates Change Note ---
1676 'templates_change_note' => array(
1677 'type' => 'note',
1678 'label' => $admin ? __( 'Templates Change Note', 'radio-station' ) : '',
1679 'helper' => $admin ? __( 'Since 2.3.0, the way that Templates are implemented has changed.', 'radio-station' )
1680 . ' ' . __( 'See the Documentation for more information:', 'radio-station' )
1681 . ' <a href="' . RADIO_STATION_DOCS_URL . 'display/#page-templates" target="_blank">' . __( 'Templates Documentation', 'radio-station' ) . '</a>' : '',
1682 'tab' => 'pages',
1683 'section' => 'single',
1684 ),
1685
1686 // --- Show Template ---
1687 'show_template' => array(
1688 'label' => $admin ? __( 'Show Template', 'radio-station' ) : '',
1689 'type' => 'select',
1690 'options' => array(
1691 'page' => $admin ? __( 'Theme Page Template (page.php)', 'radio-station' ) : '',
1692 'post' => $admin ? __( 'Theme Post Template (single.php)', 'radio-station' ) : '',
1693 'singular' => $admin ? __( 'Theme Singular Template (singular.php)', 'radio-station' ) : '',
1694 'legacy' => $admin ? __( 'Legacy Plugin Template', 'radio-station' ) : '',
1695 ),
1696 'default' => 'page',
1697 'helper' => $admin ? __( 'Which template to use for displaying Show content.', 'radio-station' ) : '',
1698 'tab' => 'pages',
1699 'section' => 'single',
1700 ),
1701
1702 // --- Combined Template Method ---
1703 'show_template_combined' => array(
1704 'label' => $admin ? __( 'Combined Method', 'radio-station' ) : '',
1705 'type' => 'checkbox',
1706 'value' => 'yes',
1707 'default' => '',
1708 'helper' => $admin ? __( 'Advanced usage. Use both a custom template AND content filtering for a Show. (Not compatible with Legacy templates.)', 'radio-station' ) : '',
1709 'tab' => 'pages',
1710 'section' => 'single',
1711 ),
1712
1713 // --- Playlist Template ---
1714 // 2.3.3.8: added missing singular.php option to match show_template
1715 'playlist_template' => array(
1716 'label' => $admin ? __( 'Playlist Template', 'radio-station' ) : '',
1717 'type' => 'select',
1718 'options' => array(
1719 'page' => $admin ? __( 'Theme Page Template (page.php)', 'radio-station' ) : '',
1720 'post' => $admin ? __( 'Theme Post Template (single.php)', 'radio-station' ) : '',
1721 'singular' => $admin ? __( 'Theme Singular Template (singular.php)', 'radio-station' ) : '',
1722 'legacy' => $admin ? __( 'Legacy Plugin Template', 'radio-station' ) : '',
1723 ),
1724 'default' => 'page',
1725 'helper' => $admin ? __( 'Which template to use for displaying Playlist content.', 'radio-station' ) : '',
1726 'tab' => 'pages',
1727 'section' => 'single',
1728 ),
1729
1730 // --- Combined Template Method ---
1731 'playlist_template_combined' => array(
1732 'label' => $admin ? __( 'Combined Method', 'radio-station' ) : '',
1733 'type' => 'checkbox',
1734 'value' => 'yes',
1735 'default' => '',
1736 'helper' => $admin ? __( 'Advanced usage. Use both a custom template AND content filtering for a Playlist. (Not compatible with Legacy templates.)', 'radio-station' ) : '',
1737 'tab' => 'pages',
1738 'section' => 'single',
1739 ),
1740
1741 // === Widgets ===
1742
1743 // --- AJAX Loading ---
1744 // 2.3.3: fix to value of value key
1745 'ajax_widgets' => array(
1746 'type' => 'checkbox',
1747 'label' => $admin ? __( 'AJAX Load Widgets?', 'radio-station' ) : '',
1748 'default' => 'yes',
1749 'value' => 'yes',
1750 'helper' => $admin ? __( 'Defaults plugin widgets to AJAX loading. Can also be set on individual widgets.', 'radio-station' ) : '',
1751 'tab' => 'widgets',
1752 'section' => 'loading',
1753 ),
1754
1755 // --- [Pro/Plus] Dynamic Reloading ---
1756 'dynamic_reload' => array(
1757 'type' => 'checkbox',
1758 'label' => $admin ? __( 'Dynamic Reloading?', 'radio-station' ) : '',
1759 'default' => 'yes',
1760 'value' => 'yes',
1761 'helper' => $admin ? __( 'Automatically reload all plugin widgets on change of current Show. Can also be set on individual widgets.', 'radio-station' ) : '',
1762 'tab' => 'widgets',
1763 'section' => 'loading',
1764 'pro' => true,
1765 ),
1766
1767 // --- Convert User Show Times ---
1768 // 2.5.18: fix to remove incorrect pro flag on free feature
1769 'convert_show_times' => array(
1770 'type' => 'checkbox',
1771 'label' => $admin ? __( 'Convert Show Times', 'radio-station' ) : '',
1772 'default' => 'yes',
1773 'value' => 'yes',
1774 'helper' => $admin ? __( 'Automatically display Show times converted into the visitor timezone, based on their browser setting.', 'radio-station' ) : '',
1775 'tab' => 'widgets',
1776 'section' => 'loading',
1777 ),
1778
1779 // --- [Pro/Plus] Timezone Switching ---
1780 'timezone_switching' => array(
1781 'type' => 'checkbox',
1782 'label' => $admin ? __( 'User Timezone Switching', 'radio-station' ) : '',
1783 'default' => 'yes',
1784 'value' => 'yes',
1785 'helper' => $admin ? __( 'Allow visitors to select their Timezone manually for Show time conversions.', 'radio-station' ) : '',
1786 'tab' => 'widgets',
1787 'section' => 'loading',
1788 'pro' => true,
1789 ),
1790
1791 // === Roles / Capabilities / Permissions ===
1792 // 2.3.0: added new capability and role options
1793
1794 // --- Show Editing Permission Note ---
1795 // 2.4.0.3: added role to show assignment note
1796 'permissions_show_role_note' => array(
1797 'type' => 'note',
1798 'label' => $admin ? __( 'Show Editing Permissions', 'radio-station' ) : '',
1799 'helper' => $admin ? __( 'By default, only Hosts and Producers that are assigned to a Show can edit that Show.', 'radio-station' ) . ' ' . __( 'This means an Administrator or Show Editor must assign these users to the Show first.', 'radio-station' ) : '',
1800 'tab' => 'roles',
1801 'section' => 'permissions',
1802 ),
1803
1804 // --- Playlist Editing Role Note ---
1805 // 2.4.0.3: added role to playlist assignment note
1806 'permissions_playlist_role_note' => array(
1807 'type' => 'note',
1808 'label' => $admin ? __( 'Playlist Permissions', 'radio-station' ) : '',
1809 'helper' => $admin ? __( 'Any user with a Host or Producer role can create Playlists.', 'radio-station' ) : '',
1810 'tab' => 'roles',
1811 'section' => 'permissions',
1812 ),
1813
1814 // --- Show Editor Role Note ---
1815 'show_editor_role_note' => array(
1816 'type' => 'note',
1817 'label' => $admin ? __( 'Show Editor Role', 'radio-station' ) : '',
1818 'helper' => $admin ? __( 'Since 2.3.0, a new Show Editor role has been added with Publish and Edit capabilities for all Radio Station Post Types.', 'radio-station' ) . ' ' . __( 'You can assign this Role to any user to give them full Station Schedule updating permissions.', 'radio-station' ) . ' ' . __( 'This is so a manager can edit the schedule without requiring full site administration role.', 'radio-station' ) : '',
1819 'tab' => 'roles',
1820 'section' => 'permissions',
1821 ),
1822
1823 // --- Author Role Capabilities ---
1824 'add_author_capabilities' => array(
1825 'type' => 'checkbox',
1826 'label' => $admin ? __( 'Add to Author Capabilities', 'radio-station' ) : '',
1827 'default' => 'yes',
1828 'value' => 'yes',
1829 'helper' => $admin ? __( 'Allow users with WordPress Author role to publish and edit their own Shows and Playlists.', 'radio-station' ) : '',
1830 'tab' => 'roles',
1831 'section' => 'permissions',
1832 ),
1833
1834 // --- Editor Role Capabilities ---
1835 'add_editor_capabilities' => array(
1836 'type' => 'checkbox',
1837 'label' => $admin ? __( 'Add to Editor Capabilities', 'radio-station' ) : '',
1838 'default' => 'yes',
1839 'value' => 'yes',
1840 'helper' => $admin ? __( 'Allow users with WordPress Editor role to edit all Radio Station post types.', 'radio-station' ) : '',
1841 'tab' => 'roles',
1842 'section' => 'permissions',
1843 ),
1844
1845 // ? --- Disallow Shift Changes --- ?
1846 // 'disallow_shift_changes' => array(
1847 // 'type' => 'checkbox',
1848 // 'label' => $admin ? __( 'Disallow Shift Changes', 'radio-station' ) : '',
1849 // 'default' => array(),
1850 // 'options' => array(
1851 // 'authors' => $admin ? __( 'WordPress Authors', 'radio-station' ) : '',
1852 // 'editors' => $admin ? __( 'WorddPress Editors', 'radio-station' ) : '',
1853 // 'hosts' => $admin ? __( 'Assigned DJs / Hosts', 'radio-station' ) : '',
1854 // 'producers' => $admin ? __( 'Assigned Producers', 'radio-station' ) : '',
1855 // ),
1856 // 'helper' => $admin ? __( 'Prevents users of these Roles changing Show Shift times.', 'radio-station' ) : '',
1857 // 'tab' => 'roles',
1858 // 'section' => 'permissions',
1859 // 'pro' => true,
1860 // ),
1861
1862 // === Tabs and Sections ===
1863
1864 // --- Tab Labels ---
1865 // 2.3.2: add widget options tab
1866 // 2.3.3.8: added player options tab
1867 // 2.3.3.8: move templates section onto pages tab
1868 // 2.4.0.6: added separate archives tab
1869 // 2.7.0: add subscribe and app tabs
1870 'tabs' => array(
1871 'general' => $admin ? __( 'General', 'radio-station' ) : '',
1872 'player' => $admin ? __( 'Player', 'radio-station' ) : '',
1873 'subscribe' => $admin ? __( 'Subscribe', 'radio-station' ) : '',
1874 'pages' => $admin ? __( 'Pages', 'radio-station' ) : '',
1875 'archives' => $admin ? __( 'Archives', 'radio-station' ) : '',
1876 // 'templates' => $admin ? __( 'Templates', 'radio-station' ) : '',
1877 'widgets' => $admin ? __( 'Widgets', 'radio-station' ) : '',
1878 'roles' => $admin ? __( 'Roles', 'radio-station' ) : '',
1879 'app' => $admin ? __( 'App', 'radio-station' ) : '',
1880 ),
1881
1882 // --- Section Labels ---
1883 // 2.3.2: add widget loading section
1884 // 2.3.3.9: added profile pages section
1885 // 2.4.0.6: added performance section
1886 // 2.4.0.6: added posttypes and taxonomies archive sections
1887 // 2.7.0: add subscribe sections
1888 'sections' => array(
1889 // --- general ---
1890 'stream' => $admin ? __( 'Stream', 'radio-station' ) : '',
1891 'broadcast' => $admin ? __( 'Broadcast', 'radio-station' ) : '',
1892 'station' => $admin ? __( 'Station', 'radio-station' ) : '',
1893 'feeds' => $admin ? __( 'Feeds', 'radio-station' ) : '',
1894 'performance' => $admin ? __( 'Performance', 'radio-station' ) : '',
1895 // --- player ---
1896 'basic' => $admin ? __( 'Basic Defaults', 'radio-station' ) : '',
1897 'advanced' => $admin ? __( 'Advanced Defaults', 'radio-station' ) : '',
1898 'colors' => $admin ? __( 'Player Colors', 'radio-station' ) : '',
1899 'bar' => $admin ? __( 'Sitewide Bar Player', 'radio-station' ) : '',
1900 // --- pages ---
1901 'schedule' => $admin ? __( 'Schedule Page', 'radio-station' ) : '',
1902 'single' => $admin ? __( 'Single Templates', 'radio-station' ) : '',
1903 // 'archive' => $admin ? __( 'Archive Templates', 'radio-station' ) : '',
1904 'show' => $admin ? __( 'Show Pages', 'radio-station' ) : '',
1905 'profile' => $admin ? __( 'Profile Pages', 'radio-station' ) : '',
1906 'episode' => $admin ? __( 'Episode Pages', 'radio-station' ) : '',
1907 // --- archives ---
1908 'archives' => $admin ? __( 'Archives', 'radio-station' ) : '',
1909 'posttypes' => $admin ? __( 'Post Types', 'radio-station' ) : '',
1910 'taxonomies' => $admin ? __( 'Taxonomies', 'radio-station' ) : '',
1911 // --- widgets ---
1912 'loading' => $admin ? __( 'Widget Loading', 'radio-station' ) : '',
1913 // --- roles ---
1914 'permissions' => $admin ? __( 'Permissions', 'radio-station' ) : '',
1915 ),
1916 );
1917
1918 return $options;
1919 }
1920
1921