add_section( 'business_uncode_top_header_info_section', array( 'priority' => 1, 'capability' => 'edit_theme_options', 'title' => esc_html__('Top Header Info', 'business-uncode'), ) ); $wp_customize->add_setting( 'business_uncode_top_header_section', array( 'default' => $default['business_uncode_top_header_section'], 'sanitize_callback' => 'business_uncode_sanitize_select', ) ); $hide_show_top_header_option = business_uncode_slider_option(); $wp_customize->add_control( 'business_uncode_top_header_section', array( 'type' => 'radio', 'label' => esc_html__('Top Header Info Option', 'business-uncode'), 'description' => esc_html__('Show/hide Option for Top Header Info Section.', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'choices' => $hide_show_top_header_option, 'priority' => 5 ) ); /** * Field for Font Awesome Icon * */ $wp_customize->add_setting( 'business_uncode_top_header_section_phone_number_icon', array( 'default' => $default['business_uncode_top_header_section_phone_number_icon'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'business_uncode_top_header_section_phone_number_icon', array( 'type' => 'text', 'description' => esc_html__('Insert Font Awesome Class Name', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'priority' => 6 ) ); /** * Field for Top Header Phone Number * */ $wp_customize->add_setting( 'business_uncode_top_header_phone_no', array( 'default' => $default['business_uncode_top_header_phone_no'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'business_uncode_top_header_phone_no', array( 'type' => 'text', 'label' => esc_html__('Phone Number', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'priority' => 8 ) ); /** * Field for Fonsome Icon * */ $wp_customize->add_setting( 'business_uncode_email_icon', array( 'default' => $default['business_uncode_email_icon'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'business_uncode_email_icon', array( 'type' => 'text', 'description' => esc_html__('Insert Font Awesome Class Name', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'priority' => 8 ) ); /** * Field for Top Header Email Address * */ $wp_customize->add_setting( 'business_uncode_top_header_email', array( 'default' => $default['business_uncode_top_header_email'], 'sanitize_callback' => 'sanitize_email', ) ); $wp_customize->add_control( 'business_uncode_top_header_email', array( 'type' => 'email', 'label' => esc_html__('Email Address', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'priority' => 8 ) ); /** * Show/Hide Social Link */ $wp_customize->add_setting( 'business_uncode_social_link_hide_option', array( 'default' => $default['business_uncode_social_link_hide_option'], 'sanitize_callback' => 'business_uncode_sanitize_checkbox', ) ); $wp_customize->add_control('business_uncode_social_link_hide_option', array( 'label' => esc_html__('Hide/Show Social Menu', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'type' => 'checkbox', 'priority' => 10, ) ); /** * Field for Fonsome Icon * */ $wp_customize->add_setting( 'business_uncode_facebook', array( 'default' => $default['business_uncode_email_icon'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'business_uncode_email_icon', array( 'type' => 'text', 'description' => esc_html__('Insert Font Awesome Class Name', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'priority' => 8 ) ); /** * Field for Get Started facebook Link * */ $wp_customize->add_setting( 'business_uncode_facebook_url', array( 'default' => $default['business_uncode_facebook_url'], 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'business_uncode_facebook_url', array( 'type' => 'url', 'label' => esc_html__('Facebook Url Link', 'business-uncode'), 'description' => esc_html__('Use full url link', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'priority' => 9 ) ); /** * Field for Get Started facebook Link * */ $wp_customize->add_setting( 'business_uncode_facebook_url', array( 'default' => $default['business_uncode_facebook_url'], 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'business_uncode_facebook_url', array( 'type' => 'url', 'label' => esc_html__('Facebook Url Link', 'business-uncode'), 'description' => esc_html__('Use full url link', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'priority' => 11 ) ); $wp_customize->add_setting( 'business_uncode_youtube_url', array( 'default' => $default['business_uncode_youtube_url'], 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'business_uncode_youtube_url', array( 'type' => 'url', 'label' => esc_html__('Youtube Url Link', 'business-uncode'), 'description' => esc_html__('Use full url link', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'priority' => 12 ) ); $wp_customize->add_setting( 'business_uncode_linkedin_url', array( 'default' => $default['business_uncode_linkedin_url'], 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'business_uncode_linkedin_url', array( 'type' => 'url', 'label' => esc_html__('linkedin Url Link', 'business-uncode'), 'description' => esc_html__('Use full url link', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'priority' => 13 ) ); $wp_customize->add_setting( 'business_uncode_twitter_url', array( 'default' => $default['business_uncode_twitter_url'], 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'business_uncode_twitter_url', array( 'type' => 'url', 'label' => esc_html__('twitter Url Link', 'business-uncode'), 'description' => esc_html__('Use full url link', 'business-uncode'), 'section' => 'business_uncode_top_header_info_section', 'priority' => 14 ) ); /*========================================slider section option==============================================*/ /** * HomePage Settings Panel on customizer */ $wp_customize->add_panel( 'business_uncode_homepage_settings_panel', array( 'priority' => 22, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__('HomePage Slider Settings', 'business-uncode'), ) ); /*-------------------------------------------------------------------------------------------------*/ /** * Slider Section * */ $wp_customize->add_section( 'business_uncode_slider_section', array( 'title' => esc_html__('Slider Section', 'business-uncode'), 'panel' => 'business_uncode_homepage_settings_panel', 'priority' => 6, ) ); /** * Show/Hide option for Homepage Slider Section * */ $wp_customize->add_setting( 'business_uncode_homepage_slider_option', array( 'default' => $default['business_uncode_homepage_slider_option'], 'sanitize_callback' => 'business_uncode_sanitize_select', ) ); $hide_show_option = business_uncode_slider_option(); $wp_customize->add_control( 'business_uncode_homepage_slider_option', array( 'type' => 'radio', 'label' => esc_html__('Slider Option', 'business-uncode'), 'description' => esc_html__('Show/hide option for homepage Slider Section.', 'business-uncode'), 'section' => 'business_uncode_slider_section', 'choices' => $hide_show_option, 'priority' => 7 ) ); /** * List All Pages */ $slider_pages = array(); $slider_pages_obj = get_pages(); $slider_pages[''] = esc_html__('Select Page','business-uncode'); foreach ($slider_pages_obj as $page) { $slider_pages[$page->ID] = $page->post_title; } /*repeter call */ $wp_customize->add_setting('business_uncode_banner_all_sliders', array( 'sanitize_callback' => 'business_uncode_sanitize_repeater', 'default' => json_encode(array( array( 'selectpage' => '',//field 'button_text' => '', 'button_url' => '' ) )) )); $wp_customize->add_control(new Business_Uncode_Repeater_Controler($wp_customize, 'business_uncode_banner_all_sliders', array( 'label' =>esc_html__('Slider Settings Area', 'business-uncode'), 'section' => 'business_uncode_slider_section', 'settings' => 'business_uncode_banner_all_sliders', 'business_uncode_box_label' =>esc_html__('Slider Settings Options', 'business-uncode'), 'business_uncode_box_add_control' =>esc_html__('Add New Slider', 'business-uncode'), ), array( 'selectpage' => array( 'type' => 'select', 'label' =>esc_html__('Select Slider Page', 'business-uncode'), 'options' => $slider_pages//array ), 'button_text' => array( 'type' => 'text', 'label' =>esc_html__('Enter Button Text', 'business-uncode'), 'default' => '' ), 'button_url' => array( 'type' => 'text', 'label' => esc_html__('Enter Button Url', 'business-uncode'), 'default' => '' ), ) ) ); /*=============================== layout design =====================================*/ /** * Layout/Design Option * */ $wp_customize->add_panel( 'business_uncode_design_layout_options', array( 'priority' => 23, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__(' Layout/Design Option', 'business-uncode'), ) ); /*-------------------------------------------------------------------------------------------*/ /** * Sidebar Option * */ $wp_customize->add_section( 'business_uncode_default_sidebar_layout_option', array( 'title' => esc_html__('Default Sidebar Layout Option', 'business-uncode'), 'panel' => 'business_uncode_design_layout_options', 'priority' => 6, ) ); /** * Sidebar Option */ $wp_customize->add_setting( 'business_uncode_sidebar_layout_option', array( 'default' => $default['business_uncode_sidebar_layout_option'], 'sanitize_callback' => 'business_uncode_sanitize_select', ) ); $layout = business_uncode_sidebar_layout(); $wp_customize->add_control('business_uncode_sidebar_layout_option', array( 'label' => esc_html__('Default Sidebar Layout', 'business-uncode'), 'description' => esc_html__('Home/front page does not have sidebar. Inner pages like blog, archive single page/post Sidebar Layout. However single page/post sidebar can be overridden.if you need on a page and post sidebar from here, you need to first set default sidebar on page and post', 'business-uncode'), 'section' => 'business_uncode_default_sidebar_layout_option', 'type' => 'select', 'choices' => $layout, 'priority' => 10 ) ); /*-------------------------------------------------------------------------------------------*/ /** * Blog/Archive Layout Option * * @since 1.0.0 */ $wp_customize->add_section( 'business_uncode_blog_archive_layout_option', array( 'title' => esc_html__('Blog/Archive Layout Option', 'business-uncode'), 'panel' => 'business_uncode_design_layout_options', 'priority' => 7, ) ); /** * Blog Page Title */ $wp_customize->add_setting( 'business_uncode_blog_title_option', array( 'default' => $default['business_uncode_blog_title_option'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('business_uncode_blog_title_option', array( 'label' => esc_html__('Blog Page Title', 'business-uncode'), 'section' => 'business_uncode_blog_archive_layout_option', 'type' => 'text', 'priority' => 11 ) ); /** * Blog/Archive excerpt option */ $wp_customize->add_setting( 'business_uncode_blog_excerpt_option', array( 'default' => $default['business_uncode_blog_excerpt_option'], 'sanitize_callback' => 'business_uncode_sanitize_select', ) ); $blogexcerpt = business_uncode_blog_excerpt(); $wp_customize->add_control('business_uncode_blog_excerpt_option', array( 'choices' => $blogexcerpt, 'label' => esc_html__('Show Description From', 'business-uncode'), 'section' => 'business_uncode_blog_archive_layout_option', 'type' => 'select', 'priority' => 8 ) ); /** * Description Length In Words */ $wp_customize->add_setting( 'business_uncode_description_length_option', array( 'default' => $default['business_uncode_description_length_option'], 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control('business_uncode_description_length_option', array( 'label' => esc_html__('Description Length In Words', 'business-uncode'), 'section' => 'business_uncode_blog_archive_layout_option', 'type' => 'number', 'priority' => 12 ) ); /*-------------------------------------------------------------------------------------------*/ /** * Feature Image Option * */ $wp_customize->add_section( 'business_uncode_feature_image_info_option', array( 'title' => esc_html__('Feature Image Option For Single post / Page', 'business-uncode'), 'panel' => 'business_uncode_design_layout_options', 'priority' => 6, ) ); /** * Feature Image Option Single page */ $wp_customize->add_setting( 'business_uncode_show_feature_image_single_option', array( 'default' => $default['business_uncode_show_feature_image_single_option'], 'sanitize_callback' => 'business_uncode_sanitize_select', ) ); $hide_show_feature_image_option = business_uncode_show_feature_image_option(); $wp_customize->add_control( 'business_uncode_show_feature_image_single_option', array( 'type' => 'radio', 'label' => esc_html__('Show/Hide Feature Image For Single Page/post', 'business-uncode'), 'section' => 'business_uncode_feature_image_info_option', 'choices' => $hide_show_feature_image_option, 'priority' => 5 ) ); /*=================================theme-options-customizer==================================*/ /** * Theme Option * * @since 1.0.0 */ $wp_customize->add_panel( 'business_uncode_theme_options', array( 'priority' => 24, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__('Theme Option', 'business-uncode'), ) ); /*----------------------------------------------------------------------------------------------*/ /** * Color Options * * @since 1.0.0 */ $wp_customize->add_section( 'business_uncode_primary_color_option', array( 'title' => esc_html__('Color Options', 'business-uncode'), 'panel' => 'business_uncode_theme_options', 'priority' => 6, ) ); $wp_customize->add_setting( 'business_uncode_primary_color', array( 'default' => $default['business_uncode_primary_color'], 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'business_uncode_primary_color', array( 'label' => esc_html__('Primary Color', 'business-uncode'), 'description' => esc_html__('We recommend choose different background color but not to choose similar to font color', 'business-uncode'), 'section' => 'business_uncode_primary_color_option', 'priority' => 14, ))); /*-----------------------------------------------------------------------------*/ /** * Top Header Background Color * * @since 1.0.0 */ $wp_customize-> add_setting( 'business_uncode_top_header_background_color', array( 'default' => $default['business_uncode_top_header_background_color'], 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize-> add_control( new WP_Customize_Color_Control( $wp_customize, 'business_uncode_top_header_background_color', array( 'label' => esc_html__('Top Header Background Color', 'business-uncode'), 'description' => esc_html__('We recommend choose different background color but not to choose similar to font color', 'business-uncode'), 'section' => 'business_uncode_primary_color_option', 'priority' => 14, ))); /*-----------------------------------------------------------------------------*/ /** * Top Footer Background Color * * @since 1.0.0 */ $wp_customize->add_setting( 'business_uncode_top_footer_background_color', array( 'default' => $default['business_uncode_top_footer_background_color'], 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'business_uncode_top_footer_background_color', array( 'label' => esc_html__('Top Footer Background Color', 'business-uncode'), 'description' => esc_html__('We recommend choose different background color but not to choose similar to font color', 'business-uncode'), 'section' => 'business_uncode_primary_color_option', 'priority' => 14, ))); /*-----------------------------------------------------------------------------*/ /** * Bottom Footer Background Color * * @since 1.0.0 */ $wp_customize->add_setting( 'business_uncode_bottom_footer_background_color', array( 'default' => $default['business_uncode_bottom_footer_background_color'], 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control(new WP_Customize_Color_Control( $wp_customize, 'business_uncode_bottom_footer_background_color', array( 'label' => esc_html__('Bottom Footer Background Color', 'business-uncode'), 'description' => esc_html__('We recommend choose different background color but not to choose similar to font color', 'business-uncode'), 'section' => 'business_uncode_primary_color_option', 'priority' => 14, ))); /*-------------------------------------------------------------------------------------------*/ /** * Hide Static page in Home page * * @since 1.0.0 */ $wp_customize->add_section( 'business_uncode_front_page_option', array( 'title' => esc_html__('Front Page Options', 'business-uncode'), 'panel' => 'business_uncode_theme_options', 'priority' => 6, ) ); /** * Show/Hide Static page/Posts in Home page */ $wp_customize->add_setting( 'business_uncode_front_page_hide_option', array( 'default' => $default['business_uncode_front_page_hide_option'], 'sanitize_callback' => 'business_uncode_sanitize_checkbox', ) ); $wp_customize->add_control('business_uncode_front_page_hide_option', array( 'label' => esc_html__('Hide Blog Posts or Static Page on Front Page', 'business-uncode'), 'section' => 'business_uncode_front_page_option', 'type' => 'checkbox', 'priority' => 10 ) ); /*-------------------------------------------------------------------------------------------*/ /** * Breadcrumb Options * * @since 1.0.0 */ $wp_customize->add_section( 'business_uncode_breadcrumb_option', array( 'title' => esc_html__('Breadcrumb Options', 'business-uncode'), 'panel' => 'business_uncode_theme_options', 'priority' => 6, ) ); /** * Breadcrumb Option */ $wp_customize->add_setting( 'business_uncode_breadcrumb_setting_option', array( 'default' => $default['business_uncode_breadcrumb_setting_option'], 'sanitize_callback' => 'business_uncode_sanitize_select', ) ); $hide_show_breadcrumb_option = business_uncode_show_breadcrumb_option(); $wp_customize->add_control('business_uncode_breadcrumb_setting_option', array( 'label' => esc_html__('Breadcrumb Options', 'business-uncode'), 'section' => 'business_uncode_breadcrumb_option', 'choices' => $hide_show_breadcrumb_option, 'type' => 'select', 'priority' => 10 ) ); /** * Show/Hide Breadcrumb in Home page */ $wp_customize->add_setting( 'business_uncode_hide_breadcrumb_front_page_option', array( 'default' => $default['business_uncode_hide_breadcrumb_front_page_option'], 'sanitize_callback' => 'business_uncode_sanitize_checkbox', ) ); $wp_customize->add_control('business_uncode_hide_breadcrumb_front_page_option', array( 'label' => esc_html__('Show/Hide Breadcrumb in Home page', 'business-uncode'), 'section' => 'business_uncode_breadcrumb_option', 'type' => 'checkbox', 'priority' => 10 ) ); /*-------------------------------------------------------------------------------------------*/ /** * Reset Options * * @since 1.0.0 */ $wp_customize->add_section( 'business_uncode_reset_option', array( 'title' => esc_html__('Color Reset Options', 'business-uncode'), 'panel' => 'business_uncode_theme_options', 'priority' => 14, ) ); /** * Reset Option */ $wp_customize->add_setting( 'business_uncode_color_reset_option', array( 'default' => $default['business_uncode_color_reset_option'], 'sanitize_callback' => 'business_uncode_sanitize_select', 'transport' => 'postMessage' ) ); $reset_option = business_uncode_reset_option(); $wp_customize->add_control('business_uncode_color_reset_option', array( 'label' => esc_html__('Reset Options', 'business-uncode'), 'description' => sprintf( esc_html__('Caution: Reset theme settings according to the given options. Refresh the page after saving to view the effects', 'business-uncode')), 'section' => 'business_uncode_reset_option', 'type' => 'select', 'choices' => $reset_option, 'priority' => 20 ) ); /*======================================footer-option=========================================*/ /** * Copyright Info Section * * @since 1.0.0 */ $wp_customize->add_section( 'business_uncode_copyright_info_section', array( 'priority' => 25, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__('Footer Option', 'business-uncode'), ) ); /** * Field for Copyright * * @since 1.0.0 */ $wp_customize->add_setting( 'business_uncode_copyright', array( 'default' => $default['business_uncode_copyright'], 'sanitize_callback' => 'wp_kses_post', ) ); $wp_customize->add_control( 'business_uncode_copyright', array( 'type' => 'text', 'label' => esc_html__('Copyright', 'business-uncode'), 'section' => 'business_uncode_copyright_info_section', 'priority' => 8 ) );