PluginProbe
Document Embedder – let visitors read files without downloading / 1.8.6
Document Embedder – let visitors read files without downloading v1.8.6
2.3.1 2.3.0 2.2.1 2.2.0 2.1.2 2.1.1 trunk 1.0 1.1 1.2 1.3 1.7.4 1.7.6 1.7.9 1.8.1 1.8.2 1.8.3 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 2.0.0 2.0.1 2.0.2 All 30 releases
document-emberdder / admin / framework / samples / comment-options.php

comment-options.php in Document Embedder – let visitors read files without downloading 1.8.6, at admin/framework/samples/comment-options.php

90 lines 1.7 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 $prefix_comment = '_prefix_comment';
8
9 //
10 // Create a comment metabox
11 //
12 CSF::createCommentMetabox( $prefix_comment, array(
13 'title' => 'Custom Comment Options',
14 ) );
15
16 //
17 // Create a section
18 //
19 CSF::createSection( $prefix_comment, array(
20
21 'fields' => array(
22
23 //
24 // A text field
25 //
26 array(
27 'id' => 'opt-text',
28 'type' => 'text',
29 'title' => 'Text',
30 ),
31
32 array(
33 'id' => 'opt-textarea',
34 'type' => 'textarea',
35 'title' => 'Textarea',
36 'help' => 'The help text of the field.',
37 ),
38
39 array(
40 'id' => 'opt-upload',
41 'type' => 'upload',
42 'title' => 'Upload',
43 ),
44
45 array(
46 'id' => 'opt-switcher',
47 'type' => 'switcher',
48 'title' => 'Switcher',
49 'label' => 'The label text of the switcher.',
50 ),
51
52 array(
53 'id' => 'opt-color',
54 'type' => 'color',
55 'title' => 'Color',
56 ),
57
58 array(
59 'id' => 'opt-checkbox',
60 'type' => 'checkbox',
61 'title' => 'Checkbox',
62 'label' => 'The label text of the checkbox.',
63 ),
64
65 array(
66 'id' => 'opt-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-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