add_section( 'header_options' , array( 'title' => __( 'Header Options', 'aytias' ), 'panel' => 'aytias_option_panel', ) ); /* Header Background Color*/ $wp_customize->add_setting( 'aytias_options[header_bg_color]', array( 'default' => $default_options['header_bg_color'], 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'aytias_options[header_bg_color]', array( 'label' => __('Header Background Color', 'aytias'), 'section' => 'header_options', 'type' => 'color', ) ) ); /* Header Style */ $wp_customize->add_setting( 'aytias_options[header_style]', array( 'default' => $default_options['header_style'], 'sanitize_callback' => 'aytias_sanitize_radio', ) ); $wp_customize->add_control( new Aytias_Radio_Image_Control( $wp_customize, 'aytias_options[header_style]', array( 'label' => __( 'Header Style', 'aytias' ), 'description' => __( 'Some options related to header may not show in the front-end based on header style chosen.', 'aytias' ), 'section' => 'header_options', 'choices' => aytias_get_header_layouts() ) ) ); /*Enable Sticky Menu*/ $wp_customize->add_setting( 'aytias_options[enable_sticky_menu]', array( 'default' => $default_options['enable_sticky_menu'], 'sanitize_callback' => 'aytias_sanitize_checkbox', ) ); $wp_customize->add_control( 'aytias_options[enable_sticky_menu]', array( 'label' => __( 'Enable Sticky Menu', 'aytias' ), 'section' => 'header_options', 'type' => 'checkbox', ) ); /* Sticky Bar Background Color*/ $wp_customize->add_setting( 'aytias_options[sticky_bar_bg_color]', array( 'default' => $default_options['sticky_bar_bg_color'], 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'aytias_options[sticky_bar_bg_color]', array( 'label' => __('Sticky Menu Background Color', 'aytias'), 'section' => 'header_options', 'type' => 'color', 'active_callback' => 'aytias_is_sticky_menu_enabled', ) ) ); /*Enable Search*/ $wp_customize->add_setting( 'aytias_options[enable_search_on_header]', array( 'default' => $default_options['enable_search_on_header'], 'sanitize_callback' => 'aytias_sanitize_checkbox', ) ); $wp_customize->add_control( 'aytias_options[enable_search_on_header]', array( 'label' => __( 'Enable Search Icon', 'aytias' ), 'section' => 'header_options', 'type' => 'checkbox', ) ); /*Search Style*/ $wp_customize->add_setting( 'aytias_options[header_search_btn_style]', array( 'default' => $default_options['header_search_btn_style'], 'sanitize_callback' => 'aytias_sanitize_select', ) ); $wp_customize->add_control( 'aytias_options[header_search_btn_style]', array( 'label' => __( 'Header Search Button Style', 'aytias' ), 'section' => 'header_options', 'type' => 'select', 'choices' => array( 'style_1' => __( 'Style 1', 'aytias' ), 'style_2' => __( 'Style 2', 'aytias' ), ), 'active_callback' => 'aytias_is_search_icon_enabled', ) ); /*Enable Border Below Header*/ $wp_customize->add_setting( 'aytias_options[enable_border_below_header]', array( 'default' => $default_options['enable_border_below_header'], 'sanitize_callback' => 'aytias_sanitize_checkbox', ) ); $wp_customize->add_control( 'aytias_options[enable_border_below_header]', array( 'label' => __( 'Enable a border below header', 'aytias' ), 'section' => 'header_options', 'type' => 'checkbox', ) ); if(aytias_is_wc_active()){ /*Enable Mini Cart Icon on header*/ $wp_customize->add_setting( 'aytias_options[enable_mini_cart_header]', array( 'default' => $default_options['enable_mini_cart_header'], 'sanitize_callback' => 'aytias_sanitize_checkbox', ) ); $wp_customize->add_control( 'aytias_options[enable_mini_cart_header]', array( 'label' => __( 'Enable Mini Cart Icon', 'aytias' ), 'section' => 'header_options', 'type' => 'checkbox', ) ); /*Enable Myaccount Link*/ $wp_customize->add_setting( 'aytias_options[enable_woo_my_account]', array( 'default' => $default_options['enable_woo_my_account'], 'sanitize_callback' => 'aytias_sanitize_checkbox', ) ); $wp_customize->add_control( 'aytias_options[enable_woo_my_account]', array( 'label' => __( 'Enable My Account Icon', 'aytias' ), 'section' => 'header_options', 'type' => 'checkbox', ) ); }