add_section( 'aster_ebooks_general_options', array( 'panel' => 'aster_ebooks_theme_options', 'title' => esc_html__( 'General Options', 'aster-ebooks' ), ) ); // General Options - Enable Preloader. $wp_customize->add_setting( 'aster_ebooks_enable_preloader', array( 'sanitize_callback' => 'aster_ebooks_sanitize_switch', 'default' => false, ) ); $wp_customize->add_control( new Aster_Ebooks_Toggle_Switch_Custom_Control( $wp_customize, 'aster_ebooks_enable_preloader', array( 'label' => esc_html__( 'Enable Preloader', 'aster-ebooks' ), 'section' => 'aster_ebooks_general_options', ) ) ); // Site Title - Enable Setting. $wp_customize->add_setting( 'aster_ebooks_enable_site_title_setting', array( 'default' => true, 'sanitize_callback' => 'aster_ebooks_sanitize_switch', ) ); $wp_customize->add_control( new Aster_Ebooks_Toggle_Switch_Custom_Control( $wp_customize, 'aster_ebooks_enable_site_title_setting', array( 'label' => esc_html__( 'Disable Site Title', 'aster-ebooks' ), 'section' => 'title_tagline', 'settings' => 'aster_ebooks_enable_site_title_setting', ) ) ); // Tagline - Enable Setting. $wp_customize->add_setting( 'aster_ebooks_enable_tagline_setting', array( 'default' => false, 'sanitize_callback' => 'aster_ebooks_sanitize_switch', ) ); $wp_customize->add_control( new Aster_Ebooks_Toggle_Switch_Custom_Control( $wp_customize, 'aster_ebooks_enable_tagline_setting', array( 'label' => esc_html__( 'Enable Tagline', 'aster-ebooks' ), 'section' => 'title_tagline', 'settings' => 'aster_ebooks_enable_tagline_setting', ) ) ); $wp_customize->add_section( 'aster_ebooks_header_options', array( 'panel' => 'aster_ebooks_theme_options', 'title' => esc_html__( 'Header Options', 'aster-ebooks' ), ) ); // Header Options - Enable Topbar. $wp_customize->add_setting( 'aster_ebooks_enable_topbar', array( 'sanitize_callback' => 'aster_ebooks_sanitize_switch', 'default' => false, ) ); $wp_customize->add_control( new Aster_Ebooks_Toggle_Switch_Custom_Control( $wp_customize, 'aster_ebooks_enable_topbar', array( 'label' => esc_html__( 'Enable Topbar', 'aster-ebooks' ), 'section' => 'aster_ebooks_header_options', ) ) ); // Header Options - Contact Number. $wp_customize->add_setting( 'aster_ebooks_discount_topbar_text', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aster_ebooks_discount_topbar_text', array( 'label' => esc_html__( 'Topbar Discount Text', 'aster-ebooks' ), 'section' => 'aster_ebooks_header_options', 'type' => 'text', 'active_callback' => 'aster_ebooks_is_topbar_enabled', ) );