selective_refresh ) ? 'postMessage' : 'refresh'; $wp_customize->add_panel( 'blindscurtains_frontpage_sections', array( 'priority' => 32, 'title' => esc_html__( 'Frontpage Sections', 'blinds-curtains' ), ) ); /*========================================= Slider Section =========================================*/ $wp_customize->add_section( 'slider_setting', array( 'title' => esc_html__( 'Slider Section', 'blinds-curtains' ), 'description'=> __('Note : Image Size Should Be 1500*800','blinds-curtains'), 'priority' => 1, 'panel' => 'blindscurtains_frontpage_sections', ) ); $wp_customize->add_setting('blindscurtains_slider_tabs', array( 'sanitize_callback' => 'wp_kses_post', )); $wp_customize->add_control(new blindscurtains_Tab_Control($wp_customize, 'blindscurtains_slider_tabs', array( 'section' => 'slider_setting', 'priority' => 2, 'buttons' => array( array( 'name' => esc_html__('General', 'blinds-curtains'), 'icon' => 'dashicons dashicons-welcome-write-blog', 'fields' => array( 'slider_content_disable_section', 'slider1', 'slider2', 'slider3', 'slider4', 'slider5', 'slider6', 'slider_buttontext' ), 'active' => true, ), array( 'name' => esc_html__('Style', 'blinds-curtains'), 'icon' => 'dashicons dashicons-art', 'fields' => array( 'slider_boxbgcolor', 'slider_boxbrdcolor', 'slider_titlecolor', 'slider_descriptioncolor', 'slider_btntxt1color', 'slider_btnbgcolor', 'slider_btntxthovercolor', 'slider_arrowiconcolor', 'slider_arrowiconbgcolor', 'slider_arrowiconHovercolor', 'slider_arrowiconHoverBGcolor' ), ), array( 'name' => esc_html__('Layout', 'blinds-curtains'), 'icon' => 'dashicons dashicons-layout', 'fields' => array( 'bestseller_slidersection_width', 'bestseller_slidersection_padding', 'bestseller_slidersection_top_padding', 'bestseller_slidersection_bottom_padding' ), ) ), ))); // General Tab // hide show slider_content section $wp_customize->add_setting( 'slider_content_disable_section', array( 'sanitize_callback' => 'wp_kses_post', ) ); $wp_customize->add_control( new blindscurtains_Toggle_Switch_Custom_Control( $wp_customize, 'slider_content_disable_section', array( 'settings' => 'slider_content_disable_section', 'section' => 'slider_setting', 'label' => __( 'Disable Content Box', 'blinds-curtains' ), 'on_off_label' => array( 'on' => __( 'Yes', 'blinds-curtains' ), 'off' => __( 'No', 'blinds-curtains' ) ), ) ) ); // Slider 1 $wp_customize->add_setting( 'slider1', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider1', array( 'label' => __('Slider 1','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Slider 2 $wp_customize->add_setting( 'slider2', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 4, ) ); $wp_customize->add_control( 'slider2', array( 'label' => __('Slider 2','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Slider 3 $wp_customize->add_setting( 'slider3', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 5, ) ); $wp_customize->add_control( 'slider3', array( 'label' => __('Slider 3','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Slider 4 $wp_customize->add_setting( 'slider4', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 6, ) ); $wp_customize->add_control( 'slider4', array( 'label' => __('Slider 4','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Slider 5 $wp_customize->add_setting( 'slider5', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 7, ) ); $wp_customize->add_control( 'slider5', array( 'label' => __('Slider 5','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Slider 6 $wp_customize->add_setting( 'slider6', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 7, ) ); $wp_customize->add_control( 'slider6', array( 'label' => __('Slider 6','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // slider buttontext $wp_customize->add_setting( 'slider_buttontext', array( 'default' => 'Shop Now', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 1, ) ); $wp_customize->add_control( 'slider_buttontext', array( 'label' => __('Button Text','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); // Style setting // slider boxbg Color $sliderboxbgcolor = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_boxbgcolor', array( 'default' => $sliderboxbgcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_boxbgcolor', array( 'label' => __('Box Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider boxbrd Color $sliderboxbrdcolor = esc_html__('#fff', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_boxbrdcolor', array( 'default' => $sliderboxbrdcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_boxbrdcolor', array( 'label' => __('Box Border Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider title Color $slidertitlecolor = esc_html__('#fff', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_titlecolor', array( 'default' => $slidertitlecolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_titlecolor', array( 'label' => __('Title Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider description Color $sliderdescriptioncolor = esc_html__('#fff', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_descriptioncolor', array( 'default' => $sliderdescriptioncolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_descriptioncolor', array( 'label' => __('Description Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider btntxt1 Color $sliderbtntxt1color = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_btntxt1color', array( 'default' => $sliderbtntxt1color, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_btntxt1color', array( 'label' => __('Button Text Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider btnbg Color $sliderbtnbgcolor = esc_html__('#fff', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_btnbgcolor', array( 'default' => $sliderbtnbgcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_btnbgcolor', array( 'label' => __('Button BG Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider btntxthover Color $sliderbtntxthovercolor = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_btntxthovercolor', array( 'default' => $sliderbtntxthovercolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_btntxthovercolor', array( 'label' => __('Button Text Hover Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider arrowicon Color $sliderarrowiconcolor = esc_html__('#fff', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_arrowiconcolor', array( 'default' => $sliderarrowiconcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_arrowiconcolor', array( 'label' => __('Arrow Icon Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider arrowiconbg Color $sliderarrowiconbgcolor = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_arrowiconbgcolor', array( 'default' => $sliderarrowiconbgcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_arrowiconbgcolor', array( 'label' => __('Arrow Icon BG Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider arrowicon Hover Color $sliderarrowiconHovercolor = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_arrowiconHovercolor', array( 'default' => $sliderarrowiconHovercolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_arrowiconHovercolor', array( 'label' => __('Arrow Icon Hover Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider arrowicon Hover BG Color $sliderarrowiconHoverBGcolor = esc_html__('#fff', 'blinds-curtains' ); $wp_customize->add_setting( 'slider_arrowiconHoverBGcolor', array( 'default' => $sliderarrowiconHoverBGcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'slider_arrowiconHoverBGcolor', array( 'label' => __('Arrow Icon Hover BG Color','blinds-curtains'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // layout setting $wp_customize->add_setting('bestseller_slidersection_width',array( 'default' => 'Full Width', 'sanitize_callback' => 'bestseller_sanitize_choices', )); $wp_customize->add_control('bestseller_slidersection_width',array( 'type' => 'select', 'label' => __('Section Width','blinds-curtains'), 'choices' => array ( 'Box Width' => __('Box Width','blinds-curtains'), 'Full Width' => __('Full Width','blinds-curtains') ), 'section' => 'slider_setting', )); // Slider section padding $wp_customize->add_setting('bestseller_slidersection_padding',array( 'sanitize_callback' => 'esc_html' )); $wp_customize->add_control('bestseller_slidersection_padding',array( 'label' => __('Section Padding','blinds-curtains'), 'section' => 'slider_setting' )); $wp_customize->add_setting('bestseller_slidersection_top_padding',array( 'default' => '5', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('bestseller_slidersection_top_padding',array( 'type' => 'number', 'label' => __('Top','blinds-curtains'), 'section' => 'slider_setting', )); $wp_customize->add_setting('bestseller_slidersection_bottom_padding',array( 'default' => '2', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('bestseller_slidersection_bottom_padding',array( 'type' => 'number', 'label' => __('Bottom','blinds-curtains'), 'section' => 'slider_setting', )); /*========================================= Best Seller Section =========================================*/ $wp_customize->add_section( 'bestseller_setting', array( 'title' => esc_html__( 'BestSeller Section', 'blinds-curtains' ), 'priority' => 2, 'panel' => 'blindscurtains_frontpage_sections', ) ); $wp_customize->add_setting('blindscurtains_bestseller_tabs', array( 'sanitize_callback' => 'wp_kses_post', )); $wp_customize->add_control(new blindscurtains_Tab_Control($wp_customize, 'blindscurtains_bestseller_tabs', array( 'section' => 'bestseller_setting', 'priority' => 2, 'buttons' => array( array( 'name' => esc_html__('General', 'blinds-curtains'), 'icon' => 'dashicons dashicons-welcome-write-blog', 'fields' => array( 'bestseller_disable_section', 'bestseller_heading' ), 'active' => true, ), array( 'name' => esc_html__('Style', 'blinds-curtains'), 'icon' => 'dashicons dashicons-art', 'fields' => array( 'bestseller_headingcolor', 'bestseller_Producttitlecolor', 'bestseller_pricecolor' ), ), array( 'name' => esc_html__('Layout', 'blinds-curtains'), 'icon' => 'dashicons dashicons-layout', 'fields' => array( 'bestseller_section_width', 'bestseller_bestseller_padding', 'bestseller_bestseller_top_padding', 'bestseller_bestseller_bottom_padding' ), ) ), ))); // General // hide show bestseller section $wp_customize->add_setting( 'bestseller_disable_section', array( 'sanitize_callback' => 'wp_kses_post', ) ); $wp_customize->add_control( new blindscurtains_Toggle_Switch_Custom_Control( $wp_customize, 'bestseller_disable_section', array( 'settings' => 'bestseller_disable_section', 'section' => 'bestseller_setting', 'label' => __( 'Disable Section', 'blinds-curtains' ), 'on_off_label' => array( 'on' => __( 'Yes', 'blinds-curtains' ), 'off' => __( 'No', 'blinds-curtains' ) ), ) ) ); // bestseller title $wp_customize->add_setting( 'bestseller_heading', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 1, ) ); $wp_customize->add_control( 'bestseller_heading', array( 'label' => __('Heading','blinds-curtains'), 'section' => 'bestseller_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); // style // bestseller heading Color $bestsellerheadingcolor = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'bestseller_headingcolor', array( 'default' => $bestsellerheadingcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'bestseller_headingcolor', array( 'label' => __('Heading Color','blinds-curtains'), 'section' => 'bestseller_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // bestseller Producttitle Color $bestsellerProducttitlecolor = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'bestseller_Producttitlecolor', array( 'default' => $bestsellerProducttitlecolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'bestseller_Producttitlecolor', array( 'label' => __('Product Title Color','blinds-curtains'), 'section' => 'bestseller_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // bestseller price Color $bestsellerpricecolor = esc_html__('#e76453', 'blinds-curtains' ); $wp_customize->add_setting( 'bestseller_pricecolor', array( 'default' => $bestsellerpricecolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'bestseller_pricecolor', array( 'label' => __('Product Price Color','blinds-curtains'), 'section' => 'bestseller_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // layout setting $wp_customize->add_setting('bestseller_section_width',array( 'default' => 'Box Width', 'sanitize_callback' => 'bestseller_sanitize_choices', )); $wp_customize->add_control('bestseller_section_width',array( 'type' => 'select', 'label' => __('Section Width','blinds-curtains'), 'choices' => array ( 'Box Width' => __('Box Width','blinds-curtains'), 'Full Width' => __('Full Width','blinds-curtains') ), 'section' => 'bestseller_setting', )); // bestseller section padding $wp_customize->add_setting('bestseller_bestseller_padding',array( 'sanitize_callback' => 'esc_html' )); $wp_customize->add_control('bestseller_bestseller_padding',array( 'label' => __('Section Padding','blinds-curtains'), 'section' => 'bestseller_setting' )); $wp_customize->add_setting('bestseller_bestseller_top_padding',array( 'default' => '5', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('bestseller_bestseller_top_padding',array( 'type' => 'number', 'label' => __('Top','blinds-curtains'), 'section' => 'bestseller_setting', )); $wp_customize->add_setting('bestseller_bestseller_bottom_padding',array( 'default' => '2', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('bestseller_bestseller_bottom_padding',array( 'type' => 'number', 'label' => __('Bottom','blinds-curtains'), 'section' => 'bestseller_setting', )); /*========================================= reviews Section =========================================*/ $wp_customize->add_section( 'reviews_setting', array( 'title' => esc_html__( 'Reviews Section', 'blinds-curtains' ), 'priority' => 2, 'panel' => 'blindscurtains_frontpage_sections', ) ); $wp_customize->add_setting('blindscurtains_reviews_tabs', array( 'sanitize_callback' => 'wp_kses_post', )); $wp_customize->add_control(new blindscurtains_Tab_Control($wp_customize, 'blindscurtains_reviews_tabs', array( 'section' => 'reviews_setting', 'priority' => 2, 'buttons' => array( array( 'name' => esc_html__('General', 'blinds-curtains'), 'icon' => 'dashicons dashicons-welcome-write-blog', 'fields' => array( 'reviews_disable_section', 'reviews_heading', 'box1review_image', 'box1reviews_name', 'box1reviews_position', 'reviews_box1review', 'box2review_image', 'box2reviews_name', 'box2reviews_position', 'reviews_box2review' ), 'active' => true, ), array( 'name' => esc_html__('Style', 'blinds-curtains'), 'icon' => 'dashicons dashicons-art', 'fields' => array( 'review_headingcolor', 'review_boxbgcolor', 'review_titlecolor', 'review_namecolor', 'review_positioncolor', 'review_reviewcolor' ), ), array( 'name' => esc_html__('Layout', 'blinds-curtains'), 'icon' => 'dashicons dashicons-layout', 'fields' => array( 'review_section_width', 'reviews_padding', 'reviews_top_padding', 'reviews_bottom_padding' ), ) ), ))); // General // hide show reviews section $wp_customize->add_setting( 'reviews_disable_section', array( 'sanitize_callback' => 'wp_kses_post', ) ); $wp_customize->add_control( new blindscurtains_Toggle_Switch_Custom_Control( $wp_customize, 'reviews_disable_section', array( 'settings' => 'reviews_disable_section', 'section' => 'reviews_setting', 'label' => __( 'Disable Section', 'blinds-curtains' ), 'on_off_label' => array( 'on' => __( 'Yes', 'blinds-curtains' ), 'off' => __( 'No', 'blinds-curtains' ) ), ) ) ); // reviews title $wp_customize->add_setting( 'reviews_heading', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 1, ) ); $wp_customize->add_control( 'reviews_heading', array( 'label' => __('Heading','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); $wp_customize->add_setting( 'box1review_image', array( 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'box1review_image', array( 'label' => __('Client 1 Image','blinds-curtains'), 'section' => 'reviews_setting', 'settings' => 'box1review_image', 'description' => __('Recommended Image Size: 324X545px', 'blinds-curtains') ) ) ); // box1reviews name $wp_customize->add_setting( 'box1reviews_name', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 1, ) ); $wp_customize->add_control( 'box1reviews_name', array( 'label' => __('Client 1 Name','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); // box1reviews position $wp_customize->add_setting( 'box1reviews_position', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 1, ) ); $wp_customize->add_control( 'box1reviews_position', array( 'label' => __('Client 1 Position','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); // reviews box1review $wp_customize->add_setting( 'reviews_box1review', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 1, ) ); $wp_customize->add_control( 'reviews_box1review', array( 'label' => __('Client 1 Review','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); $wp_customize->add_setting( 'box2review_image', array( 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'box2review_image', array( 'label' => __('Client 2 Image','blinds-curtains'), 'section' => 'reviews_setting', 'settings' => 'box2review_image', 'description' => __('Recommended Image Size: 324X545px', 'blinds-curtains') ) ) ); // box2reviews name $wp_customize->add_setting( 'box2reviews_name', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 1, ) ); $wp_customize->add_control( 'box2reviews_name', array( 'label' => __('Client 2 Name','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); // box2reviews position $wp_customize->add_setting( 'box2reviews_position', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 1, ) ); $wp_customize->add_control( 'box2reviews_position', array( 'label' => __('Client 2 Position','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); // reviews box2review $wp_customize->add_setting( 'reviews_box2review', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 1, ) ); $wp_customize->add_control( 'reviews_box2review', array( 'label' => __('Client 2 Review','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); //style // review heading Color $reviews_headingcolor = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'review_headingcolor', array( 'default' => $reviews_headingcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'review_headingcolor', array( 'label' => __('Heading Color','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // review boxbg Color $reviews_boxbgcolor = esc_html__('#ececec', 'blinds-curtains' ); $wp_customize->add_setting( 'review_boxbgcolor', array( 'default' => $reviews_boxbgcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'review_boxbgcolor', array( 'label' => __('Box BG Color','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // review title Color $reviews_titlecolor = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'review_titlecolor', array( 'default' => $reviews_titlecolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'review_titlecolor', array( 'label' => __('Title Color','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // review name Color $reviews_namecolor = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'review_namecolor', array( 'default' => $reviews_namecolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'review_namecolor', array( 'label' => __('Name Color','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // review position Color $reviews_positioncolor = esc_html__('#000', 'blinds-curtains' ); $wp_customize->add_setting( 'review_positioncolor', array( 'default' => $reviews_positioncolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'review_positioncolor', array( 'label' => __('Position Color','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // review review Color $reviews_reviewcolor = esc_html__('#7e7e7e', 'blinds-curtains' ); $wp_customize->add_setting( 'review_reviewcolor', array( 'default' => $reviews_reviewcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 3, ) ); $wp_customize->add_control( 'review_reviewcolor', array( 'label' => __('Review Color','blinds-curtains'), 'section' => 'reviews_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // layout setting $wp_customize->add_setting('review_section_width',array( 'default' => 'Box Width', 'sanitize_callback' => 'bestseller_sanitize_choices', )); $wp_customize->add_control('review_section_width',array( 'type' => 'select', 'label' => __('Section Width','blinds-curtains'), 'choices' => array ( 'Box Width' => __('Box Width','blinds-curtains'), 'Full Width' => __('Full Width','blinds-curtains') ), 'section' => 'reviews_setting', )); // reviews section padding $wp_customize->add_setting('reviews_padding',array( 'sanitize_callback' => 'esc_html' )); $wp_customize->add_control('reviews_padding',array( 'label' => __('Section Padding','blinds-curtains'), 'section' => 'reviews_setting' )); $wp_customize->add_setting('reviews_top_padding',array( 'default' => '2', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('reviews_top_padding',array( 'type' => 'number', 'label' => __('Top','blinds-curtains'), 'section' => 'reviews_setting', )); $wp_customize->add_setting('reviews_bottom_padding',array( 'default' => '2', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('reviews_bottom_padding',array( 'type' => 'number', 'label' => __('Bottom','blinds-curtains'), 'section' => 'reviews_setting', )); $wp_customize->register_control_type('blindscurtains_Tab_Control'); } add_action( 'customize_register', 'blindscurtains_blog_setting' ); // service selective refresh function blindscurtains_blog_section_partials( $wp_customize ){ // blog_title $wp_customize->selective_refresh->add_partial( 'blog_title', array( 'selector' => '.home-blog .title h6', 'settings' => 'blog_title', 'render_callback' => 'blindscurtains_blog_title_render_callback', ) ); // blog_subtitle $wp_customize->selective_refresh->add_partial( 'blog_subtitle', array( 'selector' => '.home-blog .title h2', 'settings' => 'blog_subtitle', 'render_callback' => 'blindscurtains_blog_subtitle_render_callback', ) ); // blog_description $wp_customize->selective_refresh->add_partial( 'blog_description', array( 'selector' => '.home-blog .title p', 'settings' => 'blog_description', 'render_callback' => 'blindscurtains_blog_description_render_callback', ) ); } add_action( 'customize_register', 'blindscurtains_blog_section_partials' ); // blog_title function blindscurtains_blog_title_render_callback() { return get_theme_mod( 'blog_title' ); } // blog_subtitle function blindscurtains_blog_subtitle_render_callback() { return get_theme_mod( 'blog_subtitle' ); } // service description function blindscurtains_blog_description_render_callback() { return get_theme_mod( 'blog_description' ); }