add_panel( 'panel_blog', array( 'priority' => 31, 'capability' => 'edit_theme_options', 'title' => esc_html__( 'Blog Options', 'beetan' ), ) ); $wp_customize->add_section( 'blog_archive', array( 'title' => esc_html__( 'Blog Archive', 'beetan' ), // 'priority' => 11, 'panel' => 'panel_blog', ) ); /* Blog Layout Control */ $wp_customize->add_setting( 'blog_layout', array( 'default' => 'default', 'sanitize_callback' => 'sanitize_key' ) ); $wp_customize->add_control( new Beetan_Customize_Radio_Image_Control( $wp_customize, 'blog_layout', array( 'label' => esc_html__( 'Layout', 'beetan' ), 'description' => esc_html__( 'Choose a layout for the blog posts.', 'beetan' ), 'section' => 'blog_archive', 'choices' => array( 'default' => array( 'label' => esc_html__( 'Default', 'beetan' ), 'url' => get_theme_file_uri( '/assets/images/default.svg' ) ), 'list' => array( 'label' => esc_html__( 'List', 'beetan' ), 'url' => get_theme_file_uri( '/assets/images/list .svg' ) ), 'grid' => array( 'label' => esc_html__( 'Grid', 'beetan' ), 'url' => get_theme_file_uri( '/assets/images/grid.svg' ) ) ) ) ) ); /* Blog post content */ $wp_customize->add_setting( 'blog_content', array( 'default' => 'full', 'sanitize_callback' => 'beetan_sanitize_select' ) ); $wp_customize->add_control( 'blog_content', array( 'type' => 'radio', 'section' => 'blog_archive', 'priority' => 10, 'label' => esc_html__( 'Archive Post Content', 'beetan' ), 'description' => esc_html__( 'Full content is only for DEFAULT blog layout.', 'beetan' ), 'choices' => array( 'full' => esc_html__( 'Show full content', 'beetan' ), 'summary' => esc_html__( 'Show summary', 'beetan' ), ), ) ); /* Blog excerpt length */ $wp_customize->add_setting( 'blog_excerpt_length', array( 'default' => 30, 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Beetan_Customize_Number_Control( $wp_customize, 'blog_excerpt_length', array( 'label' => esc_html__( 'Summary Length', 'beetan' ), 'description' => esc_html__( 'Summary length as words count.', 'beetan' ), 'section' => 'blog_archive', 'input_attrs' => array( 'min' => 10, 'max' => 50, 'step' => 5, ) ) ) ); /* Blog read more button */ $wp_customize->add_setting( 'blog_readmore', array( 'default' => true, 'sanitize_callback' => 'beetan_sanitize_boolean' ) ); $wp_customize->add_control( new Beetan_Customize_Toggle_Control( $wp_customize, 'blog_readmore', array( 'label' => esc_html__( 'Enable Read More', 'beetan' ), 'description' => wp_kses_post( __( 'Show READ MORE button.', 'beetan' ) ), 'section' => 'blog_archive' ) ) ); /* Space between archive blog posts */ $wp_customize->add_setting( 'blog_posts_gap', array( 'default' => 5, "transport" => "postMessage", 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Beetan_Customize_Number_Control( $wp_customize, 'blog_posts_gap', array( 'label' => esc_html__( 'Gap between posts', 'beetan' ), 'description' => esc_html__( 'Set gap in PX.', 'beetan' ), 'section' => 'blog_archive', 'input_attrs' => array( 'min' => 0, 'max' => 100, 'step' => 1, ) ) ) ); /* Remove Blog Posts Featured Image Padding */ $wp_customize->add_setting( 'blog_featured_image_display_style', array( 'default' => 'cover', 'sanitize_callback' => 'beetan_sanitize_select' ) ); $wp_customize->add_control( 'blog_featured_image_display_style', array( 'type' => 'radio', 'section' => 'blog_archive', 'label' => esc_html__( 'Featured Image Display Style', 'beetan' ), 'description' => esc_html__( 'Cover style is only for BOX container layout.', 'beetan' ), 'choices' => array( 'cover' => esc_html__( 'Cover', 'beetan' ), 'contain' => esc_html__( 'Contain', 'beetan' ), ), ) );