add_section('conponent_2_setting_option', array( 'title' => esc_html__('Front/Page Component Style 2', 'blook'), 'priority' => 20, 'capability' => 'edit_theme_options', 'panel' => 'theme_front_page_panel', ) ); $wp_customize->add_setting('enable_component_2', array( 'default' => $default['enable_component_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'blook_sanitize_checkbox', ) ); $wp_customize->add_control('enable_component_2', array( 'label' => esc_html__('Enable Component Style 2', 'blook'), 'section' => 'conponent_2_setting_option', 'type' => 'checkbox', 'priority' => 22, ) ); $wp_customize->add_setting( 'blook_component_2_title', array( 'default' => $default['blook_component_2_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'blook_component_2_title', array( 'label' => __( 'Section Title Text', 'blook' ), 'section' => 'conponent_2_setting_option', 'type' => 'text', 'priority' => 100, ) ); // Setting - drop down category for recnet post section. $wp_customize->add_setting( 'select_category_for_component_2_section', array( 'default' => $default['select_category_for_component_2_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Blook_Dropdown_Taxonomies_Control( $wp_customize, 'select_category_for_component_2_section', array( 'label' => __( 'Category for Section', 'blook' ), 'section' => 'conponent_2_setting_option', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', 'priority' => 100, ) ) ); $wp_customize->add_setting( 'number_of_post_on_component_2_section', array( 'default' => $default['number_of_post_on_component_2_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'blook_sanitize_positive_integer', ) ); $wp_customize->add_control( 'number_of_post_on_component_2_section', array( 'label' => __( 'Select Number of Post to Display', 'blook' ), 'section' => 'conponent_2_setting_option', 'type' => 'number', 'priority' => 100, 'input_attrs' => array( 'min' => 2, 'max' => 10, 'style' => 'width: 150px;' ), ) ); // Setting component_2_add_image. $wp_customize->add_setting('component_2_add_image', array( 'default' => $default['component_2_add_image'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'blook_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'component_2_add_image', array( 'label' => esc_html__('Upload Advertisement Image', 'blook'), 'description' => sprintf(esc_html__('Recommended Size %1$s px X %2$s px', 'blook'), 585, 1024), 'section' => 'conponent_2_setting_option', 'priority' => 120, ) ) ); /*component_2_add_url*/ $wp_customize->add_setting('component_2_add_url', array( 'default' => $default['component_2_add_url'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control('component_2_add_url', array( 'label' => esc_html__('Advertisement URL', 'blook'), 'section' => 'conponent_2_setting_option', 'type' => 'text', 'priority' => 130, ) ); $wp_customize->add_setting('component_2_add_target', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'blook_sanitize_checkbox', ) ); $wp_customize->add_control('component_2_add_target', array( 'label' => esc_html__('Open Advertisement in a new tab', 'blook'), 'section' => 'conponent_2_setting_option', 'priority' => 130, 'type' => 'checkbox', ) );