'949494', 'width' => 1600, 'height' => 200, 'wp-head-callback' => 'bakers_lite_header_style', 'default-text-color' => false, 'header-text' => false, ) ) ); } add_action( 'after_setup_theme', 'bakers_lite_custom_header_setup' ); if ( ! function_exists( 'bakers_lite_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @see bakers_lite_custom_header_setup(). */ function bakers_lite_header_style() { $header_text_color = get_header_textcolor(); ?>

label ); ?>

get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->add_setting('color_scheme',array( 'default' => '#531000', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'color_scheme',array( 'label' => esc_html__('Color Scheme','bakers-lite'), 'description' => esc_html__('More color options in PRO Version','bakers-lite'), 'section' => 'colors', 'settings' => 'color_scheme' )) ); // Slider Section $wp_customize->add_section( 'slider_section', array( 'title' => esc_html__('Slider Settings', 'bakers-lite'), 'priority' => null, 'description' => esc_html__('Featured Image Size Should be ( 1420 X 549 ) More slider settings available in PRO Version','bakers-lite'), ) ); $wp_customize->add_setting('page-setting7',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer' )); $wp_customize->add_control('page-setting7',array( 'type' => 'dropdown-pages', 'label' => esc_html__('Select page for slide one:','bakers-lite'), 'section' => 'slider_section' )); $wp_customize->add_setting('page-setting8',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer' )); $wp_customize->add_control('page-setting8',array( 'type' => 'dropdown-pages', 'label' => esc_html__('Select page for slide two:','bakers-lite'), 'section' => 'slider_section' )); $wp_customize->add_setting('page-setting9',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer' )); $wp_customize->add_control('page-setting9',array( 'type' => 'dropdown-pages', 'label' => esc_html__('Select page for slide three:','bakers-lite'), 'section' => 'slider_section' )); //Slider hide $wp_customize->add_setting('hide_slides',array( 'sanitize_callback' => 'bakers_lite_sanitize_checkbox', 'default' => true, )); $wp_customize->add_control( 'hide_slides', array( 'section' => 'slider_section', 'label' => esc_html__('Uncheck To Show Slider','bakers-lite'), 'type' => 'checkbox' )); // Slider Section // Home Section One $wp_customize->add_section('section_thumb_with_content', array( 'title' => esc_html__('Home Section One','bakers-lite'), 'description' => esc_html__('Select Page from the dropdown for section','bakers-lite'), 'priority' => null )); $wp_customize->add_setting('section1_title',array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('section1_title',array( 'label' => __('Add title for section title','bakers-lite'), 'section' => 'section_thumb_with_content', 'setting' => 'section1_title' )); $wp_customize->add_setting('sec-column1', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer', )); $wp_customize->add_control( 'sec-column1',array('type' => 'dropdown-pages', 'section' => 'section_thumb_with_content', )); $wp_customize->add_setting('sec-column2', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer', )); $wp_customize->add_control( 'sec-column2',array('type' => 'dropdown-pages', 'section' => 'section_thumb_with_content', )); $wp_customize->add_setting('sec-column3', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer', )); $wp_customize->add_control( 'sec-column3',array('type' => 'dropdown-pages', 'section' => 'section_thumb_with_content', )); $wp_customize->add_setting('sec-column4', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer', )); $wp_customize->add_control( 'sec-column4',array('type' => 'dropdown-pages', 'section' => 'section_thumb_with_content', )); //Hide Section $wp_customize->add_setting('hide_home_secwith_content',array( 'sanitize_callback' => 'bakers_lite_sanitize_checkbox', 'default' => true, )); $wp_customize->add_control( 'hide_home_secwith_content', array( 'section' => 'section_thumb_with_content', 'label' => esc_html__('Uncheck To Show This Section','bakers-lite'), 'type' => 'checkbox' )); // Hide Section // Home Section 2 Four Boxes $wp_customize->add_section('section_second', array( 'title' => esc_html__('Home Section Two','bakers-lite'), 'description' => esc_html__('Select Pages from the dropdown for homepage four boxes section','bakers-lite'), 'priority' => null )); $wp_customize->add_setting('section2_title',array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('section2_title',array( 'label' => __('Add title for section title','bakers-lite'), 'section' => 'section_second', 'setting' => 'section2_title' )); $wp_customize->add_setting('page-column1', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer', )); $wp_customize->add_control( 'page-column1',array('type' => 'dropdown-pages', 'section' => 'section_second', )); $wp_customize->add_setting('page-column2', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer', )); $wp_customize->add_control( 'page-column2',array('type' => 'dropdown-pages', 'section' => 'section_second', )); $wp_customize->add_setting('page-column3', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer', )); $wp_customize->add_control( 'page-column3',array('type' => 'dropdown-pages', 'section' => 'section_second', )); $wp_customize->add_setting('page-column4', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bakers_lite_sanitize_integer', )); $wp_customize->add_control( 'page-column4',array('type' => 'dropdown-pages', 'section' => 'section_second', )); //Hide Page Boxes Column Section $wp_customize->add_setting('hide_pagefourboxes',array( 'sanitize_callback' => 'bakers_lite_sanitize_checkbox', 'default' => true, )); $wp_customize->add_control( 'hide_pagefourboxes', array( 'section' => 'section_second', 'label' => esc_html__('Uncheck To Show This Section','bakers-lite'), 'type' => 'checkbox' )); // Hide Page Boxes Column Section $wp_customize->add_section('social_sec',array( 'title' => esc_html__('Social Settings','bakers-lite'), 'description' => esc_html__('More social icon available in PRO Version','bakers-lite'), 'priority' => null )); $wp_customize->add_setting('fb_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('fb_link',array( 'label' => esc_html__('Add facebook link here','bakers-lite'), 'section' => 'social_sec', 'setting' => 'fb_link' )); $wp_customize->add_setting('twitt_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('twitt_link',array( 'label' => esc_html__('Add twitter link here','bakers-lite'), 'section' => 'social_sec', 'setting' => 'twitt_link' )); $wp_customize->add_setting('gplus_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('gplus_link',array( 'label' => esc_html__('Add google plus link here','bakers-lite'), 'section' => 'social_sec', 'setting' => 'gplus_link' )); $wp_customize->add_setting('linked_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('linked_link',array( 'label' => esc_html__('Add linkedin link here','bakers-lite'), 'section' => 'social_sec', 'setting' => 'linked_link' )); $wp_customize->add_section('footer_main',array( 'title' => esc_html__('Footer Area','bakers-lite'), 'description' => esc_html__('Manager Footer From Widgets >> Footer Column 1, Footer Column 2, Footer Column 3','bakers-lite'), 'priority' => null, )); $wp_customize->add_setting('bakers_lite_options[footer-info]', array( 'type' => 'info_control', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( new bakers_lite_Info( $wp_customize, 'footer_main', array( 'section' => 'footer_main', 'settings' => 'bakers_lite_options[footer-info]', 'priority' => null ) ) ); } add_action( 'customize_register', 'bakers_lite_customize_register' ); //Integer function bakers_lite_sanitize_integer( $input ) { if( is_numeric( $input ) ) { return intval( $input ); } } function bakers_lite_sanitize_checkbox( $checked ) { // Boolean check. return ( ( isset( $checked ) && true == $checked ) ? true : false ); } //setting inline css. function bakers_lite_custom_css() { wp_enqueue_style( 'bakers-lite-custom-style', get_template_directory_uri() . '/css/bakers-lite-custom-style.css' ); $color = get_theme_mod( 'color_scheme' ); //E.g. #e64d43 $header_text_color = get_header_textcolor(); $custom_css = " #sidebar ul li a:hover, .cols-3 ul li a:hover, .cols-3 ul li.current_page_item a, .phone-no strong, .left a:hover, .blog_lists h4 a:hover, .recent-post h6 a:hover, .recent-post a:hover, .design-by a, .logo h2 span, .fancy-title h2 span, .postmeta a:hover, .recent-post .morebtn:hover, .sitenav ul li a:hover, .sitenav ul li.current_page_item a, .sitenav ul li.menu-item-has-children.hover, .sitenav ul li.current-menu-parent a.parent { color: {$color} !important; } .pagination .nav-links span.current, .pagination .nav-links a:hover, #commentform input#submit:hover, .nivo-controlNav a.active, .wpcf7 input[type='submit'], a.ReadMore, .slide_info .slide_more, .nivo-directionNav a:hover, .section2button, input.search-submit { background-color: {$color} !important; } "; wp_add_inline_style( 'bakers-lite-custom-style', $custom_css ); } add_action( 'wp_enqueue_scripts', 'bakers_lite_custom_css' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function bakers_lite_customize_preview_js() { wp_enqueue_script( 'bakers_lite_customizer', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20130508', true ); } add_action( 'customize_preview_init', 'bakers_lite_customize_preview_js' );