add_section( 'section_blog', array( 'title' => esc_html__( 'Blog/Archive', 'blog-up' ), 'priority' => 100, 'panel' => 'theme_option_panel', ) ); // Setting blog_meta. $wp_customize->add_setting( 'theme_options[blog_meta]', array( 'default' => $default['blog_meta'], 'sanitize_callback' => array( Sanitize::class, 'sortable' ), ) ); $wp_customize->add_control( new Sortable( $wp_customize, 'theme_options[blog_meta]', array( 'label' => esc_html__( 'Post Meta', 'blog-up' ), 'section' => 'section_blog', 'settings' => 'theme_options[blog_meta]', 'priority' => 100, 'choices' => array( 'date' => esc_html__( 'Date', 'blog-up' ), 'author' => esc_html__( 'Author', 'blog-up' ), 'categories' => esc_html__( 'Categories', 'blog-up' ), ), ) ) ); // Setting show_excerpt. $wp_customize->add_setting( 'theme_options[show_excerpt]', array( 'default' => $default['show_excerpt'], 'sanitize_callback' => array( Sanitize::class, 'checkbox' ), ) ); $wp_customize->add_control( new Switcher( $wp_customize, 'theme_options[show_excerpt]', array( 'label' => esc_html__( 'Show Excerpt', 'blog-up' ), 'section' => 'section_blog', 'priority' => 100, ) ) ); // Setting excerpt_length. $wp_customize->add_setting( 'theme_options[excerpt_length]', array( 'default' => $default['excerpt_length'], 'sanitize_callback' => array( Sanitize::class, 'number' ), ) ); $wp_customize->add_control( new Number( $wp_customize, 'theme_options[excerpt_length]', array( 'label' => esc_html__( 'Excerpt Length', 'blog-up' ), 'section' => 'section_blog', 'priority' => 100, 'input_attrs' => array( 'min' => 1, 'max' => 200, 'style' => 'width: 60px;', ), 'active_callback' => array( Callback::class, 'active' ), 'conditional_logic' => array( array( array( 'key' => 'theme_options[show_excerpt]', 'compare' => '==', 'value' => true, ), ), ), ) ) ); // Setting readmore_text. $wp_customize->add_setting( 'theme_options[readmore_text]', array( 'default' => $default['readmore_text'], 'sanitize_callback' => array( Sanitize::class, 'text' ), ) ); $wp_customize->add_control( new Text( $wp_customize, 'theme_options[readmore_text]', array( 'label' => esc_html__( 'Read More Text', 'blog-up' ), 'section' => 'section_blog', 'priority' => 100, 'active_callback' => array( Callback::class, 'active' ), 'conditional_logic' => array( array( array( 'key' => 'theme_options[show_excerpt]', 'compare' => '==', 'value' => true, ), ), ), ) ) );