add_section( 'aster_vlogger_general_options', array( 'panel' => 'aster_vlogger_theme_options', 'title' => esc_html__( 'General Options', 'aster-vlogger' ), ) ); // General Options - Enable Preloader. $wp_customize->add_setting( 'aster_vlogger_enable_preloader', array( 'sanitize_callback' => 'aster_vlogger_sanitize_switch', 'default' => false, ) ); $wp_customize->add_control( new Aster_Vlogger_Toggle_Switch_Custom_Control( $wp_customize, 'aster_vlogger_enable_preloader', array( 'label' => esc_html__( 'Enable Preloader', 'aster-vlogger' ), 'section' => 'aster_vlogger_general_options', ) ) ); // Add setting for sticky header $wp_customize->add_setting( 'aster_vlogger_enable_sticky_header', array( 'sanitize_callback' => 'aster_vlogger_sanitize_switch', 'default' => false, ) ); // Add control for sticky header setting $wp_customize->add_control( new Aster_Vlogger_Toggle_Switch_Custom_Control( $wp_customize, 'aster_vlogger_enable_sticky_header', array( 'label' => esc_html__( 'Enable Sticky Header', 'aster-vlogger' ), 'section' => 'aster_vlogger_general_options', ) ) ); // Site Title - Enable Setting. $wp_customize->add_setting( 'aster_vlogger_enable_site_title_setting', array( 'default' => true, 'sanitize_callback' => 'aster_vlogger_sanitize_switch', ) ); $wp_customize->add_control( new Aster_Vlogger_Toggle_Switch_Custom_Control( $wp_customize, 'aster_vlogger_enable_site_title_setting', array( 'label' => esc_html__( 'Disable Site Title', 'aster-vlogger' ), 'section' => 'title_tagline', 'settings' => 'aster_vlogger_enable_site_title_setting', ) ) ); $wp_customize->add_setting( 'aster_vlogger_site_title_size', array( 'default' => 36, // Default font size in pixels 'sanitize_callback' => 'absint', // Sanitize the input as a positive integer ) ); // Add control for site title size $wp_customize->add_control( 'aster_vlogger_site_title_size', array( 'type' => 'number', 'section' => 'title_tagline', // You can change this section to your preferred section 'label' => __( 'Site Title Font Size ', 'aster-vlogger' ), 'input_attrs' => array( 'min' => 10, 'max' => 100, 'step' => 1, ), ) ); // Tagline - Enable Setting. $wp_customize->add_setting( 'aster_vlogger_enable_tagline_setting', array( 'default' => false, 'sanitize_callback' => 'aster_vlogger_sanitize_switch', ) ); $wp_customize->add_control( new Aster_Vlogger_Toggle_Switch_Custom_Control( $wp_customize, 'aster_vlogger_enable_tagline_setting', array( 'label' => esc_html__( 'Enable Tagline', 'aster-vlogger' ), 'section' => 'title_tagline', 'settings' => 'aster_vlogger_enable_tagline_setting', ) ) ); $wp_customize->add_section( 'aster_vlogger_header_options', array( 'panel' => 'aster_vlogger_theme_options', 'title' => esc_html__( 'Header Options', 'aster-vlogger' ), ) ); // Header Options - Enable Topbar. $wp_customize->add_setting( 'aster_vlogger_enable_topbar', array( 'sanitize_callback' => 'aster_vlogger_sanitize_switch', 'default' => false, ) ); $wp_customize->add_control( new Aster_Vlogger_Toggle_Switch_Custom_Control( $wp_customize, 'aster_vlogger_enable_topbar', array( 'label' => esc_html__( 'Enable Topbar', 'aster-vlogger' ), 'section' => 'aster_vlogger_header_options', ) ) ); // Header Options - Contact Number. $wp_customize->add_setting( 'aster_vlogger_discount_topbar_text', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_vlogger_discount_topbar_text', array( 'label' => esc_html__( 'Topbar Discount Text', 'aster-vlogger' ), 'section' => 'aster_vlogger_header_options', 'type' => 'text', 'active_callback' => 'aster_vlogger_is_topbar_enabled', ) ); // Header Options - Custom Button Label. $wp_customize->add_setting( 'aster_vlogger_menu_custom_button_label', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_vlogger_menu_custom_button_label', array( 'label' => esc_html__( 'Menu Custom Button Label', 'aster-vlogger' ), 'section' => 'aster_vlogger_header_options', 'settings' => 'aster_vlogger_menu_custom_button_label', 'type' => 'text', ) ); // Header Options - Custom Button URL. $wp_customize->add_setting( 'aster_vlogger_menu_custom_button_url', array( 'default' => '#', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'aster_vlogger_menu_custom_button_url', array( 'label' => esc_html__( 'Menu Button URL', 'aster-vlogger' ), 'section' => 'aster_vlogger_header_options', 'settings' => 'aster_vlogger_menu_custom_button_url', 'type' => 'url', ) ); // Header Options - Enable Social Icons. $wp_customize->add_setting( 'aster_vlogger_enable_social', array( 'sanitize_callback' => 'aster_vlogger_sanitize_switch', 'default' => false, ) ); $wp_customize->add_control( new Aster_Vlogger_Toggle_Switch_Custom_Control( $wp_customize, 'aster_vlogger_enable_social', array( 'label' => esc_html__( 'Enable Social', 'aster-vlogger' ), 'description' => esc_html__( 'If you want to add a social icon you need to go to Dashboard = Appearance = Menus then create a new menu now add Custom Links then add proper links then choose Social then click Create Menu.', 'aster-vlogger' ), 'section' => 'aster_vlogger_header_options', 'active_callback' => 'aster_vlogger_is_topbar_enabled', ) ) );