PluginProbe
StreamCast – bring live radio to your site with a sleek player / 2.3.4
StreamCast – bring live radio to your site with a sleek player v2.3.4
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 / inc / metabox-free.php

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

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