add_section( 'homepage_category_Section', array( 'title' => esc_html__( 'Category Section Settings', 'bozu' ), 'capability' => 'edit_theme_options', 'panel' => 'homepage_option_panel', ) ); $wp_customize->add_setting('ed_category_section', array( 'default' => $bozu_default['ed_category_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_category_section', array( 'label' => esc_html__('Enable Category Section', 'bozu'), 'section' => 'homepage_category_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_category_image_overlay', array( 'default' => $bozu_default['ed_category_image_overlay'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_category_image_overlay', array( 'label' => esc_html__('Enable Category Image Overlay', 'bozu'), 'section' => 'homepage_category_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_category_description', array( 'default' => $bozu_default['ed_category_description'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_category_description', array( 'label' => esc_html__('Enable Category Description', 'bozu'), 'section' => 'homepage_category_Section', 'type' => 'checkbox', ) ); for ( $bozu_j=1; $bozu_j <= 3 ; $bozu_j++ ) { $wp_customize->add_setting('select_category_for_cat_list_'. $bozu_j, array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control(new Bozu_Dropdown_Taxonomies_Control($wp_customize, 'select_category_for_cat_list_'. $bozu_j, array( 'label' => esc_html__('Category To List', 'bozu') . ' - ' . $bozu_j , 'section' => 'homepage_category_Section', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', ))); } $wp_customize->add_setting( 'category_title_text_color', array( 'default' => $bozu_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', 'bozu' ), 'section' => 'homepage_category_Section', 'settings' => 'category_title_text_color', ) ) ); // Homepage Slider section settings. $wp_customize->add_section( 'homepage_slider_Section', array( 'title' => esc_html__( 'Slider Section Settings', 'bozu' ), 'capability' => 'edit_theme_options', 'panel' => 'homepage_option_panel', ) ); $wp_customize->add_setting('ed_slider_section', array( 'default' => $bozu_default['ed_slider_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_slider_section', array( 'label' => esc_html__('Enable Slider Section', 'bozu'), 'section' => 'homepage_slider_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'number_of_slider', array( 'default' => $bozu_default['number_of_slider'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_select', ) ); $wp_customize->add_control( 'number_of_slider', array( 'label' => esc_html__( 'Select no of slider', 'bozu' ), 'description' => esc_html__( 'Please refresh to get actual no of page field below', 'bozu' ), 'section' => 'homepage_slider_Section', 'choices' => array( '1' => esc_html__( '1', 'bozu' ), '2' => esc_html__( '2', 'bozu' ), '3' => esc_html__( '3', 'bozu' ), '4' => esc_html__( '4', 'bozu' ), '5' => esc_html__( '5', 'bozu' ), '6' => esc_html__( '6', 'bozu' ), ), 'type' => 'select', ) ); $slider_number = get_theme_mod( 'number_of_slider', $bozu_default['number_of_slider'] ); for ( $bozu_i=1; $bozu_i <= $slider_number ; $bozu_i++ ) { $wp_customize->add_setting( 'select_page_for_slider_'. $bozu_i, array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'select_page_for_slider_'. $bozu_i, array( 'input_attrs' => array( 'style' => 'width: 50px;' ), 'label' => __( 'Select Slider Page', 'bozu' ) . ' - ' . $bozu_i , 'section' => 'homepage_slider_Section', 'type' => 'dropdown-pages', 'allow_addition' => true, ) ); } $wp_customize->add_setting('ed_slider_overlay', array( 'default' => $bozu_default['ed_slider_overlay'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_slider_overlay', array( 'label' => esc_html__('Enable Slider Overlay', 'bozu'), 'section' => 'homepage_slider_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_slider_post_excerpt', array( 'default' => $bozu_default['ed_slider_post_excerpt'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_slider_post_excerpt', array( 'label' => esc_html__('Enable Slider Excerpt Content', 'bozu'), 'section' => 'homepage_slider_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_slider_control_dot', array( 'default' => $bozu_default['ed_slider_control_dot'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_slider_control_dot', array( 'label' => esc_html__('Enable Dots', 'bozu'), 'section' => 'homepage_slider_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'bozu_slider_text_color', array( 'default' => $bozu_default['bozu_slider_text_color'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bozu_slider_text_color', array( 'label' => esc_html__( 'Slider Text Color', 'bozu' ), 'section' => 'homepage_slider_Section', 'settings' => 'bozu_slider_text_color', ) ) ); // Homepage About section settings. $wp_customize->add_section( 'homepage_about_Section', array( 'title' => esc_html__( 'About Section Settings', 'bozu' ), 'capability' => 'edit_theme_options', 'panel' => 'homepage_option_panel', ) ); $wp_customize->add_setting('ed_about_section', array( 'default' => $bozu_default['ed_about_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_about_section', array( 'label' => esc_html__('Enable About Section', 'bozu'), 'section' => 'homepage_about_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('about_section_title', array( 'default' => $bozu_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', 'bozu'), 'section' => 'homepage_about_Section', 'type' => 'text', ) ); $wp_customize->add_setting( 'select_page_for_about', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'select_page_for_about', array( 'label' => __( 'Select About Page', 'bozu' ) , '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', 'bozu' ), 'capability' => 'edit_theme_options', 'panel' => 'homepage_option_panel', ) ); $wp_customize->add_setting('ed_testimonial_section', array( 'default' => $bozu_default['ed_testimonial_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_testimonial_section', array( 'label' => esc_html__('Enable Testimonial Section', 'bozu'), 'section' => 'homepage_testimonial_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('testimonial_bg_image', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'testimonial_bg_image', array( 'label' => esc_html__('Upload Section Background Image ', 'bozu'), 'section' => 'homepage_testimonial_Section', ) ) ); $wp_customize->add_setting('testimonial_section_title', array( 'default' => $bozu_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', 'bozu'), 'section' => 'homepage_testimonial_Section', 'type' => 'text', ) ); $wp_customize->add_setting( 'number_of_testimonial', array( 'default' => $bozu_default['number_of_testimonial'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_select', ) ); $wp_customize->add_control( 'number_of_testimonial', array( 'label' => esc_html__( 'Select no of slider', 'bozu' ), 'description' => esc_html__( 'Please refresh to get actual no of page field below', 'bozu' ), 'section' => 'homepage_testimonial_Section', 'choices' => array( '1' => esc_html__( '1', 'bozu' ), '2' => esc_html__( '2', 'bozu' ), '3' => esc_html__( '3', 'bozu' ), '4' => esc_html__( '4', 'bozu' ), '5' => esc_html__( '5', 'bozu' ), '6' => esc_html__( '6', 'bozu' ), ), 'type' => 'select', ) ); $testimonial_number = get_theme_mod( 'number_of_testimonial', $bozu_default['number_of_testimonial'] ); for ( $bozu_i=1; $bozu_i <= $testimonial_number ; $bozu_i++ ) { $wp_customize->add_setting( 'select_page_for_testimonial_'. $bozu_i, array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'select_page_for_testimonial_'. $bozu_i, array( 'input_attrs' => array( 'style' => 'width: 50px;' ), 'label' => __( 'Select Testimonial Page', 'bozu' ) . ' - ' . $bozu_i , 'section' => 'homepage_testimonial_Section', 'type' => 'dropdown-pages', 'allow_addition' => true, ) ); } $wp_customize->add_setting( 'bozu_testimonial_bg_color', array( 'default' => $bozu_default['bozu_testimonial_bg_color'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bozu_testimonial_bg_color', array( 'label' => esc_html__( 'Testimonial Background Color', 'bozu' ), 'section' => 'homepage_testimonial_Section', 'settings' => 'bozu_testimonial_bg_color', ) ) ); // Homepage CTA section settings. $wp_customize->add_section( 'homepage_cta_Section', array( 'title' => esc_html__( 'CTA Section Settings', 'bozu' ), 'capability' => 'edit_theme_options', 'panel' => 'homepage_option_panel', ) ); $wp_customize->add_setting('ed_cta_section', array( 'default' => $bozu_default['ed_cta_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_cta_section', array( 'label' => esc_html__('Enable CTA Section', 'bozu'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'select_page_for_cta', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'select_page_for_cta', array( 'label' => __( 'Select Call To Action Page', 'bozu' ) , 'section' => 'homepage_cta_Section', 'type' => 'dropdown-pages', 'allow_addition' => true, ) ); $wp_customize->add_setting('ed_cta_image_overlay', array( 'default' => $bozu_default['ed_cta_image_overlay'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_cta_image_overlay', array( 'label' => esc_html__('Enable Section Overlay', 'bozu'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_cta_post_excerpt', array( 'default' => $bozu_default['ed_cta_post_excerpt'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_cta_post_excerpt', array( 'label' => esc_html__('Enable CTA Excerpt Content', 'bozu'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); /*Button Text*/ $wp_customize->add_setting('homepage_cta_button_text', array( 'default' => $bozu_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', 'bozu'), 'description' => esc_html__('Removing text will disable read more on the related post', 'bozu'), 'section' => 'homepage_cta_Section', 'type' => 'text', ) ); $wp_customize->add_setting('homepage_cta_button_text_url', array( 'default' => $bozu_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', 'bozu'), 'section' => 'homepage_cta_Section', 'type' => 'text', ) ); $wp_customize->add_setting('cta_link_tab', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('cta_link_tab', array( 'label' => esc_html__('Open Link In New Tab', 'bozu'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'homepage_cta_text_color', array( 'default' => $bozu_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', 'bozu' ), 'section' => 'homepage_cta_Section', 'settings' => 'homepage_cta_text_color', ) ) ); // Homepage Service section settings. $wp_customize->add_section( 'homepage_services_Section', array( 'title' => esc_html__( 'Service Section Settings', 'bozu' ), 'capability' => 'edit_theme_options', 'panel' => 'homepage_option_panel', ) ); $wp_customize->add_setting('ed_services_section', array( 'default' => $bozu_default['ed_services_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_services_section', array( 'label' => esc_html__('Enable Service Section', 'bozu'), 'section' => 'homepage_services_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('services_section_title', array( 'default' => $bozu_default['services_section_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('services_section_title', array( 'label' => esc_html__('Section Title', 'bozu'), 'section' => 'homepage_services_Section', 'type' => 'text', ) ); $wp_customize->add_setting('services_bg_image', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'services_bg_image', array( 'label' => esc_html__('Upload Section Background Image ', 'bozu'), 'section' => 'homepage_services_Section', ) ) ); for ( $bozu_i=1; $bozu_i <= 3 ; $bozu_i++ ) { $wp_customize->add_setting( 'select_page_for_services_'. $bozu_i, array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'select_page_for_services_'. $bozu_i, array( 'input_attrs' => array( 'style' => 'width: 50px;' ), 'label' => __( 'Select Service Page', 'bozu' ) . ' - ' . $bozu_i , 'section' => 'homepage_services_Section', 'type' => 'dropdown-pages', 'allow_addition' => true, ) ); } $wp_customize->add_section( 'homepage_footer_recomend_section', array( 'title' => esc_html__( 'Footer Section Settings', 'bozu' ), 'capability' => 'edit_theme_options', 'panel' => 'homepage_option_panel', ) ); // Setting - enable_footer_related_post. $wp_customize->add_setting('enable_footer_related_post', array( 'default' => $bozu_default['enable_footer_related_post'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('enable_footer_related_post', array( 'label' => esc_html__('Enable Footer Related Post', 'bozu'), 'section' => 'homepage_footer_recomend_section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('footer_related_post_title', array( 'default' => $bozu_default['footer_related_post_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('footer_related_post_title', array( 'label' => esc_html__('Related Post Section Title', 'bozu'), 'section' => 'homepage_footer_recomend_section', 'type' => 'text', ) ); $wp_customize->add_setting('footer_related_post_sub_title', array( 'default' => $bozu_default['footer_related_post_sub_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('footer_related_post_sub_title', array( 'label' => esc_html__('Related Post Sub Title', 'bozu'), 'section' => 'homepage_footer_recomend_section', 'type' => 'text', ) ); $wp_customize->add_setting('number_of_footer_related_post', array( 'default' => $bozu_default['number_of_footer_related_post'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_select', ) ); $wp_customize->add_control('number_of_footer_related_post', array( 'label' => esc_html__('Select no of post', 'bozu'), 'section' => 'homepage_footer_recomend_section', 'choices' => array( '1' => esc_html__('1', 'bozu'), '2' => esc_html__('2', 'bozu'), '3' => esc_html__('3', 'bozu'), '4' => esc_html__('4', 'bozu'), '5' => esc_html__('5', 'bozu'), '6' => esc_html__('6', 'bozu'), '7' => esc_html__('7', 'bozu'), '8' => esc_html__('8', 'bozu'), '9' => esc_html__('9', 'bozu'), ), 'type' => 'select', ) ); // Setting - drop down category for footer related post. $wp_customize->add_setting('select_category_for_related_post', array( 'default' => $bozu_default['select_category_for_related_post'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control(new Bozu_Dropdown_Taxonomies_Control($wp_customize, 'select_category_for_related_post', array( 'label' => esc_html__('Category for related post', 'bozu'), 'section' => 'homepage_footer_recomend_section', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', ))); /*Button Text*/ $wp_customize->add_setting('footer_related_post_button', array( 'default' => $bozu_default['footer_related_post_button'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('footer_related_post_button', array( 'label' => esc_html__('Related Post Button Text', 'bozu'), 'description' => esc_html__('Removing text will disable read more on the related post', 'bozu'), 'section' => 'homepage_footer_recomend_section', 'type' => 'text', ) ); $wp_customize->add_setting('footer_related_post_button_url', array( 'default' => $bozu_default['footer_related_post_button_url'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control('footer_related_post_button_url', array( 'label' => esc_html__('Related Post Button URL', 'bozu'), 'section' => 'homepage_footer_recomend_section', 'type' => 'text', ) ); // Homepage Contact section settings. $wp_customize->add_section( 'homepage_contact_Section', array( 'title' => esc_html__( 'Contact Section Settings', 'bozu' ), 'capability' => 'edit_theme_options', 'panel' => 'homepage_option_panel', ) ); $wp_customize->add_setting('ed_contact_section', array( 'default' => $bozu_default['ed_contact_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_sanitize_checkbox', ) ); $wp_customize->add_control('ed_contact_section', array( 'label' => esc_html__('Enable Contact Section', 'bozu'), 'section' => 'homepage_contact_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('contact_section_title', array( 'default' => $bozu_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', 'bozu'), 'section' => 'homepage_contact_Section', 'type' => 'text', ) ); $wp_customize->add_setting('contact_section_location', array( 'default' => $bozu_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', 'bozu'), 'section' => 'homepage_contact_Section', 'type' => 'text', ) ); $wp_customize->add_setting('contact_section_email', array( 'default' => $bozu_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', 'bozu'), 'section' => 'homepage_contact_Section', 'type' => 'text', ) ); $wp_customize->add_setting('contact_section_number', array( 'default' => $bozu_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', 'bozu'), 'section' => 'homepage_contact_Section', 'type' => 'text', ) ); $wp_customize->add_setting('contact_section_bg_image', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bozu_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 ', 'bozu'), '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', 'bozu'), 'section' => 'homepage_contact_Section', 'type' => 'textarea', ) );