Esempio n. 1
0
function kc_settings_sample_theme($settings)
{
    /**
     * NOTE: Please copy/paste/edit the fields you need, then remove the require_once line.
     * This is only for simplifying the development.
     */
    require_once dirname(__FILE__) . '/00_fields.php';
    $my_settings = array('prefix' => 'anything', 'options' => array(array('id' => 'sample_section', 'title' => 'Sample Options', 'desc' => 'Some description about this options group', 'fields' => kc_settings_sample_fields()), array('id' => 'title_tagline', 'title' => '-', 'fields' => array(array('id' => 'another_text', 'type' => 'text', 'title' => 'Another text'))), array('id' => 'colors', 'title' => '-', 'fields' => array(array('id' => 'title_color', 'type' => 'color', 'default' => '#555', 'title' => 'Site Title text color'), array('id' => 'page_bg', 'type' => 'color', 'default' => '#fff', 'title' => 'Page background color', 'script' => "\$('#page').css('backgroundColor', to ? to : '');")))));
    $settings[] = $my_settings;
    return $settings;
}
Esempio n. 2
0
function kc_settings_sample_menu_item($groups)
{
    /**
     * NOTE: Please copy/paste/edit the fields you need, then remove the require_once line.
     * This is only for simplifying the development.
     */
    require_once dirname(__FILE__) . '/00_fields.php';
    $my_group = array(array('id' => 'sample_section', 'title' => 'Section title', 'desc' => '<p>Some description about this options group</p>', 'fields' => kc_settings_sample_fields()));
    $groups[] = $my_group;
    return $groups;
}
Esempio n. 3
0
function kc_settings_sample_plugin($settings)
{
    /**
     * NOTE: Please copy/paste/edit the fields you need, then remove the require_once line.
     * This is only for simplifying the development.
     */
    require_once dirname(__FILE__) . '/00_fields.php';
    $my_settings = array('prefix' => 'anything', 'menu_location' => 'options-general.php', 'menu_title' => 'My Plugin', 'page_title' => 'My Plugin Settings Page', 'display' => 'metabox', 'metabox' => array('context' => 'normal', 'priority' => 'default', 'button_text' => __('Save Changes')), 'options' => array(array('id' => 'sample_section', 'title' => 'Sample Options', 'desc' => '<p>Some description about this options group</p>', 'fields' => kc_settings_sample_fields())), 'help' => array(array('id' => 'help_1', 'title' => 'Help title', 'content' => 'Something....'), array('id' => 'help_2', 'title' => 'Another Help', 'content' => 'Something the user needs to know....')));
    $settings[] = $my_settings;
    return $settings;
}