PluginProbe
Cool Timeline (Horizontal & Vertical Timeline) / trunk
Cool Timeline (Horizontal & Vertical Timeline) vtrunk
3.4.0 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 2.2.3 2.3.3 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.6.1 2.7.1 2.8.3 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 All 79 releases
cool-timeline / admin / codestar-framework / samples / customize-options.php

customize-options.php in Cool Timeline (Horizontal & Vertical Timeline) trunk, at admin/codestar-framework/samples/customize-options.php

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