This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wp_customize->add_setting( 'themeslug_email_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'default' => '', | |
'sanitize_callback' => 'themeslug_sanitize_email', | |
) ); | |
$wp_customize->add_control( 'themeslug_email_setting_id', array( | |
'type' => 'email', | |
'section' => 'custom_section', // Required, core or custom. | |
'label' => __( 'Custom Email' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wp_customize->add_setting( 'themecheck_checkbox_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_checkbox', | |
) ); | |
$wp_customize->add_control( 'themeslug_checkbox_setting_id', array( | |
'type' => 'checkbox', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Checkbox' ), | |
'description' => __( 'This is a custom checkbox input.' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wp_customize->add_setting( 'themeslug_select_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_select', | |
'default' => 'value1', | |
) ); | |
$wp_customize->add_control( 'themeslug_select_setting_id', array( | |
'type' => 'select', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Select Option' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wp_customize->add_setting( 'themeslug_dropdownpages_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_dropdown_pages', | |
) ); | |
$wp_customize->add_control( 'themeslug_dropdownpages_setting_id', array( | |
'type' => 'dropdown-pages', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Dropdown Pages' ), | |
'description' => __( 'This is a custom dropdown pages option.' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wp_customize->add_setting( 'themeslug_number_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_number_absint', | |
'default' => 1, | |
) ); | |
$wp_customize->add_control( 'themeslug_number_setting_id', array( | |
'type' => 'number', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Number' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wp_customize->add_setting( 'themeslug_time_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => '', | |
'default' => 1, | |
) ); | |
$wp_customize->add_control( 'themeslug_time_setting_id', array( | |
'type' => 'time', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Time' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wp_customize->add_setting( 'core_color_setting_id', array( | |
'sanitize_callback' => 'themeslug_sanitize_hex_color', | |
) ); | |
$wp_customize->add_control( | |
new WP_Customize_Color_Control( $wp_customize, 'core_color_setting_id', | |
array( | |
'label' => __( 'Core Color Setting' ), | |
'description' => __( 'Select a color for something' ), | |
'section' => 'custom_section', // Add a default or your own section |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wp_customize->add_setting( 'themeslug_media_setting_id', array( | |
'sanitize_callback' => 'absint', | |
'validate_callback' => 'themeslug_validate_image, | |
) ); | |
$wp_customize->add_control( | |
new WP_Customize_Media_Control( $wp_customize, 'themeslug_media_setting_id', array( | |
'label' => __( 'Custom Core Media Setting' ), | |
'section' => 'custom_section', // Add a default or your own section | |
'mime_type' => 'image', |