selective_refresh ) ? 'postMessage' : 'refresh'; $wp_customize->add_panel( 'acrepairservices_frontpage_sections', array( 'priority' => 32, 'title' => esc_html__( 'Frontpage Sections', 'ac-repair-services' ), ) ); /*========================================= Slider Section =========================================*/ $wp_customize->add_section( 'slider_setting', array( 'title' => esc_html__( 'Slider Section', 'ac-repair-services' ), 'priority' => 1, 'panel' => 'acrepairservices_frontpage_sections', ) ); $wp_customize->add_setting('acrepairservices_reset_slider_settings',array( 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control(new acrepairservices_Reset_Custom_Control($wp_customize, 'acrepairservices_reset_slider_settings',array( 'type' => 'reset_control', 'priority' => 1, 'label' => __('Reset Slider Settings', 'ac-repair-services'), 'description' => 'acrepairservices_slider_reset_settings', 'section' => 'slider_setting' ))); $wp_customize->add_setting('acrepairservices_slider_tabs', array( 'sanitize_callback' => 'wp_kses_post', )); $wp_customize->add_control(new acrepairservices_Tab_Control($wp_customize, 'acrepairservices_slider_tabs', array( 'section' => 'slider_setting', 'priority' => 2, 'buttons' => array( array( 'name' => esc_html__('General', 'ac-repair-services'), 'icon' => 'dashicons dashicons-welcome-write-blog', 'fields' => array( 'slider_section_show_content', 'acrepairservices_slider_image_opacity', 'slider1', 'slider2', 'slider3', 'slider4', 'slider5', 'slider6' ), 'active' => true, ), array( 'name' => esc_html__('Style', 'ac-repair-services'), 'icon' => 'dashicons dashicons-art', 'fields' => array( 'slider_heading_color', 'slider_text_color', 'slider_btntxt_color', 'slider_btn_bgcolor1', 'slider_btn_bgcolor2', 'slider_btnbghovercolor', 'slider_arrowcolor1', 'slider_arrowcolor2', 'slider_arrowbgcolor', 'slider_arrowbghovercolor' ), ), array( 'name' => esc_html__('Layout', 'ac-repair-services'), 'icon' => 'dashicons dashicons-layout', 'fields' => array( 'acrepairservices_slider_section_width' ), ) ), ))); // General Tab // hide show slider box $wp_customize->add_setting( 'slider_section_show_content', array( 'sanitize_callback' => 'wp_kses_post', ) ); $wp_customize->add_control( new acrepairservices_Toggle_Switch_Custom_Control( $wp_customize, 'slider_section_show_content', array( 'settings' => 'slider_section_show_content', 'section' => 'slider_setting', 'label' => __( 'Hide Content On Slider', 'ac-repair-services' ), 'on_off_label' => array( 'on' => __( 'Yes', 'ac-repair-services' ), 'off' => __( 'No', 'ac-repair-services' ) ), ) ) ); // slider box opacity $wp_customize->add_setting('acrepairservices_slider_image_opacity',array( 'default' => 0.4, 'sanitize_callback' => 'acrepairservices_sanitize_float' )); $wp_customize->add_control(new acrepairservices_Custom_Control( $wp_customize, 'acrepairservices_slider_image_opacity',array( 'label' => __('Slider Opacity','ac-repair-services'), 'section' => 'slider_setting', 'input_attrs' => array( 'min' => 0, 'max' => 1, 'step' => 0.1, ), ))); // 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','ac-repair-services'), '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','ac-repair-services'), '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','ac-repair-services'), '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','ac-repair-services'), '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','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Style tab // slider Heading color $sliderheadingcolor = esc_html__('#fff', 'ac-repair-services' ); $wp_customize->add_setting( 'slider_heading_color', array( 'default' => $sliderheadingcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 8, ) ); $wp_customize->add_control( 'slider_heading_color', array( 'label' => __('Title color','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider Text color $slidertextcolor = esc_html__('#fff', 'ac-repair-services' ); $wp_customize->add_setting( 'slider_text_color', array( 'default' => $slidertextcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 9, ) ); $wp_customize->add_control( 'slider_text_color', array( 'label' => __('Text color','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider button text color $sliderbtntxtcolor = esc_html__('#fff', 'ac-repair-services' ); $wp_customize->add_setting( 'slider_btntxt_color', array( 'default' => $sliderbtntxtcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 10, ) ); $wp_customize->add_control( 'slider_btntxt_color', array( 'label' => __('Button Text color','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider Button bg color 1 $sliderbtnbgcolor1 = esc_html__('#6174be', 'ac-repair-services' ); $wp_customize->add_setting( 'slider_btn_bgcolor1', array( 'default' => $sliderbtnbgcolor1, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 11, ) ); $wp_customize->add_control( 'slider_btn_bgcolor1', array( 'label' => __('Button BG Color','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider Button bg color 2 $sliderbtnbgcolor2 = esc_html__('#28a0a8', 'ac-repair-services' ); $wp_customize->add_setting( 'slider_btn_bgcolor2', array( 'default' => $sliderbtnbgcolor2, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 11, ) ); $wp_customize->add_control( 'slider_btn_bgcolor2', array( 'label' => __('Button BG Color','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider Button bg color $sliderbtnbghovercolor = esc_html__('#28a0a8', 'ac-repair-services' ); $wp_customize->add_setting( 'slider_btnbghovercolor', array( 'default' => $sliderbtnbghovercolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 11, ) ); $wp_customize->add_control( 'slider_btnbghovercolor', array( 'label' => __('Button BG Hover Color','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider arrow color 1 $sliderarrowcolor1 = esc_html__('#6174be', 'ac-repair-services' ); $wp_customize->add_setting( 'slider_arrowcolor1', array( 'default' => $sliderarrowcolor1, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 12, ) ); $wp_customize->add_control( 'slider_arrowcolor1', array( 'label' => __('Arrows Color','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider arrow color $sliderarrowcolor2 = esc_html__('#28a0a8', 'ac-repair-services' ); $wp_customize->add_setting( 'slider_arrowcolor2', array( 'default' => $sliderarrowcolor2, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 13, ) ); $wp_customize->add_control( 'slider_arrowcolor2', array( 'label' => __('Arrows Color','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider Button arrow bg col $sliderarrowbgcolor = esc_html__('#d2e0e89e', 'ac-repair-services' ); $wp_customize->add_setting( 'slider_arrowbgcolor', array( 'default' => $sliderarrowbgcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 12, ) ); $wp_customize->add_control( 'slider_arrowbgcolor', array( 'label' => __('Arrows BG Color','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // slider Button arrow bg hrv col $sliderarrowbghovercolor = esc_html__('#d2e0e8', 'ac-repair-services' ); $wp_customize->add_setting( 'slider_arrowbghovercolor', array( 'default' => $sliderarrowbghovercolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 12, ) ); $wp_customize->add_control( 'slider_arrowbghovercolor', array( 'label' => __('Arrows BG Hover Color','ac-repair-services'), 'section' => 'slider_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // layout setting $wp_customize->add_setting('acrepairservices_slider_section_width',array( 'default' => 'Full Width', 'sanitize_callback' => 'acrepairservices_sanitize_choices', )); $wp_customize->add_control('acrepairservices_slider_section_width',array( 'type' => 'select', 'label' => __('Section Width','ac-repair-services'), 'choices' => array ( 'Box Width' => __('Box Width','ac-repair-services'), 'Full Width' => __('Full Width','ac-repair-services') ), 'section' => 'slider_setting', )); /*========================================= Service Section =========================================*/ $wp_customize->add_section( 'Service_setting', array( 'title' => esc_html__( 'Service Section', 'ac-repair-services' ), 'priority' => 2, 'panel' => 'acrepairservices_frontpage_sections', ) ); $wp_customize->add_setting('acrepairservices_reset_service_settings',array( 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control(new acrepairservices_Reset_Custom_Control($wp_customize, 'acrepairservices_reset_service_settings',array( 'type' => 'reset_control', 'priority' => 1, 'label' => __('Reset Service Settings', 'ac-repair-services'), 'description' => 'acrepairservices_service_reset_settings', 'section' => 'Service_setting' ))); $wp_customize->add_setting('acrepairservices_service_tabs', array( 'sanitize_callback' => 'wp_kses_post', )); $wp_customize->add_control(new acrepairservices_Tab_Control($wp_customize, 'acrepairservices_service_tabs', array( 'section' => 'Service_setting', 'priority' => 2, 'buttons' => array( array( 'name' => esc_html__('General', 'ac-repair-services'), 'icon' => 'dashicons dashicons-welcome-write-blog', 'fields' => array( 'slider_service_show_content', 'acrepairservices_service_image_opacity', 'Service1', 'Service2', 'Service3', 'Service4', 'Service5', 'Service6' ), 'active' => true, ), array( 'name' => esc_html__('Style', 'ac-repair-services'), 'icon' => 'dashicons dashicons-art', 'fields' => array( 'service_tle_col', 'service_description_col', 'service_border_col', 'service_btntext_col', 'service_btntexthrv_col', 'service_boxoverlaycolor1', 'service_boxoverlaycolor2' ), ), array( 'name' => esc_html__('Layout', 'ac-repair-services'), 'icon' => 'dashicons dashicons-layout', 'fields' => array( 'acrepairservices_service_section_width', 'acrepairservices_service_padding', 'acrepairservices_service_top_padding', 'acrepairservices_service_bottom_padding' ), ) ), ))); // General tab // hide show service section $wp_customize->add_setting( 'slider_service_show_content', array( 'sanitize_callback' => 'wp_kses_post', ) ); $wp_customize->add_control( new acrepairservices_Toggle_Switch_Custom_Control( $wp_customize, 'slider_service_show_content', array( 'settings' => 'slider_service_show_content', 'section' => 'Service_setting', 'label' => __( 'Disable Section', 'ac-repair-services' ), 'on_off_label' => array( 'on' => __( 'Yes', 'ac-repair-services' ), 'off' => __( 'No', 'ac-repair-services' ) ), ) ) ); // service box opacity $wp_customize->add_setting('acrepairservices_service_image_opacity',array( 'default' => 0.6, 'sanitize_callback' => 'acrepairservices_sanitize_float' )); $wp_customize->add_control(new acrepairservices_Custom_Control( $wp_customize, 'acrepairservices_service_image_opacity',array( 'label' => __('Service Box Opacity','ac-repair-services'), 'section' => 'Service_setting', 'input_attrs' => array( 'min' => 0, 'max' => 1, 'step' => 0.1, ), ))); // Service 1 $wp_customize->add_setting( 'Service1', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 5, ) ); $wp_customize->add_control( 'Service1', array( 'label' => __('Service 1','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Service 2 $wp_customize->add_setting( 'Service2', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 6, ) ); $wp_customize->add_control( 'Service2', array( 'label' => __('Service 2','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Service 3 $wp_customize->add_setting( 'Service3', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 7, ) ); $wp_customize->add_control( 'Service3', array( 'label' => __('Service 3','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Service 4 $wp_customize->add_setting( 'Service4', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 8, ) ); $wp_customize->add_control( 'Service4', array( 'label' => __('Service 4','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Service 5 $wp_customize->add_setting( 'Service5', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 9, ) ); $wp_customize->add_control( 'Service5', array( 'label' => __('Service 5','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Service 6 $wp_customize->add_setting( 'Service6', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 10, ) ); $wp_customize->add_control( 'Service6', array( 'label' => __('Service 6','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'dropdown-pages', 'transport' => $selective_refresh, ) ); // Style Tab // service Title Color $servicetleecol = esc_html__('#fff', 'ac-repair-services' ); $wp_customize->add_setting( 'service_tle_col', array( 'default' => $servicetleecol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 13, ) ); $wp_customize->add_control( 'service_tle_col', array( 'label' => __('Title Color','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // service description Color $servicedescriptioncol = esc_html__('#efefef', 'ac-repair-services' ); $wp_customize->add_setting( 'service_description_col', array( 'default' => $servicedescriptioncol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 13, ) ); $wp_customize->add_control( 'service_description_col', array( 'label' => __('Description Color','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // service border Color $servicebordercol = esc_html__('#fff', 'ac-repair-services' ); $wp_customize->add_setting( 'service_border_col', array( 'default' => $servicebordercol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 13, ) ); $wp_customize->add_control( 'service_border_col', array( 'label' => __('Border Color','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // service btn text Color $servicebtntextcol = esc_html__('#fff', 'ac-repair-services' ); $wp_customize->add_setting( 'service_btntext_col', array( 'default' => $servicebtntextcol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 13, ) ); $wp_customize->add_control( 'service_btntext_col', array( 'label' => __('Button Text Color','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // service btn text Color $servicebtntexthrvcol = esc_html__('#c4c4c4', 'ac-repair-services' ); $wp_customize->add_setting( 'service_btntexthrv_col', array( 'default' => $servicebtntexthrvcol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 13, ) ); $wp_customize->add_control( 'service_btntexthrv_col', array( 'label' => __('Button Text Hover Color','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // service box overlay color $serviceboxoverlaycolor1 = esc_html__('#6174be', 'ac-repair-services' ); $wp_customize->add_setting( 'service_boxoverlaycolor1', array( 'default' => $serviceboxoverlaycolor1, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 13, ) ); $wp_customize->add_control( 'service_boxoverlaycolor1', array( 'label' => __('Box Overlay Color','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // service box overlay color 2 $serviceboxoverlaycolor2 = esc_html__('#28a0a8', 'ac-repair-services' ); $wp_customize->add_setting( 'service_boxoverlaycolor2', array( 'default' => $serviceboxoverlaycolor2, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 13, ) ); $wp_customize->add_control( 'service_boxoverlaycolor2', array( 'label' => __('Box Overlay Color','ac-repair-services'), 'section' => 'Service_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // Layout $wp_customize->add_setting('acrepairservices_service_section_width',array( 'default' => 'Box Width', 'sanitize_callback' => 'acrepairservices_sanitize_choices', )); $wp_customize->add_control('acrepairservices_service_section_width',array( 'type' => 'select', 'label' => __('Section Width','ac-repair-services'), 'choices' => array ( 'Box Width' => __('Box Width','ac-repair-services'), 'Full Width' => __('Full Width','ac-repair-services') ), 'section' => 'Service_setting', )); // service section padding $wp_customize->add_setting('acrepairservices_service_padding',array( 'sanitize_callback' => 'esc_html' )); $wp_customize->add_control('acrepairservices_service_padding',array( 'label' => __('Section Padding','ac-repair-services'), 'section' => 'Service_setting' )); $wp_customize->add_setting('acrepairservices_service_top_padding',array( 'default' => '2', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('acrepairservices_service_top_padding',array( 'type' => 'number', 'label' => __('Top','ac-repair-services'), 'section' => 'Service_setting', )); $wp_customize->add_setting('acrepairservices_service_bottom_padding',array( 'default' => '2', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('acrepairservices_service_bottom_padding',array( 'type' => 'number', 'label' => __('Bottom','ac-repair-services'), 'section' => 'Service_setting', )); /*========================================= Blog Section =========================================*/ $wp_customize->add_section( 'blog_setting', array( 'title' => esc_html__( 'Blog Section', 'ac-repair-services' ), 'priority' => 4, 'panel' => 'acrepairservices_frontpage_sections', ) ); $wp_customize->add_setting('acrepairservices_reset_blog_settings',array( 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control(new acrepairservices_Reset_Custom_Control($wp_customize, 'acrepairservices_reset_blog_settings',array( 'type' => 'reset_control', 'priority' => 1, 'label' => __('Reset Blog Settings', 'ac-repair-services'), 'description' => 'acrepairservices_blog_reset_settings', 'section' => 'blog_setting' ))); $wp_customize->add_setting('acrepairservices_blog_tabs', array( 'sanitize_callback' => 'wp_kses_post', )); $wp_customize->add_control(new acrepairservices_Tab_Control($wp_customize, 'acrepairservices_blog_tabs', array( 'section' => 'blog_setting', 'priority' => 1, 'buttons' => array( array( 'name' => esc_html__('General', 'ac-repair-services'), 'icon' => 'dashicons dashicons-welcome-write-blog', 'fields' => array( 'blog_disable_section', 'blog_section_spanheading', 'blog_section_heading' ), 'active' => true, ), array( 'name' => esc_html__('Style', 'ac-repair-services'), 'icon' => 'dashicons dashicons-art', 'fields' => array( 'blog_boxbgcolor', 'blog_sechead_spancol', 'blog_sechead_spanbgcol', 'blog_sechead_col', 'blog_secsubhead_col', 'blog_title_col', 'blog_text_col', 'blog_border_col', 'blog_btn_text_col', 'blog_btn_col', 'blog_btn_icon_col', 'blog_adminandcommicon_col', 'blog_adminandcommtxt_col', 'blog_date_col', 'blog_date_iconcol1', 'blog_date_iconcol2' ), ), array( 'name' => esc_html__('Layout', 'ac-repair-services'), 'icon' => 'dashicons dashicons-layout', 'fields' => array( 'acrepairservices_blog_section_width', 'acrepairservices_blog_padding', 'acrepairservices_blog_section_t_padding', 'acrepairservices_blog_section_b_padding' ), ) ), ))); // General tab // hide show blog section $wp_customize->add_setting( 'blog_disable_section', array( 'sanitize_callback' => 'wp_kses_post', ) ); $wp_customize->add_control( new acrepairservices_Toggle_Switch_Custom_Control( $wp_customize, 'blog_disable_section', array( 'settings' => 'blog_disable_section', 'section' => 'blog_setting', 'label' => __( 'Disable Section', 'ac-repair-services' ), 'on_off_label' => array( 'on' => __( 'Yes', 'ac-repair-services' ), 'off' => __( 'No', 'ac-repair-services' ) ), ) ) ); // section span heading $blogsectionspanheading = esc_html__('O', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_section_spanheading', array( 'default' => $blogsectionspanheading, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 2, ) ); $wp_customize->add_control( 'blog_section_spanheading', array( 'label' => __('Section Span Heading','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); // section heading $blogsectionheading = esc_html__('ur Blog', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_section_heading', array( 'default' => $blogsectionheading, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 2, ) ); $wp_customize->add_control( 'blog_section_heading', array( 'label' => __('Section Heading','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'text', 'transport' => $selective_refresh, ) ); // Style Tab // blog section box color $blogsecboxbgcolor = esc_html__('#fff', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_boxbgcolor', array( 'default' => $blogsecboxbgcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 4, ) ); $wp_customize->add_control( 'blog_boxbgcolor', array( 'label' => __('Box BG Color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // blog section heading span color $blogsecheadspancol = esc_html__('#fff', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_sechead_spancol', array( 'default' => $blogsecheadspancol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 4, ) ); $wp_customize->add_control( 'blog_sechead_spancol', array( 'label' => __('Heading Span Color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // blog section heading span bg color $blogsecheadspanbgcol = esc_html__('#2a9eaa', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_sechead_spanbgcol', array( 'default' => $blogsecheadspanbgcol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 4, ) ); $wp_customize->add_control( 'blog_sechead_spanbgcol', array( 'label' => __('Heading Span BG Color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // blog section heading color $blogsecheadcol = esc_html__('#2a9eaa', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_sechead_col', array( 'default' => $blogsecheadcol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 4, ) ); $wp_customize->add_control( 'blog_sechead_col', array( 'label' => __('Heading Color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // blog Title Color $blogtitlecol = esc_html__('#000', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_title_col', array( 'default' => $blogtitlecol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 6, ) ); $wp_customize->add_control( 'blog_title_col', array( 'label' => __('Title Color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // blog Text Color $blogtextcol = esc_html__('#5f5f5f', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_text_col', array( 'default' => $blogtextcol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 7, ) ); $wp_customize->add_control( 'blog_text_col', array( 'label' => __('Text Color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // blog border Color $blogbordercol = esc_html__('#5f5f5f', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_border_col', array( 'default' => $blogbordercol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 7, ) ); $wp_customize->add_control( 'blog_border_col', array( 'label' => __('Border Color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // blog button Color $blogbtncol = esc_html__('#2e9da9', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_btn_col', array( 'default' => $blogbtncol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 9, ) ); $wp_customize->add_control( 'blog_btn_col', array( 'label' => __('Button Color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // blog button icon Color $blogbtniconcol = esc_html__('#2e9da9', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_btn_icon_col', array( 'default' => $blogbtniconcol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 9, ) ); $wp_customize->add_control( 'blog_btn_icon_col', array( 'label' => __('Button Icon Color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // Blog Date Color $blogdatecol = esc_html__('#7c7c7c', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_date_col', array( 'default' => $blogdatecol, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 12, ) ); $wp_customize->add_control( 'blog_date_col', array( 'label' => __('Date Text color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // Blog Date icon Color $blogdateiconcol1 = esc_html__('#7390e0', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_date_iconcol1', array( 'default' => $blogdateiconcol1, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 12, ) ); $wp_customize->add_control( 'blog_date_iconcol1', array( 'label' => __('Date Icon color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // Blog Date icon Color $blogdateiconcol2 = esc_html__('#57cbd3', 'ac-repair-services' ); $wp_customize->add_setting( 'blog_date_iconcol2', array( 'default' => $blogdateiconcol2, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 12, ) ); $wp_customize->add_control( 'blog_date_iconcol2', array( 'label' => __('Date Icon color','ac-repair-services'), 'section' => 'blog_setting', 'type' => 'color', 'transport' => $selective_refresh, ) ); // Layout $wp_customize->add_setting('acrepairservices_blog_section_width',array( 'default' => 'Box Width', 'sanitize_callback' => 'acrepairservices_sanitize_choices', )); $wp_customize->add_control('acrepairservices_blog_section_width',array( 'type' => 'select', 'label' => __('Section Width','ac-repair-services'), 'choices' => array ( 'Box Width' => __('Box Width','ac-repair-services'), 'Full Width' => __('Full Width','ac-repair-services') ), 'section' => 'blog_setting', )); // blog section padding $wp_customize->add_setting('acrepairservices_blog_padding',array( 'sanitize_callback' => 'esc_html' )); $wp_customize->add_control('acrepairservices_blog_padding',array( 'label' => __('Section Padding','ac-repair-services'), 'section' => 'blog_setting' )); $wp_customize->add_setting('acrepairservices_blog_section_t_padding',array( 'default' => '4', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('acrepairservices_blog_section_t_padding',array( 'type' => 'number', 'label' => __('Top','ac-repair-services'), 'section' => 'blog_setting', )); $wp_customize->add_setting('acrepairservices_blog_section_b_padding',array( 'default' => '5', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('acrepairservices_blog_section_b_padding',array( 'type' => 'number', 'label' => __('Bottom','ac-repair-services'), 'section' => 'blog_setting', )); $wp_customize->register_control_type('acrepairservices_Tab_Control'); } add_action( 'customize_register', 'acrepairservices_blog_setting' ); // service selective refresh function acrepairservices_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' => 'acrepairservices_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' => 'acrepairservices_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' => 'acrepairservices_blog_description_render_callback', ) ); } add_action( 'customize_register', 'acrepairservices_blog_section_partials' ); // blog_title function acrepairservices_blog_title_render_callback() { return get_theme_mod( 'blog_title' ); } // blog_subtitle function acrepairservices_blog_subtitle_render_callback() { return get_theme_mod( 'blog_subtitle' ); } // service description function acrepairservices_blog_description_render_callback() { return get_theme_mod( 'blog_description' ); }