<?php
/**
 * Football Academy: Customizer
 *
 * @subpackage Football Academy
 * @since 1.0
 */

use WPTRT\Customize\Section\Football_Academy_Button;

add_action( 'customize_register', function( $manager ) {

	$manager->register_section_type( Football_Academy_Button::class );

	$manager->add_section(
		new Football_Academy_Button( $manager, 'football_academy_pro', [
			'title' => __( 'Football Academy Pro', 'football-academy' ),
			'priority' => 0,
			'button_text' => __( 'Go Pro', 'football-academy' ),
			'button_url'  => esc_url( 'https://www.luzuk.com/products/football-wp-theme/', 'football-academy')
		] )
	);

} );

// Load the JS and CSS.
add_action( 'customize_controls_enqueue_scripts', function() {

	$version = wp_get_theme()->get( 'Version' );

	wp_enqueue_script(
		'football-academy-customize-section-button',
		get_theme_file_uri( 'vendor/wptrt/customize-section-button/public/js/customize-controls.js' ),
		[ 'customize-controls' ],
		$version,
		true
	);

	wp_enqueue_style(
		'football-academy-customize-section-button',
		get_theme_file_uri( 'vendor/wptrt/customize-section-button/public/css/customize-controls.css' ),
		[ 'customize-controls' ],
 		$version
	);

} );

function football_academy_customize_register( $wp_customize ) {

	$wp_customize->add_setting('football_academy_logo_size',array(
		'default' => '',
		'sanitize_callback'	=> 'football_academy_sanitize_float'
	));
	$wp_customize->add_control('football_academy_logo_size',array(
		'type' => 'range',
		'description' => __('Logo Size (0-100%)','football-academy'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('football_academy_logo_padding',array(
		'sanitize_callback'	=> 'esc_html'
	));
	$wp_customize->add_control('football_academy_logo_padding',array(
		'label' => __('Logo Margin','football-academy'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('football_academy_logo_top_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'football_academy_sanitize_float'
	));
	$wp_customize->add_control('football_academy_logo_top_padding',array(
		'type' => 'number',
		'description' => __('Top','football-academy'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('football_academy_logo_bottom_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'football_academy_sanitize_float'
	));
	$wp_customize->add_control('football_academy_logo_bottom_padding',array(
		'type' => 'number',
		'description' => __('Bottom','football-academy'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('football_academy_logo_left_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'football_academy_sanitize_float'
	));
	$wp_customize->add_control('football_academy_logo_left_padding',array(
		'type' => 'number',
		'description' => __('Left','football-academy'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('football_academy_logo_right_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'football_academy_sanitize_float'
 	));
 	$wp_customize->add_control('football_academy_logo_right_padding',array(
		'type' => 'number',
		'description' => __('Right','football-academy'),
		'section' => 'title_tagline',
    ));

	$wp_customize->add_setting('football_academy_show_site_title',array(
		'default' => true,
		'sanitize_callback'	=> 'football_academy_sanitize_checkbox'
	));
	$wp_customize->add_control('football_academy_show_site_title',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Title','football-academy'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting( 'football_academy_site_title_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_site_title_color', array(
		'label' => 'Title Color',
		'section' => 'title_tagline',
	)));

	$wp_customize->add_setting('football_academy_show_tagline',array(
		'default' => true,
		'sanitize_callback'	=> 'football_academy_sanitize_checkbox'
	));
	$wp_customize->add_control('football_academy_show_tagline',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Tagline','football-academy'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting( 'football_academy_site_tagline_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_site_tagline_color', array(
		'label' => 'Tagline Color',
		'section' => 'title_tagline',
	)));

	$wp_customize->add_panel( 'football_academy_panel_id', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'theme_supports' => '',
		'title' => __( 'Theme Settings', 'football-academy' ),
		'description' => __( 'Description of what this panel does.', 'football-academy' ),
	) );

	$wp_customize->add_section( 'football_academy_theme_options_section', array(
    	'title'      => __( 'General Settings', 'football-academy' ),
		'priority'   => 30,
		'panel' => 'football_academy_panel_id'
	) );

	$wp_customize->add_setting('football_academy_theme_options',array(
		'default' => 'One Column',
		'sanitize_callback' => 'football_academy_sanitize_choices'
	));
	$wp_customize->add_control('football_academy_theme_options',array(
		'type' => 'select',
		'label' => __('Blog Page Sidebar Layout','football-academy'),
		'section' => 'football_academy_theme_options_section',
		'choices' => array(
		   'Left Sidebar' => __('Left Sidebar','football-academy'),
		   'Right Sidebar' => __('Right Sidebar','football-academy'),
		   'One Column' => __('One Column','football-academy'),
		   'Grid Layout' => __('Grid Layout','football-academy')
		),
	));

	$wp_customize->add_setting('football_academy_single_post_sidebar',array(
		'default' => 'Right Sidebar',
		'sanitize_callback' => 'football_academy_sanitize_choices'
	));
	$wp_customize->add_control('football_academy_single_post_sidebar',array(
        'type' => 'select',
        'label' => __('Single Post Sidebar Layout','football-academy'),
        'section' => 'football_academy_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','football-academy'),
            'Right Sidebar' => __('Right Sidebar','football-academy'),
            'One Column' => __('One Column','football-academy')
        ),
	));

	$wp_customize->add_setting('football_academy_page_sidebar',array(
		'default' => 'One Column',
		'sanitize_callback' => 'football_academy_sanitize_choices'
	));
	$wp_customize->add_control('football_academy_page_sidebar',array(
        'type' => 'select',
        'label' => __('Page Sidebar Layout','football-academy'),
        'section' => 'football_academy_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','football-academy'),
            'Right Sidebar' => __('Right Sidebar','football-academy'),
            'One Column' => __('One Column','football-academy')
        ),
	));

	$wp_customize->add_setting('football_academy_archive_page_sidebar',array(
		'default' => 'One Column',
		'sanitize_callback' => 'football_academy_sanitize_choices'
	));
	$wp_customize->add_control('football_academy_archive_page_sidebar',array(
        'type' => 'select',
        'label' => __('Archive & Search Page Sidebar Layout','football-academy'),
        'section' => 'football_academy_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','football-academy'),
            'Right Sidebar' => __('Right Sidebar','football-academy'),
            'One Column' => __('One Column','football-academy'),
            'Grid Layout' => __('Grid Layout','football-academy')
        ),
	));

	$wp_customize->add_setting( 'football_academy_boxfull_width', array(
		'default'           => '',
		'sanitize_callback' => 'football_academy_sanitize_choices'
	));
	
	$wp_customize->add_control( 'football_academy_boxfull_width', array(
		'label'    => __( 'Section Width', 'football-academy' ),
		'section'  => 'football_academy_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'container'  => __('Box Width', 'football-academy'),
			'container-fluid' => __('Full Width', 'football-academy'),
			'none' => __('None', 'football-academy')
		),
	));

	$wp_customize->add_setting( 'football_academy_dropdown_anim', array(
		'default'           => 'None',
		'sanitize_callback' => 'football_academy_sanitize_choices'
	));
	$wp_customize->add_control( 'football_academy_dropdown_anim', array(
		'label'    => __( 'Menu Dropdown Animations', 'football-academy' ),
		'section'  => 'football_academy_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInUp'  => __('bounceInUp', 'football-academy'),
			'fadeInUp' => __('fadeInUp', 'football-academy'),
			'zoomIn'    => __('zoomIn', 'football-academy'),
			'None'    => __('None', 'football-academy')
		),
	));

	//Header
	$wp_customize->add_section( 'football_academy_header' , array(
    	'title'    => __( 'Header Section', 'football-academy' ),
		'priority' => null,
		'panel' => 'football_academy_panel_id'
	) );


	$wp_customize->add_setting('football_academy_btn_text',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_btn_text',array(
	   	'type' => 'text',
	   	'label' => __('Button Text','football-academy'),
	   	'section' => 'football_academy_header',
	));

	$wp_customize->add_setting('football_academy_btn_link',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_btn_link',array(
	   	'type' => 'text',
	   	'label' => __('Button Link','football-academy'),
	   	'section' => 'football_academy_header',
	));

	$wp_customize->add_setting( 'football_academy_hdrbtn_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_hdrbtn_color', array(
		'label' => 'Button Color',
		'section' => 'football_academy_header',
	)));

	$wp_customize->add_setting( 'football_academy_hdrbtnbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_hdrbtnbg_color', array(
		'label' => 'Button Bg Color',
		'section' => 'football_academy_header',
	)));

	//home page slider
	$wp_customize->add_section( 'football_academy_slider_section' , array(
    	'title'    => __( 'Slider Settings', 'football-academy' ),
		'priority' => null,
		'panel' => 'football_academy_panel_id'
	) );

	$wp_customize->add_setting('football_academy_slider_hide_show',array(
    	'default' => false,
    	'sanitize_callback'	=> 'football_academy_sanitize_checkbox'
	));
	$wp_customize->add_control('football_academy_slider_hide_show',array(
	   	'type' => 'checkbox',
	   	'label' => __('Show / Hide Slider','football-academy'),
	   	'section' => 'football_academy_slider_section',
	));

	$wp_customize->add_setting( 'football_academy_slider_effect', array(
		'default'           => '',
		'sanitize_callback' => 'football_academy_sanitize_choices'
	));
	$wp_customize->add_control( 'football_academy_slider_effect', array(
		'label'    => __( 'Onload Transactions Effects', 'football-academy' ),
		'section'  => 'football_academy_slider_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInLeft'  => __('bounceInLeft', 'football-academy'),
			'bounceInRight' => __('bounceInRight', 'football-academy'),
			'bounceInUp'    => __('bounceInUp', 'football-academy'),
			'bounceInDown'    => __('bounceInDown', 'football-academy'),
			'zoomIn'  => __('zoomIn', 'football-academy'),
			'zoomOut' => __('zoomOut', 'football-academy'),
			'fadeInDown'    => __('fadeInDown', 'football-academy'),
			'fadeInUp'    => __('fadeInUp', 'football-academy'),
			'fadeInLeft'  => __('fadeInLeft', 'football-academy'),
			'fadeInRight' => __('fadeInRight', 'football-academy'),
			'flip-up'    => __('flip-up', 'football-academy'),
			'none'    => __('none', 'football-academy')
		),
	));

	for ( $count = 1; $count <= 4; $count++ ) {
		$wp_customize->add_setting( 'football_academy_slider' . $count, array(
			'default'           => '',
			'sanitize_callback' => 'football_academy_sanitize_dropdown_pages'
		));
		$wp_customize->add_control( 'football_academy_slider' . $count, array(
			'label' => __('Select Slider Image Page', 'football-academy' ),
			'section' => 'football_academy_slider_section',
			'type' => 'dropdown-pages'
		));
	}

	$wp_customize->add_setting('football_academy_slider_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'football_academy_sanitize_float'
	));
	$wp_customize->add_control('football_academy_slider_font_size',array(
		'type' => 'number',
		'description' => __('Font Size','football-academy'),
		'section' => 'football_academy_slider_section',
	));

	$wp_customize->add_setting( 'football_academy_slider_title_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_slider_title_color', array(
		'label' => 'Title Color',
		'section' => 'football_academy_slider_section',
	)));

	$wp_customize->add_setting( 'football_academy_slider_titlebg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_slider_titlebg_color', array(
		'label' => 'Title Bg Color',
		'section' => 'football_academy_slider_section',
	)));


	//Service Section
	$wp_customize->add_section('football_academy_service_section',array(
		'title'	=> __('Service Section','football-academy'),
		'description'=> __('<b>Note :</b> This section will appear below the slider.','football-academy'),
		'panel' => 'football_academy_panel_id',
	));


	$wp_customize->add_setting('football_academy_serviceheading',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_serviceheading',array(
	   	'type' => 'text',
	   	'label' => __('Heading','football-academy'),
	   	'section' => 'football_academy_service_section',
	));

	$wp_customize->add_setting('football_academy_serviceheading_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'football_academy_sanitize_float'
	));
	$wp_customize->add_control('football_academy_serviceheading_font_size',array(
		'type' => 'number',
		'description' => __('Font Size','football-academy'),
		'section' => 'football_academy_service_section',
	));


	$categories = get_categories();
	$cats = array();
	$i = 0;
	$cat_pst[]= 'select';
	foreach($categories as $category){
		if($i==0){
			$default = $category->slug;
			$i++;
		}
		$cat_pst[$category->slug] = $category->name;
	}

	$wp_customize->add_setting('football_academy_service_category_setting',array(
		'default' => 'select',
		'sanitize_callback' => 'football_academy_sanitize_choices',
	));
	$wp_customize->add_control('football_academy_service_category_setting',array(
		'type' => 'select',
		'choices' => $cat_pst,
		'label' => __('Select Category To Display Post','football-academy'),
		'section' => 'football_academy_service_section',
	));

	$wp_customize->add_setting('football_academy_service_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'football_academy_sanitize_float'
	));
	$wp_customize->add_control('football_academy_service_font_size',array(
		'type' => 'number',
		'description' => __('Title Font Size','football-academy'),
		'section' => 'football_academy_service_section',
	));

	$wp_customize->add_setting( 'football_academy_service_heading_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_service_heading_color', array(
		'label' => 'Heading Color',
		'section' => 'football_academy_service_section',
	)));

	$wp_customize->add_setting( 'football_academy_service_title_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_service_title_color', array(
		'label' => 'Title Color',
		'section' => 'football_academy_service_section',
	)));

	$wp_customize->add_setting( 'football_academy_service_titlebg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_service_titlebg_color', array(
		'label' => 'Title Bg Color',
		'section' => 'football_academy_service_section',
	)));

	$wp_customize->add_setting( 'football_academy_service_icon_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_service_icon_color', array(
		'label' => 'Icon Color',
		'section' => 'football_academy_service_section',
	)));

	$wp_customize->add_setting( 'football_academy_service_iconbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'football_academy_service_iconbg_color', array(
		'label' => 'Icon Bg Color',
		'section' => 'football_academy_service_section',
	)));

	//Aboutus Section
	$wp_customize->add_section('football_academy_aboutus_section',array(
		'title'	=> __('Aboutus Settings','football-academy'),
		'description'=> __('<b>Note :</b> This section will appear below the slider.','football-academy'),
		'panel' => 'football_academy_panel_id',
	));

	$wp_customize->add_setting(
    	'football_academy_aboutus_rightimage',
	    array(
	        'sanitize_callback' => 'esc_url_raw'
	    )
	);
	$wp_customize->add_control(
	    new WP_Customize_Image_Control(
	        $wp_customize,
	        'football_academy_aboutus_rightimage',
	        array(
			    'label'   		=> __('Left Image','football-academy'),
				'description'   		=> __('Image size 400*600','football-academy'),
	            'section' => 'football_academy_aboutus_section',
	            'settings' => 'football_academy_aboutus_rightimage',
	        )
	    )
	);

	$wp_customize->add_setting('football_academy_aboutus_box1_icon',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box1_icon',array(
	   	'type' => 'text',
	   	'label' => __('Box 1 Icon (like far fa-clock)','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutus_box1_title',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box1_title',array(
	   	'type' => 'text',
	   	'label' => __('Box 1 Title','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutus_box1_description',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box1_description',array(
	   	'type' => 'text',
	   	'label' => __('Box 1 Description','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutus_box2_icon',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box2_icon',array(
	   	'type' => 'text',
	   	'label' => __('Box 2 Icon (like far fa-clock)','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutus_box2_title',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box2_title',array(
	   	'type' => 'text',
	   	'label' => __('Box 2 Title','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutus_box2_description',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box2_description',array(
	   	'type' => 'text',
	   	'label' => __('Box 2 Description','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutus_box3_icon',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box3_icon',array(
	   	'type' => 'text',
	   	'label' => __('Box 3 Icon (like far fa-clock)','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutus_box3_title',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box3_title',array(
	   	'type' => 'text',
	   	'label' => __('Box 3 Title','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutus_box3_description',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box3_description',array(
	   	'type' => 'text',
	   	'label' => __('Box 3 Description','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));


	$wp_customize->add_setting('football_academy_aboutus_box4_icon',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box4_icon',array(
	   	'type' => 'text',
	   	'label' => __('Box 4 Icon (like far fa-clock)','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutus_box4_title',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box4_title',array(
	   	'type' => 'text',
	   	'label' => __('Box 4 Title','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutus_box4_description',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_box4_description',array(
	   	'type' => 'text',
	   	'label' => __('Box 4 Description','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));


	
	$wp_customize->add_setting('football_academy_aboutustitle',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutustitle',array(
	   	'type' => 'text',
	   	'label' => __('Title','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutuspointlist_heading',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutuspointlist_heading',array(
	   	'type' => 'text',
	   	'label' => __('Heading','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

	$wp_customize->add_setting('football_academy_aboutusdescription',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutusdescription',array(
	   	'type' => 'text',
	   	'label' => __('Description','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));
	
	$wp_customize->add_setting('football_academy_aboutuspoint1',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutuspoint1',array(
	   	'type' => 'text',
	   	'label' => __('Point1','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));
	$wp_customize->add_setting('football_academy_aboutuspoint2',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutuspoint2',array(
	   	'type' => 'text',
	   	'label' => __('Point2','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));
	$wp_customize->add_setting('football_academy_aboutuspoint3',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));

	$wp_customize->add_control('football_academy_aboutuspoint3',array(
	   	'type' => 'text',
	   	'label' => __('Point3','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));

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

	$wp_customize->add_control('football_academy_aboutuspoint4',array(
	   	'type' => 'text',
	   	'label' => __('Point4','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));


	$wp_customize->add_setting('football_academy_aboutus_btnlink',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('football_academy_aboutus_btnlink',array(
	   	'type' => 'text',
	   	'label' => __('Button Link','football-academy'),
	   	'section' => 'football_academy_aboutus_section',
	));


	

	//Footer
    $wp_customize->add_section( 'football_academy_footer', array(
    	'title'  => __( 'Footer Settings', 'football-academy' ),
		'priority' => null,
		'panel' => 'football_academy_panel_id'
	) );

	$wp_customize->add_setting('football_academy_show_back_totop',array(
       'default' => true,
       'sanitize_callback'	=> 'football_academy_sanitize_checkbox'
    ));
    $wp_customize->add_control('football_academy_show_back_totop',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Back to Top','football-academy'),
       'section' => 'football_academy_footer'
    ));

    $wp_customize->add_setting('football_academy_footer_copy',array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('football_academy_footer_copy',array(
		'label'	=> __('Copyright Text','football-academy'),
		'section' => 'football_academy_footer',
		'setting' => 'football_academy_footer_copy',
		'type' => 'text'
	));

	

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

	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.site-title a',
		'render_callback' => 'football_academy_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'football_academy_customize_partial_blogdescription',
	) );
}
add_action( 'customize_register', 'football_academy_customize_register' );

function football_academy_customize_partial_blogname() {
	bloginfo( 'name' );
}

function football_academy_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

if (class_exists('WP_Customize_Control')) {

   	class Football_Academy_Fontawesome_Icon_Chooser extends WP_Customize_Control {

      	public $type = 'icon';

      	public function render_content() { ?>
	     	<label>
	            <span class="customize-control-title">
	               <?php echo esc_html($this->label); ?>
	            </span>

	            <?php if ($this->description) { ?>
	                <span class="description customize-control-description">
	                   <?php echo wp_kses_post($this->description); ?>
	                </span>
	            <?php } ?>

	            <div class="football-academy-selected-icon">
	                <i class="fa <?php echo esc_attr($this->value()); ?>"></i>
	                <span><i class="fa fa-angle-down"></i></span>
	            </div>

	            <ul class="football-academy-icon-list clearfix">
	                <?php
	                $football_academy_font_awesome_icon_array = football_academy_font_awesome_icon_array();
	                foreach ($football_academy_font_awesome_icon_array as $football_academy_font_awesome_icon) {
	                   $icon_class = $this->value() == $football_academy_font_awesome_icon ? 'icon-active' : '';
	                   echo '<li class=' . esc_attr($icon_class) . '><i class="' . esc_attr($football_academy_font_awesome_icon) . '"></i></li>';
	                }
	                ?>
	            </ul>
	            <input type="hidden" value="<?php $this->value(); ?>" <?php $this->link(); ?> />
	        </label>
	        <?php
      	}
  	}
}
function football_academy_customizer_script() {
   wp_enqueue_style( 'font-awesome-1', esc_url(get_template_directory_uri()).'/assets/css/fontawesome-all.css');
}
add_action( 'customize_controls_enqueue_scripts', 'football_academy_customizer_script' );