add_section( 'aster_real_estate_about_section', array( 'panel' => 'aster_real_estate_front_page_options', 'title' => esc_html__( 'About Section', 'aster-real-estate' ), 'priority' => 10, ) ); // about Section - Enable Section. $wp_customize->add_setting( 'aster_real_estate_enable_about_section', array( 'default' => false, 'sanitize_callback' => 'aster_real_estate_sanitize_switch', ) ); $wp_customize->add_control( new Aster_Real_Estate_Toggle_Switch_Custom_Control( $wp_customize, 'aster_real_estate_enable_about_section', array( 'label' => esc_html__( 'Enable About Section', 'aster-real-estate' ), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_enable_about_section', ) ) ); if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'aster_real_estate_enable_about_section', array( 'selector' => '#aster_real_estate_about_section .section-link', 'settings' => 'aster_real_estate_enable_about_section', ) ); } // about Section - about Content point one. $wp_customize->add_setting( 'aster_real_estate_about_short_content', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_real_estate_about_short_content', array( 'label' => sprintf( esc_html__( 'About Short Content', 'aster-real-estate' )), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_about_short_content', 'type' => 'text', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) ); // about Section - about Heading. $wp_customize->add_setting( 'aster_real_estate_about_section_heading', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_real_estate_about_section_heading', array( 'label' => sprintf( esc_html__( 'About Heading', 'aster-real-estate' )), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_about_section_heading', 'type' => 'text', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) ); // about Section - about Content. $wp_customize->add_setting( 'aster_real_estate_about_section_content', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_real_estate_about_section_content', array( 'label' => sprintf( esc_html__( 'About Content', 'aster-real-estate' )), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_about_section_content', 'type' => 'text', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) ); $wp_customize->add_setting( 'aster_real_estate_about_list_text_1', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_real_estate_about_list_text_1', array( 'label' => sprintf( esc_html__( 'About List Text 1', 'aster-real-estate' )), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_about_list_text_1', 'type' => 'text', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) ); $wp_customize->add_setting( 'aster_real_estate_about_list_text_2', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_real_estate_about_list_text_2', array( 'label' => sprintf( esc_html__( 'About List Text 2', 'aster-real-estate' )), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_about_list_text_2', 'type' => 'text', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) ); $wp_customize->add_setting( 'aster_real_estate_about_list_text_3', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_real_estate_about_list_text_3', array( 'label' => sprintf( esc_html__( 'About List Text 3', 'aster-real-estate' )), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_about_list_text_3', 'type' => 'text', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) ); // about Section - Button Label. $wp_customize->add_setting( 'aster_real_estate_about_button_label_', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_real_estate_about_button_label_', array( 'label' => sprintf( esc_html__( 'Button Label 1', 'aster-real-estate' )), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_about_button_label_', 'type' => 'text', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) ); // about Section - Button Link. $wp_customize->add_setting( 'aster_real_estate_about_button_link_' , array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'aster_real_estate_about_button_link_' , array( 'label' => sprintf( esc_html__( 'Button Link 1', 'aster-real-estate' ) ), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_about_button_link_' , 'type' => 'url', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) ); // about Section - Button Label. $wp_customize->add_setting( 'aster_real_estate_about_button_label_2', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_real_estate_about_button_label_2', array( 'label' => sprintf( esc_html__( 'Button Label 2', 'aster-real-estate' )), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_about_button_label_2', 'type' => 'text', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) ); // about Section - Button Link. $wp_customize->add_setting( 'aster_real_estate_about_button_link_2' , array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'aster_real_estate_about_button_link_2' , array( 'label' => sprintf( esc_html__( 'Button Link 2', 'aster-real-estate' ) ), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_about_button_link_2' , 'type' => 'url', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) ); // Footer Background Image Setting $wp_customize->add_setting('aster_real_estate_about_section_image', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'aster_real_estate_about_section_image', array( 'label' => __('About Image', 'aster-real-estate'), 'section' => 'aster_real_estate_about_section', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ))); $wp_customize->add_setting('aster_real_estate_video_button_url',array( 'default'=> '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('aster_real_estate_video_button_url',array( 'label' => esc_html__('Video Link','aster-real-estate'), 'section'=> 'aster_real_estate_about_section', 'active_callback' => 'aster_real_estate_is_about_section_enabled', 'type'=> 'url' )); $wp_customize->add_setting( 'aster_real_estate_rating_text', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_real_estate_rating_text', array( 'label' => sprintf( esc_html__( 'Rating Text', 'aster-real-estate' )), 'section' => 'aster_real_estate_about_section', 'settings' => 'aster_real_estate_rating_text', 'type' => 'text', 'active_callback' => 'aster_real_estate_is_about_section_enabled', ) );