add_section( 'aster_bike_rental_banner_section', array( 'panel' => 'aster_bike_rental_front_page_options', 'title' => esc_html__( 'Banner Section', 'aster-bike-rental' ), 'priority' => 10, ) ); // Banner Section - Enable Section. $wp_customize->add_setting( 'aster_bike_rental_enable_banner_section', array( 'default' => true, 'sanitize_callback' => 'aster_bike_rental_sanitize_switch', ) ); $wp_customize->add_control( new Aster_Bike_Rental_Toggle_Switch_Custom_Control( $wp_customize, 'aster_bike_rental_enable_banner_section', array( 'label' => esc_html__( 'Enable Banner Section', 'aster-bike-rental' ), 'section' => 'aster_bike_rental_banner_section', 'settings' => 'aster_bike_rental_enable_banner_section', ) ) ); if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'aster_bike_rental_enable_banner_section', array( 'selector' => '#aster_bike_rental_banner_section .section-link', 'settings' => 'aster_bike_rental_enable_banner_section', ) ); } // Footer Background Image Setting $wp_customize->add_setting('aster_bike_rental_banner_section_image', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'aster_bike_rental_banner_section_image', array( 'label' => __('Banner Image', 'aster-bike-rental'), 'section' => 'aster_bike_rental_banner_section', ))); // Banner Section - Banner Heading. $wp_customize->add_setting( 'aster_bike_rental_banner_section_heading', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_bike_rental_banner_section_heading', array( 'label' => sprintf( esc_html__( 'Banner Heading', 'aster-bike-rental' )), 'section' => 'aster_bike_rental_banner_section', 'settings' => 'aster_bike_rental_banner_section_heading', 'type' => 'text', 'active_callback' => 'aster_bike_rental_is_banner_slider_section_enabled', ) ); // Banner Section - Banner Content. $wp_customize->add_setting( 'aster_bike_rental_banner_section_content', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_bike_rental_banner_section_content', array( 'label' => sprintf( esc_html__( 'Banner Content', 'aster-bike-rental' )), 'section' => 'aster_bike_rental_banner_section', 'settings' => 'aster_bike_rental_banner_section_content', 'type' => 'text', 'active_callback' => 'aster_bike_rental_is_banner_slider_section_enabled', ) ); // Banner Section - Button Label. $wp_customize->add_setting( 'aster_bike_rental_banner_button_label_', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_bike_rental_banner_button_label_', array( 'label' => sprintf( esc_html__( 'Button Label 1', 'aster-bike-rental' )), 'section' => 'aster_bike_rental_banner_section', 'settings' => 'aster_bike_rental_banner_button_label_', 'type' => 'text', 'active_callback' => 'aster_bike_rental_is_banner_slider_section_enabled', ) ); // Banner Section - Button Link. $wp_customize->add_setting( 'aster_bike_rental_banner_button_link_' , array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'aster_bike_rental_banner_button_link_' , array( 'label' => sprintf( esc_html__( 'Button Link 1', 'aster-bike-rental' ) ), 'section' => 'aster_bike_rental_banner_section', 'settings' => 'aster_bike_rental_banner_button_link_' , 'type' => 'url', 'active_callback' => 'aster_bike_rental_is_banner_slider_section_enabled', ) ); // Banner Section - Button Label. $wp_customize->add_setting( 'aster_bike_rental_banner_button_label_2', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_bike_rental_banner_button_label_2', array( 'label' => sprintf( esc_html__( 'Button Label 2', 'aster-bike-rental' )), 'section' => 'aster_bike_rental_banner_section', 'settings' => 'aster_bike_rental_banner_button_label_2', 'type' => 'text', 'active_callback' => 'aster_bike_rental_is_banner_slider_section_enabled', ) ); // Banner Section - Button Link. $wp_customize->add_setting( 'aster_bike_rental_banner_button_link_2' , array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'aster_bike_rental_banner_button_link_2' , array( 'label' => sprintf( esc_html__( 'Button Link 2', 'aster-bike-rental' ) ), 'section' => 'aster_bike_rental_banner_section', 'settings' => 'aster_bike_rental_banner_button_link_2' , 'type' => 'url', 'active_callback' => 'aster_bike_rental_is_banner_slider_section_enabled', ) );