add_section( 'header_banner_setting', array( 'title' => esc_html__( 'Slider Banner Settings', 'beginner-blog' ), 'capability' => 'edit_theme_options', 'panel' => 'theme_home_pannel', ) ); $wp_customize->add_setting('ed_header_banner', array( 'default' => $beginner_blog_default['ed_header_banner'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_header_banner', array( 'label' => esc_html__('Enable Slider Banner', 'beginner-blog'), 'section' => 'header_banner_setting', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_banner_overlay', array( 'default' => $beginner_blog_default['ed_banner_overlay'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_banner_overlay', array( 'label' => esc_html__('Enable Banner Overlay', 'beginner-blog'), 'section' => 'header_banner_setting', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'beginner_blog_header_banner_cat', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_select', ) ); $wp_customize->add_control( 'beginner_blog_header_banner_cat', array( 'label' => esc_html__( 'Slider Post Category', 'beginner-blog' ), 'section' => 'header_banner_setting', 'type' => 'select', 'choices' => $beginner_blog_post_category_list, ) ); $wp_customize->add_section( 'header_carousel_setting', array( 'title' => esc_html__( 'Carousel Section Settings', 'beginner-blog' ), 'capability' => 'edit_theme_options', 'panel' => 'theme_home_pannel', ) ); $wp_customize->add_setting('ed_carousel_section', array( 'default' => $beginner_blog_default['ed_carousel_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_carousel_section', array( 'label' => esc_html__('Enable Carousel Section', 'beginner-blog'), 'section' => 'header_carousel_setting', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'beginner_blog_carousel_section_cat', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_select', ) ); $wp_customize->add_control( 'beginner_blog_carousel_section_cat', array( 'label' => esc_html__( 'Carousel Section Post Category', 'beginner-blog' ), 'section' => 'header_carousel_setting', 'type' => 'select', 'choices' => $beginner_blog_post_category_list, ) ); $wp_customize->add_setting('beginner_blog_carousel_section_title', array( 'default' => $beginner_blog_default['beginner_blog_carousel_section_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('beginner_blog_carousel_section_title', array( 'label' => esc_html__('Section Title', 'beginner-blog'), 'section' => 'header_carousel_setting', 'type' => 'text', ) ); // Homepage Category section settings. $wp_customize->add_section( 'homepage_category_Section', array( 'title' => esc_html__( 'Category Section Settings', 'beginner-blog' ), 'capability' => 'edit_theme_options', 'panel' => 'theme_home_pannel', ) ); $wp_customize->add_setting('ed_category_section', array( 'default' => $beginner_blog_default['ed_category_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_category_section', array( 'label' => esc_html__('Enable Category Section', 'beginner-blog'), 'section' => 'homepage_category_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_category_image_overlay', array( 'default' => $beginner_blog_default['ed_category_image_overlay'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_category_image_overlay', array( 'label' => esc_html__('Enable Category Image Overlay', 'beginner-blog'), 'section' => 'homepage_category_Section', 'type' => 'checkbox', ) ); for ( $beginner_blog_j=1; $beginner_blog_j <= 3 ; $beginner_blog_j++ ) { $wp_customize->add_setting('select_category_for_cat_list_'. $beginner_blog_j, array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control(new Beginner_Blog_Dropdown_Taxonomies_Control($wp_customize, 'select_category_for_cat_list_'. $beginner_blog_j, array( 'label' => esc_html__('Category To List', 'beginner-blog') . ' - ' . $beginner_blog_j , 'section' => 'homepage_category_Section', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', ))); } $wp_customize->add_setting( 'category_title_bg_color', array( 'default' => $beginner_blog_default['category_title_bg_color'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control(new WP_Customize_Color_Control( $wp_customize, 'category_title_bg_color', array( 'label' => esc_html__( 'Category Title Background Color', 'beginner-blog' ), 'section' => 'homepage_category_Section', 'settings' => 'category_title_bg_color', ) ) ); $wp_customize->add_setting( 'category_title_text_color', array( 'default' => $beginner_blog_default['category_title_text_color'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control(new WP_Customize_Color_Control( $wp_customize, 'category_title_text_color', array( 'label' => esc_html__( 'Category Title Text Color', 'beginner-blog' ), 'section' => 'homepage_category_Section', 'settings' => 'category_title_text_color', ) ) ); // Homepage About section settings. $wp_customize->add_section( 'homepage_about_Section', array( 'title' => esc_html__( 'About Section Settings', 'beginner-blog' ), 'capability' => 'edit_theme_options', 'panel' => 'theme_home_pannel', ) ); $wp_customize->add_setting('ed_about_section', array( 'default' => $beginner_blog_default['ed_about_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_about_section', array( 'label' => esc_html__('Enable About Section', 'beginner-blog'), 'section' => 'homepage_about_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('about_section_title', array( 'default' => $beginner_blog_default['about_section_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('about_section_title', array( 'label' => esc_html__('About Section Title', 'beginner-blog'), 'section' => 'homepage_about_Section', 'type' => 'text', ) ); $wp_customize->add_setting( 'select_page_for_about', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'select_page_for_about', array( 'label' => __( 'Select About Page', 'beginner-blog' ) , 'section' => 'homepage_about_Section', 'type' => 'dropdown-pages', 'allow_addition' => true, ) ); // Homepage testimonail section settings. $wp_customize->add_section( 'homepage_testimonial_Section', array( 'title' => esc_html__( 'Testimonial Section Settings', 'beginner-blog' ), 'capability' => 'edit_theme_options', 'panel' => 'theme_home_pannel', ) ); $wp_customize->add_setting('ed_testimonial_section', array( 'default' => $beginner_blog_default['ed_testimonial_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_testimonial_section', array( 'label' => esc_html__('Enable Testimonial Section', 'beginner-blog'), 'section' => 'homepage_testimonial_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('testimonial_section_title', array( 'default' => $beginner_blog_default['testimonial_section_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('testimonial_section_title', array( 'label' => esc_html__('Section Title', 'beginner-blog'), 'section' => 'homepage_testimonial_Section', 'type' => 'text', ) ); $wp_customize->add_setting( 'number_of_testimonial', array( 'default' => $beginner_blog_default['number_of_testimonial'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_select', ) ); $wp_customize->add_control( 'number_of_testimonial', array( 'label' => esc_html__( 'Select no of slider', 'beginner-blog' ), 'description' => esc_html__( 'Please refresh to get actual no of page field below', 'beginner-blog' ), 'section' => 'homepage_testimonial_Section', 'choices' => array( '1' => esc_html__( '1', 'beginner-blog' ), '2' => esc_html__( '2', 'beginner-blog' ), '3' => esc_html__( '3', 'beginner-blog' ), '4' => esc_html__( '4', 'beginner-blog' ), '5' => esc_html__( '5', 'beginner-blog' ), '6' => esc_html__( '6', 'beginner-blog' ), ), 'type' => 'select', ) ); $testimonial_number = get_theme_mod( 'number_of_testimonial', $beginner_blog_default['number_of_testimonial'] ); for ( $beginner_blog_i=1; $beginner_blog_i <= $testimonial_number ; $beginner_blog_i++ ) { $wp_customize->add_setting( 'select_page_for_testimonial_'. $beginner_blog_i, array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'select_page_for_testimonial_'. $beginner_blog_i, array( 'input_attrs' => array( 'style' => 'width: 50px;' ), 'label' => __( 'Select Testimonial Page', 'beginner-blog' ) . ' - ' . $beginner_blog_i , 'section' => 'homepage_testimonial_Section', 'type' => 'dropdown-pages', 'allow_addition' => true, ) ); } // Homepage Contact section settings. $wp_customize->add_section( 'homepage_contact_Section', array( 'title' => esc_html__( 'Contact Section Settings', 'beginner-blog' ), 'capability' => 'edit_theme_options', 'panel' => 'theme_home_pannel', ) ); $wp_customize->add_setting('ed_contact_section', array( 'default' => $beginner_blog_default['ed_contact_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_contact_section', array( 'label' => esc_html__('Enable Contact Section', 'beginner-blog'), 'section' => 'homepage_contact_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('contact_section_title', array( 'default' => $beginner_blog_default['contact_section_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('contact_section_title', array( 'label' => esc_html__('Section Title', 'beginner-blog'), 'section' => 'homepage_contact_Section', 'type' => 'text', ) ); $wp_customize->add_setting('contact_short_info', array( 'default' => $beginner_blog_default['contact_short_info'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('contact_short_info', array( 'label' => esc_html__('Section short Info', 'beginner-blog'), 'section' => 'homepage_contact_Section', 'type' => 'text', ) ); $wp_customize->add_setting('contact_section_location', array( 'default' => $beginner_blog_default['contact_section_location'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('contact_section_location', array( 'label' => esc_html__('Contact Location', 'beginner-blog'), 'section' => 'homepage_contact_Section', 'type' => 'text', ) ); $wp_customize->add_setting('contact_section_email', array( 'default' => $beginner_blog_default['contact_section_email'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('contact_section_email', array( 'label' => esc_html__('Contact Email', 'beginner-blog'), 'section' => 'homepage_contact_Section', 'type' => 'text', ) ); $wp_customize->add_setting('contact_section_number', array( 'default' => $beginner_blog_default['contact_section_number'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('contact_section_number', array( 'label' => esc_html__('Contact Number', 'beginner-blog'), 'section' => 'homepage_contact_Section', 'type' => 'text', ) ); $wp_customize->add_setting('contact_section_bg_image', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'contact_section_bg_image', array( 'label' => esc_html__('Upload Section Background Image ', 'beginner-blog'), 'section' => 'homepage_contact_Section', ) ) ); $wp_customize->add_setting('contact_form_shortcode', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('contact_form_shortcode', array( 'label' => esc_html__('Contact Form Shortcode', 'beginner-blog'), 'section' => 'homepage_contact_Section', 'type' => 'textarea', ) ); // Homepage CTA section settings. $wp_customize->add_section( 'homepage_cta_Section', array( 'title' => esc_html__( 'CTA Section Settings', 'beginner-blog' ), 'capability' => 'edit_theme_options', 'panel' => 'theme_home_pannel', ) ); $wp_customize->add_setting('ed_cta_section', array( 'default' => $beginner_blog_default['ed_cta_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_cta_section', array( 'label' => esc_html__('Enable CTA Section', 'beginner-blog'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'select_page_for_cta', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'select_page_for_cta', array( 'label' => __( 'Select Call To Action Page', 'beginner-blog' ) , 'section' => 'homepage_cta_Section', 'type' => 'dropdown-pages', 'allow_addition' => true, ) ); $wp_customize->add_setting( 'cta_block_spacing', array( 'default' => $beginner_blog_default['cta_block_spacing'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_select', ) ); $wp_customize->add_control( 'cta_block_spacing', array( 'label' => esc_html__( 'Select Spacing for CTA Block', 'beginner-blog' ), 'section' => 'homepage_cta_Section', 'choices' => array( 'theme-block-space-no' => esc_html__( 'No Spacing', 'beginner-blog' ), 'theme-block-space-small' => esc_html__( 'Small Spacing', 'beginner-blog' ), 'theme-block-space-large' => esc_html__( 'Large Spacing', 'beginner-blog' ), ), 'type' => 'select', ) ); $wp_customize->add_setting( 'cta_block_layout', array( 'default' => $beginner_blog_default['cta_block_layout'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_select', ) ); $wp_customize->add_control( 'cta_block_layout', array( 'label' => esc_html__( 'Select CTA Block Layout', 'beginner-blog' ), 'section' => 'homepage_cta_Section', 'choices' => array( 'wrapper' => esc_html__( 'Block Layout', 'beginner-blog' ), 'wrapper-fluid' => esc_html__( 'full-width Layout', 'beginner-blog' ), ), 'type' => 'select', ) ); $wp_customize->add_setting('ed_cta_image_overlay', array( 'default' => $beginner_blog_default['ed_cta_image_overlay'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_cta_image_overlay', array( 'label' => esc_html__('Enable Section Overlay', 'beginner-blog'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_cta_post_excerpt', array( 'default' => $beginner_blog_default['ed_cta_post_excerpt'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('ed_cta_post_excerpt', array( 'label' => esc_html__('Enable CTA Excerpt Content', 'beginner-blog'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); /*Button Text*/ $wp_customize->add_setting('homepage_cta_button_text', array( 'default' => $beginner_blog_default['homepage_cta_button_text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('homepage_cta_button_text', array( 'label' => esc_html__('Related Post Button Text', 'beginner-blog'), 'description' => esc_html__('Removing text will disable read more on the related post', 'beginner-blog'), 'section' => 'homepage_cta_Section', 'type' => 'text', ) ); $wp_customize->add_setting('homepage_cta_button_text_url', array( 'default' => $beginner_blog_default['homepage_cta_button_text_url'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control('homepage_cta_button_text_url', array( 'label' => esc_html__('Related Post Button URL', 'beginner-blog'), 'section' => 'homepage_cta_Section', 'type' => 'text', ) ); $wp_customize->add_setting('cta_link_tab', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'beginner_blog_sanitize_checkbox', ) ); $wp_customize->add_control('cta_link_tab', array( 'label' => esc_html__('Open Link In New Tab', 'beginner-blog'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'homepage_cta_background_color', array( 'default' => $beginner_blog_default['homepage_cta_background_color'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control(new WP_Customize_Color_Control( $wp_customize, 'homepage_cta_background_color', array( 'label' => esc_html__( 'Section Background Color', 'beginner-blog' ), 'section' => 'homepage_cta_Section', 'settings' => 'homepage_cta_background_color', ) ) ); $wp_customize->add_setting( 'homepage_cta_text_color', array( 'default' => $beginner_blog_default['homepage_cta_text_color'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control(new WP_Customize_Color_Control( $wp_customize, 'homepage_cta_text_color', array( 'label' => esc_html__( 'Section Text Color', 'beginner-blog' ), 'section' => 'homepage_cta_Section', 'settings' => 'homepage_cta_text_color', ) ) );