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 / comment-options.php

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

91 lines 1.8 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 // Comment Metabox
5 // Set a unique slug-like ID
6 //
7 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
8 $prefix_comment = '_prefix_comment';
9
10 //
11 // Create a comment metabox
12 //
13 CSF::createCommentMetabox( $prefix_comment, array(
14 'title' => 'Custom Comment Options',
15 ) );
16
17 //
18 // Create a section
19 //
20 CSF::createSection( $prefix_comment, array(
21
22 'fields' => array(
23
24 //
25 // A text field
26 //
27 array(
28 'id' => 'opt-text',
29 'type' => 'text',
30 'title' => 'Text',
31 ),
32
33 array(
34 'id' => 'opt-textarea',
35 'type' => 'textarea',
36 'title' => 'Textarea',
37 'help' => 'The help text of the field.',
38 ),
39
40 array(
41 'id' => 'opt-upload',
42 'type' => 'upload',
43 'title' => 'Upload',
44 ),
45
46 array(
47 'id' => 'opt-switcher',
48 'type' => 'switcher',
49 'title' => 'Switcher',
50 'label' => 'The label text of the switcher.',
51 ),
52
53 array(
54 'id' => 'opt-color',
55 'type' => 'color',
56 'title' => 'Color',
57 ),
58
59 array(
60 'id' => 'opt-checkbox',
61 'type' => 'checkbox',
62 'title' => 'Checkbox',
63 'label' => 'The label text of the checkbox.',
64 ),
65
66 array(
67 'id' => 'opt-radio',
68 'type' => 'radio',
69 'title' => 'Radio',
70 'options' => array(
71 'yes' => 'Yes, Please.',
72 'no' => 'No, Thank you.',
73 ),
74 'default' => 'yes',
75 ),
76
77 array(
78 'id' => 'opt-select',
79 'type' => 'select',
80 'title' => 'Select',
81 'placeholder' => 'Select an option',
82 'options' => array(
83 'opt-1' => 'Option 1',
84 'opt-2' => 'Option 2',
85 'opt-3' => 'Option 3',
86 ),
87 ),
88
89 )
90 ) );
91