add_section( 'ashlar_popular_post_section', array( 'title' => esc_html__( 'Popular Post Section Setting', 'ashlar' ), 'capability' => 'edit_theme_options', 'priority' => 10, 'panel' => 'theme_option_panel', ) ); $wp_customize->add_setting('ed_popular_post_section', array( 'default' => $ashlar_default['ed_popular_post_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'ashlar_sanitize_checkbox', ) ); $wp_customize->add_control('ed_popular_post_section', array( 'label' => esc_html__('Enable Popular Post Section', 'ashlar'), 'section' => 'ashlar_popular_post_section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'popular_post_section_title', array( 'default' => $ashlar_default['popular_post_section_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'popular_post_section_title', array( 'label' => esc_html__( 'Popular Post Section Title', 'ashlar' ), 'section' => 'ashlar_popular_post_section', 'type' => 'text', ) ); $wp_customize->add_setting('popular_post_category_section_cat', array( 'default' => $ashlar_default['popular_post_category_section_cat'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'ashlar_sanitize_select', ) ); $wp_customize->add_control('popular_post_category_section_cat', array( 'label' => esc_html__('Popular Post Section Categroy', 'ashlar'), 'section' => 'ashlar_popular_post_section', 'type' => 'select', 'choices' => $ashlar_post_category_list, ) ); $wp_customize->add_setting( 'number_of_popular_post', array( 'default' => $ashlar_default['number_of_popular_post'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'ashlar_sanitize_positive_integer', ) ); $wp_customize->add_control( 'number_of_popular_post', array( 'label' => __( 'Number Of Popular Post (max-10)', 'ashlar' ), 'section' => 'ashlar_popular_post_section', 'type' => 'number', 'input_attrs' => array( 'min' => 1, 'max' => 10, 'style' => 'width: 150px;' ), ) ); $wp_customize->add_setting('ed_trending_post_section', array( 'default' => $ashlar_default['ed_trending_post_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'ashlar_sanitize_checkbox', ) ); $wp_customize->add_control('ed_trending_post_section', array( 'label' => esc_html__('Enable Trending Post Section', 'ashlar'), 'section' => 'ashlar_popular_post_section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'trending_post_section_title', array( 'default' => $ashlar_default['trending_post_section_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'trending_post_section_title', array( 'label' => esc_html__( 'Popular Post Section Title', 'ashlar' ), 'section' => 'ashlar_popular_post_section', 'type' => 'text', ) ); $wp_customize->add_setting('trending_post_section_cat', array( 'default' => $ashlar_default['trending_post_section_cat'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'ashlar_sanitize_select', ) ); $wp_customize->add_control('trending_post_section_cat', array( 'label' => esc_html__('Trending Post Section Categroy', 'ashlar'), 'section' => 'ashlar_popular_post_section', 'type' => 'select', 'choices' => $ashlar_post_category_list, ) ); $wp_customize->add_setting( 'number_of_trending_post', array( 'default' => $ashlar_default['number_of_trending_post'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'ashlar_sanitize_positive_integer', ) ); $wp_customize->add_control( 'number_of_trending_post', array( 'label' => __( 'Number Of Trending Post (max-20)', 'ashlar' ), 'section' => 'ashlar_popular_post_section', 'type' => 'number', 'input_attrs' => array( 'min' => 1, 'max' => 10, 'style' => 'width: 150px;' ), ) );