<?php
/**
 * Mediquip Plus Theme Customizer
 *
 * @package Mediquip Plus
 */

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

	function mediquip_plus_sanitize_checkbox( $checked ) {
		// Boolean check.
		return ( ( isset( $checked ) && true == $checked ) ? true : false );
	}

	function mediquip_plus_sanitize_phone_number( $phone ) {
		return preg_replace( '/[^\d+]/', '', $phone );
	}

	wp_enqueue_style('mediquip-plus-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';

	//Logo
    $wp_customize->add_setting('mediquip_plus_logo_width',array(
		'default'=> '',
		'transport' => 'refresh',
		'sanitize_callback' => 'mediquip_plus_sanitize_integer'
	));
	$wp_customize->add_control(new Mediquip_Plus_Slider_Custom_Control( $wp_customize, 'mediquip_plus_logo_width',array(
		'label'	=> esc_html__('Logo Width','mediquip-plus'),
		'section'=> 'title_tagline',
		'settings'=>'mediquip_plus_logo_width',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 100,
        ),
	)));

	$wp_customize->add_setting('mediquip_plus_title_enable',array(
		'default' => false,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mediquip_plus_title_enable', array(
	   'settings' => 'mediquip_plus_title_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Title','mediquip-plus'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting('mediquip_plus_tagline_enable',array(
		'default' => true,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mediquip_plus_tagline_enable', array(
	   'settings' => 'mediquip_plus_tagline_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Tagline','mediquip-plus'),
	   'type'      => 'checkbox'
	));

	// top header Site Title color	
	$wp_customize->add_setting('mediquip_plus_sitetitle_col',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_sitetitle_col', array(
	   'settings' => 'mediquip_plus_sitetitle_col',
	   'section'   => 'title_tagline',
	   'label' => __('Site Title', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// top header Site tagline color	
	$wp_customize->add_setting('mediquip_plus_sitetagline_col',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_sitetagline_col', array(
	   'settings' => 'mediquip_plus_sitetagline_col',
	   'section'   => 'title_tagline',
	   'label' => __('Site Tagline', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// woocommerce section
	$wp_customize->add_section('mediquip_plus_woocommerce_page_settings', array(
		'title'    => __('WooCommerce Page Settings', 'mediquip-plus'),
		'priority' => null,
		'panel'    => 'woocommerce',
	));

	$wp_customize->add_setting('mediquip_plus_shop_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'mediquip_plus_sanitize_checkbox'
	));
	$wp_customize->add_control('mediquip_plus_shop_page_sidebar',array(
		'type' => 'checkbox',
		'label' => __(' Check To Enable Shop page sidebar','mediquip-plus'),
		'section' => 'mediquip_plus_woocommerce_page_settings',
	));

    // shop page sidebar alignment
    $wp_customize->add_setting('mediquip_plus_shop_page_sidebar_position', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'mediquip_plus_sanitize_choices',
	));
	$wp_customize->add_control('mediquip_plus_shop_page_sidebar_position',array(
		'type'           => 'radio',
		'label'          => __('Shop Page Sidebar', 'mediquip-plus'),
		'section'        => 'mediquip_plus_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'mediquip-plus'),
			'Right Sidebar' => __('Right Sidebar', 'mediquip-plus'),
		),
	));	 

	$wp_customize->add_setting('mediquip_plus_wooproducts_nav',array(
		'default' => 'Yes',
		'sanitize_callback'	=> 'mediquip_plus_sanitize_choices'
	));
	$wp_customize->add_control('mediquip_plus_wooproducts_nav',array(
		'type' => 'select',
		'label' => __('Shop Page Products Navigation','mediquip-plus'),
		'choices' => array(
			 'Yes' => __('Yes','mediquip-plus'),
			 'No' => __('No','mediquip-plus'),
		 ),
		'section' => 'mediquip_plus_woocommerce_page_settings',
	));

	$wp_customize->add_setting( 'mediquip_plus_single_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'mediquip_plus_sanitize_checkbox'
    ) );
    $wp_customize->add_control('mediquip_plus_single_page_sidebar',array(
    	'type' => 'checkbox',
       	'label' => __('Check To Enable Single Product Page Sidebar','mediquip-plus'),
		'section' => 'mediquip_plus_woocommerce_page_settings'
    ));

	// single product page sidebar alignment
    $wp_customize->add_setting('mediquip_plus_single_product_page_layout', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'mediquip_plus_sanitize_choices',
	));
	$wp_customize->add_control('mediquip_plus_single_product_page_layout',array(
		'type'           => 'radio',
		'label'          => __('Single product Page Sidebar', 'mediquip-plus'),
		'section'        => 'mediquip_plus_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'mediquip-plus'),
			'Right Sidebar' => __('Right Sidebar', 'mediquip-plus'),
		),
	));

	$wp_customize->add_setting('mediquip_plus_related_product_enable',array(
		'default' => true,
		'sanitize_callback'	=> 'mediquip_plus_sanitize_checkbox'
	));
	$wp_customize->add_control('mediquip_plus_related_product_enable',array(
		'type' => 'checkbox',
		'label' => __('Check To Enable Related product','mediquip-plus'),
		'section' => 'mediquip_plus_woocommerce_page_settings',
	));

	$wp_customize->add_setting( 'mediquip_plus_woo_product_img_border_radius', array(
        'default'              => '0',
        'transport'            => 'refresh',
        'sanitize_callback'    => 'mediquip_plus_sanitize_integer'
    ) );
    $wp_customize->add_control(new Mediquip_Plus_Slider_Custom_Control( $wp_customize, 'mediquip_plus_woo_product_img_border_radius',array(
		'label'	=> esc_html__('Product Img Border Radius','mediquip-plus'),
		'section'=> 'mediquip_plus_woocommerce_page_settings',
		'settings'=>'mediquip_plus_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('mediquip_plus_products_per_row', array(
	  'default'   => '4',
	  'transport' => 'refresh',
	  'sanitize_callback' => 'mediquip_plus_sanitize_integer'
    ));
    $wp_customize->add_control('mediquip_plus_products_per_row', array(
	  'label'    => __('Products Per Row', 'mediquip-plus'),
	  'section'  => 'mediquip_plus_woocommerce_page_settings',
	  'settings' => 'mediquip_plus_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('mediquip_plus_products_per_page', array(
	  'default'   => '9',
	  'transport' => 'refresh',
	  'sanitize_callback' => 'mediquip_plus_sanitize_integer'
    ));
    $wp_customize->add_control('mediquip_plus_products_per_page', array(
	  'label'    => __('Products Per Page', 'mediquip-plus'),
	  'section'  => 'mediquip_plus_woocommerce_page_settings',
	  'settings' => 'mediquip_plus_products_per_page',
	  'type'     => 'number',
	  'input_attrs' => array(
		 'min'  => 1,
		 'step' => 1,
	  ),
    ));

    $wp_customize->add_setting('mediquip_plus_product_sale_position',array(
        'default' => 'Left',
        'sanitize_callback' => 'mediquip_plus_sanitize_choices'
	));
	$wp_customize->add_control('mediquip_plus_product_sale_position',array(
        'type' => 'radio',
        'label' => __('Product Sale Position','mediquip-plus'),
        'section' => 'mediquip_plus_woocommerce_page_settings',
        'choices' => array(
            'Left' => __('Left','mediquip-plus'),
            'Right' => __('Right','mediquip-plus'),
        ),
	) );  	

	//Theme Options
	$wp_customize->add_panel( 'mediquip_plus_panel_area', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'title' => __( 'Theme Options Panel', 'mediquip-plus' ),
	) );
	
	//Site Layout Section
	$wp_customize->add_section('mediquip_plus_site_layoutsec',array(
		'title'	=> __('Manage Site Layout Section','mediquip-plus'),
        'description' => __('<p class="sec-title">Manage Site Layout Section</p>','mediquip-plus'),
		'priority'	=> 1,
		'panel' => 'mediquip_plus_panel_area',
	));

	$wp_customize->add_setting('mediquip_plus_preloader',array(
		'default' => false,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));	 
	$wp_customize->add_control( 'mediquip_plus_preloader', array(
	   'section'   => 'mediquip_plus_site_layoutsec',
	   'label'	=> __('Check to Show preloader','mediquip-plus'),
	   'type'      => 'checkbox'
 	));	
	
	$wp_customize->add_setting('mediquip_plus_box_layout',array(
		'default' => false,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));	 
	$wp_customize->add_control( 'mediquip_plus_box_layout', array(
	   'section'   => 'mediquip_plus_site_layoutsec',
	   'label'	=> __('Check to Show Box Layout','mediquip-plus'),
	   'type'      => 'checkbox'
 	));

    // Add Settings and Controls for Page Layout
    $wp_customize->add_setting('mediquip_plus_sidebar_page_layout',array(
	  'default' => 'right',
	  'sanitize_callback' => 'mediquip_plus_sanitize_choices'
	));
	$wp_customize->add_control('mediquip_plus_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'mediquip-plus'),
		'section' => 'mediquip_plus_site_layoutsec',
		'choices' => array(
			'left' => __('Left','mediquip-plus'),
			'right' => __('Right','mediquip-plus'),
			'full' => __('No Sidebar','mediquip-plus'),
	),
	) );	

	$wp_customize->add_setting( 'mediquip_plus_layout_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_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/mediquip-plus') ." '>Upgrade to Pro</a></span>",
		'section' => 'mediquip_plus_site_layoutsec'
	));	

   //Global Color
   $wp_customize->add_section('mediquip_plus_global_color', array(
		'title'    => __('Manage Global Color Section', 'mediquip-plus'),
		'panel'    => 'mediquip_plus_panel_area',
	));

	$wp_customize->add_setting('mediquip_plus_first_color', array(
		'default'           => '#00467c',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'mediquip_plus_first_color', array(
		'label'    => __('Theme Color', 'mediquip-plus'),
		'section'  => 'mediquip_plus_global_color',
		'settings' => 'mediquip_plus_first_color',
	)));	

	$wp_customize->add_setting('mediquip_plus_second_color', array(
		'default'           => '#ff9f43',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'mediquip_plus_second_color', array(
		'label'    => __('Theme Color', 'mediquip-plus'),
		'section'  => 'mediquip_plus_global_color',
		'settings' => 'mediquip_plus_second_color',
	)));	

	$wp_customize->add_setting( 'mediquip_plus_global_color_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_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/mediquip-plus') ." '>Upgrade to Pro</a></span>",
		'section' => 'mediquip_plus_global_color'
	));		

 	//Header Section
	$wp_customize->add_section('mediquip_plus_header_info',array(
		'title'	=> __('Manage Header Section','mediquip-plus'),
        'description' => __('<p class="sec-title">Manage Header Section</p>','mediquip-plus'),
		'priority'	=> 1,
		'panel' => 'mediquip_plus_panel_area',
	));

	$wp_customize->add_setting('mediquip_plus_stickyheader',array(
		'default' => false,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mediquip_plus_stickyheader', array(
	   'section'   => 'mediquip_plus_header_info',
	   'label'	=> __('Check To Show Sticky Header','mediquip-plus'),
	   'type'      => 'checkbox'
 	));

 	$wp_customize->add_setting('mediquip_plus_search_option',array(
		'default' => false,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));	 
	$wp_customize->add_control( 'mediquip_plus_search_option', array(
	   'section'   => 'mediquip_plus_header_info',
	   'label'	=> __('Check to show Search','mediquip-plus'),
	   'type'      => 'checkbox'
 	)); 

	$wp_customize->add_setting('mediquip_plus_location_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_location_text', array(
	   'settings' => 'mediquip_plus_location_text',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Location Text', 'mediquip-plus'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('mediquip_plus_location',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_location', array(
	   'settings' => 'mediquip_plus_location',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Location', 'mediquip-plus'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('mediquip_plus_time_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_time_text', array(
	   'settings' => 'mediquip_plus_time_text',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Opening Time Text', 'mediquip-plus'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('mediquip_plus_time',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_time', array(
	   'settings' => 'mediquip_plus_time',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Opening Time', 'mediquip-plus'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('mediquip_plus_phone_number_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_phone_number_text', array(
	   'settings' => 'mediquip_plus_phone_number_text',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Phone Number Text', 'mediquip-plus'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('mediquip_plus_phone_number',array(
		'default' => '',
		'sanitize_callback' => 'mediquip_plus_sanitize_phone_number',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_phone_number', array(
	   'settings' => 'mediquip_plus_phone_number',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Phone Number', 'mediquip-plus'),
	   'type'      => 'text'
	));

 	// top header bg color	
	$wp_customize->add_setting('mediquip_plus_headertopbg_color',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_headertopbg_color', array(
	   'settings' => 'mediquip_plus_headertopbg_color',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Top BG Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// icon color	 
	$wp_customize->add_setting('mediquip_plus_headericon_color',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_headericon_color', array(
	   'settings' => 'mediquip_plus_headericon_color',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Icons Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// text color	
	$wp_customize->add_setting('mediquip_plus_headertext_color',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_headertext_color', array(
	   'settings' => 'mediquip_plus_headertext_color',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Texts Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// bottom header bg color	
	$wp_customize->add_setting('mediquip_plus_headerbtmbg_color',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_headerbtmbg_color', array(
	   'settings' => 'mediquip_plus_headerbtmbg_color',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Bottom BG Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// bottom menus color	
	$wp_customize->add_setting('mediquip_plus_menus_color',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_menus_color', array(
	   'settings' => 'mediquip_plus_menus_color',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Menus Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// bottom menushover color	
	$wp_customize->add_setting('mediquip_plus_menushover_color',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_menushover_color', array(
	   'settings' => 'mediquip_plus_menushover_color',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Menus Hover Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// bottom Submenu bg color	
	$wp_customize->add_setting('mediquip_plus_submenubg_color',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_submenubg_color', array(
	   'settings' => 'mediquip_plus_submenubg_color',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('SubMenu BG Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// bottom Submenu text color	
	$wp_customize->add_setting('mediquip_plus_submenu_text_color',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_submenu_text_color', array(
	   'settings' => 'mediquip_plus_submenu_text_color',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('SubMenu Text Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// bottom Phone text color	
	$wp_customize->add_setting('mediquip_plus_phonetxt_color',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_phonetxt_color', array(
	   'settings' => 'mediquip_plus_phonetxt_color',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Phone Text Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// bottom phone bg color	
	$wp_customize->add_setting('mediquip_plus_phonebg_color',array(
		'default' => '',
		'sanitize_callback' => 'mediquipplus_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_phonebg_color', array(
	   'settings' => 'mediquip_plus_phonebg_color',
	   'section'   => 'mediquip_plus_header_info',
	   'label' => __('Phone BG Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting( 'mediquip_plus_header_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_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/mediquip-plus') ." '>Upgrade to Pro</a></span>",
		'section' => 'mediquip_plus_header_info'
	));		

	// Home Category Dropdown Section
	$wp_customize->add_section('mediquip_plus_one_cols_section',array(
		'title'	=> __('Manage Slider Section','mediquip-plus'),
		'description'	=> __('<p class="sec-title">Manage Slider Section</p> Select Category from the Dropdowns for slider, Also use the given image dimension (1400 x 550).','mediquip-plus'),
		'priority'	=> null,
		'panel' => 'mediquip_plus_panel_area'
	));

	//Hide Section
	$wp_customize->add_setting('mediquip_plus_hide_categorysec',array(
		'default' => false,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));	 
	$wp_customize->add_control( 'mediquip_plus_hide_categorysec', array(
	   'settings' => 'mediquip_plus_hide_categorysec',
	   'section'   => 'mediquip_plus_one_cols_section',
	   'label'     => __('Check To Enable This Section','mediquip-plus'),
	   'type'      => 'checkbox'
	));

	// Add a category dropdown Slider Coloumn
	$wp_customize->add_setting( 'mediquip_plus_slidersection', array(
		'default'	=> '0',	
		'sanitize_callback'	=> 'absint'
	) );
	$wp_customize->add_control( new Mediquip_Plus_Category_Dropdown_Custom_Control( $wp_customize, 'mediquip_plus_slidersection', array(
		'section' => 'mediquip_plus_one_cols_section',
	   'label' => __('Select Category to display Slider', 'mediquip-plus'),
		'settings'   => 'mediquip_plus_slidersection',
	) ) );

	$wp_customize->add_setting('mediquip_plus_button_text',array(
		'default' => 'SHOP NOW',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_button_text', array(
	   'settings' => 'mediquip_plus_button_text',
	   'section'   => 'mediquip_plus_one_cols_section',
	   'label' => __('Add Button Text', 'mediquip-plus'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('mediquip_plus_button_link_slider',array(
        'default'=> '',
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('mediquip_plus_button_link_slider',array(
        'label' => esc_html__('Add Button Link','mediquip-plus'),
        'section'=> 'mediquip_plus_one_cols_section',
        'type'=> 'url'
    ));

    //Slider height
    $wp_customize->add_setting('mediquip_plus_slider_img_height',array(
        'default'=> '',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('mediquip_plus_slider_img_height',array(
        'label' => __('Slider Image Height','mediquip-plus'),
        'description'   => __('Add the slider image height here (eg. 600px)','mediquip-plus'),
        'input_attrs' => array(
            'placeholder' => __( '500px', 'mediquip-plus' ),
        ),
        'section'=> 'mediquip_plus_one_cols_section',
        'type'=> 'text'
    ));

    $wp_customize->add_setting( 'mediquip_plus_slider_settings_upgraded_features',array(
	  'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_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/mediquip-plus') ." '>Upgrade to Pro</a></span>",
	    'section' => 'mediquip_plus_one_cols_section'
	));
	
	// Facilities Section
	$wp_customize->add_section('mediquip_plus_two_cols_section',array(
		'title'	=> __('Manage Facilities Section','mediquip-plus'),
		'description'	=> __('<p class="sec-title">Manage Facilities Section</p> Select the post category to show hospital facilities.','mediquip-plus'),
		'priority'	=> null,
		'panel' => 'mediquip_plus_panel_area'
	));

	//Hide Section
	$wp_customize->add_setting('mediquip_plus_hidcatfacility',array(
		'default' => false,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));	 
	$wp_customize->add_control( 'mediquip_plus_hidcatfacility', array(
	   'settings' => 'mediquip_plus_hidcatfacility',
	   'section'   => 'mediquip_plus_two_cols_section',
	   'label'     => __('Check To Enable This Section','mediquip-plus'),
	   'type'      => 'checkbox'
	));
	
	$wp_customize->add_setting('mediquip_plus_section_title',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_section_title', array(
	   'settings' => 'mediquip_plus_section_title',
	   'section'   => 'mediquip_plus_two_cols_section',
	   'label'     => __('Add Section Title','mediquip-plus'),
	   'type'      => 'text'
	));

	// Add a category dropdown Slider Coloumn
	$wp_customize->add_setting( 'mediquip_plus_facilities_section', array(
		'default'	=> '0',	
		'sanitize_callback'	=> 'absint'
	));
	$wp_customize->add_control( new Mediquip_Plus_Category_Dropdown_Custom_Control( $wp_customize, 'mediquip_plus_facilities_section', array(
		'section' => 'mediquip_plus_two_cols_section',
	   'label' => __('Select Category to display Facilities', 'mediquip-plus'),
		'settings'   => 'mediquip_plus_facilities_section',
	)));

	$wp_customize->add_setting( 'mediquip_plus_secondsec_settings_upgraded_features',array(
	  'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_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/mediquip-plus') ." '>Upgrade to Pro</a></span>",
	  'section' => 'mediquip_plus_two_cols_section'
	));

	//Blog post
	$wp_customize->add_section('mediquip_plus_blog_post_settings',array(
        'title' => __('Manage Post Section', 'mediquip-plus'),
        'priority' => null,
        'panel' => 'mediquip_plus_panel_area'
    ) );

	$wp_customize->add_setting('mediquip_plus_metafields_date', array(
	    'default' => true,
	    'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));
	$wp_customize->add_control('mediquip_plus_metafields_date', array(
	    'settings' => 'mediquip_plus_metafields_date', 
	    'section'   => 'mediquip_plus_blog_post_settings',
	    'label'     => __('Check to Enable Date', 'mediquip-plus'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('mediquip_plus_metafields_comments', array(
		'default' => true,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));	
	$wp_customize->add_control('mediquip_plus_metafields_comments', array(
		'settings' => 'mediquip_plus_metafields_comments',
		'section'  => 'mediquip_plus_blog_post_settings',
		'label'    => __('Check to Enable Comments', 'mediquip-plus'),
		'type'     => 'checkbox',
	));

	$wp_customize->add_setting('mediquip_plus_metafields_author', array(
		'default' => true,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));
	$wp_customize->add_control('mediquip_plus_metafields_author', array(
		'settings' => 'mediquip_plus_metafields_author',
		'section'  => 'mediquip_plus_blog_post_settings',
		'label'    => __('Check to Enable Author', 'mediquip-plus'),
		'type'     => 'checkbox',
	));		

	$wp_customize->add_setting('mediquip_plus_metafields_time', array(
		'default' => true,
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));
	$wp_customize->add_control('mediquip_plus_metafields_time', array(
		'settings' => 'mediquip_plus_metafields_time',
		'section'  => 'mediquip_plus_blog_post_settings',
		'label'    => __('Check to Enable Time', 'mediquip-plus'),
		'type'     => 'checkbox',
	));	

	$wp_customize->add_setting('mediquip_plus_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','mediquip-plus'),
		'description' => __('Ex: "/", "|", "-", ...','mediquip-plus'),
		'section' => 'mediquip_plus_blog_post_settings'
	)); 

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

	$wp_customize->add_setting('mediquip_plus_blog_post_description_option',array(
    	'default'   => 'Full Content', 
        'sanitize_callback' => 'mediquip_plus_sanitize_choices'
	));
	$wp_customize->add_control('mediquip_plus_blog_post_description_option',array(
        'type' => 'radio',
        'label' => __('Post Description Length','mediquip-plus'),
        'section' => 'mediquip_plus_blog_post_settings',
        'choices' => array(
            'No Content' => __('No Content','mediquip-plus'),
            'Excerpt Content' => __('Excerpt Content','mediquip-plus'),
            'Full Content' => __('Full Content','mediquip-plus'),
        ),
	) );

	$wp_customize->add_setting('mediquip_plus_blog_post_thumb',array(
        'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
        'default'           => 1,
    ));
    $wp_customize->add_control('mediquip_plus_blog_post_thumb',array(
        'type'        => 'checkbox',
        'label'       => esc_html__('Show / Hide Blog Post Thumbnail', 'mediquip-plus'),
        'section'     => 'mediquip_plus_blog_post_settings',
    ));

    $wp_customize->add_setting( 'mediquip_plus_blog_post_page_image_box_shadow', array(
        'default'              => '0',
        'transport'            => 'refresh',
        'sanitize_callback'    => 'mediquip_plus_sanitize_integer'
    ) );
    $wp_customize->add_control(new Mediquip_Plus_Slider_Custom_Control( $wp_customize, 'mediquip_plus_blog_post_page_image_box_shadow',array(
		'label'	=> esc_html__('Blog Page Image Box Shadow','mediquip-plus'),
		'section'=> 'mediquip_plus_blog_post_settings',
		'settings'=>'mediquip_plus_blog_post_page_image_box_shadow',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 100,
        ),
	)));

	$wp_customize->add_setting( 'mediquip_plus_post_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_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/mediquip-plus') ." '>Upgrade to Pro</a></span>",
		'section' => 'mediquip_plus_blog_post_settings'
	));		
	
	//Single Post Settings
	$wp_customize->add_section('mediquip_plus_single_post_settings',array(
		'title' => __('Manage Single Post Section', 'mediquip-plus'),
		'priority' => null,
		'panel' => 'mediquip_plus_panel_area'
	));

	$wp_customize->add_setting( 'mediquip_plus_single_page_breadcrumb',array(
		'default' => true,
        'sanitize_callback'	=> 'mediquip_plus_sanitize_checkbox',
	));
	$wp_customize->add_control('mediquip_plus_single_page_breadcrumb',array(
       'section' => 'mediquip_plus_single_post_settings',
	   'label' => __( 'Check To Enable Breadcrumb','mediquip-plus' ),
	   'type' => 'checkbox'
    ));	

	$wp_customize->add_setting('mediquip_plus_single_post_date',array(
		'default' => true,
		'sanitize_callback'	=> 'mediquip_plus_sanitize_checkbox'
	));
	$wp_customize->add_control('mediquip_plus_single_post_date',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Date ','mediquip-plus'),
		'section' => 'mediquip_plus_single_post_settings'
	));	

	$wp_customize->add_setting('mediquip_plus_single_post_author',array(
		'default' => true,
		'sanitize_callback'	=> 'mediquip_plus_sanitize_checkbox'
	));
	$wp_customize->add_control('mediquip_plus_single_post_author',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Author','mediquip-plus'),
		'section' => 'mediquip_plus_single_post_settings'
	));

	$wp_customize->add_setting('mediquip_plus_single_post_comment',array(
		'default' => true,
		'sanitize_callback'	=> 'mediquip_plus_sanitize_checkbox'
	));
	$wp_customize->add_control('mediquip_plus_single_post_comment',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Comments','mediquip-plus'),
		'section' => 'mediquip_plus_single_post_settings'
	));	

	$wp_customize->add_setting('mediquip_plus_single_post_time',array(
		'default' => true,
		'sanitize_callback'	=> 'mediquip_plus_sanitize_checkbox'
	));
	$wp_customize->add_control('mediquip_plus_single_post_time',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Time','mediquip-plus'),
		'section' => 'mediquip_plus_single_post_settings'
	));	

	$wp_customize->add_setting('mediquip_plus_single_post_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_single_post_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','mediquip-plus'),
		'description' => __('Ex: "/", "|", "-", ...','mediquip-plus'),
		'section' => 'mediquip_plus_single_post_settings'
	)); 

	$wp_customize->add_setting('mediquip_plus_sidebar_single_post_layout',array(
    	'default' => 'right',
    	 'sanitize_callback' => 'mediquip_plus_sanitize_choices'
	));
	$wp_customize->add_control('mediquip_plus_sidebar_single_post_layout',array(
   		'type' => 'radio',
    	'label'     => __('Single post sidebar layout', 'mediquip-plus'),
     	'section' => 'mediquip_plus_single_post_settings',
     	'choices' => array(
			'left' => __('Left','mediquip-plus'),
			'right' => __('Right','mediquip-plus'),
			'full' => __('No Sidebar','mediquip-plus'),
     ),
	));

	$wp_customize->add_setting( 'mediquip_plus_single_post_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_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/mediquip-plus') ." '>Upgrade to Pro</a></span>",
		'section' => 'mediquip_plus_single_post_settings'
	)); 

	//Page Settings
	$wp_customize->add_section('mediquip_plus_page_settings',array(
		'title' => __('Manage Page Section', 'mediquip-plus'),
		'priority' => null,
		'panel' => 'mediquip_plus_panel_area'
	));

	// Add Settings and Controls for Page Layout
	$wp_customize->add_setting('mediquip_plus_sidebar_page_layout',array(
		'default' => 'full',
			'sanitize_callback' => 'mediquip_plus_sanitize_choices'
	));
	$wp_customize->add_control('mediquip_plus_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'mediquip-plus'),
		'section' => 'mediquip_plus_page_settings',
		'choices' => array(
			'left' => __('Left','mediquip-plus'),
			'right' => __('Right','mediquip-plus'),
			'full' => __('No Sidebar','mediquip-plus')
		),
	));		

	// 404 Page Settings
	$wp_customize->add_section('mediquip_plus_page_not_found', array(
		'title'	=> __('Manage 404 Page Section','mediquip-plus'),
		'priority'	=> null,
		'panel' => 'mediquip_plus_panel_area',
	));

	$wp_customize->add_setting('mediquip_plus_page_not_found_heading',array(
		'default'=> __('404 Not Found','mediquip-plus'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_page_not_found_heading',array(
		'label'	=> __('404 Heading','mediquip-plus'),
		'section'=> 'mediquip_plus_page_not_found',
		'type'=> 'text'
	));

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

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

	$wp_customize->add_setting( 'mediquip_plus_page_not_found_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_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(MEDIQUIP_PLUS_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'mediquip_plus_page_not_found'
	));

	// Footer Section 
	$wp_customize->add_section('mediquip_plus_footer', array(
		'title'	=> __('Manage Footer Section','mediquip-plus'),
		'description'	=> __('<p class="sec-title">Manage Footer Section</p>','mediquip-plus'),
		'priority'	=> null,
		'panel' => 'mediquip_plus_panel_area',
	));

	$wp_customize->add_setting('mediquip_plus_footer_widget', array(
	    'default' => true,
	    'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));
	$wp_customize->add_control('mediquip_plus_footer_widget', array(
	    'settings' => 'mediquip_plus_footer_widget', // Corrected setting name
	    'section'   => 'mediquip_plus_footer',
	    'label'     => __('Check to Enable Footer Widget', 'mediquip-plus'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('mediquip_plus_footer_bg_image',array(
        'default'   => '',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'mediquip_plus_footer_bg_image',array(
        'label' => __('Footer Background Image','mediquip-plus'),
        'section' => 'mediquip_plus_footer',
    )));

	$wp_customize->add_setting('mediquip_plus_copyright_line',array(
		'sanitize_callback' => 'sanitize_text_field',
	));	
	$wp_customize->add_control( 'mediquip_plus_copyright_line', array(
	   'section' 	=> 'mediquip_plus_footer',
	   'label'	 	=> __('Copyright Line','mediquip-plus'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	$wp_customize->add_setting('mediquip_plus_copyright_link',array(
    	'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'mediquip_plus_copyright_link', array(
	   'section' 	=> 'mediquip_plus_footer',
	   'label'	 	=> __('Copyright Link','mediquip-plus'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	// footer bg col
	$wp_customize->add_setting('mediquip_plus_footer_bg_col',array(
		'default' => '',
		'sanitize_callback' => 'esc_html',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_footer_bg_col', array(
		'settings' => 'mediquip_plus_footer_bg_col',
		'section'   => 'mediquip_plus_footer',
		'label' => __('BG Color', 'mediquip-plus'),
		'type'      => 'color'
	));

	// footer coypright col
	 $wp_customize->add_setting('mediquip_plus_footer_coypright_col',array(
		'default' => '',
		'sanitize_callback' => 'esc_html',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_footer_coypright_col', array(
	   'settings' => 'mediquip_plus_footer_coypright_col',
	   'section'   => 'mediquip_plus_footer',
	   'label' => __('Copyright Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// footer coyprighthover col
	$wp_customize->add_setting('mediquip_plus_footer_coyprighthover_col',array(
		'default' => '',
		'sanitize_callback' => 'esc_html',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_footer_coyprighthover_col', array(
	   'settings' => 'mediquip_plus_footer_coyprighthover_col',
	   'section'   => 'mediquip_plus_footer',
	   'label' => __('Copyright Hover Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// footer coyprightbg col
	$wp_customize->add_setting('mediquip_plus_footer_coyprightbg_col',array(
		'default' => '',
		'sanitize_callback' => 'esc_html',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_footer_coyprightbg_col', array(
	   'settings' => 'mediquip_plus_footer_coyprightbg_col',
	   'section'   => 'mediquip_plus_footer',
	   'label' => __('Copyright BG Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// footer heading col
	$wp_customize->add_setting('mediquip_plus_footer_heading_col',array(
		'default' => '',
		'sanitize_callback' => 'esc_html',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_footer_heading_col', array(
	   'settings' => 'mediquip_plus_footer_heading_col',
	   'section'   => 'mediquip_plus_footer',
	   'label' => __('Heading Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// footer text col
	$wp_customize->add_setting('mediquip_plus_footer_text_col',array(
		'default' => '',
		'sanitize_callback' => 'esc_html',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_footer_text_col', array(
	   'settings' => 'mediquip_plus_footer_text_col',
	   'section'   => 'mediquip_plus_footer',
	   'label' => __('Text Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// footer list col
	$wp_customize->add_setting('mediquip_plus_footer_list_col',array(
		'default' => '',
		'sanitize_callback' => 'esc_html',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_footer_list_col', array(
	   'settings' => 'mediquip_plus_footer_list_col',
	   'section'   => 'mediquip_plus_footer',
	   'label' => __('List Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

	// footer listhover col
	$wp_customize->add_setting('mediquip_plus_footer_listhover_col',array(
		'default' => '',
		'sanitize_callback' => 'esc_html',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mediquip_plus_footer_listhover_col', array(
	   'settings' => 'mediquip_plus_footer_listhover_col',
	   'section'   => 'mediquip_plus_footer',
	   'label' => __('List Hover Color', 'mediquip-plus'),
	   'type'      => 'color'
	));

    $wp_customize->add_setting('mediquip_plus_scroll_hide', array(
        'default' => true,
        'sanitize_callback' => 'mediquip_plus_sanitize_checkbox'
    ));
    $wp_customize->add_control( new WP_Customize_Control($wp_customize,'mediquip_plus_scroll_hide',array(
        'label'          => __( 'Check To Show Scroll To Top', 'mediquip-plus' ),
        'section'        => 'mediquip_plus_footer',
        'settings'       => 'mediquip_plus_scroll_hide',
        'type'           => 'checkbox',
    )));

    $wp_customize->add_setting('mediquip_plus_scroll_position',array(
        'default' => 'Right',
        'sanitize_callback' => 'mediquip_plus_sanitize_choices'
    ));
    $wp_customize->add_control('mediquip_plus_scroll_position',array(
        'type' => 'radio',
        'section' => 'mediquip_plus_footer',
        'label'	 	=> __('Scroll To Top Positions','mediquip-plus'),
        'choices' => array(
            'Right' => __('Right','mediquip-plus'),
            'Left' => __('Left','mediquip-plus'),
            'Center' => __('Center','mediquip-plus')
        ),
    ) );

	$wp_customize->add_setting('mediquip_plus_scroll_text',array(
		'default'	=> __('TOP','mediquip-plus'),
		'sanitize_callback'	=> 'sanitize_text_field',
	));	
	$wp_customize->add_control('mediquip_plus_scroll_text',array(
		'label'	=> __('Scroll To Top Button Text','mediquip-plus'),
		'section'	=> 'mediquip_plus_footer',
		'type'		=> 'text'
	));

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

	$wp_customize->add_setting('mediquip_plus_footer_widget_areas',array(
		'default'           => 4,
		'sanitize_callback' => 'mediquip_plus_sanitize_choices',
	));
	$wp_customize->add_control('mediquip_plus_footer_widget_areas',array(
		'type'        => 'radio',
		'section' => 'mediquip_plus_footer',
		'label'       => __('Footer widget area', 'mediquip-plus'),
		'choices' => array(
		   '1'     => __('One', 'mediquip-plus'),
		   '2'     => __('Two', 'mediquip-plus'),
		   '3'     => __('Three', 'mediquip-plus'),
		   '4'     => __('Four', 'mediquip-plus')
		),
	));

    $wp_customize->add_setting( 'mediquip_plus_footer_settings_upgraded_features',array(
	  'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mediquip_plus_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/mediquip-plus') ." '>Upgrade to Pro</a></span>",
	    'section' => 'mediquip_plus_footer'
	));

	$wp_customize->add_setting('mediquip_plus_woocommerce_sidebar_shop',array(
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mediquip_plus_woocommerce_sidebar_shop', array(
	   'section'   => 'woocommerce_product_catalog',
	   'description'  => __('Click on the check box to remove sidebar from shop page.','mediquip-plus'),
	   'label'	=> __('Shop Page Sidebar layout','mediquip-plus'),
	   'type'      => 'checkbox'
 	));

	$wp_customize->add_setting('mediquip_plus_woocommerce_sidebar_product',array(
		'sanitize_callback' => 'mediquip_plus_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mediquip_plus_woocommerce_sidebar_product', array(
	   'section'   => 'woocommerce_product_catalog',
	   'description'  => __('Click on the check box to remove sidebar from product page.','mediquip-plus'),
	   'label'	=> __('Product Page Sidebar layout','mediquip-plus'),
	   'type'      => 'checkbox'
 	));

      // Google Fonts
      $wp_customize->add_section( 'mediquip_plus_google_fonts_section', array(
		'title'       => __( 'Google Fonts', 'mediquip-plus' ),
		'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( 'mediquip_plus_headings_fonts', array(
		'sanitize_callback' => 'mediquip_plus_sanitize_fonts',
	  ));
	  $wp_customize->add_control( 'mediquip_plus_headings_fonts', array(
		'type' => 'select',
		'description' => __('Select your desired font for the headings.', 'mediquip-plus'),
		'section' => 'mediquip_plus_google_fonts_section',
		'choices' => $font_choices
	  ));
  
	  $wp_customize->add_setting( 'mediquip_plus_body_fonts', array(
		'sanitize_callback' => 'mediquip_plus_sanitize_fonts'
	  ));
	  $wp_customize->add_control( 'mediquip_plus_body_fonts', array(
		'type' => 'select',
		'description' => __( 'Select your desired font for the body.', 'mediquip-plus' ),
		'section' => 'mediquip_plus_google_fonts_section',
		'choices' => $font_choices
	  ));	


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

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