add_setting( 'avenews_options[enable_header_bg_overlay]', array( 'default' => $default_options['enable_header_bg_overlay'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_header_bg_overlay]', array( 'label' => __('Enable Image Overlay', 'avenews'), 'section' => 'header_image', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'avenews_options[header_image_size]', array( 'default' => $default_options['header_image_size'], 'sanitize_callback' => 'avenews_sanitize_select', ) ); $wp_customize->add_control( 'avenews_options[header_image_size]', array( 'label' => __('Select Header Size', 'avenews'), 'description' => __('Some options related to header may not show in the front-end based on header style chosen.', 'avenews'), 'section' => 'header_image', 'type' => 'select', 'choices' => array( 'none' => __('Default', 'avenews'), 'small' => __('Small', 'avenews'), 'medium' => __('Medium', 'avenews'), 'large' => __('Large', 'avenews'), ), ) ); /*Header Options*/ $wp_customize->add_section( 'header_options', array( 'title' => __('Header Options', 'avenews'), 'panel' => 'avenews_option_panel', ) ); $wp_customize->add_setting( 'avenews_options[main_header_section_layout]', array( 'default' => $default_options['main_header_section_layout'], 'sanitize_callback' => 'avenews_sanitize_select', ) ); $wp_customize->add_control( 'avenews_options[main_header_section_layout]', array( 'label' => __('Select Header Layout', 'avenews'), 'description' => __('Some options related to header may not show in the front-end based on header style chosen.', 'avenews'), 'section' => 'header_options', 'type' => 'select', 'choices' => array( 'layout-1' => __('Header Layout 1', 'avenews'), 'layout-2' => __('Header Layout 2', 'avenews'), ), ) ); $wp_customize->add_setting( 'avenews_options[upload_header_add_image]', array( 'default' => '', 'sanitize_callback' => 'avenews_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'avenews_options[upload_header_add_image]', array( 'label' => __('Upload Header Advertisement Image', 'avenews'), 'section' => 'header_options', 'active_callback' => 'avenews_main_header_section_layout', ) ) ); $wp_customize->add_setting( 'avenews_options[upload_ad_banner_link]', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'avenews_options[upload_ad_banner_link]', array( 'label' => __('Header Advertisement Link', 'avenews'), 'section' => 'header_options', 'type' => 'text', 'description' => __('Leave empty if you don\'t want the image to have a link', 'avenews'), 'active_callback' => 'avenews_main_header_section_layout', ) ); $wp_customize->add_setting( 'avenews_section_seperator_header_1', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( new Avenews_Seperator_Control( $wp_customize, 'avenews_section_seperator_header_1', array( 'settings' => 'avenews_section_seperator_header_1', 'section' => 'header_options', ) ) ); /*Enable Sticky Menu*/ $wp_customize->add_setting( 'avenews_options[enable_sticky_menu]', array( 'default' => $default_options['enable_sticky_menu'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_sticky_menu]', array( 'label' => __('Enable Sticky Menu', 'avenews'), 'section' => 'header_options', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'avenews_section_seperator_header_4', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( new Avenews_Seperator_Control( $wp_customize, 'avenews_section_seperator_header_4', array( 'settings' => 'avenews_section_seperator_header_4', 'section' => 'header_options', ) ) ); if (class_exists('WooCommerce')) { /*Enable Mini Cart Icon on header*/ $wp_customize->add_setting( 'avenews_options[enable_mini_cart_header]', array( 'default' => $default_options['enable_mini_cart_header'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_mini_cart_header]', array( 'label' => __('Enable Mini Cart Icon', 'avenews'), 'section' => 'header_options', 'type' => 'checkbox', ) ); /*Enable Myaccount Link*/ $wp_customize->add_setting( 'avenews_options[enable_woo_my_account]', array( 'default' => $default_options['enable_woo_my_account'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_woo_my_account]', array( 'label' => __('Enable My Account Icon', 'avenews'), 'section' => 'header_options', 'type' => 'checkbox', ) ); }