add_setting( 'custom_plugin_css', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_setting( 'accent_color', array( 'default' => '#f72525', 'sanitize_callback' => 'sanitize_hex_color', )); /* $wp_customize->add_setting( 'custom_setting_id', array( 'type' => 'option', * 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'custom_setting_id', array( 'type' => 'date', 'priority' => 10, // Within the section. 'section' => 'custom_css', // Required, core or custom. 'label' => __( 'Date', 'alphabet' ), 'description' => __( 'This is a date control with a red border.', 'alphabet' ), 'input_attrs' => array( 'class' => 'my-custom-class-for-js', 'style' => 'border: 1px solid #900', 'placeholder' => __( 'mm/dd/yyyy', 'alphabet' ), ), 'active_callback' => 'is_front_page', )); */ $wp_customize->add_setting( 'custom_theme_css', array( 'type' => 'theme_mod', // or 'option' (d: 'theme_mod' - added to 'theme_mods_alphabet' in db table 'wp_options') //'capability' => 'edit_theme_options', //'theme_supports' => '', // Rarely needed. //'default' => '', //'transport' => 'refresh', // or postMessage 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_text_field', //'sanitize_js_callback' => '', // Basically to_json. )); $wp_customize->add_control( 'custom_theme_css', array( 'label' => __( 'Custom Theme CSS', 'alphabet' ), 'type' => 'textarea', /** checkbox textarea radio (pass a keyed array of values => labels to the choices argument) select (pass a keyed array of values => labels to the choices argument) dropdown-pages * */ 'section' => 'custom_css', )); $wp_customize->add_section( 'custom_css', array( 'title' => __( 'Custom CSS', 'alphabet' ), 'description' => __( 'Add custom CSS here', 'alphabet' ), 'panel' => 'panel_other', // Not typically needed. 'priority' => 160, // default, after 'Static Front Page' (120) 'capability' => 'edit_theme_options', 'theme_supports' => '', // Rarely needed. )); /* $wp_customize->add_setting( 'custom_theme_mod', array( 'type' => 'theme_mod', // or 'option' 'transport' => 'postMessage', // or 'refresh' * 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'custom_theme_mod', array( 'type' => 'range', 'section' => 'panel_other', 'label' => __( 'Range', 'alphabet' ), 'description' => __( 'This is the range control description.', 'alphabet' ), 'input_attrs' => array( 'min' => 0, 'max' => 10, 'step' => 2, ), 'default' => 4, ));*/ /* $wp_customize->add_setting($id = 'image_control', $args = array( 'type' => 'theme_mod', * 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'image_control', array( 'label' => __( 'Featured Home Page Image', 'alphabet' ), 'section' => 'footer', 'mime_type' => 'image', // or 'audio' ) )); $wp_customize->add_setting($id = 'audio_control', $args = array( 'type' => 'theme_mod', * 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'audio_control', array( 'label' => __( 'Featured Home Page Recording', 'alphabet' ), 'section' => 'footer', 'mime_type' => 'audio', ) )); */ // Add a 'Some Section' section. $wp_customize->add_section( 'some_section' , array( 'title' => __( 'Some Section', 'alphabet' ), 'panel' => 'panel_other', )); $description = '

Just test add_panel to Menus

'; $wp_customize->add_panel( 'panel_other', array( 'title' => __( 'Other Panel', 'alphabet' ), 'description' => $description, // Include html tags such as

. 'priority' => 160, // Mixed with top-level-section hierarchy. ) );