add_section( 'aster_storefront_general_options', array( 'panel' => 'aster_storefront_theme_options', 'title' => esc_html__( 'General Options', 'aster-storefront' ), ) ); // General Options - Enable Preloader. $wp_customize->add_setting( 'aster_storefront_enable_preloader', array( 'sanitize_callback' => 'aster_storefront_sanitize_switch', 'default' => false, ) ); $wp_customize->add_control( new Aster_Storefront_Toggle_Switch_Custom_Control( $wp_customize, 'aster_storefront_enable_preloader', array( 'label' => esc_html__( 'Enable Preloader', 'aster-storefront' ), 'section' => 'aster_storefront_general_options', ) ) ); // Site Title - Enable Setting. $wp_customize->add_setting( 'aster_storefront_enable_site_title_setting', array( 'default' => true, 'sanitize_callback' => 'aster_storefront_sanitize_switch', ) ); $wp_customize->add_control( new Aster_Storefront_Toggle_Switch_Custom_Control( $wp_customize, 'aster_storefront_enable_site_title_setting', array( 'label' => esc_html__( 'Disable Site Title', 'aster-storefront' ), 'section' => 'title_tagline', 'settings' => 'aster_storefront_enable_site_title_setting', ) ) ); $wp_customize->add_setting( 'aster_storefront_site_title_size', array( 'default' => 40, // 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_storefront_site_title_size', array( 'type' => 'number', 'section' => 'title_tagline', // You can change this section to your preferred section 'label' => __( 'Site Title Font Size ', 'aster-storefront' ), 'input_attrs' => array( 'min' => 10, 'max' => 100, 'step' => 1, ), ) ); // Tagline - Enable Setting. $wp_customize->add_setting( 'aster_storefront_enable_tagline_setting', array( 'default' => false, 'sanitize_callback' => 'aster_storefront_sanitize_switch', ) ); $wp_customize->add_control( new Aster_Storefront_Toggle_Switch_Custom_Control( $wp_customize, 'aster_storefront_enable_tagline_setting', array( 'label' => esc_html__( 'Enable Tagline', 'aster-storefront' ), 'section' => 'title_tagline', 'settings' => 'aster_storefront_enable_tagline_setting', ) ) ); $wp_customize->add_section( 'aster_storefront_header_options', array( 'panel' => 'aster_storefront_theme_options', 'title' => esc_html__( 'Header Options', 'aster-storefront' ), ) ); // Header Options - Enable Topbar. $wp_customize->add_setting( 'aster_storefront_enable_topbar', array( 'sanitize_callback' => 'aster_storefront_sanitize_switch', 'default' => false, ) ); $wp_customize->add_control( new Aster_Storefront_Toggle_Switch_Custom_Control( $wp_customize, 'aster_storefront_enable_topbar', array( 'label' => esc_html__( 'Enable Topbar', 'aster-storefront' ), 'section' => 'aster_storefront_header_options', ) ) ); // Header Options - Contact Number. $wp_customize->add_setting( 'aster_storefront_discount_topbar_text', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_storefront_discount_topbar_text', array( 'label' => esc_html__( 'Topbar Discount Text', 'aster-storefront' ), 'section' => 'aster_storefront_header_options', 'type' => 'text', 'active_callback' => 'aster_storefront_is_topbar_enabled', ) ); $wp_customize->add_setting( 'header_layout', array( 'default' => 'default-header', 'sanitize_callback' => 'sanitize_text_field', ) ); // Add control for header layout $wp_customize->add_control( 'header_layout', array( 'label' => __( ' Header Layout', 'aster-storefront' ), 'section' => 'aster_storefront_header_options', 'description' => esc_html__( 'This Setting For Changing the header layout.', 'aster-storefront' ), 'type' => 'select', 'choices' => array( 'default' => __( 'Default', 'aster-storefront' ), 'custom' => __( 'Custom', 'aster-storefront' ), ), ) );