add_panel('theme_front_page_panel', array( 'title' => esc_html__('Front/Page Section Settings', 'blook'), 'priority' => 30, 'capability' => 'edit_theme_options', ) ); // Top Bar Section. $wp_customize->add_section('conponent_1_setting_option', array( 'title' => esc_html__('3-Colum Layout With Slider', 'blook'), 'capability' => 'edit_theme_options', 'panel' => 'theme_front_page_panel', ) ); $wp_customize->add_setting('enable_component_1', array( 'default' => $default['enable_component_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'blook_sanitize_checkbox', ) ); $wp_customize->add_control('enable_component_1', array( 'label' => esc_html__('Enable Section', 'blook'), 'section' => 'conponent_1_setting_option', 'type' => 'checkbox', 'priority' => 22, ) ); $wp_customize->add_setting( 'blook_recent_post_section_title', array( 'default' => $default['blook_recent_post_section_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'blook_recent_post_section_title', array( 'label' => __( 'Recent Post Section Title Text', 'blook' ), 'section' => 'conponent_1_setting_option', 'type' => 'text', 'priority' => 100, ) ); // Setting - drop down category for recnet post section. $wp_customize->add_setting( 'select_category_for_recent_post_section', array( 'default' => $default['select_category_for_recent_post_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Blook_Dropdown_Taxonomies_Control( $wp_customize, 'select_category_for_recent_post_section', array( 'label' => __( 'Category for Recnet Post Section', 'blook' ), 'description' => __( 'Select category to be shown on Recent Post section on component 1 ', 'blook' ), 'section' => 'conponent_1_setting_option', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', 'priority' => 100, ) ) ); $wp_customize->add_setting( 'number_of_home_recent_post_section', array( 'default' => $default['number_of_home_recent_post_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'blook_sanitize_positive_integer', ) ); $wp_customize->add_control( 'number_of_home_recent_post_section', array( 'label' => __( 'Select Post Number on Recnet Post', 'blook' ), 'section' => 'conponent_1_setting_option', 'type' => 'number', 'priority' => 100, 'input_attrs' => array( 'min' => 5, 'max' => 10, 'style' => 'width: 150px;' ), ) ); $wp_customize->add_setting( 'blook_post_grid_section', array( 'default' => $default['blook_post_grid_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'blook_post_grid_section', array( 'label' => __( 'Post Grid Section Title Text', 'blook' ), 'section' => 'conponent_1_setting_option', 'type' => 'textarea', 'priority' => 100, ) ); // Setting - drop down category for post_grid. $wp_customize->add_setting( 'select_category_for_post_grid', array( 'default' => $default['select_category_for_post_grid'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Blook_Dropdown_Taxonomies_Control( $wp_customize, 'select_category_for_post_grid', array( 'label' => __( 'Category for Post Grid', 'blook' ), 'description' => __( 'Select category to be shown on grid post middle of component 1 ', 'blook' ), 'section' => 'conponent_1_setting_option', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', 'priority' => 100, ) ) ); $wp_customize->add_setting('enable_grid_post_excerpt', array( 'default' => $default['enable_grid_post_excerpt'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'blook_sanitize_checkbox', ) ); $wp_customize->add_control('enable_grid_post_excerpt', array( 'label' => esc_html__('Enable Excerpt on Grid Post', 'blook'), 'section' => 'conponent_1_setting_option', 'type' => 'checkbox', 'priority' => 100, ) ); /*content excerpt in post grid*/ $wp_customize->add_setting( 'excerpt_home_post_grid', array( 'default' => $default['excerpt_home_post_grid'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'blook_sanitize_positive_integer', ) ); $wp_customize->add_control( 'excerpt_home_post_grid', array( 'label' => __( 'Select Excerpt Number Post Grid Section', 'blook' ), 'section' => 'conponent_1_setting_option', 'type' => 'number', 'priority' => 100, 'input_attrs' => array( 'min' => 0, 'max' => 200, 'style' => 'width: 150px;' ), 'active_callback' => 'blook_grid_post_excerpt', ) ); /*No of post_grid*/ $wp_customize->add_setting( 'number_of_home_post_grid', array( 'default' => $default['number_of_home_post_grid'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'blook_sanitize_positive_integer', ) ); $wp_customize->add_control( 'number_of_home_post_grid', array( 'label' => __( 'Select Number of Post on Recent Post', 'blook' ), 'description' => __( 'Post will be shown on left of slider along with one featured post along with button click', 'blook' ), 'section' => 'conponent_1_setting_option', 'type' => 'number', 'input_attrs' => array( 'min' => 1, 'max' => 10, 'style' => 'width: 150px;' ), 'priority' => 100, ) ); // Setting - drop down category for slider section. $wp_customize->add_setting( 'select_category_for_slider_section', array( 'default' => $default['select_category_for_slider_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Blook_Dropdown_Taxonomies_Control( $wp_customize, 'select_category_for_slider_section', array( 'label' => __( 'Category for Slider Section', 'blook' ), 'description' => __( 'Select category to be shown on slider section ', 'blook' ), 'section' => 'conponent_1_setting_option', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', 'priority' => 100, ) ) ); /*No of Slider*/ $wp_customize->add_setting( 'number_of_home_slider', array( 'default' => $default['number_of_home_slider'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'blook_sanitize_positive_integer', ) ); $wp_customize->add_control( 'number_of_home_slider', array( 'label' => __( 'Select Number of Post on Slider', 'blook' ), 'section' => 'conponent_1_setting_option', 'type' => 'number', 'input_attrs' => array( 'min' => 1, 'max' => 12, 'style' => 'width: 150px;' ), 'priority' => 100, ) );