PluginProbe
StreamCast – bring live radio to your site with a sleek player / 2.1.2
StreamCast – bring live radio to your site with a sleek player v2.1.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.1.2, at admin/codestar-framework/samples/customize-options.php

3,395 lines 90.2 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 )
1212 ) );
1213
1214 //
1215 // Field: accordion
1216 //
1217 CSF::createSection( $prefix, array(
1218 'parent' => 'fields',
1219 'title' => 'Accordion',
1220 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=accordion" target="_blank">Field: accordion</a>',
1221 'fields' => array(
1222
1223 array(
1224 'id' => 'opt-accordion-1',
1225 'type' => 'accordion',
1226 'title' => 'Accordion',
1227 'accordions' => array(
1228
1229 array(
1230 'title' => 'Accordion 1',
1231 'fields' => array(
1232 array(
1233 'id' => 'opt-text-1',
1234 'type' => 'text',
1235 'title' => 'Text',
1236 ),
1237 array(
1238 'id' => 'opt-switcher-1',
1239 'type' => 'switcher',
1240 'title' => 'Switcher',
1241 ),
1242 array(
1243 'id' => 'opt-textarea-1',
1244 'type' => 'textarea',
1245 'title' => 'Textarea',
1246 ),
1247 )
1248 ),
1249
1250 array(
1251 'title' => 'Accordion 2',
1252 'fields' => array(
1253 array(
1254 'id' => 'opt-text-2',
1255 'type' => 'text',
1256 'title' => 'Text',
1257 ),
1258 array(
1259 'id' => 'opt-color-1',
1260 'type' => 'color',
1261 'title' => 'Color',
1262 ),
1263 )
1264 ),
1265
1266 )
1267 ),
1268
1269 array(
1270 'id' => 'opt-accordion-2',
1271 'type' => 'accordion',
1272 'title' => 'Accordion with default',
1273 'accordions' => array(
1274
1275 array(
1276 'title' => 'Fields 1',
1277 'fields' => array(
1278 array(
1279 'id' => 'opt-text-1',
1280 'type' => 'text',
1281 'title' => 'Text 1',
1282 ),
1283 array(
1284 'id' => 'opt-text-2',
1285 'type' => 'text',
1286 'title' => 'Text 2',
1287 ),
1288 )
1289 ),
1290
1291 array(
1292 'title' => 'Fields 2',
1293 'fields' => array(
1294 array(
1295 'id' => 'opt-color-1',
1296 'type' => 'color',
1297 'title' => 'Color 1',
1298 ),
1299 array(
1300 'id' => 'opt-color-2',
1301 'type' => 'color',
1302 'title' => 'Color 2',
1303 ),
1304 )
1305 ),
1306
1307 array(
1308 'title' => 'Fields 3',
1309 'fields' => array(
1310 array(
1311 'id' => 'opt-textarea-1',
1312 'type' => 'textarea',
1313 'title' => 'Textarea 3',
1314 ),
1315 array(
1316 'id' => 'opt-textarea-2',
1317 'type' => 'textarea',
1318 'title' => 'Textarea 4',
1319 ),
1320 )
1321 ),
1322
1323 ),
1324 'default' => array(
1325 'opt-text-1' => 'This is text 1 default value',
1326 'opt-text-2' => 'This is text 2 default value',
1327 'opt-color-1' => '#1e73be',
1328 'opt-color-2' => '#ffbc00',
1329 'opt-textarea-1' => 'This is textarea 1 default value',
1330 'opt-textarea-2' => 'This is textarea 2 default value',
1331 )
1332 ),
1333
1334 array(
1335 'id' => 'accordion_3',
1336 'type' => 'accordion',
1337 'title' => 'Accordion with custom icons',
1338 'accordions' => array(
1339
1340 array(
1341 'title' => 'Other 1',
1342 'icon' => 'fas fa-check',
1343 'fields' => array(
1344 array(
1345 'id' => 'opt-text-1',
1346 'type' => 'text',
1347 'title' => 'Text 1',
1348 ),
1349 )
1350 ),
1351
1352 array(
1353 'title' => 'Other 2',
1354 'icon' => 'fas fa-star',
1355 'fields' => array(
1356 array(
1357 'id' => 'opt-text-2',
1358 'type' => 'text',
1359 'title' => 'Text 2',
1360 ),
1361 )
1362 ),
1363
1364 )
1365 ),
1366
1367 )
1368 ) );
1369
1370 //
1371 // Field: tabbed
1372 //
1373 CSF::createSection( $prefix, array(
1374 'parent' => 'fields',
1375 'title' => 'Tabbed',
1376 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=tabbed" target="_blank">Field: tabbed</a>',
1377 'fields' => array(
1378
1379 array(
1380 'id' => 'opt-tabbed-1',
1381 'type' => 'tabbed',
1382 'title' => 'Tabbed',
1383 'tabs' => array(
1384
1385 array(
1386 'title' => 'Tab 1',
1387 'fields' => array(
1388 array(
1389 'id' => 'opt-text-1',
1390 'type' => 'text',
1391 'title' => 'Text 1',
1392 ),
1393 array(
1394 'id' => 'opt-textarea-1',
1395 'type' => 'textarea',
1396 'title' => 'Textarea 1',
1397 ),
1398 ),
1399 ),
1400
1401 array(
1402 'title' => 'Tab 2',
1403 'fields' => array(
1404 array(
1405 'id' => 'opt-text-2',
1406 'type' => 'text',
1407 'title' => 'Text 2',
1408 ),
1409 array(
1410 'id' => 'opt-textarea-2',
1411 'type' => 'textarea',
1412 'title' => 'Textarea 2',
1413 ),
1414 ),
1415 ),
1416
1417 ),
1418 ),
1419
1420 array(
1421 'id' => 'opt-tabbed-2',
1422 'type' => 'tabbed',
1423 'title' => 'Tabbed with default and icons',
1424 'tabs' => array(
1425 array(
1426 'title' => 'Fields 1',
1427 'icon' => 'fas fa-check',
1428 'fields' => array(
1429 array(
1430 'id' => 'opt-text-1',
1431 'type' => 'text',
1432 'title' => 'Text 1',
1433 ),
1434 array(
1435 'id' => 'opt-text-2',
1436 'type' => 'text',
1437 'title' => 'Text 2',
1438 ),
1439 ),
1440 ),
1441 array(
1442 'title' => 'Fields 2',
1443 'icon' => 'fas fa-star',
1444 'fields' => array(
1445 array(
1446 'id' => 'opt-color-1',
1447 'type' => 'color',
1448 'title' => 'Color 1',
1449 ),
1450 array(
1451 'id' => 'opt-color-2',
1452 'type' => 'color',
1453 'title' => 'Color 2',
1454 ),
1455 ),
1456 ),
1457 array(
1458 'title' => 'Fields 3',
1459 'icon' => 'fas fa-cog',
1460 'fields' => array(
1461 array(
1462 'id' => 'opt-textarea-1',
1463 'type' => 'textarea',
1464 'title' => 'Textarea 1',
1465 ),
1466 array(
1467 'id' => 'opt-textarea-2',
1468 'type' => 'textarea',
1469 'title' => 'Textarea 2',
1470 ),
1471 ),
1472 ),
1473 ),
1474 'default' => array(
1475 'opt-text-1' => 'This is text 1 default value',
1476 'opt-text-2' => 'This is text 2 default value',
1477 'opt-color-1' => '#1e73be',
1478 'opt-color-2' => '#ffbc00',
1479 'opt-textarea-1' => 'This is textarea 1 default value',
1480 'opt-textarea-2' => 'This is textarea 2 default value',
1481 )
1482 ),
1483
1484 )
1485 ) );
1486
1487 //
1488 // Field: fieldset
1489 //
1490 CSF::createSection( $prefix, array(
1491 'parent' => 'fields',
1492 'title' => 'Fieldset',
1493 'fields' => array(
1494
1495 array(
1496 'id' => 'opt-fieldset-1',
1497 'type' => 'fieldset',
1498 'title' => 'Fieldset',
1499 'fields' => array(
1500 array(
1501 'id' => 'opt-color',
1502 'type' => 'color',
1503 'title' => 'Color',
1504 ),
1505 array(
1506 'id' => 'opt-text',
1507 'type' => 'text',
1508 'title' => 'Text',
1509 ),
1510 array(
1511 'id' => 'opt-textarea',
1512 'type' => 'textarea',
1513 'title' => 'Textarea',
1514 ),
1515 ),
1516 ),
1517
1518 array(
1519 'id' => 'opt-fieldset-2',
1520 'type' => 'fieldset',
1521 'title' => 'Fieldset with default',
1522 'fields' => array(
1523 array(
1524 'type' => 'subheading',
1525 'content' => 'Title of the fieldset',
1526 ),
1527 array(
1528 'id' => 'opt-color',
1529 'type' => 'color',
1530 'title' => 'Color',
1531 ),
1532 array(
1533 'id' => 'opt-text',
1534 'type' => 'text',
1535 'title' => 'Text',
1536 ),
1537 array(
1538 'id' => 'opt-textarea',
1539 'type' => 'textarea',
1540 'title' => 'Textarea',
1541 ),
1542 ),
1543 'default' => array(
1544 'opt-color' => '#1e73be',
1545 'opt-text' => 'This is text default value',
1546 'opt-textarea' => 'This is textarea default value',
1547 )
1548 ),
1549
1550 )
1551 ) );
1552
1553 //
1554 // Field: media
1555 //
1556 CSF::createSection( $prefix, array(
1557 'parent' => 'fields',
1558 'title' => 'Media',
1559 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=media" target="_blank">Field: media</a>',
1560 'fields' => array(
1561
1562 array(
1563 'id' => 'opt-media-1',
1564 'type' => 'media',
1565 'title' => 'Media',
1566 ),
1567
1568 array(
1569 'id' => 'opt-media-2',
1570 'type' => 'media',
1571 'title' => 'Media without preview',
1572 'preview' => false,
1573 ),
1574
1575 array(
1576 'id' => 'opt-media-3',
1577 'type' => 'media',
1578 'title' => 'Media without url',
1579 'url' => false,
1580 ),
1581
1582 array(
1583 'id' => 'opt-media-4',
1584 'type' => 'media',
1585 'title' => 'Media with only image type',
1586 'library' => 'image',
1587 ),
1588
1589 array(
1590 'id' => 'opt-media-5',
1591 'type' => 'media',
1592 'title' => 'Media with only video type',
1593 'library' => 'video',
1594 ),
1595
1596 array(
1597 'id' => 'opt-media-6',
1598 'type' => 'media',
1599 'title' => 'Media with only audio type',
1600 'library' => 'audio',
1601 ),
1602
1603 )
1604 ) );
1605
1606 //
1607 // Field: upload
1608 //
1609 CSF::createSection( $prefix, array(
1610 'parent' => 'fields',
1611 'title' => 'Upload',
1612 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=upload" target="_blank">Field: upload</a>',
1613 'fields' => array(
1614
1615 array(
1616 'id' => 'opt-upload-1',
1617 'type' => 'upload',
1618 'title' => 'Upload',
1619 ),
1620
1621 array(
1622 'id' => 'opt-upload-2',
1623 'type' => 'upload',
1624 'title' => 'Upload with placeholder',
1625 'placeholder' => 'http://'
1626 ),
1627
1628 array(
1629 'id' => 'opt-upload-3',
1630 'type' => 'upload',
1631 'title' => 'Upload with only image type',
1632 'library' => 'image',
1633 'button_title' => 'Upload Image',
1634 ),
1635
1636 array(
1637 'id' => 'opt-upload-4',
1638 'type' => 'upload',
1639 'title' => 'Upload with only video type',
1640 'library' => 'video',
1641 'button_title' => 'Upload Video',
1642 ),
1643
1644 array(
1645 'id' => 'opt-upload-5',
1646 'type' => 'upload',
1647 'title' => 'Upload with only audio type',
1648 'library' => 'audio',
1649 'button_title' => 'Upload Audio',
1650 ),
1651
1652 )
1653 ) );
1654
1655 //
1656 // Field: gallery
1657 //
1658 CSF::createSection( $prefix, array(
1659 'parent' => 'fields',
1660 'title' => 'Gallery',
1661 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=gallery" target="_blank">Field: gallery</a>',
1662 'fields' => array(
1663
1664 array(
1665 'id' => 'opt-gallery-1',
1666 'type' => 'gallery',
1667 'title' => 'Gallery',
1668 ),
1669
1670 array(
1671 'id' => 'opt-gallery-2',
1672 'type' => 'gallery',
1673 'title' => 'Gallery with custom button names',
1674 'add_title' => 'Add Image(s)',
1675 'edit_title' => 'Edit Images',
1676 'clear_title' => 'Remove Images',
1677 ),
1678
1679 )
1680 ) );
1681
1682 //
1683 // Field: code_editor
1684 //
1685 CSF::createSection( $prefix, array(
1686 'parent' => 'fields',
1687 'title' => 'Code Editor',
1688 '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>',
1689 'fields' => array(
1690
1691 array(
1692 'id' => 'opt-code-editor-1',
1693 'type' => 'code_editor',
1694 'title' => 'Code Editor',
1695 'subtitle' => '<strong>Default Editor</strong> Using: theme: default and mode: htmlmixed',
1696 ),
1697
1698 array(
1699 'id' => 'code_editor_2',
1700 'type' => 'code_editor',
1701 'title' => 'Code Editor',
1702 'subtitle' => '<strong>HTML Editor</strong> Using: theme: shadowfox and mode: htmlmixed',
1703 'settings' => array(
1704 'theme' => 'shadowfox',
1705 'mode' => 'htmlmixed',
1706 ),
1707 'default' =>'<div class="wrapper">
1708 <h1>Hello world</h1>
1709 <p>Lorem <strong>ipsum</strong> dollar.</p>
1710 </div>',
1711 ),
1712
1713 array(
1714 'id' => 'opt-code-editor-2',
1715 'type' => 'code_editor',
1716 'title' => 'Code Editor',
1717 'subtitle' => '<strong>JS Editor</strong> Using: theme: dracula and mode: javascript',
1718 'settings' => array(
1719 'theme' => 'dracula',
1720 'mode' => 'javascript',
1721 ),
1722 'default' =>';(function( $, window, document, undefined ) {
1723 "use strict";
1724
1725 $(document).ready( function() {
1726
1727 // do stuff
1728
1729 });
1730
1731 })( jQuery, window, document );',
1732 ),
1733
1734 array(
1735 'id' => 'opt-code-editor-3',
1736 'type' => 'code_editor',
1737 'desc' => '<strong>CSS Editor</strong> It shows full width if there is no field of title and using: theme: mbo and mode: css',
1738 'settings' => array(
1739 'theme' => 'mbo',
1740 'mode' => 'css',
1741 ),
1742 'default' =>'.wrapper {
1743 font-family: "Open Sans";
1744 font-size: 13px;
1745 width: 250px;
1746 height: 100px;
1747 color: #fff;
1748 background-color: #555;
1749 }',
1750 ),
1751
1752 )
1753 ) );
1754
1755 //
1756 // Field: wp_editor
1757 //
1758 CSF::createSection( $prefix, array(
1759 'parent' => 'fields',
1760 'title' => 'WP Editor',
1761 '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>',
1762 'fields' => array(
1763
1764 array(
1765 'id' => 'opt-wp-editor-1',
1766 'type' => 'wp_editor',
1767 'title' => 'WP Editor',
1768 ),
1769
1770 array(
1771 'id' => 'opt-wp-editor-2',
1772 'type' => 'wp_editor',
1773 'title' => 'WP Editor with Custom Height and No Media Buttons',
1774 'subtitle' => 'Settings: height => 100px, media_buttons => false',
1775 'height' => '100px',
1776 'media_buttons' => false,
1777 ),
1778
1779 array(
1780 'id' => 'opt-wp-editor-3',
1781 'type' => 'wp_editor',
1782 'title' => 'WP Editor without QuickTags and Media Buttons',
1783 'subtitle' => 'Settings: height => 100px, media_buttons => false, quicktags => false',
1784 'height' => '100px',
1785 'media_buttons' => false,
1786 'quicktags' => false,
1787 ),
1788
1789 array(
1790 'id' => 'opt-wp-editor-4',
1791 'type' => 'wp_editor',
1792 'title' => 'WP Editor without Tinymce and Media Buttons',
1793 'subtitle' => 'Settings: height => 100px, media_buttons => false, tinymce => false',
1794 'height' => '100px',
1795 'media_buttons' => false,
1796 'tinymce' => false,
1797 ),
1798
1799 )
1800 ) );
1801
1802 //
1803 // Field: color
1804 //
1805 CSF::createSection( $prefix, array(
1806 'parent' => 'fields',
1807 'title' => 'Color',
1808 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=color" target="_blank">Field: color</a>',
1809 'fields' => array(
1810
1811 array(
1812 'id' => 'opt-color-1',
1813 'type' => 'color',
1814 'title' => 'Color',
1815 ),
1816
1817 array(
1818 'id' => 'opt-color-2',
1819 'type' => 'color',
1820 'title' => 'Color with default (hex)',
1821 'default' => '#3498db',
1822 ),
1823
1824 array(
1825 'id' => 'opt-color-3',
1826 'type' => 'color',
1827 'title' => 'Color with default (rgba)',
1828 'default' => 'rgba(255,255,0,0.25)',
1829 ),
1830
1831 array(
1832 'id' => 'opt-color-4',
1833 'type' => 'color',
1834 'title' => 'Color with default (transparent)',
1835 'default' => 'transparent',
1836 ),
1837
1838 )
1839 ) );
1840
1841 //
1842 // Field: link_color
1843 //
1844 CSF::createSection( $prefix, array(
1845 'parent' => 'fields',
1846 'title' => 'Link Color',
1847 '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>',
1848 'fields' => array(
1849
1850 array(
1851 'id' => 'opt-link-color-1',
1852 'type' => 'link_color',
1853 'title' => 'Link Color',
1854 ),
1855
1856 array(
1857 'id' => 'opt-link-color-2',
1858 'type' => 'link_color',
1859 'title' => 'Link Color with default',
1860 'default' => array(
1861 'color' => '#1e73be',
1862 'hover' => '#259ded',
1863 ),
1864 ),
1865
1866 array(
1867 'id' => 'opt-link-color-3',
1868 'type' => 'link_color',
1869 'title' => 'Link Color with more color options',
1870 'color' => true,
1871 'hover' => true,
1872 'visited' => true,
1873 'active' => true,
1874 'focus' => true,
1875 ),
1876
1877 )
1878 ) );
1879
1880 //
1881 // Field: color_group
1882 //
1883 CSF::createSection( $prefix, array(
1884 'parent' => 'fields',
1885 'title' => 'Color Group',
1886 '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>',
1887 'fields' => array(
1888
1889 array(
1890 'id' => 'opt-color-group-1',
1891 'type' => 'color_group',
1892 'title' => 'Color Group',
1893 'options' => array(
1894 'color-1' => 'Color 1',
1895 'color-2' => 'Color 2',
1896 )
1897 ),
1898
1899 array(
1900 'id' => 'opt-color-group-2',
1901 'type' => 'color_group',
1902 'title' => 'Color Group',
1903 'options' => array(
1904 'color-1' => 'Color 1',
1905 'color-2' => 'Color 2',
1906 'color-3' => 'Color 3',
1907 )
1908 ),
1909
1910 array(
1911 'id' => 'opt-color-group-3',
1912 'type' => 'color_group',
1913 'title' => 'Color Group with default',
1914 'subtitle' => 'Can be add unlimited color options.',
1915 'options' => array(
1916 'color-1' => 'Color 1',
1917 'color-2' => 'Color 2',
1918 'color-3' => 'Color 3',
1919 'color-4' => 'Color 4',
1920 'color-5' => 'Color 5',
1921 ),
1922 'default' => array(
1923 'color-1' => '#000100',
1924 'color-2' => '#002642',
1925 'color-3' => '#ffce4b',
1926 'color-4' => '#ff595e',
1927 'color-5' => '#0052cc',
1928 )
1929 ),
1930
1931 )
1932 ) );
1933
1934 //
1935 // Field: palette
1936 //
1937 CSF::createSection( $prefix, array(
1938 'parent' => 'fields',
1939 'title' => 'Color Palette',
1940 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=palette" target="_blank">Field: palette</a>',
1941 'fields' => array(
1942
1943 array(
1944 'id' => 'opt-palette-1',
1945 'type' => 'palette',
1946 'title' => 'Palette',
1947 'subtitle' => 'Three set colors',
1948 'options' => array(
1949 'set-1' => array( '#f36e27', '#f3d430', '#ed1683' ),
1950 'set-2' => array( '#4153ab', '#6e86c7', '#211f27' ),
1951 'set-3' => array( '#162526', '#508486', '#C8C6CE' ),
1952 'set-4' => array( '#ccab5e', '#fff55f', '#197c5d' ),
1953 ),
1954 'default' => 'set-1',
1955 ),
1956
1957 array(
1958 'id' => 'opt-palette-1',
1959 'type' => 'palette',
1960 'title' => 'Palette',
1961 'subtitle' => 'Four set colors',
1962 'options' => array(
1963 'set-1' => array( '#f04e36', '#f36e27', '#f3d430', '#ed1683' ),
1964 'set-2' => array( '#f9ca06', '#b5b546', '#2f4d48', '#212b2f' ),
1965 'set-3' => array( '#4153ab', '#6e86c7', '#211f27', '#d69762' ),
1966 'set-4' => array( '#162526', '#508486', '#C8C6CE', '#B45F1A' ),
1967 'set-5' => array( '#bbd5ff', '#ccab5e', '#fff55f', '#197c5d' ),
1968 ),
1969 'default' => 'set-3',
1970 ),
1971
1972 array(
1973 'id' => 'opt-palette-2',
1974 'type' => 'palette',
1975 'title' => 'Palette',
1976 'subtitle' => 'Five set colors',
1977 'options' => array(
1978 'set-1' => array( '#bbd5ff', '#ccab5e', '#fff55f', '#197c5d', '#bce2c4' ),
1979 'set-2' => array( '#6d3264', '#edf7f6', '#fde8e9', '#006675', '#e49ab0' ),
1980 'set-3' => array( '#000100', '#002642', '#ffce4b', '#ff595e', '#0052cc' ),
1981 ),
1982 'default' => 'set-1',
1983 ),
1984
1985 )
1986 ) );
1987
1988 //
1989 // Field: background
1990 //
1991 CSF::createSection( $prefix, array(
1992 'parent' => 'fields',
1993 'title' => 'Background',
1994 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=background" target="_blank">Field: background</a>',
1995 'fields' => array(
1996
1997 array(
1998 'id' => 'opt-background-1',
1999 'type' => 'background',
2000 'title' => 'Background',
2001 ),
2002
2003 array(
2004 'id' => 'opt-background-2',
2005 'type' => 'background',
2006 'title' => 'Background with default',
2007 'default' => array(
2008 'background-color' => '#e80000',
2009 'background-position' => 'center center',
2010 'background-repeat' => 'repeat-x',
2011 'background-attachment' => 'fixed',
2012 'background-size' => 'cover',
2013 )
2014 ),
2015
2016 array(
2017 'id' => 'opt-background-3',
2018 'type' => 'background',
2019 'title' => 'Background with all features',
2020 'background_color' => true,
2021 'background_image' => true,
2022 'background-position' => true,
2023 'background_repeat' => true,
2024 'background_attachment' => true,
2025 'background_size' => true,
2026 'background_origin' => true,
2027 'background_clip' => true,
2028 'background_blend_mode' => true,
2029 'background_gradient' => true,
2030 'default' => array(
2031 'background-color' => '#009e44',
2032 'background-gradient-color' => '#81d742',
2033 'background-gradient-direction' => '135deg',
2034 'background-position' => 'center center',
2035 'background-repeat' => 'repeat-x',
2036 'background-attachment' => 'fixed',
2037 'background-size' => 'cover',
2038 'background-origin' => 'border-box',
2039 'background-clip' => 'padding-box',
2040 'background-blend-mode' => 'normal',
2041 )
2042 ),
2043
2044 )
2045 ) );
2046
2047 //
2048 // Field: typography
2049 //
2050 CSF::createSection( $prefix, array(
2051 'parent' => 'fields',
2052 'title' => 'Typography',
2053 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=typography" target="_blank">Field: typography</a>',
2054 'fields' => array(
2055
2056 array(
2057 'id' => 'opt-typography-1',
2058 'type' => 'typography',
2059 'title' => 'Typography',
2060 ),
2061
2062 array(
2063 'id' => 'opt-typography-2',
2064 'type' => 'typography',
2065 'title' => 'Typography with default',
2066 'default' => array(
2067 'font-family' => 'Barlow',
2068 'font-weight' => '600',
2069 'subset' => 'latin-ext',
2070 'type' => 'google',
2071 'text-align' => 'center',
2072 'text-transform' => 'capitalize',
2073 'text-transform' => 'capitalize',
2074 'font-size' => '18',
2075 'line-height' => '20',
2076 'letter-spacing' => '-1',
2077 'color' => '#009e44',
2078 ),
2079 ),
2080
2081 array(
2082 'id' => 'opt-typography-3',
2083 'type' => 'typography',
2084 'title' => 'Typography with few features',
2085 'text_align' => false,
2086 'text_transform' => false,
2087 'font_size' => false,
2088 'line_height' => false,
2089 'letter_spacing' => false,
2090 'color' => false,
2091 'default' => array(
2092 'font-family' => 'Lato',
2093 'font-weight' => '900',
2094 'subset' => 'latin',
2095 'type' => 'google',
2096 ),
2097 ),
2098
2099
2100 array(
2101 'id' => 'opt-typography-4',
2102 'type' => 'typography',
2103 'title' => 'Typography with all features',
2104 'font_family' => true,
2105 'font_weight' => true,
2106 'font_style' => true,
2107 'font_size' => true,
2108 'line_height' => true,
2109 'letter_spacing' => true,
2110 'text_align' => true,
2111 'text-transform' => true,
2112 'color' => true,
2113 'subset' => true,
2114 'backup_font_family' => true,
2115 'font_variant' => true,
2116 'word_spacing' => true,
2117 'text_decoration' => true,
2118 'default' => array(
2119 'font-family' => 'Old Standard TT',
2120 'type' => 'google',
2121 ),
2122 ),
2123
2124 )
2125 ) );
2126
2127 //
2128 // Field: dimensions
2129 //
2130 CSF::createSection( $prefix, array(
2131 'parent' => 'fields',
2132 'title' => 'Dimensions',
2133 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=dimensions" target="_blank">Field: dimensions</a>',
2134 'fields' => array(
2135
2136 array(
2137 'id' => 'opt-dimensions-1',
2138 'type' => 'dimensions',
2139 'title' => 'Dimensions',
2140 ),
2141
2142 array(
2143 'id' => 'opt-dimensions-2',
2144 'type' => 'dimensions',
2145 'title' => 'Dimensions with default',
2146 'default' => array(
2147 'width' => '100',
2148 'height' => '250',
2149 'unit' => 'px',
2150 ),
2151 ),
2152
2153 array(
2154 'id' => 'opt-dimensions-3',
2155 'type' => 'dimensions',
2156 'title' => 'Dimensions with custom text and units',
2157 'width_icon' => 'width',
2158 'height_icon' => 'height',
2159 'units' => array( 'px', '%', 'em', 'rem', 'pt' ),
2160 'default' => array(
2161 'width' => '100',
2162 'height' => '50',
2163 'unit' => '%',
2164 ),
2165 ),
2166
2167 array(
2168 'id' => 'opt-dimensions-4',
2169 'type' => 'dimensions',
2170 'title' => 'Dimensions with single unit',
2171 'units' => array( 'px' ),
2172 ),
2173
2174 array(
2175 'id' => 'opt-dimensions-5',
2176 'type' => 'dimensions',
2177 'title' => 'Dimensions without unit selector',
2178 'unit' => false,
2179 ),
2180
2181 array(
2182 'id' => 'opt-dimensions-6',
2183 'type' => 'dimensions',
2184 'title' => 'Dimensions with only width',
2185 'height' => false,
2186 ),
2187
2188 array(
2189 'id' => 'opt-dimensions-7',
2190 'type' => 'dimensions',
2191 'title' => 'Dimensions with only width and single unit',
2192 'height' => false,
2193 'units' => array( 'px' ),
2194 ),
2195
2196 )
2197 ) );
2198
2199 //
2200 // Field: spacing
2201 //
2202 CSF::createSection( $prefix, array(
2203 'parent' => 'fields',
2204 'title' => 'Spacing',
2205 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=spacing" target="_blank">Field: spacing</a>',
2206 'fields' => array(
2207
2208 array(
2209 'id' => 'opt-spacing-1',
2210 'type' => 'spacing',
2211 'title' => 'Spacing',
2212 ),
2213
2214 array(
2215 'id' => 'opt-spacing-2',
2216 'type' => 'spacing',
2217 'title' => 'Spacing with default',
2218 'default' => array(
2219 'top' => '50',
2220 'right' => '100',
2221 'bottom' => '50',
2222 'left' => '100',
2223 'unit' => 'px',
2224 ),
2225 ),
2226
2227 array(
2228 'id' => 'opt-spacing-2',
2229 'type' => 'spacing',
2230 'title' => 'Spacing without unit selector',
2231 'units' => array( 'px' ),
2232 'default' => array(
2233 'top' => '50',
2234 'right' => '100',
2235 'bottom' => '50',
2236 'left' => '100',
2237 'unit' => 'px',
2238 ),
2239 ),
2240
2241 array(
2242 'id' => 'opt-spacing-3',
2243 'type' => 'spacing',
2244 'title' => 'Spacing with only left and right',
2245 'top' => false,
2246 'bottom' => false,
2247 ),
2248
2249 array(
2250 'id' => 'opt-spacing-4',
2251 'type' => 'spacing',
2252 'title' => 'Spacing with only top and bottom',
2253 'left' => false,
2254 'right' => false,
2255 ),
2256
2257 array(
2258 'id' => 'opt-spacing-5',
2259 'type' => 'spacing',
2260 'title' => 'Spacing with all directions',
2261 'all' => true,
2262 ),
2263
2264 )
2265 ) );
2266
2267 //
2268 // Field: border
2269 //
2270 CSF::createSection( $prefix, array(
2271 'parent' => 'fields',
2272 'title' => 'Border',
2273 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=border" target="_blank">Field: border</a>',
2274 'fields' => array(
2275
2276 array(
2277 'id' => 'opt-border-1',
2278 'type' => 'border',
2279 'title' => 'Border',
2280 ),
2281
2282 array(
2283 'id' => 'opt-border-2',
2284 'type' => 'border',
2285 'title' => 'Border with default',
2286 'default' => array(
2287 'top' => '4',
2288 'right' => '8',
2289 'bottom' => '4',
2290 'left' => '8',
2291 'style' => 'dashed',
2292 'color' => '#1e73be',
2293 )
2294 ),
2295
2296 array(
2297 'id' => 'opt-border-3',
2298 'type' => 'border',
2299 'title' => 'Border with only left and right',
2300 'top' => false,
2301 'bottom' => false,
2302 ),
2303
2304 array(
2305 'id' => 'opt-border-4',
2306 'type' => 'border',
2307 'title' => 'Border with only top and bottom',
2308 'left' => false,
2309 'right' => false,
2310 ),
2311
2312 array(
2313 'id' => 'opt-border-5',
2314 'type' => 'border',
2315 'title' => 'Border with all directions',
2316 'all' => true,
2317 ),
2318
2319 )
2320 ) );
2321
2322 //
2323 // Field: spinner
2324 //
2325 CSF::createSection( $prefix, array(
2326 'parent' => 'fields',
2327 'title' => 'Spinner',
2328 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=spinner" target="_blank">Field: spinner</a>',
2329 'fields' => array(
2330
2331 array(
2332 'id' => 'opt-spinner-1',
2333 'type' => 'spinner',
2334 'title' => 'Spinner',
2335 'subtitle' => 'max:100 | min:0 | step:1',
2336 'max' => 100,
2337 'min' => 0,
2338 'step' => 1,
2339 'default' => 25,
2340 ),
2341
2342 array(
2343 'id' => 'opt-spinner-2',
2344 'type' => 'spinner',
2345 'title' => 'Spinner',
2346 'subtitle' => 'max:200 | min:100 | step:10',
2347 'max' => 200,
2348 'min' => 100,
2349 'step' => 10,
2350 'default' => 100,
2351 ),
2352
2353 array(
2354 'id' => 'opt-spinner-3',
2355 'type' => 'spinner',
2356 'title' => 'Spinner',
2357 'subtitle' => 'max:1 | min:0 | step:0.1 | unit:px',
2358 'max' => 1,
2359 'min' => 0,
2360 'step' => 0.1,
2361 'unit' => 'px',
2362 'default' => 0.5,
2363 ),
2364
2365 )
2366 ) );
2367
2368 //
2369 // Field: number
2370 //
2371 CSF::createSection( $prefix, array(
2372 'parent' => 'fields',
2373 'title' => 'Number',
2374 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=number" target="_blank">Field: number</a>',
2375 'fields' => array(
2376
2377 array(
2378 'id' => 'opt-number-1',
2379 'type' => 'number',
2380 'title' => 'Number',
2381 ),
2382 array(
2383 'id' => 'opt-number-2',
2384 'type' => 'number',
2385 'title' => 'Number with unit',
2386 'unit' => 'px',
2387 ),
2388 array(
2389 'id' => 'opt-number-3',
2390 'type' => 'number',
2391 'title' => 'Number with default',
2392 'unit' => 'width',
2393 'default' => 100,
2394 ),
2395
2396 )
2397 ) );
2398
2399 //
2400 // Field: slider
2401 //
2402 CSF::createSection( $prefix, array(
2403 'parent' => 'fields',
2404 'title' => 'Slider',
2405 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=slider" target="_blank">Field: slider</a>',
2406 'fields' => array(
2407
2408 array(
2409 'id' => 'opt-slider-1',
2410 'type' => 'slider',
2411 'title' => 'Slider',
2412 ),
2413
2414 array(
2415 'id' => 'opt-slider-2',
2416 'type' => 'slider',
2417 'title' => 'Slider with default',
2418 'default' => 50,
2419 ),
2420
2421 array(
2422 'id' => 'opt-slider-3',
2423 'type' => 'slider',
2424 'title' => 'Slider with unit text',
2425 'unit' => '%',
2426 'default' => 75,
2427 ),
2428
2429 array(
2430 'id' => 'opt-slider-4',
2431 'type' => 'slider',
2432 'title' => 'Slider with min/max allowed value',
2433 'subtitle' => 'Min: 1 | Max: 10 | Step: 0.1 | Default: 5.5',
2434 'unit' => 'px',
2435 'min' => 1,
2436 'max' => 10,
2437 'step' => 0.1,
2438 'default' => 5.5,
2439 ),
2440
2441 )
2442 ) );
2443
2444 //
2445 // Field: sorter
2446 //
2447 CSF::createSection( $prefix, array(
2448 'parent' => 'fields',
2449 'title' => 'Sorter',
2450 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=sorter" target="_blank">Field: sorter</a>',
2451 'fields' => array(
2452
2453 array(
2454 'id' => 'opt-sorter-1',
2455 'type' => 'sorter',
2456 'title' => 'Sorter',
2457 'default' => array(
2458 'enabled' => array(
2459 'opt-1' => 'Option 1',
2460 'opt-2' => 'Option 2',
2461 'opt-3' => 'Option 3',
2462 ),
2463 'disabled' => array(
2464 'opt-4' => 'Option 4',
2465 'opt-5' => 'Option 5',
2466 ),
2467 ),
2468 ),
2469
2470 array(
2471 'id' => 'opt-sorter-2',
2472 'type' => 'sorter',
2473 'title' => 'Sorter with custom title',
2474 'enabled_title' => 'Activated',
2475 'disabled_title' => 'Deactivated',
2476 'default' => array(
2477 'enabled' => array(
2478 'opt-1' => 'Option 1',
2479 'opt-2' => 'Option 2',
2480 'opt-3' => 'Option 3',
2481 ),
2482 'disabled' => array(
2483 'opt-4' => 'Option 4',
2484 'opt-5' => 'Option 5',
2485 ),
2486 ),
2487 ),
2488
2489 array(
2490 'id' => 'opt-sorter-3',
2491 'type' => 'sorter',
2492 'title' => 'Sorter with use only enabled section and without title',
2493 'enabled_title' => false,
2494 'disabled' => false,
2495 'default' => array(
2496 'enabled' => array(
2497 'opt-1' => 'Option 1',
2498 'opt-2' => 'Option 2',
2499 'opt-3' => 'Option 3',
2500 ),
2501 ),
2502 ),
2503
2504 )
2505 ) );
2506
2507 //
2508 // Field: sortable
2509 //
2510 CSF::createSection( $prefix, array(
2511 'parent' => 'fields',
2512 'title' => 'Sortable',
2513 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=sortable" target="_blank">Field: sortable</a>',
2514 'fields' => array(
2515
2516 array(
2517 'id' => 'opt-sortable-1',
2518 'type' => 'sortable',
2519 'title' => 'Sortable',
2520 'fields' => array(
2521 array(
2522 'id' => 'opt-text-1',
2523 'type' => 'text',
2524 'title' => 'Text 1'
2525 ),
2526 array(
2527 'id' => 'opt-text-2',
2528 'type' => 'text',
2529 'title' => 'Text 2'
2530 ),
2531 array(
2532 'id' => 'opt-text-3',
2533 'type' => 'text',
2534 'title' => 'Text 3'
2535 ),
2536 ),
2537 ),
2538
2539 array(
2540 'id' => 'opt-sortable-2',
2541 'type' => 'sortable',
2542 'title' => 'Sortable with default',
2543 'fields' => array(
2544 array(
2545 'id' => 'opt-text-1',
2546 'type' => 'text',
2547 'title' => 'Text 1'
2548 ),
2549 array(
2550 'id' => 'opt-text-2',
2551 'type' => 'text',
2552 'title' => 'Text 2'
2553 ),
2554 array(
2555 'id' => 'opt-text-3',
2556 'type' => 'text',
2557 'title' => 'Text 3'
2558 ),
2559 ),
2560 'default' => array(
2561 'opt-text-1' => 'This is text 1 default',
2562 'opt-text-2' => 'This is text 2 default',
2563 'opt-text-3' => 'This is text 3 default',
2564 )
2565 ),
2566
2567 )
2568 ) );
2569
2570 //
2571 // Field: switcher
2572 //
2573 CSF::createSection( $prefix, array(
2574 'parent' => 'fields',
2575 'title' => 'Switcher',
2576 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=switcher" target="_blank">Field: switcher</a>',
2577 'fields' => array(
2578
2579 array(
2580 'id' => 'opt-switcher-1',
2581 'type' => 'switcher',
2582 'title' => 'Switcher',
2583 ),
2584
2585 array(
2586 'id' => 'opt-switcher-2',
2587 'type' => 'switcher',
2588 'title' => 'Switcher with default',
2589 'default' => true,
2590 ),
2591
2592 array(
2593 'id' => 'opt-switcher-3',
2594 'type' => 'switcher',
2595 'title' => 'Switcher with label',
2596 'label' => 'The label text of the switcher.',
2597 ),
2598
2599 array(
2600 'id' => 'opt-switcher-4',
2601 'type' => 'switcher',
2602 'title' => 'Switcher with Yes/No',
2603 'text_on' => 'Yes',
2604 'text_off' => 'No',
2605 ),
2606
2607 array(
2608 'id' => 'opt-switcher-4',
2609 'type' => 'switcher',
2610 'title' => 'Switcher with custom text Enabled/Disabled',
2611 'text_on' => 'Enabled',
2612 'text_off' => 'Disabled',
2613 'text_width' => '100',
2614 ),
2615
2616 )
2617 ) );
2618
2619 //
2620 // Field: icons
2621 //
2622 CSF::createSection( $prefix, array(
2623 'parent' => 'fields',
2624 'title' => 'Icons',
2625 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=icon" target="_blank">Field: icon</a>',
2626 'fields' => array(
2627
2628 array(
2629 'id' => 'opt-icon-1',
2630 'type' => 'icon',
2631 'title' => 'Icon',
2632 ),
2633
2634 array(
2635 'id' => 'opt-icon-2',
2636 'type' => 'icon',
2637 'title' => 'Icon with default',
2638 'default' => 'fas fa-check',
2639 ),
2640
2641 )
2642 ) );
2643
2644 //
2645 // Field: map
2646 //
2647 CSF::createSection( $prefix, array(
2648 'parent' => 'fields',
2649 'title' => 'Map',
2650 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=map" target="_blank">Field: map</a>',
2651 'fields' => array(
2652
2653 array(
2654 'id' => 'opt-map-1',
2655 'type' => 'map',
2656 'title' => 'Map',
2657 ),
2658
2659 array(
2660 'id' => 'opt-map-2',
2661 'type' => 'map',
2662 'title' => 'Map with Default',
2663 'default' => array(
2664 'address' => 'New York, United States of America',
2665 'latitude' => '40.7127281',
2666 'longitude' => '-74.0060152',
2667 'zoom' => '12',
2668 )
2669 ),
2670
2671 array(
2672 'type' => 'submessage',
2673 'style' => 'info',
2674 'content' => 'Using custom <strong>address_field</strong> field in below example.',
2675 ),
2676
2677 array(
2678 'id' => 'my-address-text',
2679 'type' => 'text',
2680 'title' => 'Address',
2681 ),
2682
2683 array(
2684 'id' => 'opt-map-3',
2685 'type' => 'map',
2686 'title' => 'Map',
2687 'desc' => 'Using custom <strong>address_field</strong> field',
2688 'address_field' => 'my-address-text',
2689 ),
2690
2691 )
2692 ) );
2693
2694 //
2695 // Field: link
2696 //
2697 CSF::createSection( $prefix, array(
2698 'parent' => 'fields',
2699 'title' => 'Link',
2700 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=link" target="_blank">Field: link</a>',
2701 'fields' => array(
2702
2703 array(
2704 'id' => 'opt-link-1',
2705 'type' => 'link',
2706 'title' => 'Link',
2707 ),
2708
2709 array(
2710 'id' => 'opt-link-2',
2711 'type' => 'link',
2712 'title' => 'Link with default',
2713 'default' => array(
2714 'url' => 'http://codestarframework.com/',
2715 'text' => 'Codestar Framework',
2716 'target' => '_blank'
2717 ),
2718 ),
2719
2720 )
2721 ) );
2722
2723 //
2724 // Field: date
2725 //
2726 CSF::createSection( $prefix, array(
2727 'parent' => 'fields',
2728 'title' => 'Date',
2729 'description' => 'Visit documentation for more details on this field: <a href="http://codestarframework.com/documentation/#/fields?id=date" target="_blank">Field: date</a>',
2730 'fields' => array(
2731
2732 array(
2733 'id' => 'opt-date-1',
2734 'type' => 'date',
2735 'title' => 'Date',
2736 ),
2737
2738 array(
2739 'id' => 'opt-date-2',
2740 'type' => 'date',
2741 'title' => 'Date with custom settings',
2742 'settings' => array(
2743 'dateFormat' => 'mm/dd/yy',
2744 'changeMonth' => true,
2745 'changeYear' => true,
2746 'showWeek' => true,
2747 'showButtonPanel' => true,
2748 'weekHeader' => 'Week',
2749 'monthNamesShort' => array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ),
2750 'dayNamesMin' => array( 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ),
2751 )
2752 ),
2753
2754 array(
2755 'id' => 'opt-date-3',
2756 'type' => 'date',
2757 'title' => 'Date with From &amp; To',
2758 'from_to' => true,
2759 ),
2760
2761 array(
2762 'id' => 'opt-date-4',
2763 'type' => 'date',
2764 'title' => 'Date with custom texts Begin &amp; End',
2765 'from_to' => true,
2766 'text_from' => 'Begin',
2767 'text_to' => 'End',
2768 ),
2769
2770 )
2771 ) );
2772
2773 //
2774 // Field: image_select
2775 //
2776 CSF::createSection( $prefix, array(
2777 'parent' => 'fields',
2778 'title' => 'Image Select',
2779 '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>',
2780 'fields' => array(
2781
2782 array(
2783 'id' => 'opt-image-select-1',
2784 'type' => 'image_select',
2785 'title' => 'Image Select',
2786 'options' => array(
2787 'opt-1' => 'http://codestarframework.com/assets/images/placeholder/80x80-e74c3c.gif',
2788 'opt-2' => 'http://codestarframework.com/assets/images/placeholder/80x80-ffbc00.gif',
2789 'opt-3' => 'http://codestarframework.com/assets/images/placeholder/80x80-3498db.gif',
2790 ),
2791 ),
2792
2793 array(
2794 'id' => 'opt-image-select-2',
2795 'type' => 'image_select',
2796 'title' => 'Image Select with default',
2797 'options' => array(
2798 'opt-1' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
2799 'opt-2' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
2800 'opt-3' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
2801 ),
2802 'default' => 'opt-2'
2803 ),
2804
2805 array(
2806 'id' => 'opt-image-select-3',
2807 'type' => 'image_select',
2808 'title' => 'Image Select with multiple choice',
2809 'multiple' => true,
2810 'options' => array(
2811 'opt-1' => 'http://codestarframework.com/assets/images/placeholder/80x80-e74c3c.gif',
2812 'opt-2' => 'http://codestarframework.com/assets/images/placeholder/80x80-ffbc00.gif',
2813 'opt-3' => 'http://codestarframework.com/assets/images/placeholder/80x80-3498db.gif',
2814 ),
2815 ),
2816
2817 array(
2818 'id' => 'opt-image-select-4',
2819 'type' => 'image_select',
2820 'title' => 'Image Select with multiple choice and default',
2821 'multiple' => true,
2822 'options' => array(
2823 'opt-1' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
2824 'opt-2' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
2825 'opt-3' => 'http://codestarframework.com/assets/images/placeholder/80x80-e74c3c.gif',
2826 'opt-4' => 'http://codestarframework.com/assets/images/placeholder/80x80-ffbc00.gif',
2827 'opt-5' => 'http://codestarframework.com/assets/images/placeholder/80x80-3498db.gif',
2828 'opt-6' => 'http://codestarframework.com/assets/images/placeholder/80x80-2ecc71.gif',
2829 'opt-7' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
2830 'opt-8' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
2831 'opt-9' => 'http://codestarframework.com/assets/images/placeholder/80x80-2c3e50.gif',
2832 ),
2833 'default' => array( 'opt-3', 'opt-4', 'opt-5', 'opt-6' )
2834 ),
2835
2836 array(
2837 'id' => 'opt-image-select-5',
2838 'type' => 'image_select',
2839 'title' => 'Image Select inline style',
2840 'inline' => true,
2841 'options' => array(
2842 'opt-1' => 'http://codestarframework.com/assets/images/placeholder/80x80-e74c3c.gif',
2843 'opt-2' => 'http://codestarframework.com/assets/images/placeholder/80x80-ffbc00.gif',
2844 'opt-3' => 'http://codestarframework.com/assets/images/placeholder/80x80-3498db.gif',
2845 'opt-4' => 'http://codestarframework.com/assets/images/placeholder/80x80-2ecc71.gif',
2846 ),
2847 'default' => 'opt-1'
2848 ),
2849
2850 )
2851 ) );
2852
2853 //
2854 // Field: button_set
2855 //
2856 CSF::createSection( $prefix, array(
2857 'parent' => 'fields',
2858 'title' => 'Button Set',
2859 '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>',
2860 'fields' => array(
2861
2862 array(
2863 'id' => 'opt-button-set-1',
2864 'type' => 'button_set',
2865 'title' => 'Button Set',
2866 'options' => array(
2867 'enabled' => 'Enabled',
2868 'disabled' => 'Disabled',
2869 ),
2870 ),
2871
2872 array(
2873 'id' => 'opt-button-set-2',
2874 'type' => 'button_set',
2875 'title' => 'Button Set with default',
2876 'options' => array(
2877 'enabled' => 'Enabled',
2878 '' => 'Default',
2879 'disabled' => 'Disabled',
2880 ),
2881 ),
2882
2883 array(
2884 'id' => 'opt-button-set-3',
2885 'type' => 'button_set',
2886 'title' => 'Button Set',
2887 'options' => array(
2888 'activate' => 'Activate',
2889 'deactivate' => 'Deactivate',
2890 ),
2891 'default' => 'activate',
2892 ),
2893
2894 array(
2895 'id' => 'opt-button-set-4',
2896 'type' => 'button_set',
2897 'title' => 'Button Set',
2898 'options' => array(
2899 'on' => 'ON',
2900 'off' => 'OFF',
2901 ),
2902 'default' => 'on',
2903 ),
2904
2905 array(
2906 'id' => 'opt-button-set-5',
2907 'type' => 'button_set',
2908 'title' => 'Button Set with multiple choice',
2909 'multiple' => true,
2910 'options' => array(
2911 'opt-1' => 'Option 1',
2912 'opt-2' => 'Option 2',
2913 'opt-3' => 'Option 3',
2914 'opt-4' => 'Option 4',
2915 'opt-5' => 'Option 5',
2916 ),
2917 ),
2918
2919 array(
2920 'id' => 'opt-button-set-6',
2921 'type' => 'button_set',
2922 'title' => 'Button Set with multiple choice and default',
2923 'multiple' => true,
2924 'options' => array(
2925 'opt-1' => 'Option 1',
2926 'opt-2' => 'Option 2',
2927 'opt-3' => 'Option 3',
2928 'opt-4' => 'Option 4',
2929 'opt-5' => 'Option 5',
2930 ),
2931 'default' => array( 'opt-2', 'opt-4' )
2932 ),
2933
2934 )
2935 ) );
2936
2937 //
2938 // Dependencies
2939 //
2940 CSF::createSection( $prefix, array(
2941 'parent' => 'fields',
2942 'title' => 'Dependencies',
2943 '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>',
2944 'fields' => array(
2945
2946 array(
2947 'type' => 'subheading',
2948 'content' => 'Basic Dependencies',
2949 ),
2950
2951 //
2952 // Dependency example 1
2953 array(
2954 'id' => 'opt-depend-switcher',
2955 'type' => 'switcher',
2956 'title' => 'If switched to (ON)',
2957 ),
2958
2959 array(
2960 'type' => 'notice',
2961 'style' => 'success',
2962 'content' => 'Success: Switched to (ON).',
2963 'dependency' => array( 'opt-depend-switcher', '==', 'true' ),
2964 ),
2965
2966 //
2967 // Dependency example 2
2968 array(
2969 'id' => 'opt-depend-text',
2970 'type' => 'text',
2971 'title' => 'If typed something to field',
2972 ),
2973
2974 array(
2975 'type' => 'notice',
2976 'style' => 'success',
2977 'content' => 'Success: You typed something.',
2978 'dependency' => array( 'opt-depend-text', '!=', '' ),
2979 ),
2980
2981 //
2982 // Dependency example 3
2983 array(
2984 'id' => 'opt-depend-select',
2985 'type' => 'select',
2986 'title' => 'If selected to (Blue) or (Black)',
2987 'placeholder' => 'Select a color',
2988 'options' => array(
2989 'blue' => 'Blue',
2990 'yellow' => 'Yellow',
2991 'green' => 'Green',
2992 'black' => 'Black',
2993 'white' => 'White',
2994 ),
2995 ),
2996
2997 array(
2998 'type' => 'notice',
2999 'style' => 'success',
3000 'content' => 'Success: Selected to (Blue) or (Black).',
3001 'dependency' => array( 'opt-depend-select', 'any', 'blue,black' ),
3002 ),
3003
3004 //
3005 // Dependency example 4
3006 array(
3007 'id' => 'opt-depend-radio',
3008 'type' => 'radio',
3009 'title' => 'If selected to (Yes, Please)',
3010 'inline' => true,
3011 'options' => array(
3012 'no' => 'No, Thanks',
3013 'yes' => 'Yes, Please',
3014 'any' => 'I am not sure!',
3015 ),
3016 'default' => 'no'
3017 ),
3018
3019 array(
3020 'type' => 'notice',
3021 'style' => 'success',
3022 'content' => 'Success: Selected to (Yes, Please).',
3023 'dependency' => array( 'opt-depend-radio', '==', 'yes' ),
3024 ),
3025
3026 //
3027 // Dependency example 5
3028 array(
3029 'id' => 'opt-depend-checkbox',
3030 'type' => 'checkbox',
3031 'title' => 'If selected to (Green) or (Black)',
3032 'inline' => true,
3033 'options' => array(
3034 'blue' => 'Blue',
3035 'yellow' => 'Yellow',
3036 'green' => 'Green',
3037 'black' => 'Black',
3038 'white' => 'White',
3039 ),
3040 ),
3041
3042 array(
3043 'type' => 'notice',
3044 'style' => 'success',
3045 'content' => 'Success: Selected to (Green).',
3046 'dependency' => array( 'opt-depend-checkbox', 'any', 'green,black' ),
3047 ),
3048
3049 //
3050 // Dependency example 6
3051 array(
3052 'id' => 'opt-depend-image-select',
3053 'type' => 'image_select',
3054 'title' => 'If selected to (Blue) box',
3055 'options' => array(
3056 'green' => 'http://codestarframework.com/assets/images/placeholder/100x80-2ecc71.gif',
3057 'red' => 'http://codestarframework.com/assets/images/placeholder/100x80-e74c3c.gif',
3058 'yellow' => 'http://codestarframework.com/assets/images/placeholder/100x80-ffbc00.gif',
3059 'blue' => 'http://codestarframework.com/assets/images/placeholder/100x80-3498db.gif',
3060 'gray' => 'http://codestarframework.com/assets/images/placeholder/100x80-555555.gif',
3061 ),
3062 'default' => 'green',
3063 ),
3064
3065 array(
3066 'type' => 'notice',
3067 'style' => 'success',
3068 'content' => 'Success: Selected to (Blue) box.',
3069 'dependency' => array( 'opt-depend-image-select', '==', 'blue' ),
3070 ),
3071
3072 //
3073 // Dependency example 6
3074 array(
3075 'id' => 'opt-depend-image-select-any',
3076 'type' => 'image_select',
3077 'title' => 'If selected to (Red) or (Blue) box',
3078 'options' => array(
3079 'green' => 'http://codestarframework.com/assets/images/placeholder/100x80-2ecc71.gif',
3080 'red' => 'http://codestarframework.com/assets/images/placeholder/100x80-e74c3c.gif',
3081 'yellow' => 'http://codestarframework.com/assets/images/placeholder/100x80-ffbc00.gif',
3082 'blue' => 'http://codestarframework.com/assets/images/placeholder/100x80-3498db.gif',
3083 'gray' => 'http://codestarframework.com/assets/images/placeholder/100x80-555555.gif',
3084 ),
3085 'default' => 'green',
3086 ),
3087
3088 array(
3089 'type' => 'notice',
3090 'style' => 'success',
3091 'content' => 'Success: Selected to (Red) or (Blue) box.',
3092 'dependency' => array( 'opt-depend-image-select-any', 'any', 'red,blue' ),
3093 ),
3094
3095 array(
3096 'type' => 'subheading',
3097 'content' => 'Visible Dependencies',
3098 ),
3099
3100 //
3101 // Dependency example 7
3102 array(
3103 'id' => 'opt-depend-visible-switcher',
3104 'type' => 'switcher',
3105 'title' => 'Switched to (ON)',
3106 'label' => 'Below fields are visibling instead of hiding. Switched to (ON) for use them.',
3107 ),
3108
3109 array(
3110 'id' => 'opt-depend-visible-text',
3111 'type' => 'text',
3112 'title' => 'Visible Text',
3113 'dependency' => array( 'opt-depend-visible-switcher', '==', 'true', '', 'visible' ),
3114 ),
3115
3116 array(
3117 'id' => 'opt-depend-visible-select',
3118 'type' => 'select',
3119 'title' => 'Visible Select',
3120 'placeholder' => 'Select an option',
3121 'options' => array(
3122 'opt-1' => 'Option 1',
3123 'opt-2' => 'Option 2',
3124 'opt-3' => 'Option 3',
3125 ),
3126 'dependency' => array( 'opt-depend-visible-switcher', '==', 'true', '', 'visible' ),
3127 ),
3128
3129 //
3130 // Dependency example 8
3131 array(
3132 'type' => 'subheading',
3133 'content' => 'Nested Dependencies',
3134 ),
3135
3136 array(
3137 'id' => 'opt-depend-switcher-1',
3138 'type' => 'switcher',
3139 'title' => 'If switched to (ON) --->',
3140 ),
3141
3142 array(
3143 'id' => 'opt-depend-select-1',
3144 'type' => 'select',
3145 'title' => '---> and selected to (Blue)',
3146 'placeholder' => 'Select a color',
3147 'options' => array(
3148 'blue' => 'Blue',
3149 'yellow' => 'Yellow',
3150 'green' => 'Green',
3151 'black' => 'Black',
3152 'white' => 'White',
3153 ),
3154 ),
3155
3156 array(
3157 'type' => 'notice',
3158 'style' => 'success',
3159 'content' => 'Success: Switched to (ON) and selected to (Blue).',
3160 'dependency' => array( 'opt-depend-switcher-1|opt-depend-select-1', '==|==', 'true|blue' ),
3161 ),
3162
3163 //
3164 // Dependency example 9
3165 array(
3166 'type' => 'subheading',
3167 'content' => 'Another Nested Dependencies',
3168 ),
3169
3170 array(
3171 'id' => 'opt-nested-select-1',
3172 'type' => 'select',
3173 'title' => 'If selected to (Black) or (White) --->',
3174 'placeholder' => 'Select a color',
3175 'options' => array(
3176 'blue' => 'Blue',
3177 'yellow' => 'Yellow',
3178 'green' => 'Green',
3179 'black' => 'Black',
3180 'white' => 'White',
3181 ),
3182 ),
3183
3184 array(
3185 'id' => 'opt-nested-select-2',
3186 'type' => 'select',
3187 'title' => '---> and selected to (Large) --->',
3188 'placeholder' => 'Select a size',
3189 'options' => array(
3190 'small' => 'Small',
3191 'middle' => 'Middle',
3192 'large' => 'Large',
3193 'xlage' => 'XLarge',
3194 'xxlage' => 'XXLarge',
3195 ),
3196 'dependency' => array( 'opt-nested-select-1', 'any', 'black,white' ),
3197 ),
3198
3199 array(
3200 'id' => 'opt-nested-select-3',
3201 'type' => 'select',
3202 'title' => '---> and selected to (Hello)',
3203 'placeholder' => 'Select a word',
3204 'options' => array(
3205 'hello' => 'Hello',
3206 'world' => 'World',
3207 ),
3208 'dependency' => array( 'opt-nested-select-1|opt-nested-select-2', 'any|==', 'black,white|large' ),
3209 ),
3210
3211 array(
3212 'type' => 'notice',
3213 'style' => 'success',
3214 'content' => 'Congratulations, You are here now!',
3215 'dependency' => array( 'opt-nested-select-1|opt-nested-select-2|opt-nested-select-3', 'any|==|==', 'black,white|large|hello' ),
3216 ),
3217
3218 )
3219 ) );
3220
3221 //
3222 // Validate
3223 //
3224 CSF::createSection( $prefix, array(
3225 'parent' => 'fields',
3226 'title' => 'Validate',
3227 '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>',
3228 'fields' => array(
3229
3230 array(
3231 'id' => 'opt-validate-1',
3232 'type' => 'text',
3233 'title' => 'Email validate',
3234 'subtitle' => 'This text field only allows validated email address.',
3235 'default' => 'info@domain.com',
3236 'validate' => 'csf_customize_validate_email',
3237 ),
3238
3239 array(
3240 'id' => 'opt-validate-2',
3241 'type' => 'text',
3242 'title' => 'Numeric validate',
3243 'subtitle' => 'This text field only allows numbers',
3244 'default' => '123456',
3245 'validate' => 'csf_customize_validate_numeric',
3246 ),
3247
3248 array(
3249 'id' => 'opt-validate-3',
3250 'type' => 'text',
3251 'title' => 'Required validate',
3252 'subtitle' => 'This text field is required, cannot be pass empty.',
3253 'default' => 'Lorem ipsum value',
3254 'validate' => 'csf_customize_validate_required',
3255 ),
3256
3257 array(
3258 'id' => 'opt-validate-4',
3259 'type' => 'text',
3260 'title' => 'URL validate',
3261 'subtitle' => 'This text field only allows validated url address.',
3262 'default' => 'http://codestarframework.com',
3263 'validate' => 'csf_customize_validate_url',
3264 ),
3265
3266 )
3267 ) );
3268
3269 //
3270 // Sanitize
3271 //
3272 CSF::createSection( $prefix, array(
3273 'parent' => 'fields',
3274 'title' => 'Sanitize',
3275 '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>',
3276 'fields' => array(
3277
3278 array(
3279 'id' => 'opt-sanitize-1',
3280 'type' => 'text',
3281 'title' => 'Sanitize (a) to (b)',
3282 'subtitle' => 'Replacing letter (a) to letter (b). for eg. apple to bpple',
3283 'sanitize' => 'csf_sanitize_replace_a_to_b'
3284 ),
3285
3286 array(
3287 'id' => 'opt-sanitize-2',
3288 'type' => 'text',
3289 'title' => 'Sanitize Title',
3290 'subtitle' => 'Converting (space) to (-) and (uppercase) letters to (lowercase) letters. for eg. Hello World to hello-world',
3291 'sanitize' => 'csf_sanitize_title'
3292 ),
3293
3294 )
3295 ) );
3296
3297 //
3298 // Others
3299 //
3300 CSF::createSection( $prefix, array(
3301 'parent' => 'fields',
3302 'title' => 'Others',
3303 'description' => 'Visit documentation for more details: <a href="http://codestarframework.com/documentation/#/fields?id=others" target="_blank">Others</a>',
3304 'fields' => array(
3305
3306 array(
3307 'type' => 'heading',
3308 'content' => 'This is a heading field',
3309 ),
3310
3311 array(
3312 'type' => 'subheading',
3313 'content' => 'This is a subheading field',
3314 ),
3315
3316 array(
3317 'type' => 'content',
3318 'content' => 'This is a content field',
3319 ),
3320
3321 array(
3322 'type' => 'submessage',
3323 'style' => 'success',
3324 'content' => 'This is a <strong>submessage</strong> field. And using style <strong>success</strong>',
3325 ),
3326
3327 array(
3328 'type' => 'content',
3329 'content' => 'This is a content field',
3330 ),
3331 array(
3332 'type' => 'submessage',
3333 'style' => 'info',
3334 'content' => 'This is a <strong>submessage</strong> field. And using style <strong>info</strong>',
3335 ),
3336
3337 array(
3338 'type' => 'submessage',
3339 'style' => 'warning',
3340 'content' => 'This is a <strong>submessage</strong> field. And using style <strong>warning</strong>',
3341 ),
3342
3343 array(
3344 'type' => 'submessage',
3345 'style' => 'danger',
3346 'content' => 'This is a <strong>submessage</strong> field. And using style <strong>danger</strong>',
3347 ),
3348
3349 array(
3350 'type' => 'notice',
3351 'style' => 'success',
3352 'content' => 'This is a <strong>notice</strong> field. And using style <strong>success</strong>',
3353 ),
3354
3355 array(
3356 'type' => 'notice',
3357 'style' => 'info',
3358 'content' => 'This is a <strong>notice</strong> field. And using style <strong>info</strong>',
3359 ),
3360
3361 array(
3362 'type' => 'notice',
3363 'style' => 'warning',
3364 'content' => 'This is a <strong>notice</strong> field. And using style <strong>warning</strong>',
3365 ),
3366
3367 array(
3368 'type' => 'notice',
3369 'style' => 'danger',
3370 'content' => 'This is a <strong>notice</strong> field. And using style <strong>danger</strong>',
3371 ),
3372
3373 array(
3374 'type' => 'content',
3375 'content' => 'This is a <strong>content</strong> field. You can write some contents here.',
3376 ),
3377
3378 )
3379 ) );
3380
3381 //
3382 // Create a section
3383 //
3384 CSF::createSection( $prefix, array(
3385 'title' => 'CSF - Reset & Backup',
3386 'priority' => 3,
3387 'fields' => array(
3388
3389 array(
3390 'type' => 'backup',
3391 ),
3392
3393 ),
3394 ) );
3395