Let’s open themename/wpsf-framework/config/framework.config.php all examples there
.
├── themename
| ├── wpsf-framework
| | ├── config
| | | ├── framework.config.php
take a look framework.config.php example
if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
/**
*
* CSFramework Config
*
* @since 1.0
* @version 1.0
*
*/
// Top level Menu
$settings = array(
'menu_title' => 'Framework',
'menu_type' => 'menu', // menu, submenu, options, theme, etc.
'menu_slug' => 'wpsf-framework',
'ajax_save' => false,
'show_reset_all' => false,
'framework_title' => 'wpsf Framework <small>by wpsf</small>',
);
/*
// child of another menu in wordpress
$settings = array(
'menu_title' => 'Framework',
'menu_type' => 'theme', // <----- under appearance
'menu_slug' => 'wpsf-framework',
'ajax_save' => false,
'show_reset_all' => false,
'framework_title' => 'wpsf Framework <small>by wpsf</small>',
);
// child of another by parent slug
$settings = array(
'menu_title' => 'Framework',
'menu_type' => 'submenu', // <------- set to submenu
'menu_parent' => 'your_parent_slug', // <-------
'menu_slug' => 'wpsf-framework',
'ajax_save' => false,
'show_reset_all' => false,
'framework_title' => 'wpsf Framework <small>by wpsf</small>',
);
*/
// Framework Options
$options = array();
// a new setting section
$options[] = array(
'name' => 'section_1',
'title' => 'Section #1',
'icon' => 'fa fa-repeat',
'fields' => array(
// a text field
array(
'id' => 'section_1_text',
'type' => 'text',
'title' => 'Text Option Field',
),
// a textarea field
array(
'id' => 'section_1_textarea',
'type' => 'textarea',
'title' => 'Textarea Option Field',
),
)
);
CSFramework::instance( $settings, $options );
echo wpsf_get_option( 'section_1_text' );
echo wpsf_get_option( 'section_1_textarea' );