add_section( 'blite_slider_section', array( 'title' => esc_html__( 'Slider Section','blite' ), 'description' => esc_html__( 'Slider Setting Options', 'blite' ), 'panel' => 'blite_homepage_sections_panel', ) ); // slider menu enable setting and control. $wp_customize->add_setting( 'blite_theme_options[enable_slider]', array( 'default' => blite_theme_option('enable_slider'), 'sanitize_callback' => 'blite_sanitize_switch', ) ); $wp_customize->add_control( new Blite_Switch_Control( $wp_customize, 'blite_theme_options[enable_slider]', array( 'label' => esc_html__( 'Enable Slider', 'blite' ), 'section' => 'blite_slider_section', 'on_off_label' => blite_show_options(), ) ) ); // slider social menu enable setting and control. $wp_customize->add_setting( 'blite_theme_options[slider_entire_site]', array( 'default' => blite_theme_option('slider_entire_site'), 'sanitize_callback' => 'blite_sanitize_switch', ) ); $wp_customize->add_control( new Blite_Switch_Control( $wp_customize, 'blite_theme_options[slider_entire_site]', array( 'label' => esc_html__( 'Show Entire Site', 'blite' ), 'section' => 'blite_slider_section', 'on_off_label' => blite_show_options(), 'active_callback' => 'blite_slider_section_enable', ) ) ); // slider arrow control enable setting and control. $wp_customize->add_setting( 'blite_theme_options[slider_arrow]', array( 'default' => blite_theme_option('slider_arrow'), 'sanitize_callback' => 'blite_sanitize_switch', ) ); $wp_customize->add_control( new Blite_Switch_Control( $wp_customize, 'blite_theme_options[slider_arrow]', array( 'label' => esc_html__( 'Show Arrow Controller', 'blite' ), 'section' => 'blite_slider_section', 'on_off_label' => blite_show_options(), 'active_callback' => 'blite_slider_section_enable', ) ) ); // slider auto slide control enable setting and control. $wp_customize->add_setting( 'blite_theme_options[slider_auto_slide]', array( 'default' => blite_theme_option('slider_auto_slide'), 'sanitize_callback' => 'blite_sanitize_switch', ) ); $wp_customize->add_control( new Blite_Switch_Control( $wp_customize, 'blite_theme_options[slider_auto_slide]', array( 'label' => esc_html__( 'Auto Slide', 'blite' ), 'section' => 'blite_slider_section', 'on_off_label' => blite_show_options(), 'active_callback' => 'blite_slider_section_enable', ) ) ); // slider trasnition control and setting $wp_customize->add_setting( 'blite_theme_options[slider_width]', array( 'default' => blite_theme_option('slider_width'), 'sanitize_callback' => 'blite_sanitize_select', ) ); $wp_customize->add_control( 'blite_theme_options[slider_width]', array( 'label' => esc_html__( 'Slider Width', 'blite' ), 'section' => 'blite_slider_section', 'type' => 'radio', 'choices' => array( 'full-width' => esc_html__( 'Full Width', 'blite' ), 'container-width' => esc_html__( 'Container Width', 'blite' ), ), 'active_callback' => 'blite_slider_section_enable', ) ); // slider readmore label drop down chooser control and setting $wp_customize->add_setting( 'blite_theme_options[slider_readmore_label]', array( 'default' => blite_theme_option('slider_readmore_label'), 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'blite_theme_options[slider_readmore_label]', array( 'label' => esc_html__( 'Readmore Label', 'blite' ), 'section' => 'blite_slider_section', 'type' => 'text', 'active_callback' => 'blite_slider_section_enable', ) ); for ( $i = 1; $i <= 5; $i++ ) : // slider posts drop down chooser control and setting $wp_customize->add_setting( 'blite_theme_options[slider_content_post_' . $i . ']', array( 'sanitize_callback' => 'blite_sanitize_page_post', ) ); $wp_customize->add_control( new Blite_Dropdown_Chosen_Control( $wp_customize, 'blite_theme_options[slider_content_post_' . $i . ']', array( 'label' => sprintf( esc_html__( 'Select Post %d', 'blite' ), $i ), 'section' => 'blite_slider_section', 'choices' => blite_post_choices(), 'active_callback' => 'blite_slider_section_enable', ) ) ); endfor;