add_section( 'aster_real_estate_header_options', array( 'panel' => 'aster_real_estate_front_page_options', 'title' => esc_html__( 'Header Options', 'aster-real-estate' ), 'priority' => 10, ) ); // Add setting for sticky header $wp_customize->add_setting( 'aster_real_estate_enable_sticky_header', array( 'sanitize_callback' => 'aster_real_estate_sanitize_switch', 'default' => false, ) ); // Add control for sticky header setting $wp_customize->add_control( new Aster_Real_Estate_Toggle_Switch_Custom_Control( $wp_customize, 'aster_real_estate_enable_sticky_header', array( 'label' => esc_html__( 'Enable Sticky Header', 'aster-real-estate' ), 'section' => 'aster_real_estate_header_options', ) ) ); // Enable Banner Section $wp_customize->add_setting( 'aster_real_estate_enable_topbar', 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_topbar', array( 'label' => esc_html__( 'Enable Topbar', 'aster-real-estate' ), 'section' => 'aster_real_estate_header_options', 'settings' => 'aster_real_estate_enable_topbar', ) ) ); // Add setting for sticky header $wp_customize->add_setting( 'aster_real_estate_enable_header_search_section', array( 'sanitize_callback' => 'aster_real_estate_sanitize_switch', 'default' => false, ) ); // Add control for sticky header setting $wp_customize->add_control( new Aster_Real_Estate_Toggle_Switch_Custom_Control( $wp_customize, 'aster_real_estate_enable_header_search_section', array( 'label' => esc_html__( 'Enable Search', 'aster-real-estate' ), 'section' => 'aster_real_estate_header_options', ) ) ); // Topbar Section - Topbar Mail Label. $wp_customize->add_setting( 'aster_real_estate_email_topbar_address', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_real_estate_email_topbar_address', array( 'label' => esc_html__( 'Topbar Location', 'aster-real-estate' ), 'section' => 'aster_real_estate_header_options', 'settings' => 'aster_real_estate_email_topbar_address', 'type' => 'text', ) ); // Header Options - Enable Social Icons. $wp_customize->add_setting( 'aster_real_estate_enable_social', array( 'sanitize_callback' => 'aster_real_estate_sanitize_switch', 'default' => true, ) ); $wp_customize->add_control( new Aster_Real_Estate_Toggle_Switch_Custom_Control( $wp_customize, 'aster_real_estate_enable_social', array( 'label' => esc_html__( 'Enable Social', 'aster-real-estate' ), 'active_callback' => 'aster_real_estate_is_topbar_enabled', ) ) ); // Add setting for Facebook Link $wp_customize->add_setting( 'aster_real_estate_header_facebook_link', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'aster_real_estate_header_facebook_link', array( 'label' => esc_html__( 'Facebook Link', 'aster-real-estate' ), 'section' => 'aster_real_estate_header_options', 'settings' => 'aster_real_estate_header_facebook_link', 'type' => 'url' ) ); // Add setting for Twitter Link $wp_customize->add_setting( 'aster_real_estate_header_twitter_link', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'aster_real_estate_header_twitter_link', array( 'label' => esc_html__( 'Twitter Link', 'aster-real-estate' ), 'section' => 'aster_real_estate_header_options', 'settings' => 'aster_real_estate_header_twitter_link', 'type' => 'url' ) ); // Add setting for Instagram Link $wp_customize->add_setting( 'aster_real_estate_header_instagram_link', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'aster_real_estate_header_instagram_link', array( 'label' => esc_html__( 'Instagram Link', 'aster-real-estate' ), 'section' => 'aster_real_estate_header_options', 'settings' => 'aster_real_estate_header_instagram_link', 'type' => 'url' ) ); // Add Separator Custom Control $wp_customize->add_setting( 'aster_real_estate_menu_separator', array( 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( new Aster_Real_Estate_Separator_Custom_Control( $wp_customize, 'aster_real_estate_menu_separator', array( 'label' => __( 'Menu Settings', 'aster-real-estate' ), 'section' => 'aster_real_estate_header_options', 'settings' => 'aster_real_estate_menu_separator', ))); $wp_customize->add_setting( 'aster_real_estate_menu_font_size', array( 'default' => 14, 'sanitize_callback' => 'absint', )); // Add control for site title size $wp_customize->add_control( 'aster_real_estate_menu_font_size', array( 'type' => 'number', 'section' => 'aster_real_estate_header_options', 'label' => __( 'Menu Font Size ', 'aster-real-estate' ), 'input_attrs' => array( 'min' => 10, 'max' => 100, 'step' => 1, ), )); // Add setting for menu font weight $wp_customize->add_setting('aster_real_estate_menu_font_weight', array( 'default' => '700', 'sanitize_callback' => 'sanitize_text_field', )); // Add control for menu font weight $wp_customize->add_control('aster_real_estate_menu_font_weight', array( 'type' => 'select', 'section' => 'aster_real_estate_header_options', 'label' => __('Menu Font Weight', 'aster-real-estate'), 'choices' => array( '100' => __('100','aster-real-estate'), '200' => __('200','aster-real-estate'), '300' => __('300','aster-real-estate'), '400' => __('400','aster-real-estate'), '500' => __('500','aster-real-estate'), '600' => __('600','aster-real-estate'), '700' => __('700','aster-real-estate'), '800' => __('800','aster-real-estate'), '900' => __('900','aster-real-estate'), ), )); $wp_customize->add_setting( 'aster_real_estate_menu_text_transform', array( 'default' => 'capitalize', // Default value for text transform 'sanitize_callback' => 'sanitize_text_field', ) ); // Add control for menu text transform $wp_customize->add_control( 'aster_real_estate_menu_text_transform', array( 'type' => 'select', 'section' => 'aster_real_estate_header_options', // Adjust the section as needed 'label' => __( 'Menu Text Transform', 'aster-real-estate' ), 'choices' => array( 'none' => __( 'None', 'aster-real-estate' ), 'capitalize' => __( 'Capitalize', 'aster-real-estate' ), 'uppercase' => __( 'Uppercase', 'aster-real-estate' ), 'lowercase' => __( 'Lowercase', 'aster-real-estate' ), ), ) ); // Menu Text Color $wp_customize->add_setting( 'aster_real_estate_menu_text_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'aster_real_estate_menu_text_color', array( 'label' => __('Menu Color', 'aster-real-estate'), 'section' => 'aster_real_estate_header_options', ) ) ); // Sub Menu Text Color $wp_customize->add_setting( 'aster_real_estate_sub_menu_text_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'aster_real_estate_sub_menu_text_color', array( 'label' => __('Sub Menu Color', 'aster-real-estate'), 'section' => 'aster_real_estate_header_options', ) ) );