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_text_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'default' => 'Lorem Ipsum', | |
'sanitize_callback' => 'sanitize_text_field', | |
) ); | |
$wp_customize->add_control( 'themeslug_text_setting_id', array( | |
'type' => 'text', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Text' ), |
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_textarea_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'default' => 'Lorem Ipsum Dolor Sit amet', | |
'sanitize_callback' => 'sanitize_text_field', | |
) ); | |
$wp_customize->add_control( 'themeslug_textarea_setting_id', array( | |
'type' => 'textarea', | |
'section' => 'custom_section', // // Add a default or your own section | |
'label' => __( 'Custom Text Area' ), |
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( 'date_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_date', | |
) ); | |
$wp_customize->add_control( 'date_setting_id', array( | |
'type' => 'date', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Date' ), | |
'description' => __( 'This is a custom date control.' ), |
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_url_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_url', | |
) ); | |
$wp_customize->add_control( 'themeslug_url_setting_id', array( | |
'type' => 'url', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom URL' ), | |
'description' => __( 'This is a custom url 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_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' ), |
NewerOlder