<?php
/**
 * Cooking Classes Theme Customizer
 *
 * @package Cooking Classes
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function cooking_classes_customize_register( $wp_customize ) {

	wp_enqueue_style('cooking-classes-customize-controls', trailingslashit(esc_url(get_template_directory_uri())).'/css/customize-controls.css');

	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';

	if ( class_exists( 'WP_Customize_Control' ) ) {
		require_once get_template_directory() . '/inc/customizer-custom-controls.php';
	}

	// Enable / Disable Logo
	$wp_customize->add_setting('cooking_classes_logo_enable',array(
		'default' => true,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
	));
	$wp_customize->add_control( 'cooking_classes_logo_enable', array(
	   'settings' => 'cooking_classes_logo_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Logo','cooking-classes'),
	   'type'      => 'checkbox'
	));

	//Logo
    $wp_customize->add_setting('cooking_classes_logo_width',array(
		'default'=> '',
		'transport' => 'refresh',
		'sanitize_callback' => 'cooking_classes_sanitize_integer'
	));
	$wp_customize->add_control(new Cooking_Classes_Slider_Custom_Control( $wp_customize, 'cooking_classes_logo_width',array(
		'label'	=> esc_html__('Logo Width','cooking-classes'),
		'section'=> 'title_tagline',
		'settings'=>'cooking_classes_logo_width',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 300,
        ),
	)));

	// color site title
	$wp_customize->add_setting('cooking_classes_sitetitle_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_sitetitle_color', array(
	   'settings' => 'cooking_classes_sitetitle_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Title Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('cooking_classes_title_enable',array(
		'default' => false,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
	));
	$wp_customize->add_control( 'cooking_classes_title_enable', array(
	   'settings' => 'cooking_classes_title_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Title','cooking-classes'),
	   'type'      => 'checkbox'
	));

	// woocommerce section
	$wp_customize->add_section('cooking_classes_woocommerce_page_settings', array(
		'title'    => __('WooCommerce Page Settings', 'cooking-classes'),
		'priority' => null,
		'panel'    => 'woocommerce',
	));

	$wp_customize->add_setting('cooking_classes_shop_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'cooking_classes_sanitize_checkbox'
	 ));
	 $wp_customize->add_control('cooking_classes_shop_page_sidebar',array(
		'type' => 'checkbox',
		'label' => __(' Check To Enable Shop page sidebar','cooking-classes'),
		'section' => 'cooking_classes_woocommerce_page_settings',
	 ));

    // shop page sidebar alignment
    $wp_customize->add_setting('cooking_classes_shop_page_sidebar_position', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'cooking_classes_sanitize_choices',
	));
	$wp_customize->add_control('cooking_classes_shop_page_sidebar_position',array(
		'type'           => 'radio',
		'label'          => __('Shop Page Sidebar', 'cooking-classes'),
		'section'        => 'cooking_classes_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'cooking-classes'),
			'Right Sidebar' => __('Right Sidebar', 'cooking-classes'),
		),
	));	 

	$wp_customize->add_setting('cooking_classes_wooproducts_nav',array(
		'default' => 'Yes',
		'sanitize_callback'	=> 'cooking_classes_sanitize_choices'
	));
	$wp_customize->add_control('cooking_classes_wooproducts_nav',array(
		'type' => 'select',
		'label' => __('Shop Page Products Navigation','cooking-classes'),
		'choices' => array(
			 'Yes' => __('Yes','cooking-classes'),
			 'No' => __('No','cooking-classes'),
		 ),
		'section' => 'cooking_classes_woocommerce_page_settings',
	));

	$wp_customize->add_setting( 'cooking_classes_single_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'cooking_classes_sanitize_checkbox'
    ) );
    $wp_customize->add_control('cooking_classes_single_page_sidebar',array(
    	'type' => 'checkbox',
       	'label' => __('Check To Enable Single Product Page Sidebar','cooking-classes'),
		'section' => 'cooking_classes_woocommerce_page_settings'
    ));

	// single product page sidebar alignment
    $wp_customize->add_setting('cooking_classes_single_product_page_layout', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'cooking_classes_sanitize_choices',
	));
	$wp_customize->add_control('cooking_classes_single_product_page_layout',array(
		'type'           => 'radio',
		'label'          => __('Single product Page Sidebar', 'cooking-classes'),
		'section'        => 'cooking_classes_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'cooking-classes'),
			'Right Sidebar' => __('Right Sidebar', 'cooking-classes'),
		),
	));	

	$wp_customize->add_setting('cooking_classes_related_product_enable',array(
		'default' => true,
		'sanitize_callback'	=> 'cooking_classes_sanitize_checkbox'
	));
	$wp_customize->add_control('cooking_classes_related_product_enable',array(
		'type' => 'checkbox',
		'label' => __('Check To Enable Related product','cooking-classes'),
		'section' => 'cooking_classes_woocommerce_page_settings',
	));

	$wp_customize->add_setting( 'cooking_classes_woo_product_img_border_radius', array(
        'default'              => '0',
        'transport'            => 'refresh',
        'sanitize_callback'    => 'cooking_classes_sanitize_integer'
    ) );
    $wp_customize->add_control(new Cooking_Classes_Slider_Custom_Control( $wp_customize, 'cooking_classes_woo_product_img_border_radius',array(
		'label'	=> esc_html__('Product Img Border Radius','cooking-classes'),
		'section'=> 'cooking_classes_woocommerce_page_settings',
		'settings'=>'cooking_classes_woo_product_img_border_radius',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 100,
        ),
	)));

    // Add a setting for number of products per row
    $wp_customize->add_setting('cooking_classes_products_per_row', array(
	   'default'   => '4',
	   'transport' => 'refresh',
	   'sanitize_callback' => 'cooking_classes_sanitize_integer'
    ));
    $wp_customize->add_control('cooking_classes_products_per_row', array(
	   'label'    => __('Products Per Row', 'cooking-classes'),
	   'section'  => 'cooking_classes_woocommerce_page_settings',
	   'settings' => 'cooking_classes_products_per_row',
	   'type'     => 'select',
	   'choices'  => array(
		  '2' => '2',
		  '3' => '3',
		  '4' => '4',
	   ),
   ));

   // Add a setting for the number of products per page
   $wp_customize->add_setting('cooking_classes_products_per_page', array(
	  'default'   => '9',
	  'transport' => 'refresh',
	  'sanitize_callback' => 'cooking_classes_sanitize_integer'
   ));
   $wp_customize->add_control('cooking_classes_products_per_page', array(
	  'label'    => __('Products Per Page', 'cooking-classes'),
	  'section'  => 'cooking_classes_woocommerce_page_settings',
	  'settings' => 'cooking_classes_products_per_page',
	  'type'     => 'number',
	  'input_attrs' => array(
		 'min'  => 1,
		 'step' => 1,
	 ),
   ));
   
   $wp_customize->add_setting('cooking_classes_product_sale_position',array(
	'default' => 'Left',
	'sanitize_callback' => 'cooking_classes_sanitize_choices'
	));
	$wp_customize->add_control('cooking_classes_product_sale_position',array(
		'type' => 'radio',
		'label' => __('Product Sale Position','cooking-classes'),
		'section' => 'cooking_classes_woocommerce_page_settings',
		'choices' => array(
			'Left' => __('Left','cooking-classes'),
			'Right' => __('Right','cooking-classes'),
		),
	) );      

	//Theme Options
	$wp_customize->add_panel( 'cooking_classes_panel_area', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'title' => __( 'Theme Options Panel', 'cooking-classes' ),
	) );

	//Site Layout Section
	$wp_customize->add_section('cooking_classes_site_layoutsec',array(
		'title'	=> __('Manage Site Layout Section ','cooking-classes'),
		'description' => __('<p class="sec-title">Manage Site Layout Section</p>','cooking-classes'),
		'priority'	=> 1,
		'panel' => 'cooking_classes_panel_area',
	));

	$wp_customize->add_setting('cooking_classes_preloader',array(
		'default' => false,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
	));
	$wp_customize->add_control( 'cooking_classes_preloader', array(
	   'section'   => 'cooking_classes_site_layoutsec',
	   'label'	=> __('Check to Show preloader','cooking-classes'),
	   'type'      => 'checkbox'
 	));

	$wp_customize->add_setting('cooking_classes_box_layout',array(
		'default' => false,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
	));
	$wp_customize->add_control( 'cooking_classes_box_layout', array(
	   'section'   => 'cooking_classes_site_layoutsec',
	   'label'	=> __('Check to Show Box Layout','cooking-classes'),
	   'type'      => 'checkbox'
 	));

    // Add Settings and Controls for Page Layout
    $wp_customize->add_setting('cooking_classes_sidebar_page_layout',array(
	  'default' => 'full',
	  'sanitize_callback' => 'cooking_classes_sanitize_choices'
	));
	$wp_customize->add_control('cooking_classes_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'cooking-classes'),
		'section' => 'cooking_classes_site_layoutsec',
		'choices' => array(
			'left' => __('Left','cooking-classes'),
			'right' => __('Right','cooking-classes'),
			'full' => __('No Sidebar','cooking-classes')
	),
	) );

	$wp_customize->add_setting( 'cooking_classes_layout_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_layout_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/cooking-wordpress-theme') ." '>Upgrade to Pro</a></span>",
		'section' => 'cooking_classes_site_layoutsec'
	));

	//Global Color
	$wp_customize->add_section('cooking_classes_global_color', array(
		'title'    => __('Manage Global Color Section', 'cooking-classes'),
		'panel'    => 'cooking_classes_panel_area',
	));

	$wp_customize->add_setting('cooking_classes_first_color', array(
		'default'           => '#f89212',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'cooking_classes_first_color', array(
		'label'    => __('Theme Color One', 'cooking-classes'),
		'section'  => 'cooking_classes_global_color',
		'settings' => 'cooking_classes_first_color',
	)));	

	$wp_customize->add_setting('cooking_classes_second_color', array(
		'default'           => '#a0c003',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'cooking_classes_second_color', array(
		'label'    => __('Theme Color Two', 'cooking-classes'),
		'section'  => 'cooking_classes_global_color',
		'settings' => 'cooking_classes_second_color',
	)));

	$wp_customize->add_setting('cooking_classes_third_color', array(
		'default'           => '#cf7b10',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'cooking_classes_third_color', array(
		'label'    => __('Theme Color Two', 'cooking-classes'),
		'section'  => 'cooking_classes_global_color',
		'settings' => 'cooking_classes_third_color',
	)));

	$wp_customize->add_setting( 'cooking_classes_global_color_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_global_color_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		<a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/cooking-wordpress-theme') ." '>Upgrade to Pro</a></span>",
		'section' => 'cooking_classes_global_color'
	));

	// Header Section
	$wp_customize->add_section('cooking_classes_header_section', array(
        'title' => __('Manage Header Section', 'cooking-classes'),
		'description' => __('<p class="sec-title">Manage Header Section</p>','cooking-classes'),
        'priority' => null,
		'panel' => 'cooking_classes_panel_area',
 	));

 	$wp_customize->add_setting('cooking_classes_stickyheader',array(
		'default' => false,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
	));
	$wp_customize->add_control( 'cooking_classes_stickyheader', array(
	   'section'   => 'cooking_classes_header_section',
	   'label'	=> __('Check To Show Sticky Header','cooking-classes'),
	   'type'      => 'checkbox'
 	));

    // Menu Text Transform
    $wp_customize->add_setting( 'cooking_classes_menu_text_transform', array(
        'default'           => 'Uppercase',
		'transport' => 'refresh',
		'sanitize_callback' => 'cooking_classes_sanitize_choices'
    ));

    $wp_customize->add_control( 'cooking_classes_menu_text_transform', array(
        'label'    => __( 'Menu Text Transform', 'cooking-classes' ),
        'section'  => 'cooking_classes_header_section',
        'type'     => 'select',
        'choices'  => array(
			'None'       => __( 'None', 'cooking-classes' ),
            'Capitalize' => __( 'Capitalize', 'cooking-classes' ),
            'Uppercase'  => __( 'Uppercase', 'cooking-classes' ),
            'Lowercase'  => __( 'Lowercase', 'cooking-classes' ),
        ),
    ));

 	// color bg logo header
	$wp_customize->add_setting('cooking_classes_logobg_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_logobg_color', array(
	   'settings' => 'cooking_classes_logobg_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Logo BG Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// color br logo
	$wp_customize->add_setting('cooking_classes_logoborder_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_logoborder_color', array(
	   'settings' => 'cooking_classes_logoborder_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Logo Border Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// color bg header
	$wp_customize->add_setting('cooking_classes_headerbg_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_headerbg_color', array(
	   'settings' => 'cooking_classes_headerbg_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('BG Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('cooking_classes_fb_link',array(
		'default' => '#',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_fb_link', array(
	   'settings' => 'cooking_classes_fb_link',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Facebook Link', 'cooking-classes'),
	   'type'      => 'url'
	));

	// color facebook
	$wp_customize->add_setting('cooking_classes_fb_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_fb_color', array(
	   'settings' => 'cooking_classes_fb_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Facebook Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('cooking_classes_twitt_link',array(
		'default' => '#',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_twitt_link', array(
	   'settings' => 'cooking_classes_twitt_link',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Twitter Link', 'cooking-classes'),
	   'type'      => 'url'
	));

	// color twitt
	$wp_customize->add_setting('cooking_classes_twitt_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_twitt_color', array(
	   'settings' => 'cooking_classes_twitt_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Twitter Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('cooking_classes_insta_link',array(
		'default' => '#',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_insta_link', array(
	   'settings' => 'cooking_classes_insta_link',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Instagram Link', 'cooking-classes'),
	   'type'      => 'url'
	));

	// color insta
	$wp_customize->add_setting('cooking_classes_insta_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_insta_color', array(
	   'settings' => 'cooking_classes_insta_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Instagram Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// icon bg
	$wp_customize->add_setting('cooking_classes_bg_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_bg_color', array(
	   'settings' => 'cooking_classes_bg_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Icons BG Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// header menu
	$wp_customize->add_setting('cooking_classes_menu_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_menu_color', array(
	   'settings' => 'cooking_classes_menu_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Menu Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// header menu hover color
	$wp_customize->add_setting('cooking_classes_menuhrv_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_menuhrv_color', array(
	   'settings' => 'cooking_classes_menuhrv_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('Menu Hover Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// header sub menu color
	$wp_customize->add_setting('cooking_classes_submenu_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_submenu_color', array(
	   'settings' => 'cooking_classes_submenu_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('SubMenu Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// header sub menu bg color
	$wp_customize->add_setting('cooking_classes_submenubg_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_submenubg_color', array(
	   'settings' => 'cooking_classes_submenubg_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('SubMenu BG Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// header sub menu hover color
	$wp_customize->add_setting('cooking_classes_submenuhrv_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_submenuhrv_color', array(
	   'settings' => 'cooking_classes_submenuhrv_color',
	   'section'   => 'cooking_classes_header_section',
	   'label' => __('SubMenu Hover Color', 'cooking-classes'),
	   'type'      => 'color'
	));
	$wp_customize->add_setting( 'cooking_classes_header_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_header_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
			<a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/cooking-wordpress-theme') ." '>Upgrade to Pro</a></span>",
		'section' => 'cooking_classes_header_section'
	));

	// Google Fonts
    $wp_customize->add_section( 'cooking_classes_google_fonts_section', array(
		'title'       => __( 'Google Fonts', 'cooking-classes' ),
		'priority'    => 24,
	) );

	$font_choices = array(
		'' => 'No Fonts',
		'Kaushan Script:' => 'Kaushan Script',
		'Emilys Candy:' => 'Emilys Candy',
		'Poppins:0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900' => 'Poppins',
		'Source Sans Pro:400,700,400italic,700italic' => 'Source Sans Pro',
		'Open Sans:400italic,700italic,400,700' => 'Open Sans',
		'Oswald:400,700' => 'Oswald',
		'Playfair Display:400,700,400italic' => 'Playfair Display',
		'Montserrat:400,700' => 'Montserrat',
		'Raleway:400,700' => 'Raleway',
		'Droid Sans:400,700' => 'Droid Sans',
		'Lato:400,700,400italic,700italic' => 'Lato',
		'Arvo:400,700,400italic,700italic' => 'Arvo',
		'Lora:400,700,400italic,700italic' => 'Lora',
		'Merriweather:400,300italic,300,400italic,700,700italic' => 'Merriweather',
		'Oxygen:400,300,700' => 'Oxygen',
		'PT Serif:400,700' => 'PT Serif',
		'PT Sans:400,700,400italic,700italic' => 'PT Sans',
		'PT Sans Narrow:400,700' => 'PT Sans Narrow',
		'Cabin:400,700,400italic' => 'Cabin',
		'Fjalla One:400' => 'Fjalla One',
		'Francois One:400' => 'Francois One',
		'Josefin Sans:400,300,600,700' => 'Josefin Sans',
		'Libre Baskerville:400,400italic,700' => 'Libre Baskerville',
		'Arimo:400,700,400italic,700italic' => 'Arimo',
		'Ubuntu:400,700,400italic,700italic' => 'Ubuntu',
		'Bitter:400,700,400italic' => 'Bitter',
		'Droid Serif:400,700,400italic,700italic' => 'Droid Serif',
		'Roboto:400,400italic,700,700italic' => 'Roboto',
		'Open Sans Condensed:700,300italic,300' => 'Open Sans Condensed',
		'Roboto Condensed:400italic,700italic,400,700' => 'Roboto Condensed',
		'Roboto Slab:400,700' => 'Roboto Slab',
		'Yanone Kaffeesatz:400,700' => 'Yanone Kaffeesatz',
		'Rokkitt:400' => 'Rokkitt',
	);

	$wp_customize->add_setting( 'cooking_classes_headings_fonts', array(
		'sanitize_callback' => 'cooking_classes_sanitize_fonts',
	));
	$wp_customize->add_control( 'cooking_classes_headings_fonts', array(
		'type' => 'select',
		'description' => __('Select your desired font for the headings.', 'cooking-classes'),
		'section' => 'cooking_classes_google_fonts_section',
		'choices' => $font_choices
	));

	$wp_customize->add_setting( 'cooking_classes_body_fonts', array(
		'sanitize_callback' => 'cooking_classes_sanitize_fonts'
	));
	$wp_customize->add_control( 'cooking_classes_body_fonts', array(
		'type' => 'select',
		'description' => __( 'Select your desired font for the body.', 'cooking-classes' ),
		'section' => 'cooking_classes_google_fonts_section',
		'choices' => $font_choices
	));

	// Home Category Dropdown Section
	$wp_customize->add_section('cooking_classes_one_cols_section',array(
		'title'	=> __('Manage Slider Section','cooking-classes'),
		'description'	=> __('<p class="sec-title">Manage Slider Section</p> Select Category from the Dropdowns for slider, Also use the given image dimension (1600 x 850).','cooking-classes'),
		'priority'	=> null,
		'panel' => 'cooking_classes_panel_area'
	));

	//Hide Section
	$wp_customize->add_setting('cooking_classes_hide_categorysec',array(
		'default' => false,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_hide_categorysec', array(
	   'settings' => 'cooking_classes_hide_categorysec',
	   'section'   => 'cooking_classes_one_cols_section',
	   'label'     => __('Check To Enable This Section','cooking-classes'),
	   'type'      => 'checkbox'
	));

	// Add a category dropdown Slider Coloumn
	$wp_customize->add_setting( 'cooking_classes_slidersection', array(
		'default'	=> '0',
		'sanitize_callback'	=> 'absint'
	) );
	$wp_customize->add_control( new Cooking_Classes_Category_Dropdown_Custom_Control( $wp_customize, 'cooking_classes_slidersection', array(
		'section' => 'cooking_classes_one_cols_section',
		'label'     => __('Select Category to Display Slider','cooking-classes'),
		'settings'   => 'cooking_classes_slidersection',
	) ) );

	$wp_customize->add_setting('cooking_classes_button_text',array(
		'default' => 'Read More',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_button_text', array(
	   'settings' => 'cooking_classes_button_text',
	   'section'   => 'cooking_classes_one_cols_section',
	   'label' => __('Add Button Text 1', 'cooking-classes'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('cooking_classes_button_link_slider',array(
        'default'=> '',
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('cooking_classes_button_link_slider',array(
        'label' => esc_html__('Add Button 1 URL','cooking-classes'),
        'section'=> 'cooking_classes_one_cols_section',
        'type'=> 'url'
    ));

	$wp_customize->add_setting('cooking_classes_button2_text',array(
		'default' => 'Contact Us',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_button2_text', array(
	   'settings' => 'cooking_classes_button2_text',
	   'section'   => 'cooking_classes_one_cols_section',
	   'label' => __('Add Button 2 Text', 'cooking-classes'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('cooking_classes_button2_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_button2_url', array(
	   'settings' => 'cooking_classes_button2_url',
	   'section'   => 'cooking_classes_one_cols_section',
	   'label' => __('Add Button 2 URL', 'cooking-classes'),
	   'type'      => 'url'
	));

	//Slider height
    $wp_customize->add_setting('cooking_classes_slider_img_height',array(
        'default'=> '',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('cooking_classes_slider_img_height',array(
        'label' => __('Slider Image Height','cooking-classes'),
        'description'   => __('Add the slider image height here (eg. 600px)','cooking-classes'),
        'input_attrs' => array(
            'placeholder' => __( '500px', 'cooking-classes' ),
        ),
        'section'=> 'cooking_classes_one_cols_section',
        'type'=> 'text'
    ));
	
	// color slider title
	$wp_customize->add_setting('cooking_classes_slidertitle_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_slidertitle_color', array(
	   'settings' => 'cooking_classes_slidertitle_color',
	   'section'   => 'cooking_classes_one_cols_section',
	   'label' => __('Title Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// color slider description
	$wp_customize->add_setting('cooking_classes_sliderdescription_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_sliderdescription_color', array(
	   'settings' => 'cooking_classes_sliderdescription_color',
	   'section'   => 'cooking_classes_one_cols_section',
	   'label' => __('Description Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// color slider button1 text
	$wp_customize->add_setting('cooking_classes_sliderbutton1text_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_sliderbutton1text_color', array(
	   'settings' => 'cooking_classes_sliderbutton1text_color',
	   'section'   => 'cooking_classes_one_cols_section',
	   'label' => __('Button 1 Text Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// color slider button1
	$wp_customize->add_setting('cooking_classes_sliderbutton1_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_sliderbutton1_color', array(
	   'settings' => 'cooking_classes_sliderbutton1_color',
	   'section'   => 'cooking_classes_one_cols_section',
	   'label' => __('Button 1 Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// color slider button2 text
	$wp_customize->add_setting('cooking_classes_sliderbutton2text_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_sliderbutton2text_color', array(
	   'settings' => 'cooking_classes_sliderbutton2text_color',
	   'section'   => 'cooking_classes_one_cols_section',
	   'label' => __('Button 2 Text Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// color slider button2
	$wp_customize->add_setting('cooking_classes_sliderbutton2_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_sliderbutton2_color', array(
	   'settings' => 'cooking_classes_sliderbutton2_color',
	   'section'   => 'cooking_classes_one_cols_section',
	   'label' => __('Button 2 Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting( 'cooking_classes_slider_settings_upgraded_features',array(
	  'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_slider_settings_upgraded_features', array(
	    'type'=> 'hidden',
	    'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
	        <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/cooking-wordpress-theme') ." '>Upgrade to Pro</a></span>",
	    'section' => 'cooking_classes_one_cols_section'
	));

	// Services Section
	$wp_customize->add_section('cooking_classes_below_slider_section', array(
		'title'	=> __('Manage Services Section','cooking-classes'),
		'description'	=> __('<p class="sec-title">Manage Services Section</p>  Select Pages from the dropdown for Services.','cooking-classes'),
		'priority'	=> null,
		'panel' => 'cooking_classes_panel_area',
	));

	$wp_customize->add_setting('cooking_classes_disabled_pgboxes',array(
		'default' => false,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_disabled_pgboxes', array(
	   'settings' => 'cooking_classes_disabled_pgboxes',
	   'section'   => 'cooking_classes_below_slider_section',
	   'label'     => __('Check To Enable This Section','cooking-classes'),
	   'type'      => 'checkbox'
	));

	// Add a category dropdown Slider Coloumn
	$wp_customize->add_setting( 'cooking_classes_services_cat', array(
		'default'	=> '0',
		'sanitize_callback'	=> 'absint'
	) );
	$wp_customize->add_control( new Cooking_Classes_Category_Dropdown_Custom_Control( $wp_customize, 'cooking_classes_services_cat', array(
		'section' => 'cooking_classes_below_slider_section',
		'label'     => __('Select Category to Display Services','cooking-classes'),
		'settings'   => 'cooking_classes_services_cat',
	) ) );

	$wp_customize->add_setting('cooking_classes_service_heading',array(
		'default' => 'POPULAR CLASSES',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_service_heading', array(
	   'settings' => 'cooking_classes_service_heading',
	   'section'   => 'cooking_classes_below_slider_section',
	   'label' => __('Heading', 'cooking-classes'),
	   'type'      => 'text'
	));

	//  service heading color
	$wp_customize->add_setting('cooking_classes_serviceheading_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_serviceheading_color', array(
	   'settings' => 'cooking_classes_serviceheading_color',
	   'section'   => 'cooking_classes_below_slider_section',
	   'label' => __('Heading Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	//  service headingborder color
	$wp_customize->add_setting('cooking_classes_serviceheadingborder_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_serviceheadingborder_color', array(
	   'settings' => 'cooking_classes_serviceheadingborder_color',
	   'section'   => 'cooking_classes_below_slider_section',
	   'label' => __('Heading Border Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	//  service title color
	$wp_customize->add_setting('cooking_classes_servicetitle_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_servicetitle_color', array(
	   'settings' => 'cooking_classes_servicetitle_color',
	   'section'   => 'cooking_classes_below_slider_section',
	   'label' => __('Title Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	//  service description color
	$wp_customize->add_setting('cooking_classes_servicedescription_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_servicedescription_color', array(
	   'settings' => 'cooking_classes_servicedescription_color',
	   'section'   => 'cooking_classes_below_slider_section',
	   'label' => __('Description Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('cooking_classes_servicebutton_text',array(
		'default' => 'LEARN MORE',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_servicebutton_text', array(
	   'settings' => 'cooking_classes_servicebutton_text',
	   'section'   => 'cooking_classes_below_slider_section',
	   'label' => __('Add Button Text', 'cooking-classes'),
	   'type'      => 'text'
	));

	// color service button text
	$wp_customize->add_setting('cooking_classes_servicebuttontext_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_servicebuttontext_color', array(
	   'settings' => 'cooking_classes_servicebuttontext_color',
	   'section'   => 'cooking_classes_below_slider_section',
	   'label' => __('Button Text Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	// color service button
	$wp_customize->add_setting('cooking_classes_servicebutton_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_servicebutton_color', array(
	   'settings' => 'cooking_classes_servicebutton_color',
	   'section'   => 'cooking_classes_below_slider_section',
	   'label' => __('Button Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting( 'cooking_classes_secondsec_settings_upgraded_features',array(
	  'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_secondsec_settings_upgraded_features', array(
	  'type'=> 'hidden',
	  'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
	      <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/cooking-wordpress-theme') ." '>Upgrade to Pro</a></span>",
	  'section' => 'cooking_classes_below_slider_section'
	));

	//Blog post
	$wp_customize->add_section('cooking_classes_blog_post_settings',array(
        'title' => __('Manage Post Section', 'cooking-classes'),
        'priority' => null,
        'panel' => 'cooking_classes_panel_area'
    ) );

	// Layouts Post
	$wp_customize->add_setting(
		'cooking_classes_blog_layout_option_setting',
		array(
			'default'           => 'Left',
			'sanitize_callback' => 'cooking_classes_sanitize_choices',
		)
	);

	$wp_customize->add_control(
		new Cooking_Classes_Image_Radio_Control(
			$wp_customize,
			'cooking_classes_blog_layout_option_setting',
			array(
				'label'   => __( 'Post Layouts', 'cooking-classes' ),
				'section' => 'cooking_classes_blog_post_settings',
				'choices' => array(
					'Left' => get_template_directory_uri() . '/images/layout-1.png',
					'Center'    => get_template_directory_uri() . '/images/layout-2.png',
					'Right'   => get_template_directory_uri() . '/images/layout-3.png',
				),
			)
		)
	);

	$wp_customize->add_setting('cooking_classes_metafields_date', array(
	    'default' => true,
	    'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
	));
	$wp_customize->add_control('cooking_classes_metafields_date', array(
	    'settings' => 'cooking_classes_metafields_date', 
	    'section'   => 'cooking_classes_blog_post_settings',
	    'label'     => __('Check to Enable Date', 'cooking-classes'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('cooking_classes_metafields_comments', array(
		'default' => true,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
	));	
	$wp_customize->add_control('cooking_classes_metafields_comments', array(
		'settings' => 'cooking_classes_metafields_comments',
		'section'  => 'cooking_classes_blog_post_settings',
		'label'    => __('Check to Enable Comments', 'cooking-classes'),
		'type'     => 'checkbox',
	));

	$wp_customize->add_setting('cooking_classes_metafields_author', array(
		'default' => true,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
	));
	$wp_customize->add_control('cooking_classes_metafields_author', array(
		'settings' => 'cooking_classes_metafields_author',
		'section'  => 'cooking_classes_blog_post_settings',
		'label'    => __('Check to Enable Author', 'cooking-classes'),
		'type'     => 'checkbox',
	));		

	$wp_customize->add_setting('cooking_classes_metafields_time', array(
		'default' => true,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
	));
	$wp_customize->add_control('cooking_classes_metafields_time', array(
		'settings' => 'cooking_classes_metafields_time',
		'section'  => 'cooking_classes_blog_post_settings',
		'label'    => __('Check to Enable Time', 'cooking-classes'),
		'type'     => 'checkbox',
	));	

	$wp_customize->add_setting('cooking_classes_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','cooking-classes'),
		'description' => __('Ex: "/", "|", "-", ...','cooking-classes'),
		'section' => 'cooking_classes_blog_post_settings'
	)); 

   // Add Settings and Controls for Post Layout
	$wp_customize->add_setting('cooking_classes_sidebar_post_layout',array(
		'default' => 'right',
		'sanitize_callback' => 'cooking_classes_sanitize_choices'
	));
	$wp_customize->add_control('cooking_classes_sidebar_post_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Post Sidebar Position', 'cooking-classes'),
		'description'   => __('This option work for blog page, archive page and search page.', 'cooking-classes'),
		'section' => 'cooking_classes_blog_post_settings',
		'choices' => array(
			'left' => __('Left','cooking-classes'),
			'right' => __('Right','cooking-classes'),
			'three-column' => __('Three Columns','cooking-classes'),
			'four-column' => __('Four Columns','cooking-classes'),
			'grid' => __('Grid Layout','cooking-classes'),
			'full' => __('No Sidebar','cooking-classes')
     ),
	) );

	$wp_customize->add_setting('cooking_classes_blog_post_description_option',array(
    	'default'   => 'Full Content', 
        'sanitize_callback' => 'cooking_classes_sanitize_choices'
	));
	$wp_customize->add_control('cooking_classes_blog_post_description_option',array(
        'type' => 'radio',
        'label' => __('Post Description Length','cooking-classes'),
        'section' => 'cooking_classes_blog_post_settings',
        'choices' => array(
            'No Content' => __('No Content','cooking-classes'),
            'Excerpt Content' => __('Excerpt Content','cooking-classes'),
            'Full Content' => __('Full Content','cooking-classes'),
        ),
	) );

	$wp_customize->add_setting('cooking_classes_blog_post_thumb',array(
        'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
        'default'           => 1,
    ));
    $wp_customize->add_control('cooking_classes_blog_post_thumb',array(
        'type'        => 'checkbox',
        'label'       => esc_html__('Show / Hide Blog Post Thumbnail', 'cooking-classes'),
        'section'     => 'cooking_classes_blog_post_settings',
    ));

	$wp_customize->add_setting( 'cooking_classes_post_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_post_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
			<a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/cooking-wordpress-theme') ." '>Upgrade to Pro</a></span>",
		'section' => 'cooking_classes_blog_post_settings'
	));

	//Single Post Settings
	$wp_customize->add_section('cooking_classes_single_post_settings',array(
		'title' => __('Manage Single Post Section', 'cooking-classes'),
		'priority' => null,
		'panel' => 'cooking_classes_panel_area'
	));

	$wp_customize->add_setting('cooking_classes_single_post_date',array(
		'default' => true,
		'sanitize_callback'	=> 'cooking_classes_sanitize_checkbox'
	));
	$wp_customize->add_control('cooking_classes_single_post_date',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Date ','cooking-classes'),
		'section' => 'cooking_classes_single_post_settings'
	));	

	$wp_customize->add_setting('cooking_classes_single_post_author',array(
		'default' => true,
		'sanitize_callback'	=> 'cooking_classes_sanitize_checkbox'
	));
	$wp_customize->add_control('cooking_classes_single_post_author',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Author','cooking-classes'),
		'section' => 'cooking_classes_single_post_settings'
	));

	$wp_customize->add_setting('cooking_classes_single_post_comment',array(
		'default' => true,
		'sanitize_callback'	=> 'cooking_classes_sanitize_checkbox'
	));
	$wp_customize->add_control('cooking_classes_single_post_comment',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Comments','cooking-classes'),
		'section' => 'cooking_classes_single_post_settings'
	));	

	$wp_customize->add_setting('cooking_classes_single_post_time',array(
		'default' => true,
		'sanitize_callback'	=> 'cooking_classes_sanitize_checkbox'
	));
	$wp_customize->add_control('cooking_classes_single_post_time',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Time','cooking-classes'),
		'section' => 'cooking_classes_single_post_settings'
	));	

	$wp_customize->add_setting('cooking_classes_single_post_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_single_post_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','cooking-classes'),
		'description' => __('Ex: "/", "|", "-", ...','cooking-classes'),
		'section' => 'cooking_classes_single_post_settings'
	)); 

	$wp_customize->add_setting('cooking_classes_sidebar_single_post_layout',array(
    	'default' => 'right',
    	 'sanitize_callback' => 'cooking_classes_sanitize_choices'
	));
	$wp_customize->add_control('cooking_classes_sidebar_single_post_layout',array(
   		'type' => 'radio',
    	'label'     => __('Single post sidebar layout', 'cooking-classes'),
     	'section' => 'cooking_classes_single_post_settings',
     	'choices' => array(
			'left' => __('Left','cooking-classes'),
			'right' => __('Right','cooking-classes'),
			'full' => __('No Sidebar','cooking-classes')
     ),
	));

	$wp_customize->add_setting( 'cooking_classes_single_post_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_single_post_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/cooking-wordpress-theme') ." '>Upgrade to Pro</a></span>",
		'section' => 'cooking_classes_single_post_settings'
	)); 

	//Page Settings
	$wp_customize->add_section('cooking_classes_page_settings',array(
		'title' => __('Manage Page Section', 'cooking-classes'),
		'priority' => null,
		'panel' => 'cooking_classes_panel_area'
	));

	// Add Settings and Controls for Page Layout
	$wp_customize->add_setting('cooking_classes_sidebar_page_layout',array(
		'default' => 'full',
			'sanitize_callback' => 'cooking_classes_sanitize_choices'
	));
	$wp_customize->add_control('cooking_classes_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'cooking-classes'),
		'section' => 'cooking_classes_page_settings',
		'choices' => array(
			'left' => __('Left','cooking-classes'),
			'right' => __('Right','cooking-classes'),
			'full' => __('No Sidebar','cooking-classes')
		),
	));	

	// 404 Page Settings
	$wp_customize->add_section('cooking_classes_page_not_found', array(
		'title'	=> __('Manage 404 Page Section','cooking-classes'),
		'priority'	=> null,
		'panel' => 'cooking_classes_panel_area',
	));

	$wp_customize->add_setting('cooking_classes_page_not_found_heading',array(
		'default'=> __('404 Not Found','cooking-classes'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_page_not_found_heading',array(
		'label'	=> __('404 Heading','cooking-classes'),
		'section'=> 'cooking_classes_page_not_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('cooking_classes_page_not_found_content',array(
		'default'=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));

	$wp_customize->add_control('cooking_classes_page_not_found_content',array(
		'label'	=> __('404 Text','cooking-classes'),
		'input_attrs' => array(
			'placeholder' => __( 'Looks like you have taken a wrong turn.....Don\'t worry... it happens to the best of us.', 'cooking-classes' ),
		),
		'section'=> 'cooking_classes_page_not_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('cooking_classes_page_not_found_btn',array(
		'default' => 'Homepage',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_page_not_found_btn', array(
	   'settings' => 'cooking_classes_page_not_found_btn',
	   'section'   => 'cooking_classes_page_not_found',
	   'label' => __('404 Button', 'cooking-classes'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting( 'cooking_classes_page_not_found_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_page_not_found_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
			<a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/cooking-wordpress-theme') ." '>Upgrade to Pro</a></span>",
		'section' => 'cooking_classes_page_not_found'
	));

	// Animation Section
	$wp_customize->add_section('cooking_classes_animation', array(
		'title'	=> __('Manage Animation Section','cooking-classes'),
		'description'	=> __('<p class="sec-title">Manage Animation Section</p>','cooking-classes'),
		'priority'	=> null,
		'panel' => 'cooking_classes_panel_area',
	));

	$wp_customize->add_setting('cooking_classes_animation_enabled',array(
		'default' => true,
		'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_animation_enabled', array(
	   'settings' => 'cooking_classes_animation_enabled',
	   'section'   => 'cooking_classes_animation',
	   'label'     => __('Check To Enable Animation','cooking-classes'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting( 'cooking_classes_animation_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_animation_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		<a target='_blank' href='". esc_url(COOKING_CLASSES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'cooking_classes_animation'
	));

	// Footer Section
	$wp_customize->add_section('cooking_classes_footer', array(
		'title'	=> __('Manage Footer Section','cooking-classes'),
		'description'	=> __('<p class="sec-title">Manage Footer Section</p>','cooking-classes'),
		'priority'	=> null,
		'panel' => 'cooking_classes_panel_area',
	));

	$wp_customize->add_setting('cooking_classes_footer_widget', array(
	    'default' => true,
	    'sanitize_callback' => 'cooking_classes_sanitize_checkbox',
	));
	$wp_customize->add_control('cooking_classes_footer_widget', array(
	    'settings' => 'cooking_classes_footer_widget', // Corrected setting name
	    'section'   => 'cooking_classes_footer',
	    'label'     => __('Check to Enable Footer Widget', 'cooking-classes'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('cooking_classes_footer_bg_image',array(
        'default'   => '',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'cooking_classes_footer_bg_image',array(
        'label' => __('Footer Background Image','cooking-classes'),
        'section' => 'cooking_classes_footer',
    )));

	$wp_customize->add_setting('cooking_classes_footer_img_position',array(
		'default' => 'center center',
		'transport' => 'refresh',
		'sanitize_callback' => 'cooking_classes_sanitize_choices'
	));
	$wp_customize->add_control('cooking_classes_footer_img_position',array(
		'type' => 'select',
		'label' => __('Footer Image Position','cooking-classes'),
		'section' => 'cooking_classes_footer',
		'choices' 	=> array(
			'center center'   => esc_html__( 'Center', 'cooking-classes' ),
			'center top'   => esc_html__( 'Top', 'cooking-classes' ),
			'left center'   => esc_html__( 'Left', 'cooking-classes' ),
			'right center'   => esc_html__( 'Right', 'cooking-classes' ),
			'center bottom'   => esc_html__( 'Bottom', 'cooking-classes' ),
		),
	));	

	$wp_customize->add_setting('cooking_classes_footer_img_position',array(
		'default' => 'center center',
		'transport' => 'refresh',
		'sanitize_callback' => 'cooking_classes_sanitize_choices'
	));
	$wp_customize->add_control('cooking_classes_footer_img_position',array(
		'type' => 'select',
		'label' => __('Footer Image Position','cooking-classes'),
		'section' => 'cooking_classes_footer',
		'choices' 	=> array(
			'center center'   => esc_html__( 'Center', 'cooking-classes' ),
			'center top'   => esc_html__( 'Top', 'cooking-classes' ),
			'left center'   => esc_html__( 'Left', 'cooking-classes' ),
			'right center'   => esc_html__( 'Right', 'cooking-classes' ),
			'center bottom'   => esc_html__( 'Bottom', 'cooking-classes' ),
		),
	));	

	$wp_customize->add_setting('cooking_classes_copyright_line',array(
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'cooking_classes_copyright_line', array(
	   'section' 	=> 'cooking_classes_footer',
	   'label'	 	=> __('Copyright Line','cooking-classes'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	$wp_customize->add_setting('cooking_classes_copyright_link',array(
    	'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'cooking_classes_copyright_link', array(
	   'section' 	=> 'cooking_classes_footer',
	   'label'	 	=> __('Copyright Link','cooking-classes'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	//  footer bg color
	$wp_customize->add_setting('cooking_classes_footerbg_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_footerbg_color', array(
		'settings' => 'cooking_classes_footerbg_color',
		'section'   => 'cooking_classes_footer',
		'label' => __('BG Color', 'cooking-classes'),
		'type'      => 'color'
	));

	//  footer coyprighthrv color
	$wp_customize->add_setting('cooking_classes_footercoyprighthrv_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_footercoyprighthrv_color', array(
	   'settings' => 'cooking_classes_footercoyprighthrv_color',
	   'section'   => 'cooking_classes_footer',
	   'label' => __('Coypright Hover Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	//  footer title color
	$wp_customize->add_setting('cooking_classes_footertitle_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_footertitle_color', array(
	   'settings' => 'cooking_classes_footertitle_color',
	   'section'   => 'cooking_classes_footer',
	   'label' => __('Title Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	//  footer list color
	$wp_customize->add_setting('cooking_classes_footerlist_color',array(
		'default' => '',
		'sanitize_callback' => 'cooking_classes_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_footerlist_color', array(
	   'settings' => 'cooking_classes_footerlist_color',
	   'section'   => 'cooking_classes_footer',
	   'label' => __('List Color', 'cooking-classes'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('cooking_classes_scroll_hide', array(
        'default' => true,
        'sanitize_callback' => 'cooking_classes_sanitize_checkbox'
    ));
    $wp_customize->add_control( new WP_Customize_Control($wp_customize,'cooking_classes_scroll_hide',array(
        'label'          => __( 'Check To Show Scroll To Top', 'cooking-classes' ),
        'section'        => 'cooking_classes_footer',
        'settings'       => 'cooking_classes_scroll_hide',
        'type'           => 'checkbox',
    )));

    $wp_customize->add_setting('cooking_classes_scroll_position',array(
        'default' => 'Right',
        'sanitize_callback' => 'cooking_classes_sanitize_choices'
    ));
    $wp_customize->add_control('cooking_classes_scroll_position',array(
        'type' => 'radio',
        'section' => 'cooking_classes_footer',
        'label'	 	=> __('Scroll To Top Positions','cooking-classes'),
        'choices' => array(
            'Right' => __('Right','cooking-classes'),
            'Left' => __('Left','cooking-classes'),
            'Center' => __('Center','cooking-classes')
        ),
    ) );

	$wp_customize->add_setting('cooking_classes_scroll_text',array(
		'default'	=> __('TOP','cooking-classes'),
		'sanitize_callback'	=> 'sanitize_text_field',
	));	
	$wp_customize->add_control('cooking_classes_scroll_text',array(
		'label'	=> __('Scroll To Top Button Text','cooking-classes'),
		'section'	=> 'cooking_classes_footer',
		'type'		=> 'text'
	));

	$wp_customize->add_setting( 'cooking_classes_scroll_top_shape', array(
		'default'           => 'circle',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'cooking_classes_scroll_top_shape', array(
		'label'    => __( 'Scroll to Top Button Shape', 'cooking-classes' ),
		'section'  => 'cooking_classes_footer',
		'settings' => 'cooking_classes_scroll_top_shape',
		'type'     => 'radio',
		'choices'  => array(
			'box'        => __( 'Box', 'cooking-classes' ),
			'curved' => __( 'Curved', 'cooking-classes'),
			'circle'     => __( 'Circle', 'cooking-classes' ),
		),
	));

	$wp_customize->add_setting('cooking_classes_footer_widget_areas',array(
		'default'           => 4,
		'sanitize_callback' => 'cooking_classes_sanitize_choices',
	));
	$wp_customize->add_control('cooking_classes_footer_widget_areas',array(
		'type'        => 'radio',
		'section' => 'cooking_classes_footer',
		'label'       => __('Footer widget area', 'cooking-classes'),
		'choices' => array(
		   '1'     => __('One', 'cooking-classes'),
		   '2'     => __('Two', 'cooking-classes'),
		   '3'     => __('Three', 'cooking-classes'),
		   '4'     => __('Four', 'cooking-classes')
		),
	));

    $wp_customize->add_setting( 'cooking_classes_footer_settings_upgraded_features',array(
	  'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_footer_settings_upgraded_features', array(
	    'type'=> 'hidden',
	    'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
	        <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/cooking-wordpress-theme') ." '>Upgrade to Pro</a></span>",
	    'section' => 'cooking_classes_footer'
	));

		// Footer Social Section
	$wp_customize->add_section('cooking_classes_footer_social_icons', array(
		'title'	=> __('Manage Footer Social Section','cooking-classes'),
		'description'	=> __('<p class="sec-title">Manage Footer Social Section</p>','cooking-classes'),
		'priority'	=> null,
		'panel' => 'cooking_classes_panel_area',
	));

	$wp_customize->add_setting('cooking_classes_footer_facebook_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_footer_facebook_link', array(
	   'settings' => 'cooking_classes_footer_facebook_link',
	   'section'   => 'cooking_classes_footer_social_icons',
	   'label' => __('Facebook Link', 'cooking-classes'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('cooking_classes_footer_twitter_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_footer_twitter_link', array(
	   'settings' => 'cooking_classes_footer_twitter_link',
	   'section'   => 'cooking_classes_footer_social_icons',
	   'label' => __('Twitter Link', 'cooking-classes'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('cooking_classes_footer_instagram_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'cooking_classes_footer_instagram_link', array(
	   'settings' => 'cooking_classes_footer_instagram_link',
	   'section'   => 'cooking_classes_footer_social_icons',
	   'label' => __('Instagram Link', 'cooking-classes'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting( 'cooking_classes_footer_social_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('cooking_classes_footer_social_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/cooking-wordpress-theme') ." '>Upgrade to Pro</a></span>",
		'section' => 'cooking_classes_footer_social_icons'
	));

}
add_action( 'customize_register', 'cooking_classes_customize_register' );

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function cooking_classes_customize_preview_js() {
	wp_enqueue_script( 'cooking_classes_customizer', get_template_directory_uri(). '/js/customize-preview.js', array( 'customize-preview' ), '20161510', true );
}
add_action( 'customize_preview_init', 'cooking_classes_customize_preview_js' );
