| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('ABSPATH')) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
if (class_exists('STREAMCAST_STREAMCAST_CSF')) { |
| 8 |
$streamcast_prefix = 'sc_'; |
| 9 |
$streamcast_post_type = 'streamcast'; |
| 10 |
|
| 11 |
|
| 12 |
// Create a metabox |
| 13 |
\STREAMCAST_STREAMCAST_CSF::createMetabox($streamcast_prefix, array( |
| 14 |
'title' => __('Radio Player Configuration', 'streamcast'), |
| 15 |
'post_type' => $streamcast_post_type, |
| 16 |
'data_type' => 'unserialize', |
| 17 |
'context' => 'normal', |
| 18 |
)); |
| 19 |
|
| 20 |
|
| 21 |
\STREAMCAST_STREAMCAST_CSF::createSection($streamcast_prefix, array( |
| 22 |
'title' => __('Required fields are marked with an * (asterisk)', 'streamcast'), |
| 23 |
'fields' => array( |
| 24 |
array( |
| 25 |
'id' => 'opt-radio', |
| 26 |
'type' => 'radio', |
| 27 |
'title' => __('Radio Player Type*', 'streamcast'), |
| 28 |
'desc' => __('You must choose radio player type first to get related settings fields.', 'streamcast'), |
| 29 |
'options' => array( |
| 30 |
'minimal' => __('Minimal', 'streamcast'), |
| 31 |
'standard' => __('Standard', 'streamcast'), |
| 32 |
'advanced' => __('Advanced', 'streamcast'), |
| 33 |
'ultimate' => __('Ultimate', 'streamcast'), |
| 34 |
'echoStream' => __('EchoStream', 'streamcast'), |
| 35 |
'auroraPlay' => __('AuroraPlay', 'streamcast'), |
| 36 |
"wooden" => __("Wooden", 'streamcast') |
| 37 |
), |
| 38 |
'default' => 'minimal', |
| 39 |
'inline' => true, |
| 40 |
), |
| 41 |
|
| 42 |
array( |
| 43 |
'id' => 'stream_url', |
| 44 |
'type' => 'text', |
| 45 |
'dependency' => array('opt-radio|opt-radio|opt-radio|opt-radio', '!=|!=|!=|!=', 'ultimate|echoStream|auroraPlay|wooden'), |
| 46 |
'title' => __('Stream URL*', 'streamcast'), |
| 47 |
'button_title' => __('Add or Upload File', 'streamcast'), |
| 48 |
'remove_title' => __('Remove Mp3', 'streamcast'), |
| 49 |
'default' => 'https://media-ssl.musicradio.com/HeartLondon' |
| 50 |
), |
| 51 |
|
| 52 |
array( |
| 53 |
'id' => 'stream_url_echoXaurora', |
| 54 |
'type' => 'text', |
| 55 |
'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay,wooden'), |
| 56 |
'title' => __('Stream URL', 'streamcast'), |
| 57 |
'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> ', |
| 58 |
'button_title' => __('Select a .pls file', 'streamcast'), |
| 59 |
'remove_title' => __('Remove pls', 'streamcast'), |
| 60 |
'default' => "https://media-ssl.musicradio.com/HeartLondon" |
| 61 |
), |
| 62 |
|
| 63 |
array( |
| 64 |
'id' => 'station_name', |
| 65 |
'type' => 'text', |
| 66 |
'dependency' => array('opt-radio|opt-radio|opt-radio|opt-radio|opt-radio', '!=|!=|!=|!=|!=', 'minimal|ultimate|echoStream|auroraPlay|wooden'), |
| 67 |
'default' => 'Station Name', |
| 68 |
'title' => __('Station Name*', 'streamcast'), |
| 69 |
), |
| 70 |
|
| 71 |
array( |
| 72 |
'id' => 'station_name_echoXauroraXwooden', |
| 73 |
'type' => 'text', |
| 74 |
'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay,wooden'), |
| 75 |
'title' => __('Station Name*', 'streamcast'), |
| 76 |
'default' => 'Hello London', |
| 77 |
), |
| 78 |
|
| 79 |
array( |
| 80 |
'id' => 'welcome_msgs', |
| 81 |
'type' => 'text', |
| 82 |
'dependency' => array('opt-radio|opt-radio|opt-radio|opt-radio|opt-radio', '!=|!=|!=|!=|!=', 'minimal|ultimate|echoStream|auroraPlay|wooden'), |
| 83 |
'default' => "Welcome Message", |
| 84 |
'title' => __('Welcome Message*', 'streamcast'), |
| 85 |
), |
| 86 |
|
| 87 |
array( |
| 88 |
'id' => 'welcomeMsg_echoXaurora', |
| 89 |
'type' => 'text', |
| 90 |
'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay'), |
| 91 |
'title' => __('Artist/Fm Name*', 'streamcast'), |
| 92 |
'default' => '106.2', |
| 93 |
), |
| 94 |
|
| 95 |
array( |
| 96 |
'id' => 'widthXaurora', |
| 97 |
'type' => 'text', |
| 98 |
'dependency' => array('opt-radio', 'any', 'auroraPlay,wooden'), |
| 99 |
'title' => __('Player Width', 'streamcast'), |
| 100 |
'default' => '100%', |
| 101 |
), |
| 102 |
|
| 103 |
array( |
| 104 |
'id' => 'widthXecho', |
| 105 |
'type' => 'text', |
| 106 |
'dependency' => array('opt-radio', '==', 'echoStream'), |
| 107 |
'title' => __('Player Width', 'streamcast'), |
| 108 |
'default' => '450px', |
| 109 |
), |
| 110 |
|
| 111 |
array( |
| 112 |
'id' => 'player_skin', |
| 113 |
'type' => 'select', |
| 114 |
'title' => __('Skin', 'streamcast'), |
| 115 |
'default' => 'mcclean', |
| 116 |
'dependency' => array('opt-radio', '==', 'standard'), |
| 117 |
'options' => array( |
| 118 |
'' => '==Official Skins==', |
| 119 |
'mcclean' => 'McClean (180x60)', |
| 120 |
'radiovoz' => 'RadioVoz (220x69)', |
| 121 |
'faredirfare' => 'Faredirfare (269x52)', |
| 122 |
'tweety' => 'Tweety (189x62)', |
| 123 |
'compact' => 'Compact (191x46)', |
| 124 |
'cassette' => 'Tim Simz - Cassette (200x120)', |
| 125 |
'repvku-100' => 'Repvku-100 (100x25)', |
| 126 |
'darkconsole' => 'DarkConsole (190x62)', |
| 127 |
'tiny' => 'Tiny (130x60)', |
| 128 |
'universelle' => 'Universelle (155x65)', |
| 129 |
'uuskin' => 'UUSkin (166x83)', |
| 130 |
'e76' => 'E76 (130x75)', |
| 131 |
'original' => 'Original (329x21)', |
| 132 |
'arvyskin' => 'Arvy Skin [M] (560x30)', |
| 133 |
'eastanbul' => 'Eastanbul (467x26)', |
| 134 |
'substream' => 'Substream (180x30)', |
| 135 |
'banita' => 'BANita (110x25)', |
| 136 |
'listen-live' => 'Listen Live (250x100)', |
| 137 |
'easyplay' => 'EasyPlay (231x30)', |
| 138 |
'stockblue' => 'Stockblue (476x26)', |
| 139 |
'largebayfm' => 'LargeBayFM (451x90)', |
| 140 |
'simple-blue' => 'Simple Blue [M] (300x122)', |
| 141 |
'simple-gray' => 'Simple Gray [M] (300x122)', |
| 142 |
'simple-green' => 'Simple Green [M] (300x122)', |
| 143 |
'simple-orange' => 'Simple Orange [M] (300x122)', |
| 144 |
'simple-red' => 'Simple Red [M] (300x122)', |
| 145 |
'simple-violet' => 'Simple Violet [M] (300x122)', |
| 146 |
'scradio' => 'SCRadio (160x100)', |
| 147 |
'repvku-115' => 'Repvku-115 (115x25)', |
| 148 |
'rb1' => 'RB1 (250x70)', |
| 149 |
'tandem-115' => 'Tandem-115 (115x25)', |
| 150 |
'simcha-232-toggle' => 'Simcha-232 [T] (232x58)', |
| 151 |
'simcha-232' => 'Simcha-232 (232x58)', |
| 152 |
'simcha-320' => 'Simcha-320 (320x58)', |
| 153 |
'kplayer' => 'KPlayer (220x200)', |
| 154 |
'appy' => 'Appy [T] (250x213)', |
| 155 |
'blueberry' => 'Blueberry (338x102)', |
| 156 |
'oldradio' => 'OldRadio (205x132)', |
| 157 |
'oldradio-christmas' => 'OldRadio Christmas (205x132)', |
| 158 |
'oldstereo' => 'OldStereo (318x130)', |
| 159 |
'xm' => 'Xm (234x66)', |
| 160 |
'abrahadabra' => 'Abrahadabra (100x141)', |
| 161 |
'abrahadabra2' => 'Abrahadabra 2 (100x141)', |
| 162 |
'wmp' => 'WMP (386x47)', |
| 163 |
'radioport' => 'Radioport (700x150)', |
| 164 |
'alberto' => 'Alberto (250x95)', |
| 165 |
'ff' => 'FF (288x68)', |
| 166 |
'neon' => 'Neon (240x76)', |
| 167 |
'player-stm' => 'Player STM (128x30)', |
| 168 |
'neonslim' => 'NeonSlim (501x32)', |
| 169 |
'greyslim' => 'GreySlim (494x35)', |
| 170 |
'demon' => 'Demon (468x117)', |
| 171 |
'xavi' => 'Xavi (250x95)', |
| 172 |
'xavi2' => 'Xavi2 (95x95)', |
| 173 |
'xavi3' => 'Xavi3 (250x95)', |
| 174 |
'minimal' => 'Minimal (220x80)', |
| 175 |
'grind' => 'Grind (400x336)', |
| 176 |
'cpr-180' => 'CPR-180 (180x40)', |
| 177 |
'ammascota' => 'Am Mascota (290x100)', |
| 178 |
'miniradio' => 'MiniRadio (275x112)', |
| 179 |
'myradio' => 'My Radio (262x165)', |
| 180 |
'terawhite' => 'Terawhite (255x100)', |
| 181 |
'kelabu-yellow' => 'Kelabu Yellow (253x100)', |
| 182 |
'cristal' => 'Cristal (300x113)', |
| 183 |
'bintang' => 'Bintang (300x113)', |
| 184 |
'tatarradiosi' => 'Tatar Radiosi (418x150)', |
| 185 |
'redsradiosml' => 'Reds Radio SML (500x158)', |
| 186 |
'bogusblue' => 'BogusBlue (660x266)', |
| 187 |
'bones' => 'Bones (341x125)', |
| 188 |
'combat' => 'Combat (675x247)', |
| 189 |
'dragonblues' => 'DragonBlues (400x145)', |
| 190 |
'lemon' => 'Lemon (410x60)', |
| 191 |
'limed' => 'Limed (397x115)', |
| 192 |
'longtail' => 'Longtail (498x61)', |
| 193 |
'pinhead' => 'Pinhead (421x120)', |
| 194 |
'retro' => 'Retro (669x259)', |
| 195 |
'silvertune' => 'Silvertune (200x104)', |
| 196 |
'testskin' => 'Test/Develop (189x61)', |
| 197 |
'retromatic' => 'Retromatic (700x150)', |
| 198 |
'retromaticsmall' => 'Retromatic Small (298x150)', |
| 199 |
'e90' => 'E90 (190x59)', |
| 200 |
'shmusic' => 'SH Music (300x190)', |
| 201 |
'brujulalatina' => 'Brújula Latina (330x100)', |
| 202 |
'adn' => 'ADN (700x150)', |
| 203 |
) |
| 204 |
), |
| 205 |
|
| 206 |
// Ultimate |
| 207 |
array( |
| 208 |
'id' => 'streamProvider', |
| 209 |
'type' => 'button_set', |
| 210 |
'title' => __('Stream Provider*', 'streamcast'), |
| 211 |
'options' => array( |
| 212 |
'shout-cast' => __('SHOUT cast', 'streamcast'), |
| 213 |
'ice-cast' => __('Ice cast', 'streamcast'), |
| 214 |
'other' => __('Other', 'streamcast') |
| 215 |
), |
| 216 |
'default' => 'shout-cast', |
| 217 |
'dependency' => array('opt-radio', '==', 'ultimate'), |
| 218 |
), |
| 219 |
|
| 220 |
array( |
| 221 |
'id' => 'streamURL', |
| 222 |
'type' => 'text', |
| 223 |
'title' => __('Stream URL *', 'streamcast'), |
| 224 |
'default' => 'http://s5-webradio.antenne.de/antenne?icy=https', |
| 225 |
'dependency' => array('opt-radio', '==', 'ultimate'), |
| 226 |
), |
| 227 |
|
| 228 |
array( |
| 229 |
'id' => 'streamPort', |
| 230 |
'type' => 'number', |
| 231 |
'title' => __('Stream Port *', 'streamcast'), |
| 232 |
'default' => '8009', |
| 233 |
'dependency' => array('opt-radio|streamProvider', '==|!=', 'ultimate|other'), |
| 234 |
), |
| 235 |
|
| 236 |
array( |
| 237 |
'id' => 'streamMountPoint', |
| 238 |
'type' => 'text', |
| 239 |
'title' => __('Stream Mount Point *', 'streamcast'), |
| 240 |
'dependency' => array('streamProvider|opt-radio', '==|==', 'ice-cast|ultimate'), |
| 241 |
'default' => '/stream', |
| 242 |
), |
| 243 |
|
| 244 |
array( |
| 245 |
'id' => 'radioName', |
| 246 |
'type' => 'text', |
| 247 |
'title' => __('Station Name', 'streamcast'), |
| 248 |
'default' => 'Station Name', |
| 249 |
'dependency' => array('opt-radio', '==', 'ultimate'), |
| 250 |
), |
| 251 |
|
| 252 |
// Customization |
| 253 |
array( |
| 254 |
'id' => 'playerWidth', |
| 255 |
'type' => 'text', |
| 256 |
'title' => __('Player Width', 'streamcast'), |
| 257 |
'default' => '100%', |
| 258 |
'dependency' => array('opt-radio', '==', 'ultimate'), |
| 259 |
), |
| 260 |
|
| 261 |
array( |
| 262 |
'id' => 'contentColor', |
| 263 |
'type' => 'color', |
| 264 |
'title' => __('Content Color', 'streamcast'), |
| 265 |
'dependency' => array('playerColors|opt-radio', '==|==', 'custom|ultimate'), |
| 266 |
'default' => '#fff', |
| 267 |
), |
| 268 |
|
| 269 |
array( |
| 270 |
'id' => 'blur_effect', |
| 271 |
'type' => 'spinner', |
| 272 |
'dependency' => array('opt-radio', '==', 'echoStream'), |
| 273 |
'title' => __('Blur Effect', 'streamcast'), |
| 274 |
'default' => 7, |
| 275 |
'min' => 0, |
| 276 |
'max' => 100, |
| 277 |
'unit' => 'px', |
| 278 |
), |
| 279 |
|
| 280 |
array( |
| 281 |
'id' => 'bgXaurora', |
| 282 |
'type' => 'color', |
| 283 |
'dependency' => array('opt-radio', '==', 'auroraPlay'), |
| 284 |
'title' => __('Background Color', 'streamcast'), |
| 285 |
'default' => '#000000', |
| 286 |
), |
| 287 |
|
| 288 |
array( |
| 289 |
'id' => 'bgXwooden', |
| 290 |
'type' => 'color', |
| 291 |
'dependency' => array('opt-radio', '==', 'wooden'), |
| 292 |
'title' => __('Background Color', 'streamcast'), |
| 293 |
'default' => '#693328', |
| 294 |
), |
| 295 |
|
| 296 |
array( |
| 297 |
'id' => 'contentColorEchoXauroraXwooden', |
| 298 |
'type' => 'color', |
| 299 |
'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay,wooden'), |
| 300 |
'title' => __('Content Color', 'streamcast'), |
| 301 |
'default' => '#ffffff', |
| 302 |
), |
| 303 |
|
| 304 |
|
| 305 |
// --- Shut marquees --- |
| 306 |
// One per player type: how many settings that type cannot reach in this build. |
| 307 |
// These state a fact and link out; the side column's Pro card carries the |
| 308 |
// pitch, so nothing here repeats it. |
| 309 |
|
| 310 |
// Minimal |
| 311 |
array( |
| 312 |
'type' => 'content', |
| 313 |
'content' => \StreamCast\Functions::shut_marquee(array( |
| 314 |
array( |
| 315 |
'name' => __('Custom CSS', 'streamcast'), |
| 316 |
'desc' => __('Add your own styles to match your site.', 'streamcast'), |
| 317 |
), |
| 318 |
array( |
| 319 |
'name' => __('Player Position', 'streamcast'), |
| 320 |
'desc' => __('Align the player left, center, or right.', 'streamcast'), |
| 321 |
), |
| 322 |
)), |
| 323 |
'dependency' => array('opt-radio', '==', 'minimal'), |
| 324 |
), |
| 325 |
|
| 326 |
// Standard |
| 327 |
array( |
| 328 |
'type' => 'content', |
| 329 |
'content' => \StreamCast\Functions::shut_marquee(array( |
| 330 |
array( |
| 331 |
'name' => __('Auto play & volume', 'streamcast'), |
| 332 |
'desc' => __('Start playing automatically at a preset volume.', 'streamcast'), |
| 333 |
), |
| 334 |
array( |
| 335 |
'name' => __('Fetch name from URL', 'streamcast'), |
| 336 |
'desc' => __('Read the station name from the stream itself.', 'streamcast'), |
| 337 |
), |
| 338 |
array( |
| 339 |
'name' => __('Custom CSS', 'streamcast'), |
| 340 |
'desc' => __('Add your own styles to match your site.', 'streamcast'), |
| 341 |
), |
| 342 |
array( |
| 343 |
'name' => __('Player Position', 'streamcast'), |
| 344 |
'desc' => __('Align the player left, center, or right.', 'streamcast'), |
| 345 |
), |
| 346 |
)), |
| 347 |
'dependency' => array('opt-radio', '==', 'standard'), |
| 348 |
), |
| 349 |
|
| 350 |
// Advanced |
| 351 |
array( |
| 352 |
'type' => 'content', |
| 353 |
'content' => \StreamCast\Functions::shut_marquee(array( |
| 354 |
array( |
| 355 |
'name' => __('Custom artwork', 'streamcast'), |
| 356 |
'desc' => __('Show a station image at 94x94 px.', 'streamcast'), |
| 357 |
), |
| 358 |
array( |
| 359 |
'name' => __('Timestamp & background', 'streamcast'), |
| 360 |
'desc' => __('Display duration and recolor the layout.', 'streamcast'), |
| 361 |
), |
| 362 |
array( |
| 363 |
'name' => __('Auto play & volume', 'streamcast'), |
| 364 |
'desc' => __('Start playing automatically at a preset volume.', 'streamcast'), |
| 365 |
), |
| 366 |
array( |
| 367 |
'name' => __('Fetch name from URL', 'streamcast'), |
| 368 |
'desc' => __('Read the station name from the stream itself.', 'streamcast'), |
| 369 |
), |
| 370 |
)), |
| 371 |
'dependency' => array('opt-radio', '==', 'advanced'), |
| 372 |
), |
| 373 |
|
| 374 |
// Ultimate |
| 375 |
array( |
| 376 |
'type' => 'content', |
| 377 |
'content' => \StreamCast\Functions::shut_marquee(array( |
| 378 |
array( |
| 379 |
'name' => __('Visualizer', 'streamcast'), |
| 380 |
'desc' => __('Live audio waves while the stream plays.', 'streamcast'), |
| 381 |
), |
| 382 |
array( |
| 383 |
'name' => __('Advanced themes', 'streamcast'), |
| 384 |
'desc' => __('Dodger Blue, Bittersweet, and more.', 'streamcast'), |
| 385 |
), |
| 386 |
array( |
| 387 |
'name' => __('Custom branding', 'streamcast'), |
| 388 |
'desc' => __('Poster art, background image, and color overlays.', 'streamcast'), |
| 389 |
), |
| 390 |
array( |
| 391 |
'name' => __('Station metadata', 'streamcast'), |
| 392 |
'desc' => __('Fetch station and artist name from the URL.', 'streamcast'), |
| 393 |
), |
| 394 |
)), |
| 395 |
'dependency' => array('opt-radio', '==', 'ultimate'), |
| 396 |
), |
| 397 |
|
| 398 |
// EchoStream, AuroraPlay, Wooden |
| 399 |
array( |
| 400 |
'type' => 'content', |
| 401 |
'content' => \StreamCast\Functions::shut_marquee(array( |
| 402 |
array( |
| 403 |
'name' => __('Background & blur', 'streamcast'), |
| 404 |
'desc' => __('Set a background image with a blur treatment.', 'streamcast'), |
| 405 |
), |
| 406 |
array( |
| 407 |
'name' => __('Detailed styling', 'streamcast'), |
| 408 |
'desc' => __('Recolor station name, artist name, and hover states.', 'streamcast'), |
| 409 |
), |
| 410 |
array( |
| 411 |
'name' => __('Timestamp styling', 'streamcast'), |
| 412 |
'desc' => __('Wooden only -- timestamp and hover backgrounds.', 'streamcast'), |
| 413 |
), |
| 414 |
)), |
| 415 |
'dependency' => array('opt-radio', 'any', 'echoStream,auroraPlay,wooden'), |
| 416 |
), |
| 417 |
|
| 418 |
) |
| 419 |
)); |
| 420 |
|
| 421 |
} |
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|