PluginProbe
StreamCast – bring live radio to your site with a sleek player / 2.2.5
StreamCast – bring live radio to your site with a sleek player v2.2.5
2.4.5 2.4.4 trunk 1.0 1.1 2.0.0 2.1.10 2.1.2 2.1.4 2.1.5 2.1.8 2.2.1 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 All 29 releases
streamcast / admin / inc / metabox-free.php

metabox-free.php in StreamCast – bring live radio to your site with a sleek player 2.2.5, at admin/inc/metabox-free.php

729 lines 30.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // Silence is golden.
2 // Control core classes for avoid errors
3 if (class_exists('CSF')) {
4
5 add_action('admin_footer', function () {
6 ?>
7 <style>
8 .bplugins-meta-readonly {
9 /* pointer-events: none; */
10 opacity: 0.6;
11 }
12
13 .csf-field.bplugins-meta-readonly:hover::after {
14 display: block;
15 }
16
17 .csf-field.bplugins-meta-readonly::before {
18 display: block;
19 width: 100%;
20 height: 100%;
21 content: "";
22 position: absolute;
23 z-index: 999;
24 overflow: hidden;
25 top: 0;
26 left: 0;
27 }
28
29 .csf-field.bplugins-meta-readonly::after {
30 display: none;
31 content: "The option is available in the pro version only";
32 position: absolute;
33 top: 50%;
34 left: 50%;
35 transform: translate(-50%, -50%);
36 z-index: 9999999;
37 font-size: 22px;
38 background: #673ab7;
39 color: #fff;
40 padding: 10px 13px;
41 border-radius: 3px;
42 }
43 </style>
44 <?php
45 });
46
47 //
48 // Set a unique slug-like ID
49 $prefix = 'sc_';
50
51 // Create a metabox
52 CSF::createMetabox($prefix, array(
53 'title' => 'Radio Player Configuration',
54 'post_type' => 'streamcast',
55 'data_type' => 'unserialize',
56 'context' => 'normal', // The context within the screen where the boxes should display. `normal`, `side`, `advanced`
57 ));
58
59 //
60 // Create a section
61 CSF::createSection($prefix, array(
62 'title' => 'Required fields are marked with an * (asterisk)',
63 'fields' => array(
64 array(
65 'id' => 'opt-radio',
66 'type' => 'radio',
67 'title' => 'Radio Player Type *',
68 'desc' => esc_html__('You must choose radio player type first to get related settings fields.', 'streamcast'),
69 'options' => array(
70 'minimal' => 'Minimal',
71 'standard' => 'Standard',
72 'advanced' => 'Advanced',
73 'ultimate' => 'Ultimate',
74 'echoStream' => 'EchoStream',
75 'auroraPlay' => 'AuroraPlay',
76 "wooden" => "Wooden"
77 ),
78 'default' => 'minimal',
79 'inline' => true,
80 ),
81
82
83 array(
84 'id' => 'stream_url',
85 'type' => 'text',
86 'dependency' => array('opt-radio|opt-radio|opt-radio|opt-radio', '!=|!=|!=|!=', 'ultimate|echoStream|auroraPlay|wooden'),
87 'title' => esc_html__('Stream URL*', 'streamcast'),
88 'button_title' => esc_html__('Add or Upload File', 'streamcast'),
89 'remove_title' => esc_html__('Remove Mp3', 'streamcast'),
90 'default' => 'https://media-ssl.musicradio.com/HeartLondon'
91 ),
92 array(
93 'id' => 'stream_url_echoXaurora',
94 'type' => 'text',
95 'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay,wooden'),
96 'title' => esc_html__('Stream URL', 'streamcast'),
97 'desc' => 'Enter a stream url. <br/><i>Important</i><li>If your site is secured ( https://) then the stream url must be secure (https://)</li> ',
98 'button_title' => esc_html__('Select a .pls file', 'streamcast'),
99 'remove_title' => esc_html__('Remove pls', 'streamcast'),
100 'default' => "https://media-ssl.musicradio.com/HeartLondon"
101 ),
102
103
104 array(
105 'id' => 'station_name',
106 'type' => 'text',
107 'dependency' => array('opt-radio|opt-radio|opt-radio|opt-radio', '!=|!=|!=|!=', 'ultimate|echoStream|auroraPlay|wooden'),
108 'default' => 'Station Name',
109 'title' => esc_html__('Station Name*', 'streamcast'),
110 ),
111
112 array(
113 'id' => 'station_name_echoXauroraXwooden',
114 'type' => 'text',
115 'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay,wooden'),
116 'title' => esc_html__('Station Name*', 'streamcast'),
117 'default' => 'Hello London',
118 ),
119 array(
120 'id' => 'fetch_name_from_url',
121 'type' => 'switcher',
122 'class' => 'bplugins-meta-readonly',
123 'desc' => "If station name can't access from URL then will use the given station name",
124 'dependency' => array('opt-radio|opt-radio', '!=|!=', 'minimal|ultimate'),
125 'title' => esc_html__('Fetch Name From URL', 'streamcast'),
126 'default' => false
127 ),
128 array(
129 'id' => 'welcome_msgs',
130 'type' => 'text',
131 'dependency' => array('opt-radio|opt-radio|opt-radio|opt-radio', '!=|!=|!=|!=', 'ultimate|echoStream|auroraPlay|wooden'),
132 'default' => "Welcome Message",
133 'title' => esc_html__('Welcome Message*', 'streamcast'),
134 ),
135
136 array(
137 'id' => 'welcomeMsg_echoXaurora',
138 'type' => 'text',
139 'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay'),
140 'title' => esc_html__('Artist/Fm Name*', 'streamcast'),
141 'default' => '106.2',
142 ),
143 array(
144 'id' => 'widthXaurora',
145 'type' => 'text',
146 'dependency' => array('opt-radio', 'any', 'auroraPlay,wooden'),
147 'title' => esc_html__('Player Width', 'streamcast'),
148 'default' => '100%',
149 ),
150 array(
151 'id' => 'widthXecho',
152 'type' => 'text',
153 'dependency' => array('opt-radio', '==', 'echoStream'),
154 'title' => esc_html__('Player Width', 'streamcast'),
155 'default' => '450px',
156 ),
157
158 array(
159 'id' => 'player_skin',
160 'type' => 'select',
161 'title' => esc_html__('Skin', 'streamcast'),
162 'default' => 'mcclean',
163 'dependency' => array('opt-radio', '==', 'standard'),
164 'class' => 'bplugins-meta-readonly',
165 'options' => array(
166 '' => '==Official Skins==',
167 'mcclean' => 'McClean (180x60)',
168 'radiovoz' => 'RadioVoz (220x69)',
169 'faredirfare' => 'Faredirfare (269x52)',
170 'tweety' => 'Tweety (189x62)',
171 'compact' => 'Compact (191x46)',
172 'cassette' => 'Tim Simz - Cassette (200x120)',
173 'repvku-100' => 'Repvku-100 (100x25)',
174 'darkconsole' => 'DarkConsole (190x62)',
175 'tiny' => 'Tiny (130x60)',
176 'universelle' => 'Universelle (155x65)',
177 'uuskin' => 'UUSkin (166x83)',
178 'e76' => 'E76 (130x75)',
179 'original' => 'Original (329x21)',
180 'arvyskin' => 'Arvy Skin [M] (560x30)',
181 'eastanbul' => 'Eastanbul (467x26)',
182 'substream' => 'Substream (180x30)',
183 'banita' => 'BANita (110x25)',
184 'listen-live' => 'Listen Live (250x100)',
185 'easyplay' => 'EasyPlay (231x30)',
186 'stockblue' => 'Stockblue (476x26)',
187 'largebayfm' => 'LargeBayFM (451x90)',
188 'simple-blue' => 'Simple Blue [M] (300x122)',
189 'simple-gray' => 'Simple Gray [M] (300x122)',
190 'simple-green' => 'Simple Green [M] (300x122)',
191 'simple-orange' => 'Simple Orange [M] (300x122)',
192 'simple-red' => 'Simple Red [M] (300x122)',
193 'simple-violet' => 'Simple Violet [M] (300x122)',
194 'scradio' => 'SCRadio (160x100)',
195 'repvku-115' => 'Repvku-115 (115x25)',
196 'rb1' => 'RB1 (250x70)',
197 'tandem-115' => 'Tandem-115 (115x25)',
198 'simcha-232-toggle' => 'Simcha-232 [T] (232x58)',
199 'simcha-232' => 'Simcha-232 (232x58)',
200 'simcha-320' => 'Simcha-320 (320x58)',
201 'kplayer' => 'KPlayer (220x200)',
202 'appy' => 'Appy [T] (250x213)',
203 'blueberry' => 'Blueberry (338x102)',
204 'oldradio' => 'OldRadio (205x132)',
205 'oldradio-christmas' => 'OldRadio Christmas (205x132)',
206 'oldstereo' => 'OldStereo (318x130)',
207 'xm' => 'Xm (234x66)',
208 'abrahadabra' => 'Abrahadabra (100x141)',
209 'abrahadabra2' => 'Abrahadabra 2 (100x141)',
210 'wmp' => 'WMP (386x47)',
211 'radioport' => 'Radioport (700x150)',
212 'alberto' => 'Alberto (250x95)',
213 'ff' => 'FF (288x68)',
214 'neon' => 'Neon (240x76)',
215 'player-stm' => 'Player STM (128x30)',
216 'neonslim' => 'NeonSlim (501x32)',
217 'greyslim' => 'GreySlim (494x35)',
218 'demon' => 'Demon (468x117)',
219 'xavi' => 'Xavi (250x95)',
220 'xavi2' => 'Xavi2 (95x95)',
221 'xavi3' => 'Xavi3 (250x95)',
222 'minimal' => 'Minimal (220x80)',
223 'grind' => 'Grind (400x336)',
224 'cpr-180' => 'CPR-180 (180x40)',
225 'ammascota' => 'Am Mascota (290x100)',
226 'miniradio' => 'MiniRadio (275x112)',
227 'myradio' => 'My Radio (262x165)',
228 'terawhite' => 'Terawhite (255x100)',
229 'kelabu-yellow' => 'Kelabu Yellow (253x100)',
230 'cristal' => 'Cristal (300x113)',
231 'bintang' => 'Bintang (300x113)',
232 'tatarradiosi' => 'Tatar Radiosi (418x150)',
233 'redsradiosml' => 'Reds Radio SML (500x158)',
234 'bogusblue' => 'BogusBlue (660x266)',
235 'bones' => 'Bones (341x125)',
236 'combat' => 'Combat (675x247)',
237 'dragonblues' => 'DragonBlues (400x145)',
238 'lemon' => 'Lemon (410x60)',
239 'limed' => 'Limed (397x115)',
240 'longtail' => 'Longtail (498x61)',
241 'pinhead' => 'Pinhead (421x120)',
242 'retro' => 'Retro (669x259)',
243 'silvertune' => 'Silvertune (200x104)',
244 'testskin' => 'Test/Develop (189x61)',
245 'retromatic' => 'Retromatic (700x150)',
246 'retromaticsmall' => 'Retromatic Small (298x150)',
247 'e90' => 'E90 (190x59)',
248 'shmusic' => 'SH Music (300x190)',
249 'brujulalatina' => 'Brújula Latina (330x100)',
250 'adn' => 'ADN (700x150)',
251
252 )
253 ),
254
255 array(
256 'id' => 'autoplay',
257 'type' => 'switcher',
258 'dependency' => array('opt-radio', '==', 'standard'),
259 'title' => esc_html__('Auto Play', 'streamcast'),
260 'class' => 'bplugins-meta-readonly',
261 'default' => false // or false
262 ),
263
264
265
266 array(
267 'id' => 'volume',
268 'type' => 'spinner',
269 'dependency' => array('opt-radio', '==', 'standard'),
270 'title' => esc_html__('Initial Volume', 'streamcast'),
271 'class' => 'bplugins-meta-readonly',
272 'default' => '65',
273 'min' => '0',
274 'max' => '100',
275 'unit' => '%',
276 ),
277
278 array(
279 'id' => 'artwork',
280 'library' => 'image',
281 'type' => 'media',
282 'dependency' => array('opt-radio', '==', 'advanced'),
283 'title' => esc_html__('ArtWork', 'streamcast'),
284 'default' => array(
285 'url' => 'https://templates.bplugins.com/wp-content/uploads/2025/02/streamcast-demo-ultimate-1.png',
286 'id' => '',
287 "width" => 400,
288 "height" => 400,
289 "thumbnail" => 'https://templates.bplugins.com/wp-content/uploads/2025/02/streamcast-demo-ultimate-1.png',
290 "alt" => "on-air",
291 "title" => "On Air",
292 "description" => "",
293 ),
294 'class' => "bplugins-meta-readonly",
295 'desc' => esc_html__('94x94 px photo is the standard artwork size, accepted file type .png, .jpeg, .jpg ', 'streamcast'),
296 ),
297
298 array(
299 'id' => 'autoplay',
300 'type' => 'switcher',
301 'dependency' => array('opt-radio', '==', 'advanced'),
302 'title' => esc_html__('Auto Play', 'streamcast'),
303 'class' => 'bplugins-meta-readonly',
304 'default' => false // or false
305 ),
306 array(
307 'id' => 'volume',
308 'type' => 'spinner',
309 'dependency' => array('opt-radio', '==', 'advanced'),
310 'title' => esc_html__('Initial Volume', 'streamcast'),
311 'class' => 'bplugins-meta-readonly',
312 'default' => '65',
313 'min' => '0',
314 'max' => '100',
315 'unit' => '%',
316 ),
317 array(
318 'id' => 'timeholder',
319 'type' => 'switcher',
320 'class' => 'bplugins-meta-readonly',
321 'dependency' => array('opt-radio', '==', 'advanced'),
322 'title' => esc_html__('Show Time', 'streamcast'),
323 'default' => true // or false
324 ),
325 array(
326 'id' => 'background',
327 'type' => 'color',
328 'class' => 'bplugins-meta-readonly',
329 'dependency' => array('opt-radio', '==', 'advanced'),
330 'title' => esc_html__('Background color', 'streamcast'),
331 'default' => '#f09f8b' // or false
332 ),
333
334 // Ultimate
335
336
337 array(
338 'id' => 'streamProvider',
339 'type' => 'button_set',
340 'title' => 'Stream Provider *',
341 'options' => array(
342 'shout-cast' => 'SHOUT cast',
343 'ice-cast' => 'Ice cast',
344 'other' => 'Other'
345 ),
346 'default' => 'shout-cast',
347 'dependency' => array('opt-radio', '==', 'ultimate'),
348 ),
349
350 array(
351 'id' => 'streamURL',
352 'type' => 'text',
353 'title' => 'Stream URL *',
354 'default' => 'http://s5-webradio.antenne.de/antenne?icy=https',
355 'dependency' => array('opt-radio', '==', 'ultimate'),
356 ),
357
358 array(
359 'id' => 'streamPort',
360 'type' => 'number',
361 'title' => 'Stream Port *',
362 'default' => '8009',
363 'dependency' => array('opt-radio|streamProvider', '==|!=', 'ultimate|other'),
364 ),
365
366 array(
367 'id' => 'streamMountPoint',
368 'type' => 'text',
369 'title' => 'Stream Mount Point *',
370 'dependency' => array('streamProvider|opt-radio', '==|==', 'ice-cast|ultimate'),
371 'default' => '/stream',
372 ),
373
374
375
376 array(
377 'id' => 'radioName',
378 'type' => 'text',
379 'title' => 'Station Name',
380 'default' => 'Station Name',
381 'dependency' => array('opt-radio', '==', 'ultimate'),
382 ),
383
384 array(
385 'id' => 'fetch_name_from_url',
386 'type' => 'switcher',
387 'class' => 'bplugins-meta-readonly',
388 'desc' => "If station name can't access from URL then will use the given station name",
389 'dependency' => array('opt-radio', '==', 'ultimate'),
390 'title' => esc_html__('Fetch Name From URL', 'streamcast'),
391 'default' => false
392 ),
393
394 // Customization
395 array(
396 'id' => 'playerWidth',
397 'type' => 'text',
398 'title' => 'Player Width',
399 'default' => '100%',
400 'dependency' => array('opt-radio', '==', 'ultimate'),
401 ),
402 array(
403 'id' => 'radioImage',
404 'library' => 'image',
405 'type' => 'media',
406 'class' => 'bplugins-meta-readonly',
407 'title' => 'Poster Image',
408 'default' => array(
409 'url' => 'https://templates.bplugins.com/wp-content/uploads/2025/02/streamcast-demo-ultimate-1.png',
410 'id' => '',
411 "width" => 400,
412 "height" => 400,
413 "thumbnail" => 'https://templates.bplugins.com/wp-content/uploads/2025/02/streamcast-demo-ultimate-1.png',
414 "alt" => "on-air",
415 "title" => "On Air",
416 "description" => "",
417 ),
418 'dependency' => array('opt-radio', '==', 'ultimate'),
419 ),
420
421 array(
422 'id' => 'bgImage',
423 'library' => 'image',
424 'type' => 'media',
425 'class' => 'bplugins-meta-readonly',
426 'title' => 'Player Background Image',
427 'dependency' => array('opt-radio', '==', 'ultimate'),
428 ),
429
430 array(
431 'id' => 'player_postiion',
432 'type' => 'radio',
433 'title' => 'Player Position',
434 'class' => 'bplugins-meta-readonly',
435 // 'dependency' => array( 'opt-radio|opt-radio', '!=|!=', 'standard|ultimate' ),
436 'options' => array(
437 'left' => 'Left',
438 'center' => 'Center',
439 'right' => 'Right',
440
441 ),
442 'default' => 'center',
443 'inline' => true
444 ),
445
446 array(
447 'id' => 'playerColors',
448 'type' => 'button_set',
449 'title' => 'Player Colors',
450 'options' => array(
451 'theme' => 'Theme',
452 'custom' => 'Custom Color',
453 ),
454 'default' => 'theme',
455 'class' => 'bplugins-meta-readonly',
456 'dependency' => array('opt-radio', '==', 'ultimate'),
457 ),
458
459 // Themes
460 array(
461 'id' => 'playerThemes',
462 'type' => 'button_set',
463 'title' => 'Player Themes',
464 'options' => array(
465 'dodgerBlue' => 'Dodger Blue',
466 'bittersweet' => 'Bittersweet',
467 'lightSeaGreen' => 'Light Sea Green',
468 ),
469 'dependency' => array('playerColors|opt-radio', '==|==', 'theme|ultimate'),
470 'default' => 'dodgerBlue',
471 'class' => 'bplugins-meta-readonly',
472 ),
473
474 // Custom Colors
475 array(
476 'id' => 'playerOverlayColor',
477 'type' => 'color',
478 'title' => 'Player Overlay Color',
479 'dependency' => array('playerColors|opt-radio', '==|==', 'custom|ultimate'),
480 'class' => 'bplugins-meta-readonly',
481 'default' => 'rgba(15, 17, 21, 0.5)',
482 ),
483 array(
484 'id' => 'imgBorderColor',
485 'type' => 'color',
486 'title' => 'Thumbnail Border Color',
487 'dependency' => array('playerColors|opt-radio', '==|==', 'custom|ultimate'),
488 'class' => 'bplugins-meta-readonly',
489 'default' => 'rgba(255, 255, 255, 0.2)',
490 ),
491 array(
492 'id' => 'contentColor',
493 'type' => 'color',
494 'title' => 'Content Color',
495 'dependency' => array('playerColors|opt-radio', '==|==', 'custom|ultimate'),
496 'class' => 'bplugins-meta-readonly',
497 'default' => '#fff',
498 ),
499 array(
500 'id' => 'btnHoverColor',
501 'type' => 'color',
502 'title' => 'Button Hover Color',
503 'dependency' => array('playerColors|opt-radio', '==|==', 'custom|ultimate'),
504 'class' => 'bplugins-meta-readonly',
505 'default' => 'orangered',
506 ),
507 array(
508 'id' => 'progressColor',
509 'type' => 'color',
510 'title' => 'Progress Active Color',
511 'dependency' => array('playerColors|opt-radio', '==|==', 'custom|ultimate'),
512 'class' => 'bplugins-meta-readonly',
513 'default' => 'orangered',
514 ),
515 array(
516 'id' => 'visualizerColor',
517 'type' => 'color',
518 'title' => 'Visualizer Color',
519 'dependency' => array('playerColors|opt-radio', '==|==', 'custom|ultimate'),
520 'default' => 'orangered',
521 'class' => 'bplugins-meta-readonly',
522 ),
523
524
525
526 // EchoStream
527 array(
528 'id' => 'echo_bg_image',
529 'library' => 'image',
530 'type' => 'media',
531 'class' => 'bplugins-meta-readonly',
532 'title' => 'Upload Background Image',
533 'default' => array(
534 'url' => 'https://danialsabagh.com/singleaudioplayer/img/radio.jpg',
535 'id' => '',
536 "width" => 612,
537 "height" => 408,
538 "thumbnail" => 'https://danialsabagh.com/singleaudioplayer/img/radio.jpg',
539 "alt" => "",
540 "title" => "radio-player-image",
541 "description" => "",
542 ),
543 'dependency' => array('opt-radio', '==', 'echoStream'),
544 ),
545 array(
546 'id' => 'blur_effect',
547 'type' => 'spinner',
548 'class' => 'bplugins-meta-readonly',
549 'dependency' => array('opt-radio', '==', 'echoStream'),
550 'title' => esc_html__('Blur Effect', 'streamcast'),
551 'default' => 7,
552 'min' => 0,
553 'max' => 100,
554 'unit' => 'px',
555 ),
556 array(
557 'id' => 'bgXaurora',
558 'type' => 'color',
559 'class' => 'bplugins-meta-readonly',
560 'dependency' => array('opt-radio', '==', 'auroraPlay'),
561 'title' => esc_html__('Background Color', 'streamcast'),
562 'default' => '#000000',
563 ),
564 array(
565 'id' => 'bgXwooden',
566 'type' => 'color',
567 'class' => 'bplugins-meta-readonly',
568 'dependency' => array('opt-radio', '==', 'wooden'),
569 'title' => esc_html__('Background Color', 'streamcast'),
570 'default' => '#693328',
571 ),
572
573 array(
574 'id' => 'contentColorEchoXauroraXwooden',
575 'type' => 'color',
576 'class' => 'bplugins-meta-readonly',
577 'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay,wooden'),
578 'title' => esc_html__('Content Color', 'streamcast'),
579 'default' => '#ffffff', // or false
580 ),
581
582 array(
583 'id' => 'station_name_colorEchoXAuroraXwooden',
584 'type' => 'color',
585 'class' => 'bplugins-meta-readonly',
586 'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay,wooden'),
587 'title' => esc_html__('Station Name Color', 'streamcast'),
588 'default' => 'white',
589 ),
590 array(
591 'id' => 'welcome_msg_colorEchoXAurora',
592 'type' => 'color',
593 'class' => 'bplugins-meta-readonly',
594 'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay'),
595 'title' => esc_html__('Artist/FM Name Color', 'streamcast'),
596 'default' => 'white',
597 ),
598 array(
599 'id' => 'play_btn_color',
600 'type' => 'color',
601 'class' => 'bplugins-meta-readonly',
602 'dependency' => array('opt-radio', '==', 'echoStream'),
603 'title' => esc_html__('Play Button Color', 'streamcast'),
604 'default' => 'red', // or false
605 ),
606
607 // AuroraPlay
608 array(
609 'id' => 'aurora_art_image',
610 'library' => 'image',
611 'type' => 'media',
612 'class' => 'bplugins-meta-readonly',
613 'title' => 'Upload Art Work Image',
614 'default' => array(
615 'url' => 'https://danialsabagh.com/singleaudioplayer/img/radio.jpg',
616 'id' => '',
617 "width" => 612,
618 "height" => 408,
619 "thumbnail" => 'https://danialsabagh.com/singleaudioplayer/img/radio.jpg',
620 "alt" => "",
621 "title" => "radio-player-image",
622 "description" => "",
623 ),
624 'dependency' => array('opt-radio', '==', 'auroraPlay'),
625 ),
626
627
628 // Wooden
629 array(
630 'id' => 'station_name_hover_color',
631 'type' => 'color',
632 'class' => 'bplugins-meta-readonly',
633 'dependency' => array('opt-radio', '==', 'wooden'),
634 'title' => esc_html__('Station Name Hover Color', 'streamcast'),
635 'default' => ''
636 ),
637 array(
638 'id' => 'station_name_bg_color',
639 'type' => 'color',
640 'class' => 'bplugins-meta-readonly',
641 'dependency' => array('opt-radio', '==', 'wooden'),
642 'title' => esc_html__('Station Name Background Color', 'streamcast'),
643 'default' => '#50241b'
644 ),
645 array(
646 'id' => 'station_name_bg_hover_color',
647 'type' => 'color',
648 'class' => 'bplugins-meta-readonly',
649 'dependency' => array('opt-radio', '==', 'wooden'),
650 'title' => esc_html__('Station Name Hover Background Color', 'streamcast'),
651 'default' => ''
652 ),
653
654 // TimeStamp
655 array(
656 'id' => 'timeStamp_color',
657 'type' => 'color',
658 'class' => 'bplugins-meta-readonly',
659 'dependency' => array('opt-radio', '==', 'wooden'),
660 'title' => esc_html__('Timestamp Color', 'streamcast'),
661 'default' => '#fff'
662 ),
663 array(
664 'id' => 'timeStamp_hover_color',
665 'type' => 'color',
666 'class' => 'bplugins-meta-readonly',
667 'dependency' => array('opt-radio', '==', 'wooden'),
668 'title' => esc_html__('Timestamp Hover Color', 'streamcast'),
669 'default' => ''
670 ),
671 array(
672 'id' => 'timeStamp_bg_color',
673 'type' => 'color',
674 'class' => 'bplugins-meta-readonly',
675 'dependency' => array('opt-radio', '==', 'wooden'),
676 'title' => esc_html__('Timestamp Background Color', 'streamcast'),
677 'default' => '#50241b'
678 ),
679 array(
680 'id' => 'timeStamp_bg_hover_color',
681 'type' => 'color',
682 'class' => 'bplugins-meta-readonly',
683 'dependency' => array('opt-radio', '==', 'wooden'),
684 'title' => esc_html__('Timestamp Hover Background Color', 'streamcast'),
685 'default' => ''
686 ),
687
688
689 array(
690 'id' => 'custom_css',
691 'type' => 'code_editor',
692 'title' => 'Custom CSS',
693 'desc' => 'This field is optional. ',
694 'default' => '/* Your Custom CSS here */',
695 'class' => 'bplugins-meta-readonly',
696 'sanitize' => false,
697 'settings' => array(
698 'mode' => 'css',
699 ),
700
701 ),
702 )
703 ));
704 }
705
706
707 function streamcast_exclude_fields_before_save($data)
708 {
709
710 $exclude = array(
711 'player_skin',
712 'autoplay',
713 'volume',
714 'artwork',
715 'timeholder',
716 'background',
717 'player_postiion',
718 'custom_css',
719 );
720
721 foreach ($exclude as $id) {
722 unset($data[$id]);
723 }
724
725 return $data;
726 }
727
728 add_filter('csf_sc__save', 'streamcast_exclude_fields_before_save', 10, 1);
729