add_section( 'bootstrap_coach_service_section', array( 'title' => esc_html__( 'Services Section', 'bootstrap-coach' ), 'panel' => 'bootstrap_coach_homepage_panel' ) ); $wp_customize->add_setting( 'bc_services_show_hide', array( 'sanitize_callback' => 'bootstrap_coach_sanitize_checkbox', 'default' => true ) ); $wp_customize->add_control( new Bootstrap_Coach_Toggle_Control( $wp_customize, 'bc_services_show_hide', array( 'label' => esc_html__( 'Hide / Show Services Blocks','bootstrap-coach' ), 'section' => 'bootstrap_coach_service_section', 'settings' => 'bc_services_show_hide', 'type'=> 'toggle', ) ) ); $wp_customize->add_setting('bc_services_heading', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', 'transport' => 'postMessage', )); $wp_customize->add_control('bc_services_heading', array( 'label' => esc_html__('Enter Heading for Services', 'bootstrap-coach'), 'section' => 'bootstrap_coach_service_section', 'type' => 'text', )); $wp_customize->add_setting( new Bootstrap_Coach_Repeater_Setting( $wp_customize, 'bc_services_section', array( 'sanitize_callback' => array( 'Bootstrap_Coach_Repeater_Setting', 'sanitize_repeater_setting' ), ) ) ); $wp_customize->add_control( new Bootstrap_Coach_Control_Repeater( $wp_customize, 'bc_services_section', array( 'section' => 'bootstrap_coach_service_section', 'label' => __( 'Add Services ', 'bootstrap-coach' ), 'description' => __( 'Add Services from here', 'bootstrap-coach' ), 'row_label' => array( 'type' => 'field', 'value' => esc_html__( 'Service Section', 'bootstrap-coach' ), 'field' => 'bc_service_title', ), 'fields' => array( 'bc_service_thumbnail' => array( 'type' => 'image', 'label' => __( 'Thumbnail', 'bootstrap-coach' ), ), 'bc_service_title' => array( 'type' => 'text', 'label' => __( 'Title', 'bootstrap-coach' ), ), 'bc_service_desc' => array( 'type' => 'textarea', 'label' => __( 'Description', 'bootstrap-coach' ), ), 'bc_service_btn' => array( 'type' => 'text', 'label' => __( 'Button Label', 'bootstrap-coach' ), ), 'bc_service_btnlink' => array( 'type' => 'url', 'label' => __( 'Button Link', 'bootstrap-coach' ), ), ), ) ) ); $wp_customize->selective_refresh->add_partial( 'bc_services_show_hide', array( 'selector' => '.services > .container', ) ); }