add_section( 'section_home_header', array( 'title' => __( 'Header Options', 'akisa' ), 'priority' => 5, 'capability' => 'edit_theme_options', 'panel' => 'home_page_panel', ) ); $wp_customize->add_setting( 'theme_options[disable_header_background_section]', array( 'default' => $default['disable_header_background_section'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'akisa_sanitize_switch_control', ) ); $wp_customize->add_control( new Akisa_Switch_Control( $wp_customize, 'theme_options[disable_header_background_section]', array( 'label' => __('Enable/Disable Header Background Image', 'akisa'), 'section' => 'section_home_header', 'settings' => 'theme_options[disable_header_background_section]', 'on_off_label' => akisa_switch_options(), ) ) ); // header title setting and control $wp_customize->add_setting( 'theme_options[header_background_image]', array( 'type' => 'theme_mod', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'theme_options[header_background_image]', array( 'label' => esc_html__( 'Select Header Background', 'akisa' ), 'section' => 'section_home_header', 'settings' => 'theme_options[header_background_image]', 'active_callback' => 'akisa_header_background_active', ) ) ); // Number of items $wp_customize->add_setting('theme_options[header_top_buttom_padding]', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'akisa_sanitize_number_range' ) ); $wp_customize->add_control('theme_options[header_top_buttom_padding]', array( 'label' => __('Top Bottom Padding', 'akisa'), 'description' => __('Save & Refresh the customizer to see its effect. Maximum is 160.', 'akisa'), 'section' => 'section_home_header', 'settings' => 'theme_options[header_top_buttom_padding]', 'type' => 'number', 'input_attrs' => array( 'min' => 0, 'max' => 160, 'step' => 1, ), ) );