'949494',
'width' => 1600,
'height' => 200,
'wp-head-callback' => 'bistro_lite_header_style',
'default-text-color' => false,
'header-text' => false,
) ) );
}
add_action( 'after_setup_theme', 'bistro_lite_custom_header_setup' );
if ( ! function_exists( 'bistro_lite_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see bistro_lite_custom_header_setup().
*/
function bistro_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' => '#ff8800',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control(
new WP_Customize_Color_Control($wp_customize,'color_scheme',array(
'label' => esc_html__('Color Scheme','bistro-lite'),
'description' => esc_html__('More color options in PRO Version','bistro-lite'),
'section' => 'colors',
'settings' => 'color_scheme'
))
);
// Slider Section
$wp_customize->add_section( 'slider_section', array(
'title' => esc_html__('Slider Settings', 'bistro-lite'),
'priority' => null,
'description' => esc_html__('Featured Image Size Should be ( 1420 X 549 ) More slider settings available in PRO Version','bistro-lite'),
)
);
$wp_customize->add_setting('page-setting7',array(
'default' => '0',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'bistro_lite_sanitize_integer'
));
$wp_customize->add_control('page-setting7',array(
'type' => 'dropdown-pages',
'label' => esc_html__('Select page for slide one:','bistro-lite'),
'section' => 'slider_section'
));
$wp_customize->add_setting('page-setting8',array(
'default' => '0',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'bistro_lite_sanitize_integer'
));
$wp_customize->add_control('page-setting8',array(
'type' => 'dropdown-pages',
'label' => esc_html__('Select page for slide two:','bistro-lite'),
'section' => 'slider_section'
));
$wp_customize->add_setting('page-setting9',array(
'default' => '0',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'bistro_lite_sanitize_integer'
));
$wp_customize->add_control('page-setting9',array(
'type' => 'dropdown-pages',
'label' => esc_html__('Select page for slide three:','bistro-lite'),
'section' => 'slider_section'
));
//Slider hide
$wp_customize->add_setting('hide_slides',array(
'sanitize_callback' => 'bistro_lite_sanitize_checkbox',
'default' => true,
));
$wp_customize->add_control( 'hide_slides', array(
'section' => 'slider_section',
'label' => esc_html__('Uncheck To Show Slider','bistro-lite'),
'type' => 'checkbox'
)); // Slider Section
// Home Three Boxes Section
$wp_customize->add_section('section_second', array(
'title' => esc_html__('Homepage Four Boxes Section','bistro-lite'),
'description' => esc_html__('Select Pages from the dropdown for homepage four boxes section','bistro-lite'),
'priority' => null
));
$wp_customize->add_setting('fourboxes_heading',array(
'default' => null,
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('fourboxes_heading',array(
'label' => esc_html__('Homepage Four Boxes Section Heding','bistro-lite'),
'section' => 'section_second',
'setting' => 'fourboxes_heading'
));
$wp_customize->add_setting('page-column1', array(
'default' => '0',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'bistro_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' => 'bistro_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' => 'bistro_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' => 'bistro_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_pagethreeboxes',array(
'sanitize_callback' => 'bistro_lite_sanitize_checkbox',
'default' => true,
));
$wp_customize->add_control( 'hide_pagethreeboxes', array(
'section' => 'section_second',
'label' => esc_html__('Uncheck To Show This Section','bistro-lite'),
'type' => 'checkbox'
)); // Hide Page Boxes Column Section
$wp_customize->add_section('social_sec',array(
'title' => esc_html__('Social Settings','bistro-lite'),
'description' => esc_html__('More social icon available in PRO Version','bistro-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','bistro-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','bistro-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','bistro-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','bistro-lite'),
'section' => 'social_sec',
'setting' => 'linked_link'
));
$wp_customize->add_section('footer_area',array(
'title' => esc_html__('Footer Area','bistro-lite'),
'priority' => null,
));
$wp_customize->add_setting('bistro_lite_options[credit-info]', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field'
)
);
$wp_customize->add_control( new bistro_lite_Info( $wp_customize, 'cred_section', array(
'section' => 'footer_area',
'settings' => 'bistro_lite_options[credit-info]'
) )
);
$wp_customize->add_setting('newsfeed_title',array(
'default' => null,
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('newsfeed_title',array(
'label' => esc_html__('Add title for latest news feed','bistro-lite'),
'section' => 'footer_area',
'setting' => 'newsfeed_title'
));
$wp_customize->add_setting('about_title',array(
'default' => null,
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('about_title',array(
'label' => esc_html__('Add title for about us','bistro-lite'),
'section' => 'footer_area',
'setting' => 'about_title'
));
$wp_customize->add_setting( 'about_description', array(
'default' => null,
'sanitize_callback' => 'sanitize_textarea_field',
) );
$wp_customize->add_control( 'about_description', array(
'type' => 'textarea',
'label' => esc_html__( 'About Description', 'bistro-lite' ),
'section' => 'footer_area',
'setting' => 'about_description',
) );
$wp_customize->add_setting('contact_title',array(
'default' => null,
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('contact_title',array(
'label' => esc_html__('Add title for footer contact info','bistro-lite'),
'section' => 'footer_area',
'setting' => 'contact_title'
));
$wp_customize->add_section('contact_sec',array(
'title' => esc_html__('Contact Details','bistro-lite'),
'description' => esc_html__('Add you contact details here','bistro-lite'),
'priority' => null
));
$wp_customize->add_setting('contact_add',array(
'default' => null,
'sanitize_callback' => 'sanitize_textarea_field',
));
$wp_customize->add_control( 'contact_add', array(
'type' => 'textarea',
'label' => esc_html__('Add contact address here','bistro-lite'),
'section' => 'contact_sec',
'setting' => 'contact_add'
));
$wp_customize->add_setting('contact_no',array(
'default' => null,
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('contact_no',array(
'label' => esc_html__('Add contact number here.','bistro-lite'),
'section' => 'contact_sec',
'setting' => 'contact_no'
));
$wp_customize->add_setting('contact_mail',array(
'default' => null,
'sanitize_callback' => 'sanitize_email'
));
$wp_customize->add_control('contact_mail',array(
'label' => esc_html__('Add email here','bistro-lite'),
'section' => 'contact_sec',
'setting' => 'contact_mail'
));
$wp_customize->add_setting('opening_time',array(
'default' => null,
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('opening_time',array(
'label' => esc_html__('Add opening time here','bistro-lite'),
'section' => 'contact_sec',
'setting' => 'opening_time'
));
$wp_customize->add_setting('bistro_lite_options[layout-info]', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field'
)
);
$wp_customize->add_control( new bistro_lite_Info( $wp_customize, 'layout_section', array(
'section' => 'theme_layout_sec',
'settings' => 'bistro_lite_options[layout-info]',
'priority' => null
) )
);
$wp_customize->add_setting('bistro_lite_options[font-info]', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field'
)
);
$wp_customize->add_control( new bistro_lite_Info( $wp_customize, 'font_section', array(
'section' => 'theme_font_sec',
'settings' => 'bistro_lite_options[font-info]',
'priority' => null
) )
);
$wp_customize->add_setting('bistro_lite_options[info]', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field'
)
);
$wp_customize->add_control( new bistro_lite_Info( $wp_customize, 'doc_section', array(
'section' => 'theme_doc_sec',
'settings' => 'bistro_lite_options[info]',
'priority' => 10
) )
);
}
add_action( 'customize_register', 'bistro_lite_customize_register' );
//Integer
function bistro_lite_sanitize_integer( $input ) {
if( is_numeric( $input ) ) {
return intval( $input );
}
}
function bistro_lite_sanitize_checkbox( $checked ) {
// Boolean check.
return ( ( isset( $checked ) && true == $checked ) ? true : false );
}
function bistro_lite_custom_css(){
$header_text_color = get_header_textcolor();
?>