add_section( 'blite_latest_blog_section', array( 'title' => esc_html__( 'Latest Blog Section','blite' ), 'description' => esc_html__( 'Latest Blog Page Options', 'blite' ), 'panel' => 'blite_homepage_sections_panel', ) ); // latest blog menu enable setting and control. $wp_customize->add_setting( 'blite_theme_options[enable_latest_blog]', array( 'default' => blite_theme_option('enable_latest_blog'), 'sanitize_callback' => 'blite_sanitize_switch', ) ); $wp_customize->add_control( new Blite_Switch_Control( $wp_customize, 'blite_theme_options[enable_latest_blog]', array( 'label' => esc_html__( 'Enable Latest Blog', 'blite' ), 'section' => 'blite_latest_blog_section', 'on_off_label' => blite_show_options(), ) ) ); // latest blog menu enable setting and control. $wp_customize->add_setting( 'blite_theme_options[latest_blog_sidebar]', array( 'default' => blite_theme_option('latest_blog_sidebar'), 'sanitize_callback' => 'blite_sanitize_switch', ) ); $wp_customize->add_control( new Blite_Switch_Control( $wp_customize, 'blite_theme_options[latest_blog_sidebar]', array( 'label' => esc_html__( 'Enable Sidebar', 'blite' ), 'section' => 'blite_latest_blog_section', 'on_off_label' => blite_show_options(), ) ) ); // latest blog title drop down chooser control and setting $wp_customize->add_setting( 'blite_theme_options[latest_blog_title]', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => blite_theme_option( 'latest_blog_title' ), ) ); $wp_customize->add_control( 'blite_theme_options[latest_blog_title]', array( 'label' => esc_html__( 'Latest Blog Title', 'blite' ), 'description' => esc_html__( 'Note: This title is displayed when your homepage displays option is set to latest posts.', 'blite' ), 'section' => 'blite_latest_blog_section', 'type' => 'text', ) ); // alignment control and setting $wp_customize->add_setting( 'blite_theme_options[blog_layout]', array( 'default' => blite_theme_option('blog_layout'), 'sanitize_callback' => 'blite_sanitize_select', ) ); $wp_customize->add_control( 'blite_theme_options[blog_layout]', array( 'label' => esc_html__( 'Layout', 'blite' ), 'section' => 'blite_latest_blog_section', 'type' => 'radio', 'choices' => array( 'left-align' => esc_html__( 'Left Align', 'blite' ), 'image-focus' => esc_html__( 'Image Focus', 'blite' ), 'image-focus-dark' => esc_html__( 'Image Focus Dark', 'blite' ), ), ) ); // column control and setting $wp_customize->add_setting( 'blite_theme_options[blog_column_type]', array( 'default' => blite_theme_option('blog_column_type'), 'sanitize_callback' => 'blite_sanitize_select', ) ); $wp_customize->add_control( 'blite_theme_options[blog_column_type]', array( 'label' => esc_html__( 'Column', 'blite' ), 'section' => 'blite_latest_blog_section', 'type' => 'radio', 'choices' => array( 'column-2' => esc_html__( 'Two Column', 'blite' ), 'column-3' => esc_html__( 'Three Column', 'blite' ), 'column-4' => esc_html__( 'Four Column', 'blite' ), ), ) ); // column control and setting $wp_customize->add_setting( 'blite_theme_options[filter_blog_posts]', array( 'default' => blite_theme_option('filter_blog_posts'), 'sanitize_callback' => 'blite_sanitize_select', ) ); $wp_customize->add_control( 'blite_theme_options[filter_blog_posts]', array( 'label' => esc_html__( 'Filter Posts By', 'blite' ), 'section' => 'blite_latest_blog_section', 'type' => 'radio', 'choices' => array( 'category' => esc_html__( 'Category', 'blite' ), 'none' => esc_html__( 'None', 'blite' ), ), ) ); // category drop down chooser control and setting $wp_customize->add_setting( 'blite_theme_options[blog_filter_category]', array( 'sanitize_callback' => 'blite_sanitize_multiple_absint', ) ); $wp_customize->add_control( new Blite_Dropdown_Multiple_Chosen_Control( $wp_customize, 'blite_theme_options[blog_filter_category]', array( 'label' => esc_html__( 'Select Filter Categories', 'blite' ), 'section' => 'blite_latest_blog_section', 'choices' => blite_category_choices(), 'active_callback' => 'blite_blog_filter_category', ) ) );