<?php
/**
 * Educational University Theme Customizer
 *
 * @package Educational University
 */

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

	function educational_university_sanitize_dropdown_pages( $page_id, $setting ) {
  		$page_id = absint( $page_id );
  		return ( 'publish' == get_post_status( $page_id ) ? $page_id : $setting->default );
	}

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

	wp_enqueue_style('educational-university-customize-controls', trailingslashit(esc_url(get_template_directory_uri())).'/css/customize-controls.css');

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

	// Enable / Disable Logo
	$wp_customize->add_setting('educational_university_logo_enable',array(
		'default' => true,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
	));
	$wp_customize->add_control( 'educational_university_logo_enable', array(
		'settings' => 'educational_university_logo_enable',
		'section'   => 'title_tagline',
		'label'     => __('Enable Logo','educational-university'),
		'type'      => 'checkbox'
	));

	//Logo
    $wp_customize->add_setting('educational_university_logo_width', array(
        'default' => 85,
        'transport' => 'refresh',
        'sanitize_callback' => 'educational_university_sanitize_integer'
    ));
    $wp_customize->add_control(new Educational_University_Slider_Custom_Control($wp_customize, 'educational_university_logo_width', array(
    	'label'          => __( 'Logo Width', 'educational-university'),
        'section' => 'title_tagline',
        'settings' => 'educational_university_logo_width',
        'input_attrs' => array(
            'step' => 1,
            'min' => 0,
            'max' => 300,
        ),
    )));

	// color site title
	$wp_customize->add_setting('educational_university_sitetitle_color',array(
		'default' => '',
		'sanitize_callback' => 'educational_university_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));

	$wp_customize->add_control( 'educational_university_sitetitle_color', array(
	   'settings' => 'educational_university_sitetitle_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Title Color', 'educational-university'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('educational_university_title_enable',array(
		'default' => false,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
	));
	$wp_customize->add_control( 'educational_university_title_enable', array(
	   'settings' => 'educational_university_title_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Title','educational-university'),
	   'type'      => 'checkbox'
	));

	// color site tagline
	$wp_customize->add_setting('educational_university_sitetagline_color',array(
		'default' => '',
		'sanitize_callback' => 'educational_university_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_sitetagline_color', array(
	   'settings' => 'educational_university_sitetagline_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Tagline Color', 'educational-university'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('educational_university_tagline_enable',array(
		'default' => false,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
	));
	$wp_customize->add_control( 'educational_university_tagline_enable', array(
	   'settings' => 'educational_university_tagline_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Tagline','educational-university'),
	   'type'      => 'checkbox'
	));

	// woocommerce section
	$wp_customize->add_section('educational_university_woocommerce_page_settings', array(
		'title'    => __('WooCommerce Page Settings', 'educational-university'),
		'priority' => null,
		'panel'    => 'woocommerce',
	));

	$wp_customize->add_setting('educational_university_shop_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'educational_university_sanitize_checkbox'
	 ));
	 $wp_customize->add_control('educational_university_shop_page_sidebar',array(
		'type' => 'checkbox',
		'label' => __(' Check To Enable Shop page sidebar','educational-university'),
		'section' => 'educational_university_woocommerce_page_settings',
	 ));

    // shop page sidebar alignment
    $wp_customize->add_setting('educational_university_shop_page_sidebar_position', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'educational_university_sanitize_choices',
	));
	$wp_customize->add_control('educational_university_shop_page_sidebar_position',array(
		'type'           => 'radio',
		'label'          => __('Shop Page Sidebar', 'educational-university'),
		'section'        => 'educational_university_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'educational-university'),
			'Right Sidebar' => __('Right Sidebar', 'educational-university'),
		),
	));	 

	$wp_customize->add_setting('educational_university_wooproducts_nav',array(
		'default' => 'Yes',
		'sanitize_callback'	=> 'educational_university_sanitize_choices'
	 ));
	 $wp_customize->add_control('educational_university_wooproducts_nav',array(
		'type' => 'select',
		'label' => __('Shop Page Products Navigation','educational-university'),
		'choices' => array(
			 'Yes' => __('Yes','educational-university'),
			 'No' => __('No','educational-university'),
		 ),
		'section' => 'educational_university_woocommerce_page_settings',
	 ));

	 $wp_customize->add_setting( 'educational_university_single_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'educational_university_sanitize_checkbox'
    ) );
    $wp_customize->add_control('educational_university_single_page_sidebar',array(
    	'type' => 'checkbox',
       	'label' => __('Check To Enable Single Product Page Sidebar','educational-university'),
		'section' => 'educational_university_woocommerce_page_settings'
    ));

	// single product page sidebar alignment
    $wp_customize->add_setting('educational_university_single_product_page_layout', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'educational_university_sanitize_choices',
	));
	$wp_customize->add_control('educational_university_single_product_page_layout',array(
		'type'           => 'radio',
		'label'          => __('Single product Page Sidebar', 'educational-university'),
		'section'        => 'educational_university_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'educational-university'),
			'Right Sidebar' => __('Right Sidebar', 'educational-university'),
		),
	));

	$wp_customize->add_setting('educational_university_related_product_enable',array(
		'default' => true,
		'sanitize_callback'	=> 'educational_university_sanitize_checkbox'
	));
	$wp_customize->add_control('educational_university_related_product_enable',array(
		'type' => 'checkbox',
		'label' => __('Check To Enable Related product','educational-university'),
		'section' => 'educational_university_woocommerce_page_settings',
	));

	$wp_customize->add_setting( 'educational_university_woo_product_img_border_radius', array(
        'default'              => '0',
        'transport'            => 'refresh',
        'sanitize_callback'    => 'educational_university_sanitize_integer'
    ) );
    $wp_customize->add_control(new Educational_University_Slider_Custom_Control( $wp_customize, 'educational_university_woo_product_img_border_radius',array(
		'label'	=> esc_html__('Woo Product Img Border Radius','educational-university'),
		'section'=> 'educational_university_woocommerce_page_settings',
		'settings'=>'educational_university_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('educational_university_products_per_row', array(
	    'default'   => '4',
	    'transport' => 'refresh',
	    'sanitize_callback' => 'educational_university_sanitize_integer'  
    ));

   $wp_customize->add_control('educational_university_products_per_row', array(
	   'label'    => __('Products Per Row', 'educational-university'),
	   'section'  => 'educational_university_woocommerce_page_settings',
	   'settings' => 'educational_university_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('educational_university_products_per_page', array(
	'default'   => '9',
	'transport' => 'refresh',
	'sanitize_callback' => 'educational_university_sanitize_integer'
   ));

   $wp_customize->add_control('educational_university_products_per_page', array(
	  'label'    => __('Products Per Page', 'educational-university'),
	  'section'  => 'educational_university_woocommerce_page_settings',
	  'settings' => 'educational_university_products_per_page',
	  'type'     => 'number',
	  'input_attrs' => array(
		 'min'  => 1,
		 'step' => 1,
	 ),
   ));	

   $wp_customize->add_setting('educational_university_product_sale_position',array(
	'default' => 'Left',
	'sanitize_callback' => 'educational_university_sanitize_choices'
	));
	$wp_customize->add_control('educational_university_product_sale_position',array(
		'type' => 'radio',
		'label' => __('Product Sale Position','educational-university'),
		'section' => 'educational_university_woocommerce_page_settings',
		'choices' => array(
			'Left' => __('Left','educational-university'),
			'Right' => __('Right','educational-university'),
		),
	) );   

	//Theme Options
	$wp_customize->add_panel( 'educational_university_panel_area', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'title' => __( 'Theme Options Panel', 'educational-university' ),
	) );

	//Site Layout Section
	$wp_customize->add_section('educational_university_site_layoutsec',array(
		'title'	=> __('Manage Site Layout Section ','educational-university'),
		'description' => __('<p class="sec-title">Manage Site Layout Section</p>','educational-university'),
		'priority'	=> 1,
		'panel' => 'educational_university_panel_area',
	));

	$wp_customize->add_setting('educational_university_preloader',array(
		'default' => false,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
	));
	$wp_customize->add_control( 'educational_university_preloader', array(
	   'section'   => 'educational_university_site_layoutsec',
	   'label'	=> __('Check to Show preloader','educational-university'),
	   'type'      => 'checkbox'
 	));		

	$wp_customize->add_setting('educational_university_box_layout',array(
		'default' => false,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
	));
	$wp_customize->add_control( 'educational_university_box_layout', array(
	   'section'   => 'educational_university_site_layoutsec',
	   'label'	=> __('Check to Show Box Layout','educational-university'),
	   'type'      => 'checkbox'
 	));

	// Add Settings and Controls for Page Layout
    $wp_customize->add_setting('educational_university_sidebar_page_layout',array(
		'default' => 'full',
	 	'sanitize_callback' => 'educational_university_sanitize_choices'
	));
	$wp_customize->add_control('educational_university_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'educational-university'),
		'section' => 'educational_university_site_layoutsec',
		'choices' => array(
			'full' => __('Full','educational-university'),
			'left' => __('Left','educational-university'),
			'right' => __('Right','educational-university'),
	),
	));		

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

	//Global Color
	$wp_customize->add_section('educational_university_global_color', array(
		'title'    => __('Manage Global Color Section', 'educational-university'),
		'panel'    => 'educational_university_panel_area',
	));

	$wp_customize->add_setting('educational_university_first_color', array(
		'default'           => '#A01B30',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'educational_university_first_color', array(
		'label'    => __('Theme Color', 'educational-university'),
		'section'  => 'educational_university_global_color',
		'settings' => 'educational_university_first_color',
	)));
	
	$wp_customize->add_setting( 'educational_university_global_color_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('educational_university_global_color_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(EDUCATIONAL_UNIVERSITY_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'educational_university_global_color'
	));

	// Topbar Section
	$wp_customize->add_section('educational_university_topbar_section',array(
	    'title' => __('Manage Topbar Section','educational-university'),
	    'priority'  => null,
	    'panel' => 'educational_university_panel_area',
	));	

	// Sticky Header
	$wp_customize->add_setting( 'educational_university_sticky_header',array(
        'default' => false,
        'sanitize_callback' => 'educational_university_sanitize_checkbox',
		'capability' => 'edit_theme_options',
    ));
    $wp_customize->add_control( 'educational_university_sticky_header',array(
		'settings' => 'educational_university_sticky_header',
	    'section'   => 'educational_university_topbar_section',
        'label' => esc_html__( 'Sticky Header','educational-university' ),
        'type'      => 'checkbox'
    ));

	$wp_customize->add_setting('educational_university_topbar_text_title', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('educational_university_topbar_text_title', array(
	    'settings' => 'educational_university_topbar_text_title',
	    'section'  => 'educational_university_topbar_section',
	    'label'    => __('Add Text', 'educational-university'),
	    'type'     => 'text',
	));	

	$wp_customize->add_setting('educational_university_top_text_icon',array(
        'default'=> 'fa-solid fa-volume-high',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('educational_university_top_text_icon',array(
        'label' => __('Add Icon','educational-university'),
        'description' => __('Fontawesome Icon (e.g., fa-solid fa-volume-high)','educational-university'),
        'section'=> 'educational_university_topbar_section',
        'type'=> 'text'
    ));

	$wp_customize->add_setting('educational_university_header_btn_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_header_btn_text', array(
	   'settings' => 'educational_university_header_btn_text',
	   'section'   => 'educational_university_topbar_section',
	   'label' => __('Add Button Text', 'educational-university'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('educational_university_header_btn_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_header_btn_url', array(
	   'settings' => 'educational_university_header_btn_url',
	   'section'   => 'educational_university_topbar_section',
	   'label' => __('Add Button URL', 'educational-university'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('educational_university_enable_topbar_section',array(
		'default' => true,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_enable_topbar_section', array(
	   'settings' => 'educational_university_enable_topbar_section',
	   'section'   => 'educational_university_topbar_section',
	   'label'     => __('Check To Enable This Section','educational-university'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting('educational_university_email_address',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_email',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_email_address', array(
	   'settings' => 'educational_university_email_address',
	   'section'   => 'educational_university_topbar_section',
	   'label' => __('Add Email Address', 'educational-university'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('educational_university_phone_number',array(
		'default' => '',
		'sanitize_callback' => 'educational_university_sanitize_phone_number',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_phone_number', array(
	   'settings' => 'educational_university_phone_number',
	   'section'   => 'educational_university_topbar_section',
	   'label' => __('Add Phone Number', 'educational-university'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('educational_university_fb_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_fb_link', array(
	   'settings' => 'educational_university_fb_link',
	   'section'   => 'educational_university_topbar_section',
	   'label' => __('Facebook Link', 'educational-university'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('educational_university_instagram_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_instagram_link', array(
	   'settings' => 'educational_university_instagram_link',
	   'section'   => 'educational_university_topbar_section',
	   'label' => __('Instagram Link', 'educational-university'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('educational_university_twitter_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_twitter_link', array(
	   'settings' => 'educational_university_twitter_link',
	   'section'   => 'educational_university_topbar_section',
	   'label' => __('Twitter Link', 'educational-university'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('educational_university_youtube_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_youtube_link', array(
	   'settings' => 'educational_university_youtube_link',
	   'section'   => 'educational_university_topbar_section',
	   'label' => __('Youtube Link', 'educational-university'),
	   'type'      => 'url'
	));

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

    // Banner Section
	$wp_customize->add_section('educational_university_banner_section',array(
	    'title' => __('Manage Banner Section','educational-university'),
	    'priority'  => null,
	    'description'	=> __('<p class="sec-title">Manage Banner Section</p> Select Page from the Dropdowns for banner, Also use the given image dimension (1200 x 770).','educational-university'),
	    'panel' => 'educational_university_panel_area',
	));	

	$wp_customize->add_setting('educational_university_banner',array(
		'default' => true,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_banner', array(
	   'settings' => 'educational_university_banner',
	   'section'   => 'educational_university_banner_section',
	   'label'     => __('Check To Enable This Section','educational-university'),
	   'type'      => 'checkbox'
	));

	// Page Dropdown
	$wp_customize->add_setting('educational_university_banner_pageboxes', array(
	    'default'           => '0',
	    'capability'        => 'edit_theme_options',
	    'sanitize_callback' => 'educational_university_sanitize_dropdown_pages',
	));
	$wp_customize->add_control('educational_university_banner_pageboxes', array(
	    'type'     => 'dropdown-pages',
	    'label'    => __('Select Page to display Banner', 'educational-university'),
	    'section'  => 'educational_university_banner_section',
	));

	// Small Title
	$wp_customize->add_setting('educational_university_banner_small_title', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('educational_university_banner_small_title', array(
	    'settings' => 'educational_university_banner_small_title',
	    'section'  => 'educational_university_banner_section',
	    'label'    => __('Add Banner Small Title', 'educational-university'),
	    'type'     => 'text',
	));

	$wp_customize->add_setting('educational_university_small_title_icon',array(
        'default'=> 'fa-solid fa-graduation-cap',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('educational_university_small_title_icon',array(
        'label' => __('Add Icon','educational-university'),
        'description' => __('Fontawesome Icon (e.g., fa-solid fa-graduation-cap)','educational-university'),
        'section'=> 'educational_university_banner_section',
        'type'=> 'text'
    ));

	// Button Text
	$wp_customize->add_setting('educational_university_button_text', array(
	    'default'           => 'Get Started',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('educational_university_button_text', array(
	    'settings' => 'educational_university_button_text',
	    'section'  => 'educational_university_banner_section',
	    'label'    => __('Add Banner Button Text', 'educational-university'),
	    'type'     => 'text',
	));

	// Button Link
	$wp_customize->add_setting('educational_university_button_link_banner', array(
	    'default'           => '',
	    'sanitize_callback' => 'esc_url_raw',
	));
	$wp_customize->add_control('educational_university_button_link_banner', array(
	    'label'    => __('Add Banner Button Link', 'educational-university'),
	    'section'  => 'educational_university_banner_section',
	    'type'     => 'url',
	));

	$wp_customize->add_setting('educational_university_banner_right_img',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw',
	));
	$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'educational_university_banner_right_img',array(
	    'label' => __('Select Banner Image','educational-university'),
	    'description'	=> __('Use the given image dimension (330px x 450px).','educational-university'),
	    'section' => 'educational_university_banner_section'
	)));

	$wp_customize->add_setting('educational_university_banner_bottom_img',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw',
	));
	$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'educational_university_banner_bottom_img',array(
	    'label' => __('Select Banner Bottom Image','educational-university'),
	    'description'	=> __('Use the given image dimension (1200px x 770px).','educational-university'),
	    'section' => 'educational_university_banner_section'
	)));

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

	// Degree & Courses Section
	$wp_customize->add_section('educational_university_degree_section', array(
	    'title'       => __('Manage Degree & Courses Section', 'educational-university'),
	    'description' => __('<p class="sec-title">Manage Degree & Courses Section</p>', 'educational-university'),
	    'priority'    => null,
	    'panel'       => 'educational_university_panel_area',
	));

	$wp_customize->add_setting('educational_university_disabled_degree_section', array(
	    'default'           => true,
	    'sanitize_callback' => 'educational_university_sanitize_checkbox',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('educational_university_disabled_degree_section', array(
	    'settings' => 'educational_university_disabled_degree_section',
	    'section'  => 'educational_university_degree_section',
	    'label'    => __('Check To Enable Section', 'educational-university'),
	    'type'     => 'checkbox',
	));

	$wp_customize->add_setting('educational_university_courses_title_icon',array(
        'default'=> 'fa-solid fa-graduation-cap',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('educational_university_courses_title_icon',array(
        'label' => __('Add Icon','educational-university'),
        'description' => __('Fontawesome Icon (e.g., fa-solid fa-graduation-cap)','educational-university'),
        'section'=> 'educational_university_degree_section',
        'type'=> 'text'
    ));

	$wp_customize->add_setting('educational_university_degree_text', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('educational_university_degree_text', array(
	    'settings' => 'educational_university_degree_text',
	    'section'  => 'educational_university_degree_section',
	    'label'    => __('Add Degree & Courses Text', 'educational-university'),
	    'type'     => 'text',
	));

	$wp_customize->add_setting('educational_university_degree_title', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('educational_university_degree_title', array(
	    'settings' => 'educational_university_degree_title',
	    'section'  => 'educational_university_degree_section',
	    'label'    => __('Add Degree & Courses Title', 'educational-university'),
	    'type'     => 'text',
	));

	$wp_customize->add_setting('educational_university_claases_number',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field',
	));
	$wp_customize->add_control('educational_university_claases_number',array(
		'label'	=> __('Number of post to show','educational-university'),
		'description' => __('Add number and refresh tab','educational-university'),
		'section'	=> 'educational_university_degree_section',
		'type'		=> 'number',
		'input_attrs' => array(
			'step'             => 1,
			'min'              => 0,
			'max'              => 6,
		),
	));
	$educational_university_featured_post = get_theme_mod('educational_university_claases_number');

	$educational_university_args = array('numberposts' => -1);
	$educational_university_post_list = get_posts($educational_university_args);
	$educational_university_i = 0;
	$educational_university_pst[]='Select';
	foreach($educational_university_post_list as $educational_university_post){
		$educational_university_pst[$educational_university_post->ID] = $educational_university_post->post_title;
	}

	for ( $educational_university_i = 1; $educational_university_i <= $educational_university_featured_post; $educational_university_i++ ) {
		$wp_customize->add_setting('educational_university_select_post'.$educational_university_i,array(
			'sanitize_callback' => 'educational_university_sanitize_choices',
		));
		$wp_customize->add_control('educational_university_select_post'.$educational_university_i,array(
			'type'    => 'select',
			'choices' => $educational_university_pst,
			'label' => __('Select Post','educational-university'),
			'section' => 'educational_university_degree_section',
		));

		$wp_customize->add_setting('educational_university_add_students_count'.$educational_university_i, array(
		    'default'           => '',
		    'sanitize_callback' => 'sanitize_text_field',
		    'capability'        => 'edit_theme_options',
		));
		$wp_customize->add_control('educational_university_add_students_count'.$educational_university_i, array(
		    'settings' => 'educational_university_add_students_count'.$educational_university_i,
		    'section'  => 'educational_university_degree_section',
		    'label'    => __('Add Students Count', 'educational-university'),
		    'type'     => 'text',
		));

		$wp_customize->add_setting('educational_university_add_time'.$educational_university_i, array(
		    'default'           => '',
		    'sanitize_callback' => 'sanitize_text_field',
		    'capability'        => 'edit_theme_options',
		));
		$wp_customize->add_control('educational_university_add_time'.$educational_university_i, array(
		    'settings' => 'educational_university_add_time'.$educational_university_i,
		    'section'  => 'educational_university_degree_section',
		    'label'    => __('Add Time', 'educational-university'),
		    'type'     => 'text',
		));

		$wp_customize->add_setting('educational_university_add_price'.$educational_university_i, array(
		    'default'           => '',
		    'sanitize_callback' => 'sanitize_text_field',
		    'capability'        => 'edit_theme_options',
		));
		$wp_customize->add_control('educational_university_add_price'.$educational_university_i, array(
		    'settings' => 'educational_university_add_price'.$educational_university_i,
		    'section'  => 'educational_university_degree_section',
		    'label'    => __('Add Price', 'educational-university'),
		    'type'     => 'text',
		));

		$wp_customize->add_setting('educational_university_add_level'.$educational_university_i, array(
		    'default'           => '',
		    'sanitize_callback' => 'sanitize_text_field',
		    'capability'        => 'edit_theme_options',
		));
		$wp_customize->add_control('educational_university_add_level'.$educational_university_i, array(
		    'settings' => 'educational_university_add_level'.$educational_university_i,
		    'section'  => 'educational_university_degree_section',
		    'label'    => __('Add Level', 'educational-university'),
		    'type'     => 'text',
		));
	}

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

	//Blog post
	$wp_customize->add_section('educational_university_blog_post_settings',array(
        'title' => __('Manage Post Section', 'educational-university'),
        'priority' => null,
        'panel' => 'educational_university_panel_area'
    ) );

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

	$wp_customize->add_control(
		new Educational_University_Image_Radio_Control(
			$wp_customize,
			'educational_university_blog_layout_option_setting',
			array(
				'label'   => __( 'Post Layouts', 'educational-university' ),
				'section' => 'educational_university_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('educational_university_metafields_date', array(
	    'default' => true,
	    'sanitize_callback' => 'educational_university_sanitize_checkbox',
	));
	$wp_customize->add_control('educational_university_metafields_date', array(
	    'settings' => 'educational_university_metafields_date', 
	    'section'   => 'educational_university_blog_post_settings',
	    'label'     => __('Check to Enable Date', 'educational-university'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('educational_university_metafields_comments', array(
		'default' => true,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
	));	
	$wp_customize->add_control('educational_university_metafields_comments', array(
		'settings' => 'educational_university_metafields_comments',
		'section'  => 'educational_university_blog_post_settings',
		'label'    => __('Check to Enable Comments', 'educational-university'),
		'type'     => 'checkbox',
	));

	$wp_customize->add_setting('educational_university_metafields_author', array(
		'default' => true,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
	));
	$wp_customize->add_control('educational_university_metafields_author', array(
		'settings' => 'educational_university_metafields_author',
		'section'  => 'educational_university_blog_post_settings',
		'label'    => __('Check to Enable Author', 'educational-university'),
		'type'     => 'checkbox',
	));		

	$wp_customize->add_setting('educational_university_metafields_time', array(
		'default' => true,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
	));
	$wp_customize->add_control('educational_university_metafields_time', array(
		'settings' => 'educational_university_metafields_time',
		'section'  => 'educational_university_blog_post_settings',
		'label'    => __('Check to Enable Time', 'educational-university'),
		'type'     => 'checkbox',
	));	

	$wp_customize->add_setting('educational_university_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('educational_university_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','educational-university'),
		'description' => __('Ex: "/", "|", "-", ...','educational-university'),
		'section' => 'educational_university_blog_post_settings'
	)); 

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

	$wp_customize->add_setting('educational_university_blog_post_description_option',array(
    	'default'   => 'Excerpt Content', 
        'sanitize_callback' => 'educational_university_sanitize_choices'
	));
	$wp_customize->add_control('educational_university_blog_post_description_option',array(
        'type' => 'radio',
        'label' => __('Post Description Length','educational-university'),
        'section' => 'educational_university_blog_post_settings',
        'choices' => array(
            'No Content' => __('No Content','educational-university'),
            'Excerpt Content' => __('Excerpt Content','educational-university'),
            'Full Content' => __('Full Content','educational-university'),
        ),
	) );

	$wp_customize->add_setting('educational_university_blog_post_thumb',array(
        'sanitize_callback' => 'educational_university_sanitize_checkbox',
        'default'           => 1,
    ));
    $wp_customize->add_control('educational_university_blog_post_thumb',array(
        'type'        => 'checkbox',
        'label'       => esc_html__('Show / Hide Blog Post Thumbnail', 'educational-university'),
        'section'     => 'educational_university_blog_post_settings',
    ));

    $wp_customize->add_setting( 'educational_university_blog_post_page_image_box_shadow', array(
        'default'              => '0',
        'transport'            => 'refresh',
        'sanitize_callback'    => 'educational_university_sanitize_integer'
    ) );
    $wp_customize->add_control(new Educational_University_Slider_Custom_Control( $wp_customize, 'educational_university_blog_post_page_image_box_shadow',array(
		'label'	=> esc_html__('Blog Page Image Box Shadow','educational-university'),
		'section'=> 'educational_university_blog_post_settings',
		'settings'=>'educational_university_blog_post_page_image_box_shadow',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 100,
        ),
	)));

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

	//Single Post Settings
	$wp_customize->add_section('educational_university_single_post_settings',array(
		'title' => __('Manage Single Post Section', 'educational-university'),
		'priority' => null,
		'panel' => 'educational_university_panel_area'
	));

	$wp_customize->add_setting( 'educational_university_single_page_breadcrumb',array(
		'default' => true,
        'sanitize_callback'	=> 'educational_university_sanitize_checkbox',
	));
	$wp_customize->add_control('educational_university_single_page_breadcrumb',array(
       'section' => 'educational_university_single_post_settings',
	   'label' => __( 'Check To Enable Breadcrumb','educational-university' ),
	   'type' => 'checkbox'
    ));	

	$wp_customize->add_setting('educational_university_single_post_date',array(
		'default' => true,
		'sanitize_callback'	=> 'educational_university_sanitize_checkbox'
	));
	$wp_customize->add_control('educational_university_single_post_date',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Date ','educational-university'),
		'section' => 'educational_university_single_post_settings'
	));	

	$wp_customize->add_setting('educational_university_single_post_author',array(
		'default' => true,
		'sanitize_callback'	=> 'educational_university_sanitize_checkbox'
	));
	$wp_customize->add_control('educational_university_single_post_author',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Author','educational-university'),
		'section' => 'educational_university_single_post_settings'
	));

	$wp_customize->add_setting('educational_university_single_post_comment',array(
		'default' => true,
		'sanitize_callback'	=> 'educational_university_sanitize_checkbox'
	));
	$wp_customize->add_control('educational_university_single_post_comment',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Comments','educational-university'),
		'section' => 'educational_university_single_post_settings'
	));	

	$wp_customize->add_setting('educational_university_single_post_time',array(
		'default' => true,
		'sanitize_callback'	=> 'educational_university_sanitize_checkbox'
	));
	$wp_customize->add_control('educational_university_single_post_time',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Time','educational-university'),
		'section' => 'educational_university_single_post_settings'
	));	

	$wp_customize->add_setting('educational_university_single_post_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('educational_university_single_post_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','educational-university'),
		'description' => __('Ex: "/", "|", "-", ...','educational-university'),
		'section' => 'educational_university_single_post_settings'
	)); 

	$wp_customize->add_setting('educational_university_sidebar_single_post_layout',array(
    	'default' => 'right',
    	 'sanitize_callback' => 'educational_university_sanitize_choices'
	));
	$wp_customize->add_control('educational_university_sidebar_single_post_layout',array(
   		'type' => 'radio',
    	'label'     => __('Single post sidebar layout', 'educational-university'),
     	'section' => 'educational_university_single_post_settings',
     	'choices' => array(
			'full' => __('Full','educational-university'),
			'left' => __('Left','educational-university'),
			'right' => __('Right','educational-university'),
     ),
	));

	$wp_customize->add_setting( 'educational_university_single_post_page_image_box_shadow', array(
        'default'              => '0',
        'transport'            => 'refresh',
        'sanitize_callback'    => 'educational_university_sanitize_integer'
    ) );
    $wp_customize->add_control(new Educational_University_Slider_Custom_Control( $wp_customize, 'educational_university_single_post_page_image_box_shadow',array(
		'label'	=> esc_html__('Single Post Image Box Shadow','educational-university'),
		'section'=> 'educational_university_single_post_settings',
		'settings'=>'educational_university_single_post_page_image_box_shadow',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 100,
        ),
	)));

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

	//Page Settings
	$wp_customize->add_section('educational_university_page_settings',array(
		'title' => __('Manage Page Section', 'educational-university'),
		'priority' => null,
		'panel' => 'educational_university_panel_area'
	));

	// Add Settings and Controls for Page Layout
	$wp_customize->add_setting('educational_university_sidebar_page_layout',array(
		'default' => 'full',
			'sanitize_callback' => 'educational_university_sanitize_choices'
	));
	$wp_customize->add_control('educational_university_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'educational-university'),
		'section' => 'educational_university_page_settings',
		'choices' => array(
			'left' => __('Left','educational-university'),
			'right' => __('Right','educational-university'),
			'full' => __('No Sidebar','educational-university')
	),
	));	

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

	// 404 Page Settings
	$wp_customize->add_section('educational_university_page_not_found', array(
		'title'	=> __('Manage 404 Page Section','educational-university'),
		'priority'	=> null,
		'panel' => 'educational_university_panel_area',
	));
	
	$wp_customize->add_setting('educational_university_page_not_found_heading',array(
		'default'=> __('404 Not Found','educational-university'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('educational_university_page_not_found_heading',array(
		'label'	=> __('404 Heading','educational-university'),
		'section'=> 'educational_university_page_not_found',
		'type'=> 'text'
	));

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

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

	$wp_customize->add_setting( 'educational_university_page_not_found_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('educational_university_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(EDUCATIONAL_UNIVERSITY_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'educational_university_page_not_found'
	));

	// No Results Page Settings
	$wp_customize->add_section('educational_university_no_results_found', array(
		'title'	=> __('Manage No Results Page Section','educational-university'),
		'priority'	=> null,
		'panel' => 'educational_university_panel_area',
	));
	
	$wp_customize->add_setting('educational_university_page_nothing_found_heading',array(
		'default'=> __('Nothing Found','educational-university'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('educational_university_page_nothing_found_heading',array(
		'label'	=> __('Add Title','educational-university'),
		'section'=> 'educational_university_no_results_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('educational_university_nothing_found_content',array(
		'default'=> 'Sorry, but nothing matched your search terms. Please try again with some different keywords.',
		'sanitize_callback'	=> 'sanitize_text_field'
	));

	$wp_customize->add_control('educational_university_nothing_found_content',array(
		'label'	=> __('Add Text','educational-university'),
		'section'=> 'educational_university_no_results_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('educational_university_nothing_found_search',array(
		'default' => true,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_nothing_found_search', array(
	   'settings' => 'educational_university_nothing_found_search',
	   'section'   => 'educational_university_no_results_found',
	   'label'     => __('Check To Enable Search','educational-university'),
	   'type'      => 'checkbox'
	));

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

	// Animation Section
	$wp_customize->add_section('educational_university_animation', array(
		'title'	=> __('Manage Animation Section','educational-university'),
		'description'	=> __('<p class="sec-title">Manage Animation Section</p>','educational-university'),
		'priority'	=> null,
		'panel' => 'educational_university_panel_area',
	));

	$wp_customize->add_setting('educational_university_animation_enabled',array(
		'default' => true,
		'sanitize_callback' => 'educational_university_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_animation_enabled', array(
	   'settings' => 'educational_university_animation_enabled',
	   'section'   => 'educational_university_animation',
	   'label'     => __('Check To Enable Animation','educational-university'),
	   'type'      => 'checkbox'
	));

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

	// Footer Section
	$wp_customize->add_section('educational_university_footer', array(
		'title'	=> __('Manage Footer Section','educational-university'),
		'description'	=> __('<p class="sec-title">Manage Footer Section</p>','educational-university'),
		'priority'	=> null,
		'panel' => 'educational_university_panel_area',
	));

	$wp_customize->add_setting('educational_university_footer_widget', array(
	    'default' => true,
	    'sanitize_callback' => 'educational_university_sanitize_checkbox',
	));
	$wp_customize->add_control('educational_university_footer_widget', array(
	    'settings' => 'educational_university_footer_widget',
	    'section'   => 'educational_university_footer',
	    'label'     => __('Check to Enable Footer Widget', 'educational-university'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('educational_university_footer_bg_image',array(
        'default'   => '',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'educational_university_footer_bg_image',array(
        'label' => __('Footer Background Image','educational-university'),
        'section' => 'educational_university_footer',
    )));

	$wp_customize->add_setting('educational_university_footer_img_position',array(
		'default' => 'center center',
		'transport' => 'refresh',
		'sanitize_callback' => 'educational_university_sanitize_choices'
	));
	$wp_customize->add_control('educational_university_footer_img_position',array(
		'type' => 'select',
		'label' => __('Footer Image Position','educational-university'),
		'section' => 'educational_university_footer',
		'choices' 	=> array(
			'center center'   => esc_html__( 'Center', 'educational-university' ),
			'center top'   => esc_html__( 'Top', 'educational-university' ),
			'left center'   => esc_html__( 'Left', 'educational-university' ),
			'right center'   => esc_html__( 'Right', 'educational-university' ),
			'center bottom'   => esc_html__( 'Bottom', 'educational-university' ),
		),
	));	

	$wp_customize->add_setting('educational_university_footer_widget_areas',array(
		'default'           => 4,
		'sanitize_callback' => 'educational_university_sanitize_choices',
	));
	$wp_customize->add_control('educational_university_footer_widget_areas',array(
		'type'        => 'radio',
		'section' => 'educational_university_footer',
		'label'       => __('Footer widget area', 'educational-university'),
		'choices' => array(
		   '1'     => __('One', 'educational-university'),
		   '2'     => __('Two', 'educational-university'),
		   '3'     => __('Three', 'educational-university'),
		   '4'     => __('Four', 'educational-university')
		),
	));

	$wp_customize->add_setting('educational_university_copyright_line',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'educational_university_copyright_line', array(
	   'section' 	=> 'educational_university_footer',
	   'label'	 	=> __('Copyright Line','educational-university'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	$wp_customize->add_setting('educational_university_copyright_link',array(
    	'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'educational_university_copyright_link', array(
	   'section' 	=> 'educational_university_footer',
	   'label'	 	=> __('Copyright Link','educational-university'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	//  footer bg color
	$wp_customize->add_setting('educational_university_footerbg_color',array(
		'default' => '',
		'sanitize_callback' => 'educational_university_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_footerbg_color', array(
		'settings' => 'educational_university_footerbg_color',
		'section'   => 'educational_university_footer',
		'label' => __('BG Color', 'educational-university'),
		'type'      => 'color'
	));

	//  footer coypright color
	$wp_customize->add_setting('educational_university_footercoypright_color',array(
		'default' => '',
		'sanitize_callback' => 'educational_university_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_footercoypright_color', array(
	   'settings' => 'educational_university_footercoypright_color',
	   'section'   => 'educational_university_footer',
	   'label' => __('Coypright Color', 'educational-university'),
	   'type'      => 'color'
	));

	//  footer title color
	$wp_customize->add_setting('educational_university_footertitle_color',array(
		'default' => '',
		'sanitize_callback' => 'educational_university_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_footertitle_color', array(
	   'settings' => 'educational_university_footertitle_color',
	   'section'   => 'educational_university_footer',
	   'label' => __('Title Color', 'educational-university'),
	   'type'      => 'color'
	));

	//  footer description color
	$wp_customize->add_setting('educational_university_footerdescription_color',array(
		'default' => '',
		'sanitize_callback' => 'educational_university_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_footerdescription_color', array(
	   'settings' => 'educational_university_footerdescription_color',
	   'section'   => 'educational_university_footer',
	   'label' => __('Description Color', 'educational-university'),
	   'type'      => 'color'
	));

	//  footer list color
	$wp_customize->add_setting('educational_university_footerlist_color',array(
		'default' => '',
		'sanitize_callback' => 'educational_university_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_footerlist_color', array(
	   'settings' => 'educational_university_footerlist_color',
	   'section'   => 'educational_university_footer',
	   'label' => __('List Color', 'educational-university'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('educational_university_scroll_hide', array(
        'default' => true,
        'sanitize_callback' => 'educational_university_sanitize_checkbox'
    ));
    $wp_customize->add_control( new WP_Customize_Control($wp_customize,'educational_university_scroll_hide',array(
        'label'          => __( 'Check To Show Scroll To Top', 'educational-university' ),
        'section'        => 'educational_university_footer',
        'settings'       => 'educational_university_scroll_hide',
        'type'           => 'checkbox',
    )));

	$wp_customize->add_setting('educational_university_scroll_position',array(
        'default' => 'Right',
        'sanitize_callback' => 'educational_university_sanitize_choices'
    ));
    $wp_customize->add_control('educational_university_scroll_position',array(
        'type' => 'radio',
        'section' => 'educational_university_footer',
        'label'	 	=> __('Scroll To Top Positions','educational-university'),
        'choices' => array(
            'Right' => __('Right','educational-university'),
            'Left' => __('Left','educational-university'),
            'Center' => __('Center','educational-university')
        ),
    ) );

	$wp_customize->add_setting('educational_university_scroll_text',array(
		'default'	=> __('TOP','educational-university'),
		'sanitize_callback'	=> 'sanitize_text_field',
	));	
	$wp_customize->add_control('educational_university_scroll_text',array(
		'label'	=> __('Scroll To Top Button Text','educational-university'),
		'section'	=> 'educational_university_footer',
		'type'		=> 'text'
	));

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

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

	// Footer Social Section
	$wp_customize->add_section('educational_university_footer_social_icons', array(
		'title'	=> __('Manage Footer Social Section','educational-university'),
		'description'	=> __('<p class="sec-title">Manage Footer Social Section</p>','educational-university'),
		'priority'	=> null,
		'panel' => 'educational_university_panel_area',
	));

	$wp_customize->add_setting('educational_university_footer_facebook_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_footer_facebook_link', array(
	   'settings' => 'educational_university_footer_facebook_link',
	   'section'   => 'educational_university_footer_social_icons',
	   'label' => __('Facebook Link', 'educational-university'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('educational_university_footer_instagram_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_footer_instagram_link', array(
	   'settings' => 'educational_university_footer_instagram_link',
	   'section'   => 'educational_university_footer_social_icons',
	   'label' => __('Instagram Link', 'educational-university'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('educational_university_footer_twitter_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_footer_twitter_link', array(
	   'settings' => 'educational_university_footer_twitter_link',
	   'section'   => 'educational_university_footer_social_icons',
	   'label' => __('Twitter Link', 'educational-university'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('educational_university_footer_youtube_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'educational_university_footer_youtube_link', array(
	   'settings' => 'educational_university_footer_youtube_link',
	   'section'   => 'educational_university_footer_social_icons',
	   'label' => __('Youtube Link', 'educational-university'),
	   'type'      => 'url'
	));

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

	// Google Fonts
	$wp_customize->add_section( 'educational_university_google_fonts_section', array(
		'title'       => __( 'Google Fonts', 'educational-university' ),
		'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( 'educational_university_headings_fonts', array(
		'sanitize_callback' => 'educational_university_sanitize_fonts',
	));
	$wp_customize->add_control( 'educational_university_headings_fonts', array(
		'type' => 'select',
		'description' => __('Select your desired font for the headings.', 'educational-university'),
		'section' => 'educational_university_google_fonts_section',
		'choices' => $font_choices
	));

	$wp_customize->add_setting( 'educational_university_body_fonts', array(
		'sanitize_callback' => 'educational_university_sanitize_fonts'
	));
	$wp_customize->add_control( 'educational_university_body_fonts', array(
		'type' => 'select',
		'description' => __( 'Select your desired font for the body.', 'educational-university' ),
		'section' => 'educational_university_google_fonts_section',
		'choices' => $font_choices
	));
  
}
add_action( 'customize_register', 'educational_university_customize_register' );

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