add_section( 'blogable_popular_post_section', array( 'title' => esc_html__( 'Popular Posts','blogable' ), 'description' => esc_html__( 'Popular Posts Section options.', 'blogable' ), 'panel' => 'blogable_front_page_panel', ) ); // Popular Posts content enable control and setting $wp_customize->add_setting( 'blogable_theme_options[popular_post_section_enable]', array( 'default' => $options['popular_post_section_enable'], 'sanitize_callback' => 'blogable_sanitize_switch_control', ) ); $wp_customize->add_control( new Blogable_Switch_Control( $wp_customize, 'blogable_theme_options[popular_post_section_enable]', array( 'label' => esc_html__( 'Popular Posts Section Enable', 'blogable' ), 'section' => 'blogable_popular_post_section', 'on_off_label' => blogable_switch_options(), ) ) ); // Add dropdown category setting and control. $wp_customize->add_setting( 'blogable_theme_options[popular_post_content_category]', array( 'sanitize_callback' => 'blogable_sanitize_single_category', ) ); $wp_customize->add_control( new Blogable_Dropdown_Taxonomies_Control( $wp_customize, 'blogable_theme_options[popular_post_content_category]', array( 'label' => esc_html__( 'Select Category', 'blogable' ), 'description' => esc_html__( 'Note: Latest selected no of posts will be shown from selected category', 'blogable' ), 'section' => 'blogable_popular_post_section', 'type' => 'dropdown-taxonomies', 'active_callback' => 'blogable_is_popular_post_section_enable' ) ) );