PluginProbe
StreamCast – bring live radio to your site with a sleek player / 2.3.2
StreamCast – bring live radio to your site with a sleek player v2.3.2
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 / codestar-framework / samples / customize-options.php

customize-options.php in StreamCast – bring live radio to your site with a sleek player 2.3.2, at admin/codestar-framework/samples/customize-options.php

3,663 lines 100.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
3 //
4 // Set a unique slug-like ID
5 //
6 $prefix = 'csf_demo_customizer';
7
8 //
9 // Create customize options
10 //
11 CSF::createCustomizeOptions( $prefix );
12
13 //
14 // Create a section
15 //
16 CSF::createSection( $prefix, array(
17 'title' => 'CSF - Overview',
18 'priority' => 1,
19 'fields' => array(
20
21 //
22 // A text field
23 //
24 array(
25 'id' => 'opt-overview-text',
26 'type' => 'text',
27 'title' => 'Text',
28 ),
29
30 array(
31 'id' => 'opt-overview-textarea',
32 'type' => 'textarea',
33 'title' => 'Textarea',
34 'help' => 'The help text of the field.',
35 ),
36
37 array(
38 'id' => 'opt-upload',
39 'type' => 'upload',
40 'title' => 'Upload',
41 ),
42
43 array(
44 'id' => 'opt-overview-switcher',
45 'type' => 'switcher',
46 'title' => 'Switcher',
47 'label' => 'The label text of the switcher.',
48 ),
49
50 array(
51 'id' => 'opt-overview-color',
52 'type' => 'color',
53 'title' => 'Color',
54 'default' => '#3498db',
55 ),
56
57 array(
58 'id' => 'opt-overview-checkbox',
59 'type' => 'checkbox',
60 'title' => 'Checkbox',
61 'label' => 'The label text of the checkbox.',
62 ),
63
64 array(
65 'id' => 'opt-overview-radio',
66 'type' => 'radio',
67 'title' => 'Radio',
68 'options' => array(
69 'yes' => 'Yes, Please.',
70 'no' => 'No, Thank you.',
71 ),
72 'default' => 'yes',
73 ),
74
75 array(
76 'id' => 'opt-overview-select',
77 'type' => 'select',
78 'title' => 'Select',
79 'placeholder' => 'Select an option',
80 'options' => array(
81 'opt-1' => 'Option 1',
82 'opt-2' => 'Option 2',
83 'opt-3' => 'Option 3',
84 ),
85 ),
86
87 )
88 ) );
89
90 //
91 // Create a section
92 //
93 CSF::createSection( $prefix, array(
94 'id' => 'fields',
95 'title' => 'CSF - Fields',
96 'priority' => 2,
97 ) );
98
99 //
100 // Field: text
101 //
102 CSF::createSection( $prefix, array(
103 'parent' => 'fields',
104 'title' => 'Text',
105 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=text" target="_blank">Field: text</a>',
106 'fields' => array(
107
108 array(
109 'id' => 'opt-text-1',
110 'type' => 'text',
111 'title' => 'Text',
112 ),
113
114 array(
115 'id' => 'opt-text-2',
116 'type' => 'text',
117 'title' => 'Text with default',
118 'default' => 'This is default value bla bla bla',
119 ),
120
121 array(
122 'id' => 'opt-text-3',
123 'type' => 'text',
124 'title' => 'Text field ingenuity',
125 'subtitle' => 'The field of subtitle text.',
126 'help' => 'The field of help text.',
127 'before' => '<p>The field of before text.</p>',
128 'after' => '<p>The field of after text.</p>',
129 ),
130
131 array(
132 'id' => 'opt-text-4',
133 'type' => 'text',
134 'title' => 'Text with placeholder',
135 'placeholder' => 'Typed something...'
136 ),
137
138 array(
139 'id' => 'opt-text-5',
140 'type' => 'text',
141 'title' => 'Text readonly',
142 'attributes' => array(
143 'readonly' => 'readonly'
144 ),
145 'default' => 'readonly text field, can not be changed'
146 ),
147
148 array(
149 'id' => 'opt-text-6',
150 'type' => 'text',
151 'title' => 'Text with maxlength (5)',
152 'attributes' => array(
153 'maxlength' => '5'
154 ),
155 'default' => 'abc',
156 ),
157
158 array(
159 'id' => 'opt-text-7',
160 'type' => 'text',
161 'title' => 'Text usign custom styles',
162 'attributes' => array(
163 'style' => 'width: 100%; height: 40px; border-color: #93C054;'
164 ),
165 ),
166
167 array(
168 'id' => 'opt-text-8',
169 'type' => 'text',
170 'after' => '<p>It shows full width if there is no field of title.</p>',
171 ),
172
173 )
174 ) );
175
176 //
177 // Field: textarea
178 //
179 CSF::createSection( $prefix, array(
180 'parent' => 'fields',
181 'title' => 'Textarea',
182 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=textarea" target="_blank">Field: textrea</a>',
183 'fields' => array(
184
185 array(
186 'id' => 'opt-textarea-1',
187 'type' => 'textarea',
188 'title' => 'Textarea',
189 ),
190
191 array(
192 'id' => 'opt-textarea-2',
193 'type' => 'textarea',
194 'title' => 'Textarea wtih default',
195 'default' => 'This is default value bla bla bla',
196 ),
197
198 array(
199 'id' => 'opt-textarea-3',
200 'type' => 'textarea',
201 'title' => 'Text with placeholder',
202 'placeholder' => 'Typed something...'
203 ),
204
205 array(
206 'id' => 'opt-textarea-4',
207 'type' => 'textarea',
208 'title' => 'Textarea with shortcoder',
209 'shortcoder' => 'csf_demo_shortcodes',
210 ),
211
212 array(
213 'id' => 'opt-textarea-5',
214 'type' => 'textarea',
215 'title' => 'Textarea field ingenuity',
216 'subtitle' => 'The field of subtitle text.',
217 'help' => 'The field of help text.',
218 'before' => '<p>The field of before text.</p>',
219 'after' => '<p>The field of after text.</p>',
220 ),
221
222 array(
223 'id' => 'opt-textarea-6',
224 'type' => 'textarea',
225 'after' => '<p>It shows full width if there is no field of title.</p>',
226 ),
227
228 )
229 ) );
230
231 //
232 // Field: select
233 //
234 CSF::createSection( $prefix, array(
235 'parent' => 'fields',
236 'title' => 'Select',
237 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=select" target="_blank">Field: select</a>',
238 'fields' => array(
239
240 array(
241 'id' => 'opt-select-1',
242 'type' => 'select',
243 'title' => 'Select',
244 'placeholder' => 'Select an option',
245 'options' => array(
246 'opt-1' => 'Option 1',
247 'opt-2' => 'Option 2',
248 'opt-3' => 'Option 3',
249 ),
250 ),
251
252 array(
253 'id' => 'opt-select-2',
254 'type' => 'select',
255 'title' => 'Select with default',
256 'placeholder' => 'Select an option',
257 'options' => array(
258 'opt-1' => 'Option 1',
259 'opt-2' => 'Option 2',
260 'opt-3' => 'Option 3',
261 ),
262 'default' => 'opt-2'
263 ),
264
265 array(
266 'id' => 'opt-select-3',
267 'type' => 'select',
268 'title' => 'Select with group related options',
269 'placeholder' => 'Select an option',
270 'options' => array(
271 'Group 1' => array(
272 'opt-1' => 'Option 1',
273 'opt-2' => 'Option 2',
274 'opt-3' => 'Option 3',
275 ),
276 'Group 2' => array(
277 'opt-4' => 'Option 4',
278 'opt-5' => 'Option 5',
279 'opt-6' => 'Option 6',
280 ),
281 'Group 3' => array(
282 'opt-7' => 'Option 7',
283 'opt-8' => 'Option 8',
284 'opt-9' => 'Option 9',
285 ),
286 ),
287 ),
288
289 array(
290 'id' => 'opt-select-4',
291 'type' => 'select',
292 'title' => 'Select with multiple choice',
293 'multiple' => true,
294 'attributes' => array(
295 'style' => 'min-width: 200px;'
296 ),
297 'options' => array(
298 'opt-1' => 'Option 1',
299 'opt-2' => 'Option 2',
300 'opt-3' => 'Option 3',
301 'opt-4' => 'Option 4',
302 'opt-5' => 'Option 5',
303 'opt-6' => 'Option 6',
304 ),
305 'default' => array( 'opt-2', 'opt-3' ),
306 ),
307
308 array(
309 'type' => 'notice',
310 'style' => 'info',
311 'content' => 'Select with <strong>chosen</strong> style.',
312 ),
313
314 array(
315 'id' => 'opt-select-5',
316 'type' => 'select',
317 'title' => 'Select with Chosen',
318 'chosen' => true,
319 'placeholder' => 'Select an option',
320 'options' => array(
321 'opt-1' => 'Option 1',
322 'opt-2' => 'Option 2',
323 'opt-3' => 'Option 3',
324 'opt-4' => 'Option 4',
325 'opt-5' => 'Option 5',
326 'opt-6' => 'Option 6',
327 ),
328 ),
329
330 array(
331 'id' => 'opt-select-6',
332 'type' => 'select',
333 'title' => 'Select with multiple Chosen',
334 'chosen' => true,
335 'multiple' => true,
336 'placeholder' => 'Select an option',
337 'options' => array(
338 'opt-1' => 'Option 1',
339 'opt-2' => 'Option 2',
340 'opt-3' => 'Option 3',
341 'opt-4' => 'Option 4',
342 'opt-5' => 'Option 5',
343 'opt-6' => 'Option 6',
344 ),
345 ),
346
347 array(
348 'id' => 'opt-select-7',
349 'type' => 'select',
350 'title' => 'Select with multiple Chosen and Sortable',
351 'chosen' => true,
352 'multiple' => true,
353 'sortable' => true,
354 'placeholder' => 'Select an option',
355 'options' => array(
356 'opt-1' => 'Option 1',
357 'opt-2' => 'Option 2',
358 'opt-3' => 'Option 3',
359 'opt-4' => 'Option 4',
360 'opt-5' => 'Option 5',
361 'opt-6' => 'Option 6',
362 ),
363 'default' => array( 'opt-1', 'opt-2', 'opt-3' )
364 ),
365
366 array(
367 'id' => 'opt-select-8',
368 'type' => 'select',
369 'title' => 'Select with multiple AJAX search Pages',
370 'chosen' => true,
371 'multiple' => true,
372 'sortable' => true,
373 'ajax' => true,
374 'options' => 'pages',
375 'placeholder' => 'Select pages',
376 ),
377
378 array(
379 'id' => 'opt-select-9',
380 'type' => 'select',
381 'title' => 'Select with multiple AJAX search Posts',
382 'chosen' => true,
383 'multiple' => true,
384 'sortable' => true,
385 'ajax' => true,
386 'options' => 'posts',
387 'placeholder' => 'Select posts',
388 ),
389
390 array(
391 'id' => 'opt-select-10',
392 'type' => 'select',
393 'title' => 'Select with AJAX search Category',
394 'chosen' => true,
395 'ajax' => true,
396 'options' => 'category',
397 'placeholder' => 'Select a category',
398 ),
399
400 array(
401 'type' => 'notice',
402 'style' => 'info',
403 'content' => 'Select with <strong>predefined wp query</strong> options.',
404 ),
405
406 array(
407 'id' => 'opt-select-11',
408 'type' => 'select',
409 'title' => 'Select with pages',
410 'placeholder' => 'Select a page',
411 'options' => 'pages',
412 ),
413
414 array(
415 'id' => 'opt-select-12',
416 'type' => 'select',
417 'title' => 'Select with posts',
418 'placeholder' => 'Select a post',
419 'options' => 'posts',
420 ),
421
422 array(
423 'id' => 'opt-select-13',
424 'type' => 'select',
425 'title' => 'Select with categories',
426 'placeholder' => 'Select a category',
427 'options' => 'categories',
428 ),
429
430 array(
431 'id' => 'opt-select-14',
432 'type' => 'select',
433 'title' => 'Select with menus',
434 'placeholder' => 'Select a menu',
435 'options' => 'menus',
436 ),
437
438 array(
439 'id' => 'opt-select-15',
440 'type' => 'select',
441 'title' => 'Select with locations',
442 'placeholder' => 'Select a location',
443 'options' => 'locations',
444 ),
445
446 array(
447 'id' => 'opt-select-16',
448 'type' => 'select',
449 'title' => 'Select with sidebars',
450 'placeholder' => 'Select a sidebar',
451 'options' => 'sidebars',
452 ),
453
454 array(
455 'id' => 'opt-select-17',
456 'type' => 'select',
457 'title' => 'Select with wp roles',
458 'placeholder' => 'Select a role',
459 'options' => 'roles',
460 ),
461
462 array(
463 'id' => 'opt-select-18',
464 'type' => 'select',
465 'title' => 'Select with users',
466 'placeholder' => 'Select a user',
467 'options' => 'users',
468 ),
469
470 array(
471 'id' => 'opt-select-19',
472 'type' => 'select',
473 'title' => 'Select with post type',
474 'placeholder' => 'Select a post type',
475 'options' => 'post_types',
476 ),
477
478 array(
479 'id' => 'opt-select-20',
480 'type' => 'select',
481 'title' => 'Select with CPT (custom post type) posts',
482 'placeholder' => 'Select a post',
483 'options' => 'posts',
484 'query_args' => array(
485 'post_type' => 'your_post_type_name',
486 ),
487 ),
488
489 array(
490 'id' => 'opt-select-21',
491 'type' => 'select',
492 'title' => 'Select with CPT (custom post type) categories',
493 'placeholder' => 'Select a category',
494 'options' => 'categories',
495 'query_args' => array(
496 'taxonomy' => 'your_taxonomy_name',
497 ),
498 ),
499
500 )
501 ) );
502
503 //
504 // Field: checkbox
505 //
506 CSF::createSection( $prefix, array(
507 'parent' => 'fields',
508 'title' => 'Checkbox',
509 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=checkbox" target="_blank">Field: checkbox</a>',
510 'fields' => array(
511
512 array(
513 'id' => 'opt-checkbox-1',
514 'type' => 'checkbox',
515 'title' => 'Checkbox',
516 'label' => 'The label text of the checkbox.',
517 ),
518
519 array(
520 'id' => 'opt-checkbox-2',
521 'type' => 'checkbox',
522 'title' => 'Checkbox with default',
523 'label' => 'The label text of the checkbox.',
524 'default' => true,
525 ),
526
527 array(
528 'id' => 'opt-checkbox-3',
529 'type' => 'checkbox',
530 'title' => 'Checkbox with multiple choice',
531 'options' => array(
532 'opt-1' => 'Option 1',
533 'opt-2' => 'Option 2',
534 'opt-3' => 'Option 3',
535 ),
536 ),
537
538 array(
539 'id' => 'opt-checkbox-4',
540 'type' => 'checkbox',
541 'title' => 'Checkbox inline with multiple choice',
542 'inline' => true,
543 'options' => array(
544 'opt-1' => 'Option 1',
545 'opt-2' => 'Option 2',
546 'opt-3' => 'Option 3',
547 ),
548 ),
549
550 array(
551 'id' => 'opt-checkbox-5',
552 'type' => 'checkbox',
553 'title' => 'Checkbox multiple choice with default',
554 'options' => array(
555 'opt-1' => 'Option 1',
556 'opt-2' => 'Option 2',
557 'opt-3' => 'Option 3',
558 ),
559 'default' => array( 'opt-1', 'opt-2' )
560 ),
561
562 array(
563 'id' => 'opt-checkbox-6',
564 'type' => 'checkbox',
565 'title' => 'Checkbox with group related options',
566 'options' => array(
567 'Group 1' => array(
568 'opt-1' => 'Option 1',
569 'opt-2' => 'Option 2',
570 'opt-3' => 'Option 3',
571 ),
572 'Group 2' => array(
573 'opt-4' => 'Option 4',
574 'opt-5' => 'Option 5',
575 'opt-6' => 'Option 6',
576 ),
577 ),
578 ),
579
580 array(
581 'id' => 'opt-checkbox-7',
582 'type' => 'checkbox',
583 'title' => 'Checkbox testing on many items',
584 'options' => array(
585 'opt-1' => 'Option 1',
586 'opt-2' => 'Option 2',
587 'opt-3' => 'Option 3',
588 'opt-4' => 'Option 4',
589 'opt-5' => 'Option 5',
590 'opt-6' => 'Option 6',
591 'opt-7' => 'Option 7',
592 'opt-8' => 'Option 8',
593 'opt-9' => 'Option 9',
594 'opt-10' => 'Option 10',
595 'opt-11' => 'Option 11',
596 'opt-12' => 'Option 12',
597 'opt-13' => 'Option 13',
598 'opt-14' => 'Option 14',
599 'opt-15' => 'Option 15',
600 ),
601 'after' => 'Vertical scroll showing automatically after add many items'
602 ),
603
604 array(
605 'type' => 'notice',
606 'style' => 'info',
607 'content' => 'Checkbox with <strong>predefined wp query</strong> options similar like <strong>select</strong> field. (see select field for all options models.)',
608 ),
609
610 array(
611 'id' => 'opt-checkbox-8',
612 'type' => 'checkbox',
613 'title' => 'Checkbox with categories',
614 'options' => 'categories',
615 ),
616
617 )
618 ) );
619
620 //
621 // Field: radio
622 //
623 CSF::createSection( $prefix, array(
624 'parent' => 'fields',
625 'title' => 'Radio',
626 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=radio" target="_blank">Field: radio</a>',
627 'fields' => array(
628
629 array(
630 'id' => 'opt-radio-1',
631 'type' => 'radio',
632 'title' => 'Radio',
633 'options' => array(
634 'opt-1' => 'Option 1',
635 'opt-2' => 'Option 2',
636 'opt-3' => 'Option 3',
637 ),
638 ),
639
640 array(
641 'id' => 'opt-radio-2',
642 'type' => 'radio',
643 'title' => 'Radio with default',
644 'options' => array(
645 'opt-1' => 'Option 1',
646 'opt-2' => 'Option 2',
647 'opt-3' => 'Option 3',
648 ),
649 'default' => 'opt-2',
650 ),
651
652 array(
653 'id' => 'opt-radio-3',
654 'type' => 'radio',
655 'title' => 'Radio with inline style',
656 'inline' => true,
657 'options' => array(
658 'opt-1' => 'Option 1',
659 'opt-2' => 'Option 2',
660 'opt-3' => 'Option 3',
661 ),
662 ),
663
664 array(
665 'id' => 'opt-radio-4',
666 'type' => 'radio',
667 'title' => 'Radio with group related options',
668 'options' => array(
669 'Group 1' => array(
670 'opt-1' => 'Option 1',
671 'opt-2' => 'Option 2',
672 'opt-3' => 'Option 3',
673 ),
674 'Group 2' => array(
675 'opt-4' => 'Option 4',
676 'opt-5' => 'Option 5',
677 'opt-6' => 'Option 6',
678 ),
679 ),
680 ),
681
682 array(
683 'id' => 'opt-radio-5',
684 'type' => 'radio',
685 'title' => 'Radio testing on many items',
686 'options' => array(
687 'opt-1' => 'Option 1',
688 'opt-2' => 'Option 2',
689 'opt-3' => 'Option 3',
690 'opt-4' => 'Option 4',
691 'opt-5' => 'Option 5',
692 'opt-6' => 'Option 6',
693 'opt-7' => 'Option 7',
694 'opt-8' => 'Option 8',
695 'opt-9' => 'Option 9',
696 'opt-10' => 'Option 10',
697 'opt-11' => 'Option 11',
698 'opt-12' => 'Option 12',
699 'opt-13' => 'Option 13',
700 'opt-14' => 'Option 14',
701 'opt-15' => 'Option 15',
702 ),
703 'desc' => 'Vertical scroll showing automatically after add many items'
704 ),
705
706 array(
707 'type' => 'notice',
708 'style' => 'info',
709 'content' => 'Radio with <strong>predefined wp query</strong> options similar like <strong>select</strong> field. (see select field for all options models.)',
710 ),
711
712 array(
713 'id' => 'opt-radio-6',
714 'type' => 'radio',
715 'title' => 'Radio with categories',
716 'options' => 'categories',
717 ),
718
719 )
720 ) );
721
722 //
723 // Field: repeater
724 //
725 CSF::createSection( $prefix, array(
726 'parent' => 'fields',
727 'title' => 'Repeater',
728 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=repeater" target="_blank">Field: repeater</a>',
729 'fields' => array(
730
731 array(
732 'id' => 'opt-repeater-1',
733 'type' => 'repeater',
734 'title' => 'Repeater',
735 'fields' => array(
736 array(
737 'id' => 'opt-text',
738 'type' => 'text',
739 'title' => 'Text'
740 ),
741 ),
742 ),
743
744 array(
745 'id' => 'opt-repeater-2',
746 'type' => 'repeater',
747 'title' => 'Repeater with default',
748 'fields' => array(
749 array(
750 'id' => 'opt-text',
751 'type' => 'text',
752 'title' => 'Text',
753 ),
754 ),
755 'default' => array(
756 array(
757 'opt-text' => 'Text default 1',
758 ),
759 array(
760 'opt-text' => 'Text default 2',
761 ),
762 ),
763 ),
764
765 array(
766 'id' => 'opt-repeater-3',
767 'type' => 'repeater',
768 'title' => 'Repeater with multiple fields',
769 'fields' => array(
770 array(
771 'id' => 'opt-switcher',
772 'type' => 'switcher',
773 'title' => 'Switcher',
774 ),
775 array(
776 'id' => 'opt-color',
777 'type' => 'color',
778 'title' => 'Color',
779 ),
780 array(
781 'id' => 'opt-text',
782 'type' => 'text',
783 'title' => 'Text',
784 ),
785 ),
786 'default' => array(
787 array(
788 'opt-switcher' => false,
789 'opt-color' => '#3498db',
790 'opt-text' => 'Text default 1',
791 ),
792 ),
793 ),
794
795 array(
796 'id' => 'opt-repeater-4',
797 'type' => 'repeater',
798 'title' => 'Repeater with limited (min - max items)',
799 'subtitle' => 'The maximum/minimum number of items the user can add. (In this example min:1, max:3)',
800 'button_title' => 'Add Text',
801 'min' => 1,
802 'max' => 3,
803 'fields' => array(
804 array(
805 'id' => 'opt-text',
806 'type' => 'text',
807 'title' => 'Text',
808 ),
809 ),
810 'default' => array(
811 array(
812 'opt-text' => 'Text default 1',
813 ),
814 array(
815 'opt-text' => 'Text default 2',
816 ),
817 ),
818 ),
819
820 array(
821 'id' => 'opt-repeater-6',
822 'type' => 'repeater',
823 'title' => 'Repeater nested repeater',
824 'subtitle' => 'Can be added unlimited nested repeater',
825 'fields' => array(
826 array(
827 'id' => 'opt-text',
828 'type' => 'text',
829 'title' => 'Text',
830 ),
831 array(
832 'id' => 'opt-repeater-6-nested-1',
833 'type' => 'repeater',
834 'title' => 'Repeater',
835 'fields' => array(
836 array(
837 'id' => 'opt-text',
838 'type' => 'text',
839 'title' => 'Text'
840 ),
841 ),
842 ),
843 ),
844 'default' => array(
845 array(
846 'opt-text' => 'Text default 1',
847 'opt-repeater-6-nested-1' => array(
848 array(
849 'opt-text' => 'Text default 1',
850 ),
851 array(
852 'opt-text' => 'Text default 2',
853 ),
854 ),
855 ),
856 ),
857 ),
858
859 )
860 ) );
861
862 //
863 // Field: group
864 //
865 CSF::createSection( $prefix, array(
866 'parent' => 'fields',
867 'title' => 'Group',
868 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=group" target="_blank">Field: group</a>',
869 'fields' => array(
870
871 array(
872 'id' => 'opt-group-1',
873 'type' => 'group',
874 'title' => 'Group',
875 'fields' => array(
876 array(
877 'id' => 'opt-text',
878 'type' => 'text',
879 'title' => 'Text',
880 ),
881 array(
882 'id' => 'opt-switcher',
883 'type' => 'switcher',
884 'title' => 'Switcher',
885 ),
886 array(
887 'id' => 'opt-textarea',
888 'type' => 'textarea',
889 'title' => 'Textarea',
890 ),
891 )
892 ),
893
894 array(
895 'id' => 'opt-group-2',
896 'type' => 'group',
897 'title' => 'Group with default',
898 'fields' => array(
899 array(
900 'id' => 'opt-text',
901 'type' => 'text',
902 'title' => 'Text',
903 ),
904 array(
905 'id' => 'opt-switcher',
906 'type' => 'switcher',
907 'title' => 'Switcher',
908 ),
909 array(
910 'id' => 'opt-textarea',
911 'type' => 'textarea',
912 'title' => 'Textarea',
913 ),
914 ),
915 'default' => array(
916 array(
917 'opt-text' => 'Some text 1',
918 'opt-switcher' => true,
919 'opt-textarea' => 'Some textarea content 1',
920 ),
921 array(
922 'opt-text' => 'Some text 2',
923 'opt-switcher' => false,
924 'opt-textarea' => 'Some textarea content 2',
925 ),
926 )
927 ),
928
929 array(
930 'id' => 'opt-group-3',
931 'type' => 'group',
932 'title' => 'Group with limited (min - max items)',
933 'subtitle' => 'The maximum/minimum number of items the user can add. (In this example min:1, max:3)',
934 'min' => 1,
935 'max' => 3,
936 'fields' => array(
937 array(
938 'id' => 'opt-text',
939 'type' => 'text',
940 'title' => 'Text',
941 ),
942 array(
943 'id' => 'opt-textarea',
944 'type' => 'textarea',
945 'title' => 'Textarea',
946 ),
947 ),
948 'default' => array(
949 array(
950 'opt-text' => 'Limited text 1',
951 'opt-textarea' => 'Limited textarea content 1',
952 ),
953 array(
954 'opt-text' => 'Limited text 2',
955 'opt-textarea' => 'Limited textarea content 2',
956 ),
957 )
958 ),
959
960 array(
961 'id' => 'opt-group-4',
962 'type' => 'group',
963 'title' => 'Group with WP Editor',
964 'subtitle' => 'WP Editor integrated for Ajax Call.',
965 'fields' => array(
966 array(
967 'id' => 'opt-text',
968 'type' => 'text',
969 'title' => 'Text',
970 ),
971 array(
972 'id' => 'opt-editor',
973 'type' => 'wp_editor',
974 'title' => 'WP Editor',
975 ),
976 ),
977 'default' => array(
978 array(
979 'opt-text' => 'WP Editor 1',
980 'opt-editor' => 'Editor content 1',
981 ),
982 array(
983 'opt-text' => 'WP Editor 2',
984 'opt-editor' => 'Editor content 2',
985 ),
986 )
987 ),
988
989 array(
990 'id' => 'opt-group-5',
991 'type' => 'group',
992 'title' => 'Group nested',
993 'subtitle' => 'Can be added unlimited nested groups',
994 'fields' => array(
995 array(
996 'id' => 'opt-text',
997 'type' => 'text',
998 'title' => 'Text',
999 ),
1000 array(
1001 'id' => 'opt-group-5-sublevel-1',
1002 'type' => 'group',
1003 'title' => 'Group Nested',
1004 'fields' => array(
1005 array(
1006 'id' => 'opt-text',
1007 'type' => 'text',
1008 'title' => 'Text',
1009 ),
1010 array(
1011 'id' => 'opt-group-5-sublevel-2',
1012 'type' => 'group',
1013 'title' => 'Group Nested',
1014 'fields' => array(
1015 array(
1016 'id' => 'opt-text',
1017 'type' => 'text',
1018 'title' => 'Text',
1019 ),
1020 array(
1021 'id' => 'opt-switcher',
1022 'type' => 'switcher',
1023 'title' => 'Switcher',
1024 ),
1025 array(
1026 'id' => 'opt-textarea',
1027 'type' => 'textarea',
1028 'title' => 'Textarea',
1029 ),
1030 )
1031 ),
1032 array(
1033 'id' => 'opt-switcher',
1034 'type' => 'switcher',
1035 'title' => 'Switcher',
1036 ),
1037 array(
1038 'id' => 'opt-textarea',
1039 'type' => 'textarea',
1040 'title' => 'Textarea',
1041 ),
1042 )
1043 ),
1044 array(
1045 'id' => 'opt-switcher',
1046 'type' => 'switcher',
1047 'title' => 'Switcher',
1048 ),
1049 array(
1050 'id' => 'opt-textarea',
1051 'type' => 'textarea',
1052 'title' => 'Textarea',
1053 ),
1054 ),
1055 'default' => array(
1056
1057 // top level defaults
1058 array(
1059 'opt-text' => 'Top Level 1',
1060
1061 // sub level 1 defaults
1062 'opt-group-5-sublevel-1' => array(
1063 array(
1064 'opt-text' => 'Sub Level 1',
1065
1066 // sub level 2 defaults
1067 'opt-group-5-sublevel-2' => array(
1068 array(
1069 'opt-text' => 'Sub Sub Level 1',
1070 ),
1071 array(
1072 'opt-text' => 'Sub Sub Level 2',
1073 )
1074 ),
1075 ),
1076 array(
1077 'opt-text' => 'Sub Level 2',
1078 )
1079 ),
1080 ),
1081
1082 // top level defaults
1083 array(
1084 'opt-text' => 'Top Level 2',
1085 ),
1086 )
1087 ),
1088
1089 array(
1090 'id' => 'opt-group-6',
1091 'type' => 'group',
1092 'title' => 'Group with Repeater Field',
1093 'fields' => array(
1094 array(
1095 'id' => 'opt-text',
1096 'type' => 'text',
1097 'title' => 'Text',
1098 ),
1099 array(
1100 'id' => 'opt-group-6-repeater',
1101 'type' => 'repeater',
1102 'title' => 'Repeater',
1103 'fields' => array(
1104 array(
1105 'id' => 'opt-text',
1106 'type' => 'text',
1107 'title' => 'Text'
1108 ),
1109 ),
1110 ),
1111 array(
1112 'id' => 'opt-switcher',
1113 'type' => 'switcher',
1114 'title' => 'Switcher',
1115 ),
1116 array(
1117 'id' => 'opt-textarea',
1118 'type' => 'textarea',
1119 'title' => 'Textarea',
1120 ),
1121 ),
1122 'default' => array(
1123 array(
1124 'opt-text' => 'Some text 1',
1125 'opt-group-6-repeater' => array(
1126 array(
1127 'opt-text' => 'Some text 1',
1128 ),
1129 array(
1130 'opt-text' => 'Some text 2',
1131 ),
1132 )
1133 ),
1134 )
1135 ),
1136
1137 array(
1138 'id' => 'opt-group-7',
1139 'type' => 'group',
1140 'title' => 'Group with static prefix of title',
1141 'subtitle' => 'accordion_title_prefix => "Static Prefix:"',
1142 'accordion_title_prefix' => 'Static Prefix:',
1143 'fields' => array(
1144 array(
1145 'id' => 'opt-text',
1146 'type' => 'text',
1147 'title' => 'Text',
1148 ),
1149 array(
1150 'id' => 'opt-switcher',
1151 'type' => 'switcher',
1152 'title' => 'Switcher',
1153 ),
1154 array(
1155 'id' => 'opt-textarea',
1156 'type' => 'textarea',
1157 'title' => 'Textarea',
1158 ),
1159 ),
1160 'default' => array(
1161 array(
1162 'opt-text' => 'Some text 1',
1163 'opt-switcher' => true,
1164 'opt-textarea' => 'Some textarea content 1',
1165 ),
1166 array(
1167 'opt-text' => 'Some text 2',
1168 'opt-switcher' => false,
1169 'opt-textarea' => 'Some textarea content 2',
1170 ),
1171 )
1172 ),
1173
1174 array(
1175 'id' => 'opt-group-8',
1176 'type' => 'group',
1177 'title' => 'Group with title numbers',
1178 'subtitle' => 'accordion_title_number => true',
1179 'accordion_title_number' => true,
1180 'fields' => array(
1181 array(
1182 'id' => 'opt-text',
1183 'type' => 'text',
1184 'title' => 'Text',
1185 ),
1186 array(
1187 'id' => 'opt-switcher',
1188 'type' => 'switcher',
1189 'title' => 'Switcher',
1190 ),
1191 array(
1192 'id' => 'opt-textarea',
1193 'type' => 'textarea',
1194 'title' => 'Textarea',
1195 ),
1196 ),
1197 'default' => array(
1198 array(
1199 'opt-text' => 'Some text 1',
1200 'opt-switcher' => true,
1201 'opt-textarea' => 'Some textarea content 1',
1202 ),
1203 array(
1204 'opt-text' => 'Some text 2',
1205 'opt-switcher' => false,
1206 'opt-textarea' => 'Some textarea content 2',
1207 ),
1208 )
1209 ),
1210
1211 array(
1212 'id' => 'opt-group-9',
1213 'type' => 'group',
1214 'title' => 'Group with custom titles',
1215 'subtitle' => 'accordion_title_by => array( \'opt-name\', \'opt-surname\' )',
1216 'accordion_title_by' => array( 'opt-name', 'opt-surname' ),
1217 'fields' => array(
1218 array(
1219 'id' => 'opt-name',
1220 'type' => 'text',
1221 'title' => 'Name',
1222 ),
1223 array(
1224 'id' => 'opt-surname',
1225 'type' => 'text',
1226 'title' => 'Surname',
1227 ),
1228 array(
1229 'id' => 'opt-textarea',
1230 'type' => 'textarea',
1231 'title' => 'Textarea',
1232 ),
1233 ),
1234 'default' => array(
1235 array(
1236 'opt-name' => 'John',
1237 'opt-surname' => 'Doe',
1238 'opt-textarea' => 'Textarea 1',
1239 ),
1240 array(
1241 'opt-name' => 'Jane',
1242 'opt-surname' => 'Doe',
1243 'opt-textarea' => 'Textarea 1',
1244 ),
1245 )
1246 ),
1247
1248 array(
1249 'id' => 'opt-group-10',
1250 'type' => 'group',
1251 'title' => 'Group with custom titles and prefix',
1252 'subtitle' => 'accordion_title_by => array( \'opt-text\', \'opt-textarea\' )<br />accordion_title_by_prefix => \' | \'',
1253 'accordion_title_by' => array( 'opt-text', 'opt-textarea' ),
1254 'accordion_title_by_prefix' => ' | ',
1255 'fields' => array(
1256 array(
1257 'id' => 'opt-text',
1258 'type' => 'text',
1259 'title' => 'Title',
1260 ),
1261 array(
1262 'id' => 'opt-textarea',
1263 'type' => 'textarea',
1264 'title' => 'Textarea',
1265 ),
1266 ),
1267 'default' => array(
1268 array(
1269 'opt-text' => 'Text 1',
1270 'opt-textarea' => 'Textarea 1',
1271 ),
1272 array(
1273 'opt-text' => 'Text 2',
1274 'opt-textarea' => 'Textarea 1',
1275 ),
1276 )
1277 ),
1278
1279 )
1280 ) );
1281
1282 //
1283 // Field: accordion
1284 //
1285 CSF::createSection( $prefix, array(
1286 'parent' => 'fields',
1287 'title' => 'Accordion',
1288 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=accordion" target="_blank">Field: accordion</a>',
1289 'fields' => array(
1290
1291 array(
1292 'id' => 'opt-accordion-1',
1293 'type' => 'accordion',
1294 'title' => 'Accordion',
1295 'accordions' => array(
1296
1297 array(
1298 'title' => 'Accordion 1',
1299 'fields' => array(
1300 array(
1301 'id' => 'opt-text-1',
1302 'type' => 'text',
1303 'title' => 'Text',
1304 ),
1305 array(
1306 'id' => 'opt-switcher-1',
1307 'type' => 'switcher',
1308 'title' => 'Switcher',
1309 ),
1310 array(
1311 'id' => 'opt-textarea-1',
1312 'type' => 'textarea',
1313 'title' => 'Textarea',
1314 ),
1315 )
1316 ),
1317
1318 array(
1319 'title' => 'Accordion 2',
1320 'fields' => array(
1321 array(
1322 'id' => 'opt-text-2',
1323 'type' => 'text',
1324 'title' => 'Text',
1325 ),
1326 array(
1327 'id' => 'opt-color-1',
1328 'type' => 'color',
1329 'title' => 'Color',
1330 ),
1331 )
1332 ),
1333
1334 )
1335 ),
1336
1337 array(
1338 'id' => 'opt-accordion-2',
1339 'type' => 'accordion',
1340 'title' => 'Accordion with default',
1341 'accordions' => array(
1342
1343 array(
1344 'title' => 'Fields 1',
1345 'fields' => array(
1346 array(
1347 'id' => 'opt-text-1',
1348 'type' => 'text',
1349 'title' => 'Text 1',
1350 ),
1351 array(
1352 'id' => 'opt-text-2',
1353 'type' => 'text',
1354 'title' => 'Text 2',
1355 ),
1356 )
1357 ),
1358
1359 array(
1360 'title' => 'Fields 2',
1361 'fields' => array(
1362 array(
1363 'id' => 'opt-color-1',
1364 'type' => 'color',
1365 'title' => 'Color 1',
1366 ),
1367 array(
1368 'id' => 'opt-color-2',
1369 'type' => 'color',
1370 'title' => 'Color 2',
1371 ),
1372 )
1373 ),
1374
1375 array(
1376 'title' => 'Fields 3',
1377 'fields' => array(
1378 array(
1379 'id' => 'opt-textarea-1',
1380 'type' => 'textarea',
1381 'title' => 'Textarea 3',
1382 ),
1383 array(
1384 'id' => 'opt-textarea-2',
1385 'type' => 'textarea',
1386 'title' => 'Textarea 4',
1387 ),
1388 )
1389 ),
1390
1391 ),
1392 'default' => array(
1393 'opt-text-1' => 'This is text 1 default value',
1394 'opt-text-2' => 'This is text 2 default value',
1395 'opt-color-1' => '#1e73be',
1396 'opt-color-2' => '#ffbc00',
1397 'opt-textarea-1' => 'This is textarea 1 default value',
1398 'opt-textarea-2' => 'This is textarea 2 default value',
1399 )
1400 ),
1401
1402 array(
1403 'id' => 'accordion_3',
1404 'type' => 'accordion',
1405 'title' => 'Accordion with custom icons',
1406 'accordions' => array(
1407
1408 array(
1409 'title' => 'Other 1',
1410 'icon' => 'fas fa-check',
1411 'fields' => array(
1412 array(
1413 'id' => 'opt-text-1',
1414 'type' => 'text',
1415 'title' => 'Text 1',
1416 ),
1417 )
1418 ),
1419
1420 array(
1421 'title' => 'Other 2',
1422 'icon' => 'fas fa-star',
1423 'fields' => array(
1424 array(
1425 'id' => 'opt-text-2',
1426 'type' => 'text',
1427 'title' => 'Text 2',
1428 ),
1429 )
1430 ),
1431
1432 )
1433 ),
1434
1435 )
1436 ) );
1437
1438 //
1439 // Field: tabbed
1440 //
1441 CSF::createSection( $prefix, array(
1442 'parent' => 'fields',
1443 'title' => 'Tabbed',
1444 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=tabbed" target="_blank">Field: tabbed</a>',
1445 'fields' => array(
1446
1447 array(
1448 'id' => 'opt-tabbed-1',
1449 'type' => 'tabbed',
1450 'title' => 'Tabbed',
1451 'tabs' => array(
1452
1453 array(
1454 'title' => 'Tab 1',
1455 'fields' => array(
1456 array(
1457 'id' => 'opt-text-1',
1458 'type' => 'text',
1459 'title' => 'Text 1',
1460 ),
1461 array(
1462 'id' => 'opt-textarea-1',
1463 'type' => 'textarea',
1464 'title' => 'Textarea 1',
1465 ),
1466 ),
1467 ),
1468
1469 array(
1470 'title' => 'Tab 2',
1471 'fields' => array(
1472 array(
1473 'id' => 'opt-text-2',
1474 'type' => 'text',
1475 'title' => 'Text 2',
1476 ),
1477 array(
1478 'id' => 'opt-textarea-2',
1479 'type' => 'textarea',
1480 'title' => 'Textarea 2',
1481 ),
1482 ),
1483 ),
1484
1485 ),
1486 ),
1487
1488 array(
1489 'id' => 'opt-tabbed-2',
1490 'type' => 'tabbed',
1491 'title' => 'Tabbed with default and icons',
1492 'tabs' => array(
1493 array(
1494 'title' => 'Fields 1',
1495 'icon' => 'fas fa-check',
1496 'fields' => array(
1497 array(
1498 'id' => 'opt-text-1',
1499 'type' => 'text',
1500 'title' => 'Text 1',
1501 ),
1502 array(
1503 'id' => 'opt-text-2',
1504 'type' => 'text',
1505 'title' => 'Text 2',
1506 ),
1507 ),
1508 ),
1509 array(
1510 'title' => 'Fields 2',
1511 'icon' => 'fas fa-star',
1512 'fields' => array(
1513 array(
1514 'id' => 'opt-color-1',
1515 'type' => 'color',
1516 'title' => 'Color 1',
1517 ),
1518 array(
1519 'id' => 'opt-color-2',
1520 'type' => 'color',
1521 'title' => 'Color 2',
1522 ),
1523 ),
1524 ),
1525 array(
1526 'title' => 'Fields 3',
1527 'icon' => 'fas fa-cog',
1528 'fields' => array(
1529 array(
1530 'id' => 'opt-textarea-1',
1531 'type' => 'textarea',
1532 'title' => 'Textarea 1',
1533 ),
1534 array(
1535 'id' => 'opt-textarea-2',
1536 'type' => 'textarea',
1537 'title' => 'Textarea 2',
1538 ),
1539 ),
1540 ),
1541 ),
1542 'default' => array(
1543 'opt-text-1' => 'This is text 1 default value',
1544 'opt-text-2' => 'This is text 2 default value',
1545 'opt-color-1' => '#1e73be',
1546 'opt-color-2' => '#ffbc00',
1547 'opt-textarea-1' => 'This is textarea 1 default value',
1548 'opt-textarea-2' => 'This is textarea 2 default value',
1549 )
1550 ),
1551
1552 )
1553 ) );
1554
1555 //
1556 // Field: fieldset
1557 //
1558 CSF::createSection( $prefix, array(
1559 'parent' => 'fields',
1560 'title' => 'Fieldset',
1561 'fields' => array(
1562
1563 array(
1564 'id' => 'opt-fieldset-1',
1565 'type' => 'fieldset',
1566 'title' => 'Fieldset',
1567 'fields' => array(
1568 array(
1569 'id' => 'opt-color',
1570 'type' => 'color',
1571 'title' => 'Color',
1572 ),
1573 array(
1574 'id' => 'opt-text',
1575 'type' => 'text',
1576 'title' => 'Text',
1577 ),
1578 array(
1579 'id' => 'opt-textarea',
1580 'type' => 'textarea',
1581 'title' => 'Textarea',
1582 ),
1583 ),
1584 ),
1585
1586 array(
1587 'id' => 'opt-fieldset-2',
1588 'type' => 'fieldset',
1589 'title' => 'Fieldset with default',
1590 'fields' => array(
1591 array(
1592 'type' => 'subheading',
1593 'content' => 'Title of the fieldset',
1594 ),
1595 array(
1596 'id' => 'opt-color',
1597 'type' => 'color',
1598 'title' => 'Color',
1599 ),
1600 array(
1601 'id' => 'opt-text',
1602 'type' => 'text',
1603 'title' => 'Text',
1604 ),
1605 array(
1606 'id' => 'opt-textarea',
1607 'type' => 'textarea',
1608 'title' => 'Textarea',
1609 ),
1610 ),
1611 'default' => array(
1612 'opt-color' => '#1e73be',
1613 'opt-text' => 'This is text default value',
1614 'opt-textarea' => 'This is textarea default value',
1615 )
1616 ),
1617
1618 )
1619 ) );
1620
1621 //
1622 // Field: media
1623 //
1624 CSF::createSection( $prefix, array(
1625 'parent' => 'fields',
1626 'title' => 'Media',
1627 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=media" target="_blank">Field: media</a>',
1628 'fields' => array(
1629
1630 array(
1631 'id' => 'opt-media-1',
1632 'type' => 'media',
1633 'title' => 'Media',
1634 ),
1635
1636 array(
1637 'id' => 'opt-media-2',
1638 'type' => 'media',
1639 'title' => 'Media without preview',
1640 'preview' => false,
1641 ),
1642
1643 array(
1644 'id' => 'opt-media-3',
1645 'type' => 'media',
1646 'title' => 'Media without url',
1647 'url' => false,
1648 ),
1649
1650 array(
1651 'id' => 'opt-media-4',
1652 'type' => 'media',
1653 'title' => 'Media with only image type',
1654 'library' => 'image',
1655 ),
1656
1657 array(
1658 'id' => 'opt-media-5',
1659 'type' => 'media',
1660 'title' => 'Media with only video type',
1661 'library' => 'video',
1662 ),
1663
1664 array(
1665 'id' => 'opt-media-6',
1666 'type' => 'media',
1667 'title' => 'Media with only audio type',
1668 'library' => 'audio',
1669 ),
1670
1671 )
1672 ) );
1673
1674 //
1675 // Field: upload
1676 //
1677 CSF::createSection( $prefix, array(
1678 'parent' => 'fields',
1679 'title' => 'Upload',
1680 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=upload" target="_blank">Field: upload</a>',
1681 'fields' => array(
1682
1683 array(
1684 'id' => 'opt-upload-1',
1685 'type' => 'upload',
1686 'title' => 'Upload',
1687 ),
1688
1689 array(
1690 'id' => 'opt-upload-2',
1691 'type' => 'upload',
1692 'title' => 'Upload with preview',
1693 'preview' => true,
1694 ),
1695
1696 array(
1697 'id' => 'opt-upload-3',
1698 'type' => 'upload',
1699 'title' => 'Upload with placeholder',
1700 'placeholder' => 'http://'
1701 ),
1702
1703 array(
1704 'id' => 'opt-upload-4',
1705 'type' => 'upload',
1706 'title' => 'Upload with only image type',
1707 'library' => 'image',
1708 'button_title' => 'Upload Image',
1709 ),
1710
1711 array(
1712 'id' => 'opt-upload-5',
1713 'type' => 'upload',
1714 'title' => 'Upload with only video type',
1715 'library' => 'video',
1716 'button_title' => 'Upload Video',
1717 ),
1718
1719 array(
1720 'id' => 'opt-upload-6',
1721 'type' => 'upload',
1722 'title' => 'Upload with only audio type',
1723 'library' => 'audio',
1724 'button_title' => 'Upload Audio',
1725 ),
1726 )
1727 ) );
1728
1729 //
1730 // Field: gallery
1731 //
1732 CSF::createSection( $prefix, array(
1733 'parent' => 'fields',
1734 'title' => 'Gallery',
1735 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=gallery" target="_blank">Field: gallery</a>',
1736 'fields' => array(
1737
1738 array(
1739 'id' => 'opt-gallery-1',
1740 'type' => 'gallery',
1741 'title' => 'Gallery',
1742 ),
1743
1744 array(
1745 'id' => 'opt-gallery-2',
1746 'type' => 'gallery',
1747 'title' => 'Gallery with custom button names',
1748 'add_title' => 'Add Image(s)',
1749 'edit_title' => 'Edit Images',
1750 'clear_title' => 'Remove Images',
1751 ),
1752
1753 )
1754 ) );
1755
1756 //
1757 // Field: code_editor
1758 //
1759 CSF::createSection( $prefix, array(
1760 'parent' => 'fields',
1761 'title' => 'Code Editor',
1762 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=code-editor" target="_blank">Field: code_editor</a>',
1763 'fields' => array(
1764
1765 array(
1766 'id' => 'opt-code-editor-1',
1767 'type' => 'code_editor',
1768 'title' => 'Code Editor',
1769 'subtitle' => '<strong>Default Editor</strong> Using: theme: default and mode: htmlmixed',
1770 ),
1771
1772 array(
1773 'id' => 'code_editor_2',
1774 'type' => 'code_editor',
1775 'title' => 'Code Editor',
1776 'subtitle' => '<strong>HTML Editor</strong> Using: theme: shadowfox and mode: htmlmixed',
1777 'settings' => array(
1778 'theme' => 'shadowfox',
1779 'mode' => 'htmlmixed',
1780 ),
1781 'default' =>'<div class="wrapper">
1782 <h1>Hello world</h1>
1783 <p>Lorem <strong>ipsum</strong> dollar.</p>
1784 </div>',
1785 ),
1786
1787 array(
1788 'id' => 'opt-code-editor-2',
1789 'type' => 'code_editor',
1790 'title' => 'Code Editor',
1791 'subtitle' => '<strong>JS Editor</strong> Using: theme: dracula and mode: javascript',
1792 'settings' => array(
1793 'theme' => 'dracula',
1794 'mode' => 'javascript',
1795 ),
1796 'default' =>';(function( $, window, document, undefined ) {
1797 "use strict";
1798
1799 $(document).ready( function() {
1800
1801 // do stuff
1802
1803 });
1804
1805 })( jQuery, window, document );',
1806 ),
1807
1808 array(
1809 'id' => 'opt-code-editor-3',
1810 'type' => 'code_editor',
1811 'desc' => '<strong>CSS Editor</strong> It shows full width if there is no field of title and using: theme: mbo and mode: css',
1812 'settings' => array(
1813 'theme' => 'mbo',
1814 'mode' => 'css',
1815 ),
1816 'default' =>'.wrapper {
1817 font-family: "Open Sans";
1818 font-size: 13px;
1819 width: 250px;
1820 height: 100px;
1821 color: #fff;
1822 background-color: #555;
1823 }',
1824 ),
1825
1826 )
1827 ) );
1828
1829 //
1830 // Field: wp_editor
1831 //
1832 CSF::createSection( $prefix, array(
1833 'parent' => 'fields',
1834 'title' => 'WP Editor',
1835 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=wp-editor" target="_blank">Field: wp_editor</a>',
1836 'fields' => array(
1837
1838 array(
1839 'id' => 'opt-wp-editor-1',
1840 'type' => 'wp_editor',
1841 'title' => 'WP Editor',
1842 ),
1843
1844 array(
1845 'id' => 'opt-wp-editor-2',
1846 'type' => 'wp_editor',
1847 'title' => 'WP Editor with Custom Height and No Media Buttons',
1848 'subtitle' => 'Settings: height => 100px, media_buttons => false',
1849 'height' => '100px',
1850 'media_buttons' => false,
1851 ),
1852
1853 array(
1854 'id' => 'opt-wp-editor-3',
1855 'type' => 'wp_editor',
1856 'title' => 'WP Editor without QuickTags and Media Buttons',
1857 'subtitle' => 'Settings: height => 100px, media_buttons => false, quicktags => false',
1858 'height' => '100px',
1859 'media_buttons' => false,
1860 'quicktags' => false,
1861 ),
1862
1863 array(
1864 'id' => 'opt-wp-editor-4',
1865 'type' => 'wp_editor',
1866 'title' => 'WP Editor without Tinymce and Media Buttons',
1867 'subtitle' => 'Settings: height => 100px, media_buttons => false, tinymce => false',
1868 'height' => '100px',
1869 'media_buttons' => false,
1870 'tinymce' => false,
1871 ),
1872
1873 )
1874 ) );
1875
1876 //
1877 // Field: color
1878 //
1879 CSF::createSection( $prefix, array(
1880 'parent' => 'fields',
1881 'title' => 'Color',
1882 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=color" target="_blank">Field: color</a>',
1883 'fields' => array(
1884
1885 array(
1886 'id' => 'opt-color-1',
1887 'type' => 'color',
1888 'title' => 'Color',
1889 ),
1890
1891 array(
1892 'id' => 'opt-color-2',
1893 'type' => 'color',
1894 'title' => 'Color with default (hex)',
1895 'default' => '#3498db',
1896 ),
1897
1898 array(
1899 'id' => 'opt-color-3',
1900 'type' => 'color',
1901 'title' => 'Color with default (rgba)',
1902 'default' => 'rgba(255,255,0,0.25)',
1903 ),
1904
1905 array(
1906 'id' => 'opt-color-4',
1907 'type' => 'color',
1908 'title' => 'Color with default (transparent)',
1909 'default' => 'transparent',
1910 ),
1911
1912 )
1913 ) );
1914
1915 //
1916 // Field: link_color
1917 //
1918 CSF::createSection( $prefix, array(
1919 'parent' => 'fields',
1920 'title' => 'Link Color',
1921 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=link-color" target="_blank">Field: link_color</a>',
1922 'fields' => array(
1923
1924 array(
1925 'id' => 'opt-link-color-1',
1926 'type' => 'link_color',
1927 'title' => 'Link Color',
1928 ),
1929
1930 array(
1931 'id' => 'opt-link-color-2',
1932 'type' => 'link_color',
1933 'title' => 'Link Color with default',
1934 'default' => array(
1935 'color' => '#1e73be',
1936 'hover' => '#259ded',
1937 ),
1938 ),
1939
1940 array(
1941 'id' => 'opt-link-color-3',
1942 'type' => 'link_color',
1943 'title' => 'Link Color with more color options',
1944 'color' => true,
1945 'hover' => true,
1946 'visited' => true,
1947 'active' => true,
1948 'focus' => true,
1949 ),
1950
1951 )
1952 ) );
1953
1954 //
1955 // Field: color_group
1956 //
1957 CSF::createSection( $prefix, array(
1958 'parent' => 'fields',
1959 'title' => 'Color Group',
1960 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=color-group" target="_blank">Field: color_group</a>',
1961 'fields' => array(
1962
1963 array(
1964 'id' => 'opt-color-group-1',
1965 'type' => 'color_group',
1966 'title' => 'Color Group',
1967 'options' => array(
1968 'color-1' => 'Color 1',
1969 'color-2' => 'Color 2',
1970 )
1971 ),
1972
1973 array(
1974 'id' => 'opt-color-group-2',
1975 'type' => 'color_group',
1976 'title' => 'Color Group',
1977 'options' => array(
1978 'color-1' => 'Color 1',
1979 'color-2' => 'Color 2',
1980 'color-3' => 'Color 3',
1981 )
1982 ),
1983
1984 array(
1985 'id' => 'opt-color-group-3',
1986 'type' => 'color_group',
1987 'title' => 'Color Group with default',
1988 'subtitle' => 'Can be add unlimited color options.',
1989 'options' => array(
1990 'color-1' => 'Color 1',
1991 'color-2' => 'Color 2',
1992 'color-3' => 'Color 3',
1993 'color-4' => 'Color 4',
1994 'color-5' => 'Color 5',
1995 ),
1996 'default' => array(
1997 'color-1' => '#000100',
1998 'color-2' => '#002642',
1999 'color-3' => '#ffce4b',
2000 'color-4' => '#ff595e',
2001 'color-5' => '#0052cc',
2002 )
2003 ),
2004
2005 )
2006 ) );
2007
2008 //
2009 // Field: palette
2010 //
2011 CSF::createSection( $prefix, array(
2012 'parent' => 'fields',
2013 'title' => 'Color Palette',
2014 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=palette" target="_blank">Field: palette</a>',
2015 'fields' => array(
2016
2017 array(
2018 'id' => 'opt-palette-1',
2019 'type' => 'palette',
2020 'title' => 'Palette',
2021 'subtitle' => 'Three set colors',
2022 'options' => array(
2023 'set-1' => array( '#f36e27', '#f3d430', '#ed1683' ),
2024 'set-2' => array( '#4153ab', '#6e86c7', '#211f27' ),
2025 'set-3' => array( '#162526', '#508486', '#C8C6CE' ),
2026 'set-4' => array( '#ccab5e', '#fff55f', '#197c5d' ),
2027 ),
2028 'default' => 'set-1',
2029 ),
2030
2031 array(
2032 'id' => 'opt-palette-1',
2033 'type' => 'palette',
2034 'title' => 'Palette',
2035 'subtitle' => 'Four set colors',
2036 'options' => array(
2037 'set-1' => array( '#f04e36', '#f36e27', '#f3d430', '#ed1683' ),
2038 'set-2' => array( '#f9ca06', '#b5b546', '#2f4d48', '#212b2f' ),
2039 'set-3' => array( '#4153ab', '#6e86c7', '#211f27', '#d69762' ),
2040 'set-4' => array( '#162526', '#508486', '#C8C6CE', '#B45F1A' ),
2041 'set-5' => array( '#bbd5ff', '#ccab5e', '#fff55f', '#197c5d' ),
2042 ),
2043 'default' => 'set-3',
2044 ),
2045
2046 array(
2047 'id' => 'opt-palette-2',
2048 'type' => 'palette',
2049 'title' => 'Palette',
2050 'subtitle' => 'Five set colors',
2051 'options' => array(
2052 'set-1' => array( '#bbd5ff', '#ccab5e', '#fff55f', '#197c5d', '#bce2c4' ),
2053 'set-2' => array( '#6d3264', '#edf7f6', '#fde8e9', '#006675', '#e49ab0' ),
2054 'set-3' => array( '#000100', '#002642', '#ffce4b', '#ff595e', '#0052cc' ),
2055 ),
2056 'default' => 'set-1',
2057 ),
2058
2059 )
2060 ) );
2061
2062 //
2063 // Field: background
2064 //
2065 CSF::createSection( $prefix, array(
2066 'parent' => 'fields',
2067 'title' => 'Background',
2068 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=background" target="_blank">Field: background</a>',
2069 'fields' => array(
2070
2071 array(
2072 'id' => 'opt-background-1',
2073 'type' => 'background',
2074 'title' => 'Background',
2075 ),
2076
2077 array(
2078 'id' => 'opt-background-2',
2079 'type' => 'background',
2080 'title' => 'Background with default',
2081 'default' => array(
2082 'background-color' => '#e80000',
2083 'background-position' => 'center center',
2084 'background-repeat' => 'repeat-x',
2085 'background-attachment' => 'fixed',
2086 'background-size' => 'cover',
2087 )
2088 ),
2089
2090 array(
2091 'id' => 'opt-background-3',
2092 'type' => 'background',
2093 'title' => 'Background with all features',
2094 'background_color' => true,
2095 'background_image' => true,
2096 'background-position' => true,
2097 'background_repeat' => true,
2098 'background_attachment' => true,
2099 'background_size' => true,
2100 'background_origin' => true,
2101 'background_clip' => true,
2102 'background_blend_mode' => true,
2103 'background_gradient' => true,
2104 'default' => array(
2105 'background-color' => '#009e44',
2106 'background-gradient-color' => '#81d742',
2107 'background-gradient-direction' => '135deg',
2108 'background-position' => 'center center',
2109 'background-repeat' => 'repeat-x',
2110 'background-attachment' => 'fixed',
2111 'background-size' => 'cover',
2112 'background-origin' => 'border-box',
2113 'background-clip' => 'padding-box',
2114 'background-blend-mode' => 'normal',
2115 )
2116 ),
2117
2118 )
2119 ) );
2120
2121 //
2122 // Field: typography
2123 //
2124 CSF::createSection( $prefix, array(
2125 'parent' => 'fields',
2126 'title' => 'Typography',
2127 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=typography" target="_blank">Field: typography</a>',
2128 'fields' => array(
2129
2130 array(
2131 'id' => 'opt-typography-1',
2132 'type' => 'typography',
2133 'title' => 'Typography',
2134 ),
2135
2136 array(
2137 'id' => 'opt-typography-2',
2138 'type' => 'typography',
2139 'title' => 'Typography with default',
2140 'default' => array(
2141 'font-family' => 'Barlow',
2142 'font-weight' => '600',
2143 'subset' => 'latin-ext',
2144 'type' => 'google',
2145 'text-align' => 'center',
2146 'text-transform' => 'capitalize',
2147 'text-transform' => 'capitalize',
2148 'font-size' => '18',
2149 'line-height' => '20',
2150 'letter-spacing' => '-1',
2151 'color' => '#009e44',
2152 ),
2153 ),
2154
2155 array(
2156 'id' => 'opt-typography-3',
2157 'type' => 'typography',
2158 'title' => 'Typography with few features',
2159 'text_align' => false,
2160 'text_transform' => false,
2161 'font_size' => false,
2162 'line_height' => false,
2163 'letter_spacing' => false,
2164 'color' => false,
2165 'default' => array(
2166 'font-family' => 'Lato',
2167 'font-weight' => '900',
2168 'subset' => 'latin',
2169 'type' => 'google',
2170 ),
2171 ),
2172
2173
2174 array(
2175 'id' => 'opt-typography-4',
2176 'type' => 'typography',
2177 'title' => 'Typography with all features',
2178 'font_family' => true,
2179 'font_weight' => true,
2180 'font_style' => true,
2181 'font_size' => true,
2182 'line_height' => true,
2183 'letter_spacing' => true,
2184 'text_align' => true,
2185 'text-transform' => true,
2186 'color' => true,
2187 'subset' => true,
2188 'backup_font_family' => true,
2189 'font_variant' => true,
2190 'word_spacing' => true,
2191 'text_decoration' => true,
2192 'default' => array(
2193 'font-family' => 'Old Standard TT',
2194 'type' => 'google',
2195 ),
2196 ),
2197
2198 )
2199 ) );
2200
2201 //
2202 // Field: dimensions
2203 //
2204 CSF::createSection( $prefix, array(
2205 'parent' => 'fields',
2206 'title' => 'Dimensions',
2207 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=dimensions" target="_blank">Field: dimensions</a>',
2208 'fields' => array(
2209
2210 array(
2211 'id' => 'opt-dimensions-1',
2212 'type' => 'dimensions',
2213 'title' => 'Dimensions',
2214 ),
2215
2216 array(
2217 'id' => 'opt-dimensions-2',
2218 'type' => 'dimensions',
2219 'title' => 'Dimensions with default',
2220 'default' => array(
2221 'width' => '100',
2222 'height' => '250',
2223 'unit' => 'px',
2224 ),
2225 ),
2226
2227 array(
2228 'id' => 'opt-dimensions-3',
2229 'type' => 'dimensions',
2230 'title' => 'Dimensions with custom text and units',
2231 'width_icon' => 'width',
2232 'height_icon' => 'height',
2233 'units' => array( 'px', '%', 'em', 'rem', 'pt' ),
2234 'default' => array(
2235 'width' => '100',
2236 'height' => '50',
2237 'unit' => '%',
2238 ),
2239 ),
2240
2241 array(
2242 'id' => 'opt-dimensions-4',
2243 'type' => 'dimensions',
2244 'title' => 'Dimensions with single unit',
2245 'units' => array( 'px' ),
2246 ),
2247
2248 array(
2249 'id' => 'opt-dimensions-5',
2250 'type' => 'dimensions',
2251 'title' => 'Dimensions without unit selector',
2252 'unit' => false,
2253 ),
2254
2255 array(
2256 'id' => 'opt-dimensions-6',
2257 'type' => 'dimensions',
2258 'title' => 'Dimensions with only width',
2259 'height' => false,
2260 ),
2261
2262 array(
2263 'id' => 'opt-dimensions-7',
2264 'type' => 'dimensions',
2265 'title' => 'Dimensions with only width and single unit',
2266 'height' => false,
2267 'units' => array( 'px' ),
2268 ),
2269
2270 )
2271 ) );
2272
2273 //
2274 // Field: spacing
2275 //
2276 CSF::createSection( $prefix, array(
2277 'parent' => 'fields',
2278 'title' => 'Spacing',
2279 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=spacing" target="_blank">Field: spacing</a>',
2280 'fields' => array(
2281
2282 array(
2283 'id' => 'opt-spacing-1',
2284 'type' => 'spacing',
2285 'title' => 'Spacing',
2286 ),
2287
2288 array(
2289 'id' => 'opt-spacing-2',
2290 'type' => 'spacing',
2291 'title' => 'Spacing with default',
2292 'default' => array(
2293 'top' => '50',
2294 'right' => '100',
2295 'bottom' => '50',
2296 'left' => '100',
2297 'unit' => 'px',
2298 ),
2299 ),
2300
2301 array(
2302 'id' => 'opt-spacing-2',
2303 'type' => 'spacing',
2304 'title' => 'Spacing without unit selector',
2305 'units' => array( 'px' ),
2306 'default' => array(
2307 'top' => '50',
2308 'right' => '100',
2309 'bottom' => '50',
2310 'left' => '100',
2311 'unit' => 'px',
2312 ),
2313 ),
2314
2315 array(
2316 'id' => 'opt-spacing-3',
2317 'type' => 'spacing',
2318 'title' => 'Spacing with only left and right',
2319 'top' => false,
2320 'bottom' => false,
2321 ),
2322
2323 array(
2324 'id' => 'opt-spacing-4',
2325 'type' => 'spacing',
2326 'title' => 'Spacing with only top and bottom',
2327 'left' => false,
2328 'right' => false,
2329 ),
2330
2331 array(
2332 'id' => 'opt-spacing-5',
2333 'type' => 'spacing',
2334 'title' => 'Spacing with all directions',
2335 'all' => true,
2336 ),
2337
2338 )
2339 ) );
2340
2341 //
2342 // Field: border
2343 //
2344 CSF::createSection( $prefix, array(
2345 'parent' => 'fields',
2346 'title' => 'Border',
2347 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=border" target="_blank">Field: border</a>',
2348 'fields' => array(
2349
2350 array(
2351 'id' => 'opt-border-1',
2352 'type' => 'border',
2353 'title' => 'Border',
2354 ),
2355
2356 array(
2357 'id' => 'opt-border-2',
2358 'type' => 'border',
2359 'title' => 'Border with default',
2360 'default' => array(
2361 'top' => '4',
2362 'right' => '8',
2363 'bottom' => '4',
2364 'left' => '8',
2365 'style' => 'dashed',
2366 'color' => '#1e73be',
2367 )
2368 ),
2369
2370 array(
2371 'id' => 'opt-border-3',
2372 'type' => 'border',
2373 'title' => 'Border with only left and right',
2374 'top' => false,
2375 'bottom' => false,
2376 ),
2377
2378 array(
2379 'id' => 'opt-border-4',
2380 'type' => 'border',
2381 'title' => 'Border with only top and bottom',
2382 'left' => false,
2383 'right' => false,
2384 ),
2385
2386 array(
2387 'id' => 'opt-border-5',
2388 'type' => 'border',
2389 'title' => 'Border with all directions',
2390 'all' => true,
2391 ),
2392
2393 )
2394 ) );
2395
2396 //
2397 // Field: spinner
2398 //
2399 CSF::createSection( $prefix, array(
2400 'parent' => 'fields',
2401 'title' => 'Spinner',
2402 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=spinner" target="_blank">Field: spinner</a>',
2403 'fields' => array(
2404
2405 array(
2406 'id' => 'opt-spinner-1',
2407 'type' => 'spinner',
2408 'title' => 'Spinner',
2409 'subtitle' => 'max:100 | min:0 | step:1',
2410 'max' => 100,
2411 'min' => 0,
2412 'step' => 1,
2413 'default' => 25,
2414 ),
2415
2416 array(
2417 'id' => 'opt-spinner-2',
2418 'type' => 'spinner',
2419 'title' => 'Spinner',
2420 'subtitle' => 'max:200 | min:100 | step:10',
2421 'max' => 200,
2422 'min' => 100,
2423 'step' => 10,
2424 'default' => 100,
2425 ),
2426
2427 array(
2428 'id' => 'opt-spinner-3',
2429 'type' => 'spinner',
2430 'title' => 'Spinner',
2431 'subtitle' => 'max:1 | min:0 | step:0.1 | unit:px',
2432 'max' => 1,
2433 'min' => 0,
2434 'step' => 0.1,
2435 'unit' => 'px',
2436 'default' => 0.5,
2437 ),
2438
2439 )
2440 ) );
2441
2442 //
2443 // Field: number
2444 //
2445 CSF::createSection( $prefix, array(
2446 'parent' => 'fields',
2447 'title' => 'Number',
2448 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=number" target="_blank">Field: number</a>',
2449 'fields' => array(
2450
2451 array(
2452 'id' => 'opt-number-1',
2453 'type' => 'number',
2454 'title' => 'Number',
2455 ),
2456 array(
2457 'id' => 'opt-number-2',
2458 'type' => 'number',
2459 'title' => 'Number with unit',
2460 'unit' => 'px',
2461 ),
2462 array(
2463 'id' => 'opt-number-3',
2464 'type' => 'number',
2465 'title' => 'Number with default',
2466 'unit' => 'width',
2467 'default' => 100,
2468 ),
2469
2470 )
2471 ) );
2472
2473 //
2474 // Field: slider
2475 //
2476 CSF::createSection( $prefix, array(
2477 'parent' => 'fields',
2478 'title' => 'Slider',
2479 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=slider" target="_blank">Field: slider</a>',
2480 'fields' => array(
2481
2482 array(
2483 'id' => 'opt-slider-1',
2484 'type' => 'slider',
2485 'title' => 'Slider',
2486 ),
2487
2488 array(
2489 'id' => 'opt-slider-2',
2490 'type' => 'slider',
2491 'title' => 'Slider with default',
2492 'default' => 50,
2493 ),
2494
2495 array(
2496 'id' => 'opt-slider-3',
2497 'type' => 'slider',
2498 'title' => 'Slider with unit text',
2499 'unit' => '%',
2500 'default' => 75,
2501 ),
2502
2503 array(
2504 'id' => 'opt-slider-4',
2505 'type' => 'slider',
2506 'title' => 'Slider with min/max allowed value',
2507 'subtitle' => 'Min: 1 | Max: 10 | Step: 0.1 | Default: 5.5',
2508 'unit' => 'px',
2509 'min' => 1,
2510 'max' => 10,
2511 'step' => 0.1,
2512 'default' => 5.5,
2513 ),
2514
2515 )
2516 ) );
2517
2518 //
2519 // Field: sorter
2520 //
2521 CSF::createSection( $prefix, array(
2522 'parent' => 'fields',
2523 'title' => 'Sorter',
2524 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=sorter" target="_blank">Field: sorter</a>',
2525 'fields' => array(
2526
2527 array(
2528 'id' => 'opt-sorter-1',
2529 'type' => 'sorter',
2530 'title' => 'Sorter',
2531 'default' => array(
2532 'enabled' => array(
2533 'opt-1' => 'Option 1',
2534 'opt-2' => 'Option 2',
2535 'opt-3' => 'Option 3',
2536 ),
2537 'disabled' => array(
2538 'opt-4' => 'Option 4',
2539 'opt-5' => 'Option 5',
2540 ),
2541 ),
2542 ),
2543
2544 array(
2545 'id' => 'opt-sorter-2',
2546 'type' => 'sorter',
2547 'title' => 'Sorter with custom title',
2548 'enabled_title' => 'Activated',
2549 'disabled_title' => 'Deactivated',
2550 'default' => array(
2551 'enabled' => array(
2552 'opt-1' => 'Option 1',
2553 'opt-2' => 'Option 2',
2554 'opt-3' => 'Option 3',
2555 ),
2556 'disabled' => array(
2557 'opt-4' => 'Option 4',
2558 'opt-5' => 'Option 5',
2559 ),
2560 ),
2561 ),
2562
2563 array(
2564 'id' => 'opt-sorter-3',
2565 'type' => 'sorter',
2566 'title' => 'Sorter with use only enabled section and without title',
2567 'enabled_title' => false,
2568 'disabled' => false,
2569 'default' => array(
2570 'enabled' => array(
2571 'opt-1' => 'Option 1',
2572 'opt-2' => 'Option 2',
2573 'opt-3' => 'Option 3',
2574 ),
2575 ),
2576 ),
2577
2578 )
2579 ) );
2580
2581 //
2582 // Field: sortable
2583 //
2584 CSF::createSection( $prefix, array(
2585 'parent' => 'fields',
2586 'title' => 'Sortable',
2587 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=sortable" target="_blank">Field: sortable</a>',
2588 'fields' => array(
2589
2590 array(
2591 'id' => 'opt-sortable-1',
2592 'type' => 'sortable',
2593 'title' => 'Sortable',
2594 'fields' => array(
2595 array(
2596 'id' => 'opt-text-1',
2597 'type' => 'text',
2598 'title' => 'Text 1'
2599 ),
2600 array(
2601 'id' => 'opt-text-2',
2602 'type' => 'text',
2603 'title' => 'Text 2'
2604 ),
2605 array(
2606 'id' => 'opt-text-3',
2607 'type' => 'text',
2608 'title' => 'Text 3'
2609 ),
2610 ),
2611 ),
2612
2613 array(
2614 'id' => 'opt-sortable-2',
2615 'type' => 'sortable',
2616 'title' => 'Sortable with default',
2617 'fields' => array(
2618 array(
2619 'id' => 'opt-text-1',
2620 'type' => 'text',
2621 'title' => 'Text 1'
2622 ),
2623 array(
2624 'id' => 'opt-text-2',
2625 'type' => 'text',
2626 'title' => 'Text 2'
2627 ),
2628 array(
2629 'id' => 'opt-text-3',
2630 'type' => 'text',
2631 'title' => 'Text 3'
2632 ),
2633 ),
2634 'default' => array(
2635 'opt-text-1' => 'This is text 1 default',
2636 'opt-text-2' => 'This is text 2 default',
2637 'opt-text-3' => 'This is text 3 default',
2638 )
2639 ),
2640
2641 )
2642 ) );
2643
2644 //
2645 // Field: switcher
2646 //
2647 CSF::createSection( $prefix, array(
2648 'parent' => 'fields',
2649 'title' => 'Switcher',
2650 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=switcher" target="_blank">Field: switcher</a>',
2651 'fields' => array(
2652
2653 array(
2654 'id' => 'opt-switcher-1',
2655 'type' => 'switcher',
2656 'title' => 'Switcher',
2657 ),
2658
2659 array(
2660 'id' => 'opt-switcher-2',
2661 'type' => 'switcher',
2662 'title' => 'Switcher with default',
2663 'default' => true,
2664 ),
2665
2666 array(
2667 'id' => 'opt-switcher-3',
2668 'type' => 'switcher',
2669 'title' => 'Switcher with label',
2670 'label' => 'The label text of the switcher.',
2671 ),
2672
2673 array(
2674 'id' => 'opt-switcher-4',
2675 'type' => 'switcher',
2676 'title' => 'Switcher with Yes/No',
2677 'text_on' => 'Yes',
2678 'text_off' => 'No',
2679 ),
2680
2681 array(
2682 'id' => 'opt-switcher-4',
2683 'type' => 'switcher',
2684 'title' => 'Switcher with custom text Enabled/Disabled',
2685 'text_on' => 'Enabled',
2686 'text_off' => 'Disabled',
2687 'text_width' => '100',
2688 ),
2689
2690 )
2691 ) );
2692
2693 //
2694 // Field: icons
2695 //
2696 CSF::createSection( $prefix, array(
2697 'parent' => 'fields',
2698 'title' => 'Icons',
2699 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=icon" target="_blank">Field: icon</a>',
2700 'fields' => array(
2701
2702 array(
2703 'id' => 'opt-icon-1',
2704 'type' => 'icon',
2705 'title' => 'Icon',
2706 ),
2707
2708 array(
2709 'id' => 'opt-icon-2',
2710 'type' => 'icon',
2711 'title' => 'Icon with default',
2712 'default' => 'fas fa-check',
2713 ),
2714
2715 )
2716 ) );
2717
2718 //
2719 // Field: map
2720 //
2721 CSF::createSection( $prefix, array(
2722 'parent' => 'fields',
2723 'title' => 'Map',
2724 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=map" target="_blank">Field: map</a>',
2725 'fields' => array(
2726
2727 array(
2728 'id' => 'opt-map-1',
2729 'type' => 'map',
2730 'title' => 'Map',
2731 ),
2732
2733 array(
2734 'id' => 'opt-map-2',
2735 'type' => 'map',
2736 'title' => 'Map with Default',
2737 'default' => array(
2738 'address' => 'New York, United States of America',
2739 'latitude' => '40.7127281',
2740 'longitude' => '-74.0060152',
2741 'zoom' => '12',
2742 )
2743 ),
2744
2745 array(
2746 'type' => 'submessage',
2747 'style' => 'info',
2748 'content' => 'Using custom <strong>address_field</strong> field in below example.',
2749 ),
2750
2751 array(
2752 'id' => 'my-address-text',
2753 'type' => 'text',
2754 'title' => 'Address',
2755 ),
2756
2757 array(
2758 'id' => 'opt-map-3',
2759 'type' => 'map',
2760 'title' => 'Map',
2761 'desc' => 'Using custom <strong>address_field</strong> field',
2762 'address_field' => 'my-address-text',
2763 ),
2764
2765 )
2766 ) );
2767
2768 //
2769 // Field: link
2770 //
2771 CSF::createSection( $prefix, array(
2772 'parent' => 'fields',
2773 'title' => 'Link',
2774 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=link" target="_blank">Field: link</a>',
2775 'fields' => array(
2776
2777 array(
2778 'id' => 'opt-link-1',
2779 'type' => 'link',
2780 'title' => 'Link',
2781 ),
2782
2783 array(
2784 'id' => 'opt-link-2',
2785 'type' => 'link',
2786 'title' => 'Link with default',
2787 'default' => array(
2788 'url' => 'http://codestarframework.com/',
2789 'text' => 'Codestar Framework',
2790 'target' => '_blank'
2791 ),
2792 ),
2793
2794 )
2795 ) );
2796
2797 //
2798 // Field: date
2799 //
2800 CSF::createSection( $prefix, array(
2801 'parent' => 'fields',
2802 'title' => 'Date',
2803 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=date" target="_blank">Field: date</a>',
2804 'fields' => array(
2805
2806 array(
2807 'id' => 'opt-date-1',
2808 'type' => 'date',
2809 'title' => 'Date',
2810 ),
2811
2812 array(
2813 'id' => 'opt-date-2',
2814 'type' => 'date',
2815 'title' => 'Date with custom settings',
2816 'settings' => array(
2817 'dateFormat' => 'mm/dd/yy',
2818 'changeMonth' => true,
2819 'changeYear' => true,
2820 'showWeek' => true,
2821 'showButtonPanel' => true,
2822 'weekHeader' => 'Week',
2823 'monthNamesShort' => array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ),
2824 'dayNamesMin' => array( 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ),
2825 )
2826 ),
2827
2828 array(
2829 'id' => 'opt-date-3',
2830 'type' => 'date',
2831 'title' => 'Date with From &amp; To',
2832 'from_to' => true,
2833 ),
2834
2835 array(
2836 'id' => 'opt-date-4',
2837 'type' => 'date',
2838 'title' => 'Date with custom texts Begin &amp; End',
2839 'from_to' => true,
2840 'text_from' => 'Begin',
2841 'text_to' => 'End',
2842 ),
2843
2844 )
2845 ) );
2846
2847 //
2848 // Field: datetime
2849 //
2850 CSF::createSection( $prefix, array(
2851 'parent' => 'fields',
2852 'title' => 'Date and Time',
2853 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=date-time" target="_blank">Field: datetime</a>',
2854 'fields' => array(
2855
2856 array(
2857 'id' => 'opt-datetime-1',
2858 'type' => 'datetime',
2859 'title' => 'Date',
2860 ),
2861
2862 array(
2863 'id' => 'opt-datetime-2',
2864 'type' => 'datetime',
2865 'title' => 'Date',
2866 'subtitle' => 'Human-friendly Dates',
2867 'settings' => array(
2868 'altFormat' => 'F j, Y',
2869 'dateFormat' => 'Y-m-d',
2870 ),
2871 ),
2872
2873 array(
2874 'id' => 'opt-datetime-3',
2875 'type' => 'datetime',
2876 'title' => 'Date',
2877 'subtitle' => 'Start week on Monday',
2878 'settings' => array(
2879 'locale' => array(
2880 'firstDayOfWeek' => 1,
2881 ),
2882 ),
2883 ),
2884
2885 array(
2886 'id' => 'opt-datetime-4',
2887 'type' => 'datetime',
2888 'title' => 'Date and Time',
2889 'subtitle' => 'Date and Time Both',
2890 'settings' => array(
2891 'enableTime' => true,
2892 'dateFormat' => 'Y-m-d H:i',
2893 ),
2894 ),
2895
2896 array(
2897 'id' => 'opt-datetime-5',
2898 'type' => 'datetime',
2899 'title' => 'Time',
2900 'subtitle' => 'Only Time',
2901 'settings' => array(
2902 'noCalendar' => true,
2903 'enableTime' => true,
2904 ),
2905 ),
2906
2907 array(
2908 'id' => 'opt-datetime-6',
2909 'type' => 'datetime',
2910 'title' => 'Time',
2911 'subtitle' => '24-hour Time without PM:AM',
2912 'settings' => array(
2913 'noCalendar' => true,
2914 'enableTime' => true,
2915 'dateFormat' => 'H:i',
2916 'time_24hr' => true,
2917 ),
2918 ),
2919
2920 array(
2921 'id' => 'opt-datetime-7',
2922 'type' => 'datetime',
2923 'title' => 'Date Range',
2924 'subtitle' => 'Range Mode',
2925 'settings' => array(
2926 'mode' => 'range',
2927 ),
2928 ),
2929
2930 array(
2931 'id' => 'opt-datetime-8',
2932 'type' => 'datetime',
2933 'title' => 'Date From - To',
2934 'subtitle' => 'Date with "From" and "To"',
2935 'from_to' => true,
2936 ),
2937
2938 array(
2939 'id' => 'opt-datetime-9',
2940 'type' => 'datetime',
2941 'title' => 'Date Begin - End',
2942 'subtitle' => 'Date with "Begin" and "End" Custom Text',
2943 'from_to' => true,
2944 'text_from' => 'Begin',
2945 'text_to' => 'End',
2946 ),
2947
2948 array(
2949 'id' => 'opt-datetime-10',
2950 'type' => 'datetime',
2951 'title' => 'Date',
2952 'subtitle' => 'Localize Example (Spanish)',
2953 'settings' => array(
2954 'locale' => array(
2955 'time_24hr' => true,
2956 'firstDayOfWeek' => 1,
2957 'weekdays' => array(
2958 'shorthand' => array( 'Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb' ),
2959 'longhand' => array(
2960 'Domingo',
2961 'Lunes',
2962 'Martes',
2963 'Miércoles',
2964 'Jueves',
2965 'Viernes',
2966 'Sábado',
2967 ),
2968 ),
2969 'months' => array(
2970 'shortland' => array( 'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic' ),
2971 'longhand' => array(
2972 'Enero',
2973 'Febrero',
2974 'Marzo',
2975 'Abril',
2976 'Mayo',
2977 'Junio',
2978 'Julio',
2979 'Agosto',
2980 'Septiembre',
2981 'Octubre',
2982 'Noviembre',
2983 'Diciembre',
2984 ),
2985 ),
2986 ),
2987 ),
2988 ),
2989
2990 array(
2991 'id' => 'opt-datetime-11',
2992 'type' => 'datetime',
2993 'title' => 'Date',
2994 'subtitle' => 'Ready-Only Input',
2995 'settings' => array(
2996 'allowInput' => false,
2997 ),
2998 ),
2999
3000 )
3001 ) );
3002
3003 //
3004 // Field: image_select
3005 //
3006 CSF::createSection( $prefix, array(
3007 'parent' => 'fields',
3008 'title' => 'Image Select',
3009 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=image-select" target="_blank">Field: image_select</a>',
3010 'fields' => array(
3011
3012 array(
3013 'id' => 'opt-image-select-1',
3014 'type' => 'image_select',
3015 'title' => 'Image Select',
3016 'options' => array(
3017 'opt-1' => 'http://codestarframework.com/assets/images/placeholder/80x80-e74c3c.gif',
3018 'opt-2' => 'http://codestarframework.com/assets/images/placeholder/80x80-ffbc00.gif',
3019 'opt-3' => 'http://codestarframework.com/assets/images/placeholder/80x80-3498db.gif',
3020 ),
3021 ),
3022
3023 array(
3024 'id' => 'opt-image-select-2',
3025 'type' => 'image_select',
3026 'title' => 'Image Select with default',
3027 'options' => array(
3028 'opt-1' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
3029 'opt-2' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
3030 'opt-3' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
3031 ),
3032 'default' => 'opt-2'
3033 ),
3034
3035 array(
3036 'id' => 'opt-image-select-3',
3037 'type' => 'image_select',
3038 'title' => 'Image Select with multiple choice',
3039 'multiple' => true,
3040 'options' => array(
3041 'opt-1' => 'http://codestarframework.com/assets/images/placeholder/80x80-e74c3c.gif',
3042 'opt-2' => 'http://codestarframework.com/assets/images/placeholder/80x80-ffbc00.gif',
3043 'opt-3' => 'http://codestarframework.com/assets/images/placeholder/80x80-3498db.gif',
3044 ),
3045 ),
3046
3047 array(
3048 'id' => 'opt-image-select-4',
3049 'type' => 'image_select',
3050 'title' => 'Image Select with multiple choice and default',
3051 'multiple' => true,
3052 'options' => array(
3053 'opt-1' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
3054 'opt-2' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
3055 'opt-3' => 'http://codestarframework.com/assets/images/placeholder/80x80-e74c3c.gif',
3056 'opt-4' => 'http://codestarframework.com/assets/images/placeholder/80x80-ffbc00.gif',
3057 'opt-5' => 'http://codestarframework.com/assets/images/placeholder/80x80-3498db.gif',
3058 'opt-6' => 'http://codestarframework.com/assets/images/placeholder/80x80-2ecc71.gif',
3059 'opt-7' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
3060 'opt-8' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
3061 'opt-9' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
3062 ),
3063 'default' => array( 'opt-3', 'opt-4', 'opt-5', 'opt-6' )
3064 ),
3065
3066 array(
3067 'id' => 'opt-image-select-5',
3068 'type' => 'image_select',
3069 'title' => 'Image Select inline style',
3070 'inline' => true,
3071 'options' => array(
3072 'opt-1' => 'http://codestarframework.com/assets/images/placeholder/80x80-e74c3c.gif',
3073 'opt-2' => 'http://codestarframework.com/assets/images/placeholder/80x80-ffbc00.gif',
3074 'opt-3' => 'http://codestarframework.com/assets/images/placeholder/80x80-3498db.gif',
3075 'opt-4' => 'http://codestarframework.com/assets/images/placeholder/80x80-2ecc71.gif',
3076 ),
3077 'default' => 'opt-1'
3078 ),
3079
3080 )
3081 ) );
3082
3083 //
3084 // Field: button_set
3085 //
3086 CSF::createSection( $prefix, array(
3087 'parent' => 'fields',
3088 'title' => 'Button Set',
3089 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=button-set" target="_blank">Field: button_set</a>',
3090 'fields' => array(
3091
3092 array(
3093 'id' => 'opt-button-set-1',
3094 'type' => 'button_set',
3095 'title' => 'Button Set',
3096 'options' => array(
3097 'enabled' => 'Enabled',
3098 'disabled' => 'Disabled',
3099 ),
3100 ),
3101
3102 array(
3103 'id' => 'opt-button-set-2',
3104 'type' => 'button_set',
3105 'title' => 'Button Set with default',
3106 'options' => array(
3107 'enabled' => 'Enabled',
3108 '' => 'Default',
3109 'disabled' => 'Disabled',
3110 ),
3111 ),
3112
3113 array(
3114 'id' => 'opt-button-set-3',
3115 'type' => 'button_set',
3116 'title' => 'Button Set',
3117 'options' => array(
3118 'activate' => 'Activate',
3119 'deactivate' => 'Deactivate',
3120 ),
3121 'default' => 'activate',
3122 ),
3123
3124 array(
3125 'id' => 'opt-button-set-4',
3126 'type' => 'button_set',
3127 'title' => 'Button Set',
3128 'options' => array(
3129 'on' => 'ON',
3130 'off' => 'OFF',
3131 ),
3132 'default' => 'on',
3133 ),
3134
3135 array(
3136 'id' => 'opt-button-set-5',
3137 'type' => 'button_set',
3138 'title' => 'Button Set with multiple choice',
3139 'multiple' => true,
3140 'options' => array(
3141 'opt-1' => 'Option 1',
3142 'opt-2' => 'Option 2',
3143 'opt-3' => 'Option 3',
3144 'opt-4' => 'Option 4',
3145 'opt-5' => 'Option 5',
3146 ),
3147 ),
3148
3149 array(
3150 'id' => 'opt-button-set-6',
3151 'type' => 'button_set',
3152 'title' => 'Button Set with multiple choice and default',
3153 'multiple' => true,
3154 'options' => array(
3155 'opt-1' => 'Option 1',
3156 'opt-2' => 'Option 2',
3157 'opt-3' => 'Option 3',
3158 'opt-4' => 'Option 4',
3159 'opt-5' => 'Option 5',
3160 ),
3161 'default' => array( 'opt-2', 'opt-4' )
3162 ),
3163
3164 )
3165 ) );
3166
3167 //
3168 // Dependencies
3169 //
3170 CSF::createSection( $prefix, array(
3171 'parent' => 'fields',
3172 'title' => 'Dependencies',
3173 'description' => 'Visit documentation for more details: <a href="http://codestarframework.com/documentation/#/faq?id=how-to-use-dependency" target="_blank">How to use dependencies</a>',
3174 'fields' => array(
3175
3176 array(
3177 'type' => 'subheading',
3178 'content' => 'Basic Dependencies',
3179 ),
3180
3181 //
3182 // Dependency example 1
3183 array(
3184 'id' => 'opt-depend-switcher',
3185 'type' => 'switcher',
3186 'title' => 'If switched to (ON)',
3187 ),
3188
3189 array(
3190 'type' => 'notice',
3191 'style' => 'success',
3192 'content' => 'Success: Switched to (ON).',
3193 'dependency' => array( 'opt-depend-switcher', '==', 'true' ),
3194 ),
3195
3196 //
3197 // Dependency example 2
3198 array(
3199 'id' => 'opt-depend-text',
3200 'type' => 'text',
3201 'title' => 'If typed something to field',
3202 ),
3203
3204 array(
3205 'type' => 'notice',
3206 'style' => 'success',
3207 'content' => 'Success: You typed something.',
3208 'dependency' => array( 'opt-depend-text', '!=', '' ),
3209 ),
3210
3211 //
3212 // Dependency example 3
3213 array(
3214 'id' => 'opt-depend-select',
3215 'type' => 'select',
3216 'title' => 'If selected to (Blue) or (Black)',
3217 'placeholder' => 'Select a color',
3218 'options' => array(
3219 'blue' => 'Blue',
3220 'yellow' => 'Yellow',
3221 'green' => 'Green',
3222 'black' => 'Black',
3223 'white' => 'White',
3224 ),
3225 ),
3226
3227 array(
3228 'type' => 'notice',
3229 'style' => 'success',
3230 'content' => 'Success: Selected to (Blue) or (Black).',
3231 'dependency' => array( 'opt-depend-select', 'any', 'blue,black' ),
3232 ),
3233
3234 //
3235 // Dependency example 4
3236 array(
3237 'id' => 'opt-depend-radio',
3238 'type' => 'radio',
3239 'title' => 'If selected to (Yes, Please)',
3240 'inline' => true,
3241 'options' => array(
3242 'no' => 'No, Thanks',
3243 'yes' => 'Yes, Please',
3244 'any' => 'I am not sure!',
3245 ),
3246 'default' => 'no'
3247 ),
3248
3249 array(
3250 'type' => 'notice',
3251 'style' => 'success',
3252 'content' => 'Success: Selected to (Yes, Please).',
3253 'dependency' => array( 'opt-depend-radio', '==', 'yes' ),
3254 ),
3255
3256 //
3257 // Dependency example 5
3258 array(
3259 'id' => 'opt-depend-checkbox',
3260 'type' => 'checkbox',
3261 'title' => 'If selected to (Green) or (Black)',
3262 'inline' => true,
3263 'options' => array(
3264 'blue' => 'Blue',
3265 'yellow' => 'Yellow',
3266 'green' => 'Green',
3267 'black' => 'Black',
3268 'white' => 'White',
3269 ),
3270 ),
3271
3272 array(
3273 'type' => 'notice',
3274 'style' => 'success',
3275 'content' => 'Success: Selected to (Green).',
3276 'dependency' => array( 'opt-depend-checkbox', 'any', 'green,black' ),
3277 ),
3278
3279 //
3280 // Dependency example 6
3281 array(
3282 'id' => 'opt-depend-image-select',
3283 'type' => 'image_select',
3284 'title' => 'If selected to (Blue) box',
3285 'options' => array(
3286 'green' => 'http://codestarframework.com/assets/images/placeholder/100x80-2ecc71.gif',
3287 'red' => 'http://codestarframework.com/assets/images/placeholder/100x80-e74c3c.gif',
3288 'yellow' => 'http://codestarframework.com/assets/images/placeholder/100x80-ffbc00.gif',
3289 'blue' => 'http://codestarframework.com/assets/images/placeholder/100x80-3498db.gif',
3290 'gray' => 'http://codestarframework.com/assets/images/placeholder/100x80-555555.gif',
3291 ),
3292 'default' => 'green',
3293 ),
3294
3295 array(
3296 'type' => 'notice',
3297 'style' => 'success',
3298 'content' => 'Success: Selected to (Blue) box.',
3299 'dependency' => array( 'opt-depend-image-select', '==', 'blue' ),
3300 ),
3301
3302 //
3303 // Dependency example 6
3304 array(
3305 'id' => 'opt-depend-image-select-any',
3306 'type' => 'image_select',
3307 'title' => 'If selected to (Red) or (Blue) box',
3308 'options' => array(
3309 'green' => 'http://codestarframework.com/assets/images/placeholder/100x80-2ecc71.gif',
3310 'red' => 'http://codestarframework.com/assets/images/placeholder/100x80-e74c3c.gif',
3311 'yellow' => 'http://codestarframework.com/assets/images/placeholder/100x80-ffbc00.gif',
3312 'blue' => 'http://codestarframework.com/assets/images/placeholder/100x80-3498db.gif',
3313 'gray' => 'http://codestarframework.com/assets/images/placeholder/100x80-555555.gif',
3314 ),
3315 'default' => 'green',
3316 ),
3317
3318 array(
3319 'type' => 'notice',
3320 'style' => 'success',
3321 'content' => 'Success: Selected to (Red) or (Blue) box.',
3322 'dependency' => array( 'opt-depend-image-select-any', 'any', 'red,blue' ),
3323 ),
3324
3325 array(
3326 'type' => 'subheading',
3327 'content' => 'Visible Dependencies',
3328 ),
3329
3330 //
3331 // Dependency example 7
3332 array(
3333 'id' => 'opt-depend-visible-switcher',
3334 'type' => 'switcher',
3335 'title' => 'Switched to (ON)',
3336 'label' => 'Below fields are visibling instead of hiding. Switched to (ON) for use them.',
3337 ),
3338
3339 array(
3340 'id' => 'opt-depend-visible-text',
3341 'type' => 'text',
3342 'title' => 'Visible Text',
3343 'dependency' => array( 'opt-depend-visible-switcher', '==', 'true', '', 'visible' ),
3344 ),
3345
3346 array(
3347 'id' => 'opt-depend-visible-select',
3348 'type' => 'select',
3349 'title' => 'Visible Select',
3350 'placeholder' => 'Select an option',
3351 'options' => array(
3352 'opt-1' => 'Option 1',
3353 'opt-2' => 'Option 2',
3354 'opt-3' => 'Option 3',
3355 ),
3356 'dependency' => array( 'opt-depend-visible-switcher', '==', 'true', '', 'visible' ),
3357 ),
3358
3359 //
3360 // Dependency example 8
3361 array(
3362 'type' => 'subheading',
3363 'content' => 'Nested Dependencies',
3364 ),
3365
3366 array(
3367 'id' => 'opt-depend-switcher-1',
3368 'type' => 'switcher',
3369 'title' => 'If switched to (ON) --->',
3370 ),
3371
3372 array(
3373 'id' => 'opt-depend-select-1',
3374 'type' => 'select',
3375 'title' => '---> and selected to (Blue)',
3376 'placeholder' => 'Select a color',
3377 'options' => array(
3378 'blue' => 'Blue',
3379 'yellow' => 'Yellow',
3380 'green' => 'Green',
3381 'black' => 'Black',
3382 'white' => 'White',
3383 ),
3384 ),
3385
3386 array(
3387 'type' => 'notice',
3388 'style' => 'success',
3389 'content' => 'Success: Switched to (ON) and selected to (Blue).',
3390 'dependency' => array( 'opt-depend-switcher-1|opt-depend-select-1', '==|==', 'true|blue' ),
3391 ),
3392
3393 //
3394 // Dependency example 9
3395 array(
3396 'type' => 'subheading',
3397 'content' => 'Another Nested Dependencies',
3398 ),
3399
3400 array(
3401 'id' => 'opt-nested-select-1',
3402 'type' => 'select',
3403 'title' => 'If selected to (Black) or (White) --->',
3404 'placeholder' => 'Select a color',
3405 'options' => array(
3406 'blue' => 'Blue',
3407 'yellow' => 'Yellow',
3408 'green' => 'Green',
3409 'black' => 'Black',
3410 'white' => 'White',
3411 ),
3412 ),
3413
3414 array(
3415 'id' => 'opt-nested-select-2',
3416 'type' => 'select',
3417 'title' => '---> and selected to (Large) --->',
3418 'placeholder' => 'Select a size',
3419 'options' => array(
3420 'small' => 'Small',
3421 'middle' => 'Middle',
3422 'large' => 'Large',
3423 'xlage' => 'XLarge',
3424 'xxlage' => 'XXLarge',
3425 ),
3426 'dependency' => array( 'opt-nested-select-1', 'any', 'black,white' ),
3427 ),
3428
3429 array(
3430 'id' => 'opt-nested-select-3',
3431 'type' => 'select',
3432 'title' => '---> and selected to (Hello)',
3433 'placeholder' => 'Select a word',
3434 'options' => array(
3435 'hello' => 'Hello',
3436 'world' => 'World',
3437 ),
3438 'dependency' => array( 'opt-nested-select-1|opt-nested-select-2', 'any|==', 'black,white|large' ),
3439 ),
3440
3441 array(
3442 'type' => 'notice',
3443 'style' => 'success',
3444 'content' => 'Congratulations, You are here now!',
3445 'dependency' => array( 'opt-nested-select-1|opt-nested-select-2|opt-nested-select-3', 'any|==|==', 'black,white|large|hello' ),
3446 ),
3447
3448 array(
3449 'type' => 'subheading',
3450 'content' => 'Contains Dependencies',
3451 ),
3452
3453 array(
3454 'id' => 'opt-depend-checkbox-1',
3455 'type' => 'checkbox',
3456 'title' => 'Select a color or more.',
3457 'inline' => true,
3458 'options' => array(
3459 'blue' => 'Blue',
3460 'yellow' => 'Yellow',
3461 'green' => 'Green',
3462 ),
3463 ),
3464
3465 array(
3466 'type' => 'notice',
3467 'style' => 'info',
3468 'content' => 'Selected (blue) color.',
3469 'dependency' => array( 'opt-depend-checkbox-1', 'contains', 'blue' ),
3470 ),
3471
3472 array(
3473 'type' => 'notice',
3474 'style' => 'warning',
3475 'content' => 'Selected (yellow) color.',
3476 'dependency' => array( 'opt-depend-checkbox-1', 'contains', 'yellow' ),
3477 ),
3478
3479 array(
3480 'type' => 'notice',
3481 'style' => 'success',
3482 'content' => 'Selected (green) color.',
3483 'dependency' => array( 'opt-depend-checkbox-1', 'contains', 'green' ),
3484 ),
3485
3486 )
3487 ) );
3488
3489 //
3490 // Validate
3491 //
3492 CSF::createSection( $prefix, array(
3493 'parent' => 'fields',
3494 'title' => 'Validate',
3495 'description' => 'Visit documentation for more details: <a href="http://codestarframework.com/documentation/#/faq?id=how-to-use-validate" target="_blank">How to use validate</a>',
3496 'fields' => array(
3497
3498 array(
3499 'id' => 'opt-validate-1',
3500 'type' => 'text',
3501 'title' => 'Email validate',
3502 'subtitle' => 'This text field only allows validated email address.',
3503 'default' => 'info@domain.com',
3504 'validate' => 'csf_customize_validate_email',
3505 ),
3506
3507 array(
3508 'id' => 'opt-validate-2',
3509 'type' => 'text',
3510 'title' => 'Numeric validate',
3511 'subtitle' => 'This text field only allows numbers',
3512 'default' => '123456',
3513 'validate' => 'csf_customize_validate_numeric',
3514 ),
3515
3516 array(
3517 'id' => 'opt-validate-3',
3518 'type' => 'text',
3519 'title' => 'Required validate',
3520 'subtitle' => 'This text field is required, cannot be pass empty.',
3521 'default' => 'Lorem ipsum value',
3522 'validate' => 'csf_customize_validate_required',
3523 ),
3524
3525 array(
3526 'id' => 'opt-validate-4',
3527 'type' => 'text',
3528 'title' => 'URL validate',
3529 'subtitle' => 'This text field only allows validated url address.',
3530 'default' => 'http://codestarframework.com',
3531 'validate' => 'csf_customize_validate_url',
3532 ),
3533
3534 )
3535 ) );
3536
3537 //
3538 // Sanitize
3539 //
3540 CSF::createSection( $prefix, array(
3541 'parent' => 'fields',
3542 'title' => 'Sanitize',
3543 'description' => 'Visit documentation for more details: <a href="http://codestarframework.com/documentation/#/faq?id=how-to-use-sanitize" target="_blank">How to use sanitize</a>',
3544 'fields' => array(
3545
3546 array(
3547 'id' => 'opt-sanitize-1',
3548 'type' => 'text',
3549 'title' => 'Sanitize (a) to (b)',
3550 'subtitle' => 'Replacing letter (a) to letter (b). for eg. apple to bpple',
3551 'sanitize' => 'csf_sanitize_replace_a_to_b'
3552 ),
3553
3554 array(
3555 'id' => 'opt-sanitize-2',
3556 'type' => 'text',
3557 'title' => 'Sanitize Title',
3558 'subtitle' => 'Converting (space) to (-) and (uppercase) letters to (lowercase) letters. for eg. Hello World to hello-world',
3559 'sanitize' => 'csf_sanitize_title'
3560 ),
3561
3562 )
3563 ) );
3564
3565 //
3566 // Others
3567 //
3568 CSF::createSection( $prefix, array(
3569 'parent' => 'fields',
3570 'title' => 'Others',
3571 'description' => 'Visit documentation for more details: <a href="http://codestarframework.com/documentation/#/fields?id=others" target="_blank">Others</a>',
3572 'fields' => array(
3573
3574 array(
3575 'type' => 'heading',
3576 'content' => 'This is a heading field',
3577 ),
3578
3579 array(
3580 'type' => 'subheading',
3581 'content' => 'This is a subheading field',
3582 ),
3583
3584 array(
3585 'type' => 'content',
3586 'content' => 'This is a content field',
3587 ),
3588
3589 array(
3590 'type' => 'submessage',
3591 'style' => 'success',
3592 'content' => 'This is a <strong>submessage</strong> field. And using style <strong>success</strong>',
3593 ),
3594
3595 array(
3596 'type' => 'content',
3597 'content' => 'This is a content field',
3598 ),
3599 array(
3600 'type' => 'submessage',
3601 'style' => 'info',
3602 'content' => 'This is a <strong>submessage</strong> field. And using style <strong>info</strong>',
3603 ),
3604
3605 array(
3606 'type' => 'submessage',
3607 'style' => 'warning',
3608 'content' => 'This is a <strong>submessage</strong> field. And using style <strong>warning</strong>',
3609 ),
3610
3611 array(
3612 'type' => 'submessage',
3613 'style' => 'danger',
3614 'content' => 'This is a <strong>submessage</strong> field. And using style <strong>danger</strong>',
3615 ),
3616
3617 array(
3618 'type' => 'notice',
3619 'style' => 'success',
3620 'content' => 'This is a <strong>notice</strong> field. And using style <strong>success</strong>',
3621 ),
3622
3623 array(
3624 'type' => 'notice',
3625 'style' => 'info',
3626 'content' => 'This is a <strong>notice</strong> field. And using style <strong>info</strong>',
3627 ),
3628
3629 array(
3630 'type' => 'notice',
3631 'style' => 'warning',
3632 'content' => 'This is a <strong>notice</strong> field. And using style <strong>warning</strong>',
3633 ),
3634
3635 array(
3636 'type' => 'notice',
3637 'style' => 'danger',
3638 'content' => 'This is a <strong>notice</strong> field. And using style <strong>danger</strong>',
3639 ),
3640
3641 array(
3642 'type' => 'content',
3643 'content' => 'This is a <strong>content</strong> field. You can write some contents here.',
3644 ),
3645
3646 )
3647 ) );
3648
3649 //
3650 // Create a section
3651 //
3652 CSF::createSection( $prefix, array(
3653 'title' => 'CSF - Reset & Backup',
3654 'priority' => 3,
3655 'fields' => array(
3656
3657 array(
3658 'type' => 'backup',
3659 ),
3660
3661 ),
3662 ) );
3663