add_section( 'aster_it_solutions_general_options', array( 'panel' => 'aster_it_solutions_theme_options', 'title' => esc_html__( 'General Options', 'aster-it-solutions' ), ) ); // General Options - Enable Preloader. $wp_customize->add_setting( 'aster_it_solutions_enable_preloader', array( 'sanitize_callback' => 'aster_it_solutions_sanitize_switch', 'default' => false, ) ); $wp_customize->add_control( new Aster_It_Solutions_Toggle_Switch_Custom_Control( $wp_customize, 'aster_it_solutions_enable_preloader', array( 'label' => esc_html__( 'Enable Preloader', 'aster-it-solutions' ), 'section' => 'aster_it_solutions_general_options', ) ) ); // Site Title - Enable Setting. $wp_customize->add_setting( 'aster_it_solutions_enable_site_title_setting', array( 'default' => true, 'sanitize_callback' => 'aster_it_solutions_sanitize_switch', ) ); $wp_customize->add_control( new Aster_It_Solutions_Toggle_Switch_Custom_Control( $wp_customize, 'aster_it_solutions_enable_site_title_setting', array( 'label' => esc_html__( 'Disable Site Title', 'aster-it-solutions' ), 'section' => 'title_tagline', 'settings' => 'aster_it_solutions_enable_site_title_setting', ) ) ); $wp_customize->add_setting( 'aster_it_solutions_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_it_solutions_site_title_size', array( 'type' => 'number', 'section' => 'title_tagline', // You can change this section to your preferred section 'label' => __( 'Site Title Font Size ', 'aster-it-solutions' ), 'input_attrs' => array( 'min' => 10, 'max' => 100, 'step' => 1, ), ) ); // Tagline - Enable Setting. $wp_customize->add_setting( 'aster_it_solutions_enable_tagline_setting', array( 'default' => false, 'sanitize_callback' => 'aster_it_solutions_sanitize_switch', ) ); $wp_customize->add_control( new Aster_It_Solutions_Toggle_Switch_Custom_Control( $wp_customize, 'aster_it_solutions_enable_tagline_setting', array( 'label' => esc_html__( 'Enable Tagline', 'aster-it-solutions' ), 'section' => 'title_tagline', 'settings' => 'aster_it_solutions_enable_tagline_setting', ) ) ); $wp_customize->add_section( 'aster_it_solutions_header_options', array( 'panel' => 'aster_it_solutions_theme_options', 'title' => esc_html__( 'Header Options', 'aster-it-solutions' ), ) ); // Header Options - Phone. $wp_customize->add_setting( 'aster_it_solutions_callus_header_text', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_it_solutions_callus_header_text', array( 'label' => esc_html__( 'Call Text', 'aster-it-solutions' ), 'section' => 'aster_it_solutions_header_options', 'type' => 'text', ) ); // Header Options - Phone. $wp_customize->add_setting( 'aster_it_solutions_callus_header_number', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_it_solutions_callus_header_number', array( 'label' => esc_html__( 'Phone Number', 'aster-it-solutions' ), 'section' => 'aster_it_solutions_header_options', 'type' => 'text', ) ); // icon // $wp_customize->add_setting( 'aster_it_solutions_call_icon', array( 'default' => 'fas fa-comments', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control(new Aster_Change_Icon_Control($wp_customize, 'aster_it_solutions_call_icon', array( 'label' => __('Call Icon','aster-it-solutions'), 'section' => 'aster_it_solutions_header_options', 'iconset' => 'fa', )) ); $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-it-solutions' ), 'section' => 'aster_it_solutions_header_options', 'description' => esc_html__( 'This Setting For Changing the header layout.', 'aster-it-solutions' ), 'type' => 'select', 'choices' => array( 'default' => __( 'Default', 'aster-it-solutions' ), 'custom' => __( 'Custom', 'aster-it-solutions' ), ), ) );