first commit
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
|
||||
|
||||
//
|
||||
// Set a unique slug-like ID
|
||||
//
|
||||
$prefix = '_prefix_menu_options';
|
||||
|
||||
//
|
||||
// Create menu options
|
||||
//
|
||||
CSF::createNavMenuOptions( $prefix, array(
|
||||
'data_type' => 'serialize'
|
||||
) );
|
||||
|
||||
//
|
||||
// Create a section
|
||||
//
|
||||
CSF::createSection( $prefix, array(
|
||||
'fields' => array(
|
||||
|
||||
//
|
||||
// A text field
|
||||
//
|
||||
array(
|
||||
'id' => 'opt-text',
|
||||
'type' => 'text',
|
||||
'title' => 'Text',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'opt-textarea',
|
||||
'type' => 'textarea',
|
||||
'title' => 'Textarea',
|
||||
'help' => 'The help text of the field.',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'opt-upload',
|
||||
'type' => 'upload',
|
||||
'title' => 'Upload',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'opt-icon',
|
||||
'type' => 'icon',
|
||||
'title' => 'Icon',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'opt-switcher',
|
||||
'type' => 'switcher',
|
||||
'title' => 'Switcher',
|
||||
'label' => 'The label text of the switcher.',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'opt-color',
|
||||
'type' => 'color',
|
||||
'title' => 'Color',
|
||||
'default' => '#3498db',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'opt-checkbox',
|
||||
'type' => 'checkbox',
|
||||
'title' => 'Checkbox',
|
||||
'label' => 'The label text of the checkbox.',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'opt-radio',
|
||||
'type' => 'radio',
|
||||
'title' => 'Radio',
|
||||
'options' => array(
|
||||
'yes' => 'Yes, Please.',
|
||||
'no' => 'No, Thank you.',
|
||||
),
|
||||
'default' => 'yes',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'opt-select',
|
||||
'type' => 'select',
|
||||
'title' => 'Select',
|
||||
'placeholder' => 'Select an option',
|
||||
'options' => array(
|
||||
'opt-1' => 'Option 1',
|
||||
'opt-2' => 'Option 2',
|
||||
'opt-3' => 'Option 3',
|
||||
),
|
||||
),
|
||||
|
||||
)
|
||||
) );
|
||||
Reference in New Issue
Block a user