add_setting( 'automobile_theme_options[enable_featured_header_image]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['enable_featured_header_image'], 'sanitize_callback' => 'automobile_sanitize_select', ) ); $automobile_enable_featured_header_image_options = automobile_enable_featured_header_image_options(); $choices = array(); foreach ( $automobile_enable_featured_header_image_options as $automobile_enable_featured_header_image_option ) { $choices[$automobile_enable_featured_header_image_option['value']] = $automobile_enable_featured_header_image_option['label']; } $wp_customize->add_control( 'automobile_theme_options[enable_featured_header_image]', array( 'choices' => $choices, 'label' => __( 'Enable Featured Header Image on ', 'automobile' ), 'section' => 'header_image', 'settings' => 'automobile_theme_options[enable_featured_header_image]', 'type' => 'select', ) ); $wp_customize->add_setting( 'automobile_theme_options[featured_image_size]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['featured_image_size'], 'sanitize_callback' => 'automobile_sanitize_select', ) ); $automobile_featured_image_size_options = automobile_featured_image_size_options(); $choices = array(); foreach ( $automobile_featured_image_size_options as $automobile_featured_image_size_option ) { $choices[$automobile_featured_image_size_option['value']] = $automobile_featured_image_size_option['label']; } $wp_customize->add_control( 'automobile_theme_options[featured_image_size]', array( 'choices' => $choices, 'label' => __( 'Page/Post Featured Header Image Size', 'automobile' ), 'section' => 'header_image', 'settings' => 'automobile_theme_options[featured_image_size]', 'type' => 'select', ) ); $wp_customize->add_setting( 'automobile_theme_options[featured_header_image_alt]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['featured_header_image_alt'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'automobile_theme_options[featured_header_image_alt]', array( 'label' => __( 'Featured Header Image Alt/Title Tag ', 'automobile' ), 'section' => 'header_image', 'settings' => 'automobile_theme_options[featured_header_image_alt]', 'type' => 'text', ) ); $wp_customize->add_setting( 'automobile_theme_options[featured_header_image_url]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['featured_header_image_url'], 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'automobile_theme_options[featured_header_image_url]', array( 'label' => __( 'Featured Header Image Link URL', 'automobile' ), 'section' => 'header_image', 'settings' => 'automobile_theme_options[featured_header_image_url]', 'type' => 'text', ) ); $wp_customize->add_setting( 'automobile_theme_options[featured_header_image_base]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['featured_header_image_url'], 'sanitize_callback' => 'automobile_sanitize_checkbox', ) ); $wp_customize->add_control( 'automobile_theme_options[featured_header_image_base]', array( 'label' => __( 'Check to Open Link in New Window/Tab', 'automobile' ), 'section' => 'header_image', 'settings' => 'automobile_theme_options[featured_header_image_base]', 'type' => 'checkbox', ) ); // Header Options End