add_section( 'builder_lite_general_settings', array( 'priority' => 25, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Banner Settings', 'builder-lite' ) ) ); // Background selection $wp_customize->add_setting( 'bul_home_background_radio', array( 'type' => 'theme_mod', 'default' => 'image', 'sanitize_callback' => 'builder_lite_sanitize_radio_pagebg_selection' ) ); $wp_customize->add_control( 'bul_home_background_radio', array( 'settings' => 'bul_home_background_radio', 'section' => 'builder_lite_general_settings', 'type' => 'radio', 'label' => __( 'Choose Home Background Color or Background Image:', 'builder-lite' ), 'description' => __( 'This setting will change the Home background area.', 'builder-lite' ), 'choices' => array( 'color' => __( 'Background Color', 'builder-lite' ), 'image' => __( 'Background Image', 'builder-lite' ), ), ) ); // Background color $wp_customize->add_setting( 'bul_home_background_color', array( 'type' => 'theme_mod', 'default' => '#555555', 'sanitize_callback' => 'sanitize_hex_color' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bul_home_background_color', array( 'label' => __( 'Select Background Color', 'builder-lite' ), 'description' => __( 'This setting will add background color if Background Color was selected above.', 'builder-lite' ), 'section' => 'builder_lite_general_settings', 'settings' => 'bul_home_background_color', ) ) ); // Home Background Image $wp_customize->add_setting( 'bul_theme_home_background_image', array( 'type' => 'theme_mod', 'sanitize_callback' => 'builder_lite_sanitize_image' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'bul_theme_home_background_image', array( 'settings' => 'bul_theme_home_background_image', 'section' => 'builder_lite_general_settings', 'label' => __( 'Home Background Image', 'builder-lite' ), 'description' => __( 'This setting will add background image if Background Image was selected above.', 'builder-lite' ) ) ) ); // Home Section Heading text $wp_customize->add_setting( 'bul_home_heading_text', array( 'default' => __( 'ENTER YOUR HEADING HERE', 'builder-lite' ), 'sanitize_callback' => 'builder_lite_sanitize_textarea', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'bul_home_heading_text', array( 'settings' => 'bul_home_heading_text', 'section' => 'builder_lite_general_settings', 'type' => 'textarea', 'label' => __( 'Heading Text', 'builder-lite' ), 'description' => __( 'heading for the home section', 'builder-lite' ), ) ); $wp_customize->selective_refresh->add_partial( 'bul_home_heading_text', array( 'selector' => '.slide-bg-section h1', 'settings' => 'bul_home_heading_text', 'render_callback' => 'builder_lite_home_heading_text_render_callback', 'fallback_refresh' => false, ) ); // Home Section SubHeading text $wp_customize->add_setting( 'bul_home_subheading_text', array( 'default' => __( 'ENTER YOUR SUBHEADING HERE', 'builder-lite' ), 'sanitize_callback' => 'builder_lite_sanitize_textarea', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'bul_home_subheading_text', array( 'settings' => 'bul_home_subheading_text', 'section' => 'builder_lite_general_settings', 'type' => 'textarea', 'label' => __( 'SubHeading Text', 'builder-lite' ), 'description' => __( 'Subheading for the home section', 'builder-lite' ), ) ); $wp_customize->selective_refresh->add_partial( 'bul_home_subheading_text', array( 'selector' => '.slide-bg-section p', 'settings' => 'bul_home_subheading_text', 'render_callback' => 'builder_lite_home_subheading_text_render_callback', 'fallback_refresh' => false, ) ); // Home Section Button text $wp_customize->add_setting( 'bul_home_button_text', array( 'type' => 'theme_mod', 'default' => '', 'sanitize_callback' => 'builder_lite_sanitize_html', ) ); $wp_customize->add_control( 'bul_home_button_text', array( 'settings' => 'bul_home_button_text', 'section' => 'builder_lite_general_settings', 'type' => 'textbox', 'label' => __( 'Button Text', 'builder-lite' ), 'description' => __( 'Button text for the home section', 'builder-lite' ), ) ); // Home Section Button url $wp_customize->add_setting( 'bul_home_button_url', array( 'type' => 'theme_mod', 'default' => '', 'sanitize_callback' => 'builder_lite_sanitize_url' ) ); $wp_customize->add_control( 'bul_home_button_url', array( 'settings' => 'bul_home_button_url', 'section' => 'builder_lite_general_settings', 'type' => 'textbox', 'label' => __( 'Button URL', 'builder-lite' ), 'description' => __( 'Button URL for the home section, you can paste youtube or vimeo video url also', 'builder-lite' ), ) ); // Parallax Scroll for background image $wp_customize->add_setting( 'bul_home_parallax', array( 'type' => 'theme_mod', 'default' => true, 'sanitize_callback' => 'builder_lite_sanitize_checkbox_selection' ) ); $wp_customize->add_control( 'bul_home_parallax', array( 'settings' => 'bul_home_parallax', 'section' => 'builder_lite_general_settings', 'type' => 'checkbox', 'label' => __( 'Enable Parallax Scroll:', 'builder-lite' ), 'description' => __( 'Choose whether to show a parallax scroll feature for the Home Background image', 'builder-lite' ), ) ); // Enable Dark Overlay $wp_customize->add_setting( 'bul_home_dark_overlay', array( 'type' => 'theme_mod', 'default' => true, 'sanitize_callback' => 'builder_lite_sanitize_checkbox_selection' ) ); $wp_customize->add_control( 'bul_home_dark_overlay', array( 'settings' => 'bul_home_dark_overlay', 'section' => 'builder_lite_general_settings', 'type' => 'checkbox', 'label' => __( 'Enable Dark Overlay:', 'builder-lite' ), 'description' => __( 'Choose whether to show a dark overlay over background image', 'builder-lite' ), ) ); // Blog Homepage $wp_customize->add_setting( 'bul_blog_homepage', array( 'type' => 'theme_mod', 'default' => false, 'sanitize_callback' => 'builder_lite_sanitize_checkbox_selection' ) ); $wp_customize->add_control( 'bul_blog_homepage', array( 'settings' => 'bul_blog_homepage', 'section' => 'builder_lite_general_settings', 'type' => 'checkbox', 'label' => __( 'Use this for Blog Homepage:', 'builder-lite' ), 'description' => __( 'Check this if you are having a Blog as front page', 'builder-lite' ), ) ); //Header Settings $wp_customize->add_section( 'builder_lite_sticky_header_settings', array( 'priority' => 25, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Header Settings', 'builder-lite' ) ) ); //enable sticky menu $wp_customize->add_setting( 'bul_sticky_menu', array( 'type' => 'theme_mod', 'default' => true, 'sanitize_callback' => 'builder_lite_sanitize_checkbox_selection' ) ); $wp_customize->add_control( 'bul_sticky_menu', array( 'settings' => 'bul_sticky_menu', 'section' => 'builder_lite_sticky_header_settings', 'type' => 'checkbox', 'label' => __( 'Enable Sticky Header Feature:', 'builder-lite' ), 'description' => __( 'Choose whether to enable a sticky header feature for the site', 'builder-lite' ), ) ); // Mobile logo $wp_customize->add_setting( 'bul_alt_log_for_mobile', array( 'type' => 'theme_mod', 'sanitize_callback' => 'builder_lite_sanitize_image' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'bul_alt_log_for_mobile', array( 'settings' => 'bul_alt_log_for_mobile', 'section' => 'builder_lite_sticky_header_settings', 'label' => __( 'Logo for Sticky Header', 'builder-lite' ), 'description' => __( 'Upload logo for Sticky Header. This will used for mobile version of the theme. Recommended height is 45px', 'builder-lite' ) ) ) ); // Page settings $wp_customize->add_section( 'builder_lite_page_settings', array( 'priority' => 25, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Page Settings', 'builder-lite' ) ) ); // Background selection $wp_customize->add_setting( 'bul_page_bg_radio', array( 'type' => 'theme_mod', 'default' => 'color', 'sanitize_callback' => 'builder_lite_sanitize_radio_pagebg_selection' ) ); $wp_customize->add_control( 'bul_page_bg_radio', array( 'settings' => 'bul_page_bg_radio', 'section' => 'builder_lite_page_settings', 'type' => 'radio', 'label' => __( 'Choose Page Title Background Color or Background Image:', 'builder-lite' ), 'description' => __( 'This setting will change the background of the page title area.', 'builder-lite' ), 'choices' => array( 'color' => __( 'Background Color', 'builder-lite' ), 'image' => __( 'Background Image', 'builder-lite' ), ), ) ); // Background color $wp_customize->add_setting( 'bul_page_bg_color', array( 'type' => 'theme_mod', 'default' => '#555555', 'sanitize_callback' => 'sanitize_hex_color' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bul_page_bg_color', array( 'label' => __( 'Select Background Color', 'builder-lite' ), 'description' => __( 'This setting will add background color to the page title area if Background Color was selected above.', 'builder-lite' ), 'section' => 'builder_lite_page_settings', 'settings' => 'bul_page_bg_color', ) ) ); // Background Image $wp_customize->add_setting( 'bul_page_bg_image', array( 'type' => 'theme_mod', 'sanitize_callback' => 'builder_lite_sanitize_image' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'bul_page_bg_image', array( 'settings' => 'bul_page_bg_image', 'section' => 'builder_lite_page_settings', 'label' => __( 'Select Background Image for Page', 'builder-lite' ), 'description' => __( 'This setting will add background image to the page title area if Background Image was selected above.', 'builder-lite' ), ) ) ); // Parallax Scroll for background image $wp_customize->add_setting( 'bul_page_bg_parallax', array( 'type' => 'theme_mod', 'default' => true, 'sanitize_callback' => 'builder_lite_sanitize_checkbox_selection' ) ); $wp_customize->add_control( 'bul_page_bg_parallax', array( 'settings' => 'bul_page_bg_parallax', 'section' => 'builder_lite_page_settings', 'type' => 'checkbox', 'label' => __( 'Enable Parallax Scroll:', 'builder-lite' ), 'description' => __( 'Choose whether to show a parallax scroll feature for the Page Background image', 'builder-lite' ), ) ); // Enable Dark Overlay $wp_customize->add_setting( 'bul_page_dark_overlay', array( 'type' => 'theme_mod', 'default' => false, 'sanitize_callback' => 'builder_lite_sanitize_checkbox_selection' ) ); $wp_customize->add_control( 'bul_page_dark_overlay', array( 'settings' => 'bul_page_dark_overlay', 'section' => 'builder_lite_page_settings', 'type' => 'checkbox', 'label' => __( 'Enable Dark Overlay:', 'builder-lite' ), 'description' => __( 'Choose whether to show a dark overlay over page header background', 'builder-lite' ), ) ); // page title height from top // $wp_customize->add_setting( 'bul_pagetitle_hft', array( 'type' => 'theme_mod', 'default' => '125', 'sanitize_callback' => 'absint' ) ); $wp_customize->add_control( 'bul_pagetitle_hft', array( 'settings' => 'bul_pagetitle_hft', 'section' => 'builder_lite_page_settings', 'type' => 'textbox', 'label' => __( 'Page Title Height from Top(px)', 'builder-lite' ), 'description' => __( 'This will add top padding to the page title. Do not write px or em', 'builder-lite' ), ) ); // page title height from bottom // $wp_customize->add_setting( 'bul_pagetitle_hfb', array( 'type' => 'theme_mod', 'default' => '125', 'sanitize_callback' => 'absint' ) ); $wp_customize->add_control( 'bul_pagetitle_hfb', array( 'settings' => 'bul_pagetitle_hfb', 'section' => 'builder_lite_page_settings', 'type' => 'textbox', 'label' => __( 'Page Title Height from Bottom(px)', 'builder-lite' ), 'description' => __( 'This will add bottom padding to the page title. Do not write px or em', 'builder-lite' ), ) ); //Blog Settings $wp_customize->add_section( 'builder_lite_blog_settings', array( 'priority' => 25, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Blog Settings', 'builder-lite' ) ) ); // Blog Sidebar $wp_customize->add_setting( 'bul_blog_sidebar', array( 'type' => 'theme_mod', 'default' => 'right', 'sanitize_callback' => 'builder_lite_sanitize_blog_sidebar_radio_selection' ) ); $wp_customize->add_control( 'bul_blog_sidebar', array( 'settings' => 'bul_blog_sidebar', 'section' => 'builder_lite_blog_settings', 'type' => 'radio', 'label' => __( 'Select sidebar position:', 'builder-lite' ), 'description' => '', 'choices' => array( 'right' => __( 'Right', 'builder-lite' ), 'left' => __( 'Left', 'builder-lite' ), ), ) ); //Footer Settings $wp_customize->add_section( 'builder_lite_footer_settings', array( 'priority' => 25, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Footer Settings', 'builder-lite' ) ) ); // Copyright text $wp_customize->add_setting( 'bul_copyright_text', array( 'type' => 'theme_mod', 'default' => __( 'Copyrights 2017 builder lite. All Rights Reserved', 'builder-lite' ), 'sanitize_callback' => 'builder_lite_sanitize_textarea' ) ); $wp_customize->add_control( 'bul_copyright_text', array( 'settings' => 'bul_copyright_text', 'section' => 'builder_lite_footer_settings', 'type' => 'textarea', 'label' => __( 'Footer copyright text', 'builder-lite' ), 'description' => __( 'Copyright text to be displayed in the footer. HTML allowed.', 'builder-lite' ) ) ); // Footer widgets $wp_customize->add_setting( 'bul_footer_widgets', array( 'type' => 'theme_mod', 'default' => '4', 'sanitize_callback' => 'builder_lite_sanitize_footer_widgets_radio_selection' ) ); $wp_customize->add_control( 'bul_footer_widgets', array( 'settings' => 'bul_footer_widgets', 'section' => 'builder_lite_footer_settings', 'type' => 'radio', 'label' => __( 'Number of Footer Widgets:', 'builder-lite' ), 'description' => '', 'choices' => array( '3' => __( '3', 'builder-lite' ), '4' => __( '4', 'builder-lite' ), ), ) ); // Footer background color $wp_customize->add_setting( 'bul_footer_bg_color', array( 'type' => 'theme_mod', 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bul_footer_bg_color', array( 'label' => __( 'Footer Background Color', 'builder-lite' ), 'section' => 'builder_lite_footer_settings', 'settings' => 'bul_footer_bg_color', ) ) ); // Footer Content Color $wp_customize->add_setting( 'bul_footer_content_color', array( 'type' => 'theme_mod', 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bul_footer_content_color', array( 'label' => __( 'Footer Content Color', 'builder-lite' ), 'section' => 'builder_lite_footer_settings', 'settings' => 'bul_footer_content_color', ) ) ); // Footer links Color $wp_customize->add_setting( 'bul_footer_links_color', array( 'type' => 'theme_mod', 'default' => '#b3b3b3', 'sanitize_callback' => 'sanitize_hex_color' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bul_footer_links_color', array( 'label' => __( 'Footer Links Color', 'builder-lite' ), 'section' => 'builder_lite_footer_settings', 'settings' => 'bul_footer_links_color', ) ) ); // Preloader Settings $wp_customize->add_section( 'builder_lite_preloader_settings', array( 'priority' => 25, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Preloader Settings', 'builder-lite' ) ) ); // Preloader Enable radio button $wp_customize->add_setting( 'bul_preloader_display', array( 'type' => 'theme_mod', 'default' => true, 'sanitize_callback' => 'builder_lite_sanitize_checkbox_selection' ) ); $wp_customize->add_control( 'bul_preloader_display', array( 'settings' => 'bul_preloader_display', 'section' => 'builder_lite_preloader_settings', 'type' => 'checkbox', 'label' => __( 'Enable Preloader for site:', 'builder-lite' ), 'description' => __( 'Choose whether to show a preloader before a site opens', 'builder-lite' ), ) ); // Image for preloader $wp_customize->add_setting( 'bul_preloader_image', array( 'type' => 'theme_mod', 'sanitize_callback' => 'builder_lite_sanitize_image' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'bul_preloader_image', array( 'settings' => 'bul_preloader_image', 'section' => 'builder_lite_preloader_settings', 'label' => __( 'Preloader Image', 'builder-lite' ), 'description' => __( 'Upload image for preloader', 'builder-lite' ) ) ) ); } endif; add_action( 'customize_register', 'builder_lite_customize_register' ); require get_template_directory() . '/inc/customizer/customizer-sanatize.php';