add_panel('bigmart_blog_settings_panel', array( 'title' => esc_html__('Blog/Single Post Settings', 'bigmart'), 'priority' => 40 )); $wp_customize->add_section('bigmart_blog_page_settings', array( 'panel' => 'bigmart_blog_settings_panel', 'title' => esc_html__('Blog/Archive Page Settings', 'bigmart'), )); $wp_customize->add_setting('bigmart_blog_layout', array( 'sanitize_callback' => 'bigmart_sanitize_select', 'default' => 'blog-layout1' )); $wp_customize->add_control(new Bigmart_Image_Selector($wp_customize, 'bigmart_blog_layout', array( 'section' => 'bigmart_blog_page_settings', 'label' => esc_html__('Blog & Archive Layout', 'bigmart'), 'image_path' => BIGMART_OPT_DIR_URI_IMAGES . 'blog-layouts/', 'choices' => array( 'blog-layout1' => esc_html__('Layout 1', 'bigmart'), 'blog-layout2' => esc_html__('Layout 2', 'bigmart'), ) ))); $wp_customize->add_setting('bigmart_blog_cat', array( 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control(new Bigmart_Multiple_Checkbox($wp_customize, 'bigmart_blog_cat', array( 'label' => esc_html__('Exclude Category', 'bigmart'), 'section' => 'bigmart_blog_page_settings', 'choices' => bigmart_categories_list(), 'description' => esc_html__('Post with selected category will not display in the blog page', 'bigmart') ))); $wp_customize->add_setting('bigmart_archive_content', array( 'default' => 'excerpt', 'sanitize_callback' => 'bigmart_sanitize_choices' )); $wp_customize->add_control('bigmart_archive_content', array( 'section' => 'bigmart_blog_page_settings', 'type' => 'radio', 'label' => esc_html__('Archive Content', 'bigmart'), 'choices' => array( 'full-content' => esc_html__('Full Content', 'bigmart'), 'excerpt' => esc_html__('Excerpt', 'bigmart') ) )); $wp_customize->add_setting('bigmart_archive_readmore', array( 'default' => esc_html__('Read More', 'bigmart'), 'sanitize_callback' => 'bigmart_sanitize_text' )); $wp_customize->add_control('bigmart_archive_readmore', array( 'section' => 'bigmart_blog_page_settings', 'type' => 'text', 'label' => esc_html__('Read More Text', 'bigmart') )); $wp_customize->add_setting('bigmart_blog_excerpt_length', array( 'default' => 250, 'sanitize_callback' => 'bigmart_sanitize_number_absint', )); $wp_customize->add_control(new Bigmart_Range_Slider($wp_customize, 'bigmart_blog_excerpt_length', array( 'section' => 'bigmart_blog_page_settings', 'label' => esc_html__('Excerpt Length(Letters)', 'bigmart'), 'input_attrs' => array( 'min' => 0, 'max' => 500, 'step' => 1 ) ))); $wp_customize->add_setting('bigmart_blog_date', array( 'sanitize_callback' => 'bigmart_sanitize_boolean', 'default' => true )); $wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_blog_date', array( 'section' => 'bigmart_blog_page_settings', 'label' => esc_html__('Display Posted Date', 'bigmart') ))); $wp_customize->add_setting('bigmart_blog_author', array( 'sanitize_callback' => 'bigmart_sanitize_boolean', 'default' => true )); $wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_blog_author', array( 'section' => 'bigmart_blog_page_settings', 'label' => esc_html__('Display Author', 'bigmart') ))); $wp_customize->add_setting('bigmart_blog_comment', array( 'sanitize_callback' => 'bigmart_sanitize_boolean', 'default' => true )); $wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_blog_comment', array( 'section' => 'bigmart_blog_page_settings', 'label' => esc_html__('Display Comment', 'bigmart') ))); $wp_customize->add_setting('bigmart_blog_category', array( 'sanitize_callback' => 'bigmart_sanitize_boolean', 'default' => true )); $wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_blog_category', array( 'section' => 'bigmart_blog_page_settings', 'label' => esc_html__('Display Category', 'bigmart') ))); $wp_customize->add_setting('bigmart_blog_tag', array( 'sanitize_callback' => 'bigmart_sanitize_boolean', 'default' => true )); $wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_blog_tag', array( 'section' => 'bigmart_blog_page_settings', 'label' => esc_html__('Display Tag', 'bigmart') ))); /** Single Post Settings **/ $wp_customize->add_section('bigmart_single_post_settings', array( 'title' => esc_html__('Single Post Settings', 'bigmart'), 'panel' => 'bigmart_blog_settings_panel', )); $wp_customize->add_setting('bigmart_single_layout', array( 'sanitize_callback' => 'bigmart_sanitize_select', 'default' => 'single-layout1' )); $wp_customize->add_control(new Bigmart_Image_Selector($wp_customize, 'bigmart_single_layout', array( 'section' => 'bigmart_single_post_settings', 'label' => esc_html__('Single Post Layout', 'bigmart'), 'description' => esc_html__('This option can be overwritten in single page settings.', 'bigmart'), 'image_path' => BIGMART_OPT_DIR_URI_IMAGES . 'single-layouts/', 'choices' => array( 'single-layout1' => esc_html__('Layout 1', 'bigmart'), 'single-layout2' => esc_html__('Layout 2', 'bigmart'), ) ))); $wp_customize->add_setting('bigmart_single_categories', array( 'sanitize_callback' => 'bigmart_sanitize_boolean', 'default' => true )); $wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_single_categories', array( 'section' => 'bigmart_single_post_settings', 'label' => esc_html__('Display Categories', 'bigmart') ))); $wp_customize->add_setting('bigmart_single_author', array( 'sanitize_callback' => 'bigmart_sanitize_boolean', 'default' => true )); $wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_single_author', array( 'section' => 'bigmart_single_post_settings', 'label' => esc_html__('Display Author', 'bigmart') ))); $wp_customize->add_setting('bigmart_single_date', array( 'sanitize_callback' => 'bigmart_sanitize_boolean', 'default' => true )); $wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_single_date', array( 'section' => 'bigmart_single_post_settings', 'label' => esc_html__('Display Posted Date', 'bigmart') ))); $wp_customize->add_setting('bigmart_single_comment_count', array( 'sanitize_callback' => 'bigmart_sanitize_boolean', 'default' => true )); $wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_single_comment_count', array( 'section' => 'bigmart_single_post_settings', 'label' => esc_html__('Display Comment Count', 'bigmart') ))); $wp_customize->add_setting('bigmart_single_tags', array( 'sanitize_callback' => 'bigmart_sanitize_boolean', 'default' => true )); $wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_single_tags', array( 'section' => 'bigmart_single_post_settings', 'label' => esc_html__('Display Tags', 'bigmart') )));