add_setting( 'applica_options[enable_header_bg_overlay]', array( 'default' => $default_options['enable_header_bg_overlay'], 'sanitize_callback' => 'applica_sanitize_checkbox', ) ); $wp_customize->add_control( 'applica_options[enable_header_bg_overlay]', array( 'label' => __( 'Enable Image Overlay', 'applica' ), 'section' => 'header_image', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'applica_options[header_image_size]', array( 'default' => $default_options['header_image_size'], 'sanitize_callback' => 'applica_sanitize_select', ) ); $wp_customize->add_control( 'applica_options[header_image_size]', array( 'label' => __( 'Select Header Size', 'applica' ), 'description' => __( 'Some options related to header may not show in the front-end based on header style chosen.', 'applica' ), 'section' => 'header_image', 'type' => 'select', 'choices' => array( 'none' => __( 'default', 'applica' ), 'small' => __( 'Small', 'applica' ), 'medium' => __( 'Medium', 'applica' ), 'large' => __( 'Large', 'applica' ), ), ) ); /*Header Options*/ $wp_customize->add_section( 'header_options' , array( 'title' => __( 'Header Options', 'applica' ), 'panel' => 'applica_option_panel', ) ); $wp_customize->add_setting( 'applica_section_seperator_header_1', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( new Applica_Seperator_Control( $wp_customize, 'applica_section_seperator_header_1', array( 'settings' => 'applica_section_seperator_header_1', 'section' => 'header_options', ) ) ); /* Header Style */ $wp_customize->add_setting( 'applica_options[header_style]', array( 'default' => $default_options['header_style'], 'sanitize_callback' => 'applica_sanitize_select', ) ); $wp_customize->add_control( 'applica_options[header_style]', array( 'label' => __( 'Header Style', 'applica' ), 'description' => __( 'Some options related to header may not show in the front-end based on header style chosen.', 'applica' ), 'section' => 'header_options', 'type' => 'select', 'choices' => array( 'header_style_1' => __( 'Header Style 1', 'applica' ), 'header_style_2' => __( 'Header Style 2', 'applica' ), 'header_style_3' => __( 'Header Style 3', 'applica' ), ), ) ); $wp_customize->add_setting( 'applica_section_seperator_header_2', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( new Applica_Seperator_Control( $wp_customize, 'applica_section_seperator_header_2', array( 'settings' => 'applica_section_seperator_header_2', 'section' => 'header_options', ) ) ); /*Enable Sticky Menu*/ $wp_customize->add_setting( 'applica_options[enable_sticky_menu]', array( 'default' => $default_options['enable_sticky_menu'], 'sanitize_callback' => 'applica_sanitize_checkbox', ) ); $wp_customize->add_control( 'applica_options[enable_sticky_menu]', array( 'label' => __( 'Enable Sticky Menu', 'applica' ), 'section' => 'header_options', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'applica_section_seperator_header_3', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( new Applica_Seperator_Control( $wp_customize, 'applica_section_seperator_header_3', array( 'settings' => 'applica_section_seperator_header_3', 'section' => 'header_options', ) ) ); $wp_customize->add_setting( 'applica_options[enable_random_post]', array( 'default' => $default_options['enable_random_post'], 'sanitize_callback' => 'applica_sanitize_checkbox', ) ); $wp_customize->add_control( 'applica_options[enable_random_post]', array( 'label' => esc_html__('Enable Random Post', 'applica'), 'section' => 'header_options', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'applica_options[random_post_category]', array( 'default' => $default_options['random_post_category'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control(new Applica_Dropdown_Taxonomies_Control( $wp_customize, 'applica_options[random_post_category]', array( 'label' => esc_html__('Random Post Category', 'applica'), 'section' => 'header_options', ) ) ); $wp_customize->add_setting( 'applica_section_seperator_header_4', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( new Applica_Seperator_Control( $wp_customize, 'applica_section_seperator_header_4', array( 'settings' => 'applica_section_seperator_header_4', 'section' => 'header_options', ) ) ); /*Enable Search*/ $wp_customize->add_setting( 'applica_options[enable_search_on_header]', array( 'default' => $default_options['enable_search_on_header'], 'sanitize_callback' => 'applica_sanitize_checkbox', ) ); $wp_customize->add_control( 'applica_options[enable_search_on_header]', array( 'label' => __( 'Enable Search Icon', 'applica' ), 'section' => 'header_options', 'type' => 'checkbox', ) ); if(class_exists( 'WooCommerce' )){ /*Enable Mini Cart Icon on header*/ $wp_customize->add_setting( 'applica_options[enable_mini_cart_header]', array( 'default' => $default_options['enable_mini_cart_header'], 'sanitize_callback' => 'applica_sanitize_checkbox', ) ); $wp_customize->add_control( 'applica_options[enable_mini_cart_header]', array( 'label' => __( 'Enable Mini Cart Icon', 'applica' ), 'section' => 'header_options', 'type' => 'checkbox', ) ); /*Enable Myaccount Link*/ $wp_customize->add_setting( 'applica_options[enable_woo_my_account]', array( 'default' => $default_options['enable_woo_my_account'], 'sanitize_callback' => 'applica_sanitize_checkbox', ) ); $wp_customize->add_control( 'applica_options[enable_woo_my_account]', array( 'label' => __( 'Enable My Account Icon', 'applica' ), 'section' => 'header_options', 'type' => 'checkbox', ) ); }