add_section('section_general', array( 'title' => __('General Setting', 'bizbell'), 'panel' => 'theme_option_panel' )); $wp_customize->add_setting( 'theme_options[disable_homepage_content_section]', array( 'default' => false, 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizbell_sanitize_switch_control', ) ); $wp_customize->add_control( new BizBell_Switch_Control( $wp_customize, 'theme_options[disable_homepage_content_section]', array( 'label' => __('Enable/Disable Static Homepage Content Section', 'bizbell'), 'description' => __('This option is only work on Static HomePage ', 'bizbell'), 'section' => 'section_general', 'settings' => 'theme_options[disable_homepage_content_section]', 'on_off_label' => bizbell_switch_options(), ) ) ); // Setting excerpt_length. $wp_customize->add_setting( 'theme_options[excerpt_length]', array( 'default' => $default['excerpt_length'], 'sanitize_callback' => 'bizbell_sanitize_positive_integer', ) ); $wp_customize->add_control( 'theme_options[excerpt_length]', array( 'label' => esc_html__( 'Excerpt Length', 'bizbell' ), 'description' => esc_html__( 'in words', 'bizbell' ), 'section' => 'section_general', 'type' => 'number', 'input_attrs' => array( 'min' => 1, 'max' => 200, 'style' => 'width: 55px;' ), ) ); ?>