add_section( 'shapon_section_post', array( 'title' => __( 'Post Settings', 'shapon-lite' ), 'priority' => 30, 'panel' => 'shapon_options_panel' ) ); // Add Settings and Controls for Posts $wp_customize->add_setting( 'shapon_theme_options[posts_length]', array( 'default' => 'index', 'type' => 'option', 'transport' => 'refresh', 'sanitize_callback' => 'shapon_sanitize_post_length' ) ); $wp_customize->add_control( 'shapon_control_posts_length', array( 'label' => __( 'Post Length on archives', 'shapon-lite' ), 'section' => 'shapon_section_post', 'settings' => 'shapon_theme_options[posts_length]', 'type' => 'radio', 'priority' => 1, 'choices' => array( 'index' => __( 'Show full posts', 'shapon-lite' ), 'excerpt' => __( 'Show post summaries (excerpt)', 'shapon-lite' ) ) ) ); // Add Post Images Headline $wp_customize->add_setting( 'shapon_theme_options[post_images]', array( 'default' => '', 'type' => 'option', 'transport' => 'refresh', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new shapon_Customize_Header_Control( $wp_customize, 'shapon_control_post_images', array( 'label' => __( 'Post Images', 'shapon-lite' ), 'section' => 'shapon_section_post', 'settings' => 'shapon_theme_options[post_images]', 'priority' => 2 ) ) ); $wp_customize->add_setting( 'shapon_theme_options[post_thumbnails_index]', array( 'default' => true, 'type' => 'option', 'transport' => 'refresh', 'sanitize_callback' => 'shapon_sanitize_checkbox' ) ); $wp_customize->add_control( 'shapon_control_posts_thumbnails_index', array( 'label' => __( 'Display featured images on archive pages', 'shapon-lite' ), 'section' => 'shapon_section_post', 'settings' => 'shapon_theme_options[post_thumbnails_index]', 'type' => 'checkbox', 'priority' => 3 ) ); $wp_customize->add_setting( 'shapon_theme_options[post_thumbnails_single]', array( 'default' => true, 'type' => 'option', 'transport' => 'refresh', 'sanitize_callback' => 'shapon_sanitize_checkbox' ) ); $wp_customize->add_control( 'shapon_control_posts_thumbnails_single', array( 'label' => __( 'Display featured images on single posts', 'shapon-lite' ), 'section' => 'shapon_section_post', 'settings' => 'shapon_theme_options[post_thumbnails_single]', 'type' => 'checkbox', 'priority' => 4 ) ); // Add Excerpt Text setting $wp_customize->add_setting( 'shapon_theme_options[excerpt_text_headline]', array( 'default' => '', 'type' => 'option', 'transport' => 'refresh', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new shapon_Customize_Header_Control( $wp_customize, 'shapon_control_excerpt_text_headline', array( 'label' => __( 'Excerpt More Text', 'shapon-lite' ), 'section' => 'shapon_section_post', 'settings' => 'shapon_theme_options[excerpt_text_headline]', 'priority' => 5 ) ) ); $wp_customize->add_setting( 'shapon_theme_options[excerpt_text]', array( 'default' => false, 'type' => 'option', 'transport' => 'refresh', 'sanitize_callback' => 'shapon_sanitize_checkbox' ) ); $wp_customize->add_control( 'shapon_control_excerpt_text', array( 'label' => __( 'Display [...] after text excerpts.', 'shapon-lite' ), 'section' => 'shapon_section_post', 'settings' => 'shapon_theme_options[excerpt_text]', 'type' => 'checkbox', 'priority' => 6 ) ); } ?>