← All changes
|
frameworks/codestar-framework/samples/comment-options.php
+89
-89
2.3.4
→
2.4.0
View file →
| @@ -1,89 +1,89 @@ | ||
| 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 | -) ); | |
| 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 | +) ); | |