<?php
/**
 * Forest Adventure Tour: Customizer
 *
 * @subpackage Forest Adventure Tour
 * @since 1.0
 */

use WPTRT\Customize\Section\Forest_Adventure_Tour_Button;

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

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

	$manager->add_section(
		new Forest_Adventure_Tour_Button( $manager, 'forest_adventure_tour_pro', [
			'title' => __( 'Forest Adventure Tour Pro', 'forest-adventure-tour' ),
			'priority' => 0,
			'button_text' => __( 'Go Pro', 'forest-adventure-tour' ),
			'button_url'  => esc_url( 'https://www.luzuk.com/products/forest-adventure-wordpress-theme', 'forest-adventure-tour')
		] )
	);

} );

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

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

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

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

} );

function forest_adventure_tour_customize_register( $wp_customize ) {

	$wp_customize->add_setting('forest_adventure_tour_logo_size',array(
		'sanitize_callback'	=> 'forest_adventure_tour_sanitize_float'
	));
	$wp_customize->add_control('forest_adventure_tour_logo_size',array(
		'type' => 'range',
		'label' => __('Logo Size','forest-adventure-tour'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('forest_adventure_tour_logo_padding',array(
		'sanitize_callback'	=> 'esc_html'
	));
	$wp_customize->add_control('forest_adventure_tour_logo_padding',array(
		'label' => __('Logo Margin','forest-adventure-tour'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('forest_adventure_tour_logo_top_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'forest_adventure_tour_sanitize_float'
	));
	$wp_customize->add_control('forest_adventure_tour_logo_top_padding',array(
		'type' => 'number',
		'description' => __('Top','forest-adventure-tour'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('forest_adventure_tour_logo_bottom_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'forest_adventure_tour_sanitize_float'
	));
	$wp_customize->add_control('forest_adventure_tour_logo_bottom_padding',array(
		'type' => 'number',
		'description' => __('Bottom','forest-adventure-tour'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('forest_adventure_tour_logo_left_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'forest_adventure_tour_sanitize_float'
	));
	$wp_customize->add_control('forest_adventure_tour_logo_left_padding',array(
		'type' => 'number',
		'description' => __('Left','forest-adventure-tour'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('forest_adventure_tour_logo_right_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'forest_adventure_tour_sanitize_float'
 	));
 	$wp_customize->add_control('forest_adventure_tour_logo_right_padding',array(
		'type' => 'number',
		'description' => __('Right','forest-adventure-tour'),
		'section' => 'title_tagline',
    ));

	$wp_customize->add_setting('forest_adventure_tour_show_site_title',array(
		'default' => true,
		'sanitize_callback'	=> 'forest_adventure_tour_sanitize_checkbox'
	));
	$wp_customize->add_control('forest_adventure_tour_show_site_title',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Title','forest-adventure-tour'),
		'section' => 'title_tagline'
	));

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

	$wp_customize->add_setting('forest_adventure_tour_show_tagline',array(
		'default' => true,
		'sanitize_callback'	=> 'forest_adventure_tour_sanitize_checkbox'
	));
	$wp_customize->add_control('forest_adventure_tour_show_tagline',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Tagline','forest-adventure-tour'),
		'section' => 'title_tagline'
	));

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

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

	$wp_customize->add_section( 'forest_adventure_tour_theme_options_section', array(
    	'title'      => __( 'General Settings', 'forest-adventure-tour' ),
		'priority'   => 30,
		'panel' => 'forest_adventure_tour_panel_id'
	) );

	$wp_customize->add_setting('forest_adventure_tour_theme_options',array(
		'default' => 'One Column',
		'sanitize_callback' => 'forest_adventure_tour_sanitize_choices'
	));
	$wp_customize->add_control('forest_adventure_tour_theme_options',array(
		'type' => 'select',
		'label' => __('Blog Page Sidebar Layout','forest-adventure-tour'),
		'section' => 'forest_adventure_tour_theme_options_section',
		'choices' => array(
		   'Left Sidebar' => __('Left Sidebar','forest-adventure-tour'),
		   'Right Sidebar' => __('Right Sidebar','forest-adventure-tour'),
		   'One Column' => __('One Column','forest-adventure-tour'),
		   'Grid Layout' => __('Grid Layout','forest-adventure-tour')
		),
	));

	$wp_customize->add_setting('forest_adventure_tour_single_post_sidebar',array(
		'default' => 'Right Sidebar',
		'sanitize_callback' => 'forest_adventure_tour_sanitize_choices'
	));
	$wp_customize->add_control('forest_adventure_tour_single_post_sidebar',array(
        'type' => 'select',
        'label' => __('Single Post Sidebar Layout','forest-adventure-tour'),
        'section' => 'forest_adventure_tour_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','forest-adventure-tour'),
            'Right Sidebar' => __('Right Sidebar','forest-adventure-tour'),
            'One Column' => __('One Column','forest-adventure-tour')
        ),
	));

	$wp_customize->add_setting('forest_adventure_tour_page_sidebar',array(
		'default' => 'One Column',
		'sanitize_callback' => 'forest_adventure_tour_sanitize_choices'
	));
	$wp_customize->add_control('forest_adventure_tour_page_sidebar',array(
        'type' => 'select',
        'label' => __('Page Sidebar Layout','forest-adventure-tour'),
        'section' => 'forest_adventure_tour_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','forest-adventure-tour'),
            'Right Sidebar' => __('Right Sidebar','forest-adventure-tour'),
            'One Column' => __('One Column','forest-adventure-tour')
        ),
	));

	$wp_customize->add_setting('forest_adventure_tour_archive_page_sidebar',array(
		'default' => 'One Column',
		'sanitize_callback' => 'forest_adventure_tour_sanitize_choices'
	));
	$wp_customize->add_control('forest_adventure_tour_archive_page_sidebar',array(
        'type' => 'select',
        'label' => __('Archive & Search Page Sidebar Layout','forest-adventure-tour'),
        'section' => 'forest_adventure_tour_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','forest-adventure-tour'),
            'Right Sidebar' => __('Right Sidebar','forest-adventure-tour'),
            'One Column' => __('One Column','forest-adventure-tour'),
            'Grid Layout' => __('Grid Layout','forest-adventure-tour')
        ),
	));

	$wp_customize->add_setting( 'forest_adventure_tour_boxfull_width', array(
		'default'           => '',
		'sanitize_callback' => 'forest_adventure_tour_sanitize_choices'
	));
	
	$wp_customize->add_control( 'forest_adventure_tour_boxfull_width', array(
		'label'    => __( 'Section Width', 'forest-adventure-tour' ),
		'section'  => 'forest_adventure_tour_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'container'  => __('Box Width', 'forest-adventure-tour'),
			'container-fluid' => __('Full Width', 'forest-adventure-tour'),
			'none' => __('None', 'forest-adventure-tour')
		),
	));

	$wp_customize->add_setting( 'forest_adventure_tour_dropdown_anim', array(
		'default'           => 'None',
		'sanitize_callback' => 'forest_adventure_tour_sanitize_choices'
	));
	$wp_customize->add_control( 'forest_adventure_tour_dropdown_anim', array(
		'label'    => __( 'Menu Dropdown Animations', 'forest-adventure-tour' ),
		'section'  => 'forest_adventure_tour_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInUp'  => __('bounceInUp', 'forest-adventure-tour'),
			'fadeInUp' => __('fadeInUp', 'forest-adventure-tour'),
			'zoomIn'    => __('zoomIn', 'forest-adventure-tour'),
			'None'    => __('None', 'forest-adventure-tour')
		),
	));

	//Header
	$wp_customize->add_section( 'forest_adventure_tour_header' , array(
    	'title'    => __( 'Header Settings', 'forest-adventure-tour' ),
		'priority' => null,
		'panel' => 'forest_adventure_tour_panel_id'
	));


	$wp_customize->add_setting('forest_adventure_tour_header_contactbtntext',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_header_contactbtntext',array(
	   	'type' => 'text',
	   	'label' => __('Button Text','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_header',
	));


	$wp_customize->add_setting('forest_adventure_tour_header_contactbtnlink',array(
    	'default' => '',
    	'sanitize_callback'	=> 'esc_url_raw'
	));
	$wp_customize->add_control('forest_adventure_tour_header_contactbtnlink',array(
	   	'type' => 'url',
	   	'label' => __('Button Link','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_header',
	));

	$wp_customize->add_setting( 'forest_adventure_tour_menu_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'forest_adventure_tour_menu_color', array(
		'label' => 'Menu Color',
		'section' => 'forest_adventure_tour_header',
	)));

	$wp_customize->add_setting( 'forest_adventure_tour_menuhvr_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'forest_adventure_tour_menuhvr_color', array(
		'label' => 'Menu Hover Color',
		'section' => 'forest_adventure_tour_header',
	)));

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

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

	//home page slider
	$wp_customize->add_section( 'forest_adventure_tour_slider_section' , array(
    	'title'    => __( 'Slider Settings', 'forest-adventure-tour' ),
		'description'=> __('<b>Note :</b> The Image size should be 1800px*1200px','forest-adventure-tour'),
		'priority' => null,
		'panel' => 'forest_adventure_tour_panel_id'
	) );

	$wp_customize->add_setting('forest_adventure_tour_slider_hide_show',array(
    	'default' => false,
    	'sanitize_callback'	=> 'forest_adventure_tour_sanitize_checkbox'
	));
	$wp_customize->add_control('forest_adventure_tour_slider_hide_show',array(
	   	'type' => 'checkbox',
	   	'label' => __('Show / Hide Slider','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_slider_section',
	));

	$wp_customize->add_setting( 'forest_adventure_tour_slider_effect', array(
		'default'           => '',
		'sanitize_callback' => 'forest_adventure_tour_sanitize_choices'
	));
	$wp_customize->add_control( 'forest_adventure_tour_slider_effect', array(
		'label'    => __( 'Onload Transactions Effects', 'forest-adventure-tour' ),
		'section'  => 'forest_adventure_tour_slider_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInLeft'  => __('bounceInLeft', 'forest-adventure-tour'),
			'bounceInRight' => __('bounceInRight', 'forest-adventure-tour'),
			'bounceInUp'    => __('bounceInUp', 'forest-adventure-tour'),
			'bounceInDown'    => __('bounceInDown', 'forest-adventure-tour'),
			'zoomIn'  => __('zoomIn', 'forest-adventure-tour'),
			'zoomOut' => __('zoomOut', 'forest-adventure-tour'),
			'fadeInDown'    => __('fadeInDown', 'forest-adventure-tour'),
			'fadeInUp'    => __('fadeInUp', 'forest-adventure-tour'),
			'fadeInLeft'  => __('fadeInLeft', 'forest-adventure-tour'),
			'fadeInRight' => __('fadeInRight', 'forest-adventure-tour'),
			'flip-up'    => __('flip-up', 'forest-adventure-tour'),
			'none'    => __('none', 'forest-adventure-tour')
		),
	));

	for ( $count = 1; $count <= 3; $count++ ) {
		$wp_customize->add_setting( 'forest_adventure_tour_slider' . $count, array(
			'default'           => '',
			'sanitize_callback' => 'forest_adventure_tour_sanitize_dropdown_pages'
		));
		$wp_customize->add_control( 'forest_adventure_tour_slider' . $count, array(
			'label' => __('Select Slider Image Page', 'forest-adventure-tour' ),
			'section' => 'forest_adventure_tour_slider_section',
			'type' => 'dropdown-pages'
		));
	}

	$wp_customize->add_setting('forest_adventure_tour_slider_excerpt_length',array(
		'default' => '15',
		'sanitize_callback'	=> 'forest_adventure_tour_sanitize_float'
	));
	$wp_customize->add_control('forest_adventure_tour_slider_excerpt_length',array(
		'type' => 'number',
		'label' => __('Slider Excerpt Length','forest-adventure-tour'),
		'section' => 'forest_adventure_tour_slider_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_slider_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'forest_adventure_tour_sanitize_float'
	));
	$wp_customize->add_control('forest_adventure_tour_slider_font_size',array(
		'type' => 'number',
		'label' => __('Title Font Size','forest-adventure-tour'),
		'section' => 'forest_adventure_tour_slider_section',
	));

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

	//Aboutus Section
	$wp_customize->add_section('forest_adventure_tour_aboutus_section',array(
		'title'	=> __('Aboutus Settings','forest-adventure-tour'),
		'description'=> __('<b>Note :</b> This section will appear below the slider.','forest-adventure-tour'),
		'panel' => 'forest_adventure_tour_panel_id',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutusheading',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutusheading',array(
	   	'type' => 'text',
	   	'label' => __('Sub Heading','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutustitle',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutustitle',array(
	   	'type' => 'text',
	   	'label' => __('Heading','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutusdescription',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutusdescription',array(
	   	'type' => 'text',
	   	'label' => __('Description','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_box1_icon',array(
    	'default' => 'fas fa-money-bill-alt',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_box1_icon',array(
	   	'type' => 'text',
	   	'label' => __('Box 1 Icon','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_box1_title',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_box1_title',array(
	   	'type' => 'text',
	   	'label' => __('Box 1 Title','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_box1_description',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_box1_description',array(
	   	'type' => 'text',
	   	'label' => __('Box 1 Description','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_box2_icon',array(
    	'default' => 'fas fa-money-bill-alt',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_box2_icon',array(
	   	'type' => 'text',
	   	'label' => __('Box 2 Icon','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_box2_title',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_box2_title',array(
	   	'type' => 'text',
	   	'label' => __('Box 2 Title','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_box2_description',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_box2_description',array(
	   	'type' => 'text',
	   	'label' => __('Box 2 Description','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));


	$wp_customize->add_setting(
    	'forest_adventure_tour_aboutus_rightimage',
	    array(
	        'sanitize_callback' => 'esc_url_raw'
	    )
	);
	$wp_customize->add_control(
	    new WP_Customize_Image_Control(
	        $wp_customize,
	        'forest_adventure_tour_aboutus_rightimage',
	        array(
			    'label'   		=> __('Right Image','forest-adventure-tour'),
				'description'=> __('<b>Note :</b> The Image size should be 500px*600px','forest-adventure-tour'),
	            'section' => 'forest_adventure_tour_aboutus_section',
	            'settings' => 'forest_adventure_tour_aboutus_rightimage',
	        )
	    )
	);

	$wp_customize->add_setting('forest_adventure_tour_aboutus_imgoverlay_box1_icon',array(
    	'default' => 'fas fa-money-bill-alt',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_imgoverlay_box1_icon',array(
	   	'type' => 'text',
	   	'label' => __('Image Overlay Box 1 Icon','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_imgoverlay_box1_number',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_imgoverlay_box1_number',array(
	   	'type' => 'text',
	   	'label' => __('Image Overlay Box 1 Number','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_imgoverlay_box1_text',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_imgoverlay_box1_text',array(
	   	'type' => 'text',
	   	'label' => __('Image Overlay Box 1 Text','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_imgoverlay_box2_icon',array(
    	'default' => 'fas fa-money-bill-alt',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_imgoverlay_box2_icon',array(
	   	'type' => 'text',
	   	'label' => __('Image Overlay Box 2 Icon','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_imgoverlay_box2_number',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_imgoverlay_box2_number',array(
	   	'type' => 'text',
	   	'label' => __('Image Overlay Box 2 Number','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_aboutus_imgoverlay_box2_text',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_aboutus_imgoverlay_box2_text',array(
	   	'type' => 'text',
	   	'label' => __('Image Overlay Box 2 Text','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_aboutus_section',
	));

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

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

	$wp_customize->add_setting( 'forest_adventure_tour_aboutus_desc_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'forest_adventure_tour_aboutus_desc_color', array(
		'label' => 'Description Color',
		'section' => 'forest_adventure_tour_aboutus_section',
	)));

	//Services Section
	$wp_customize->add_section('forest_adventure_tour_services_section',array(
		'title'	=> __('Services Settings','forest-adventure-tour'),
		'description'=> __('<b>Note :</b> This section will appear below the Aboutus.','forest-adventure-tour'),
		'panel' => 'forest_adventure_tour_panel_id',
	));


	$wp_customize->add_setting('forest_adventure_tour_servicesubheading',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_servicesubheading',array(
	   	'type' => 'text',
	   	'label' => __('Sub Heading','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_services_section',
	));

	$wp_customize->add_setting('forest_adventure_tour_serviceheading',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('forest_adventure_tour_serviceheading',array(
	   	'type' => 'text',
	   	'label' => __('Heading','forest-adventure-tour'),
	   	'section' => 'forest_adventure_tour_services_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('forest_adventure_tour_services_category_setting',array(
		'default' => 'select',
		'sanitize_callback' => 'forest_adventure_tour_sanitize_choices',
	));
	$wp_customize->add_control('forest_adventure_tour_services_category_setting',array(
		'type' => 'select',
		'choices' => $cat_pst,
		'label' => __('Select Category To Display Post','forest-adventure-tour'),
		'section' => 'forest_adventure_tour_services_section',
	));



	//Footer
    $wp_customize->add_section( 'forest_adventure_tour_footer', array(
    	'title'  => __( 'Footer Settings', 'forest-adventure-tour' ),
		'priority' => null,
		'panel' => 'forest_adventure_tour_panel_id'
	) );

	$wp_customize->add_setting('forest_adventure_tour_show_back_totop',array(
       'default' => true,
       'sanitize_callback'	=> 'forest_adventure_tour_sanitize_checkbox'
    ));
    $wp_customize->add_control('forest_adventure_tour_show_back_totop',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Back to Top','forest-adventure-tour'),
       'section' => 'forest_adventure_tour_footer'
    ));

    $wp_customize->add_setting('forest_adventure_tour_footer_link',array(
		'default' => 'https://www.luzuk.com/products/free-forest-wordpress-theme',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('forest_adventure_tour_footer_link',array(
		'label'	=> __('Copyright Link','forest-adventure-tour'),
		'section' => 'forest_adventure_tour_footer',
		'setting' => 'forest_adventure_tour_footer_link',
		'type' => 'text'
	));

	$wp_customize->add_setting('forest_adventure_tour_footer_copy',array(
		'default' => 'Forest Adventure Tour WordPress Theme By Luzuk',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('forest_adventure_tour_footer_copy',array(
		'label'	=> __('Copyright Text','forest-adventure-tour'),
		'section' => 'forest_adventure_tour_footer',
		'setting' => 'forest_adventure_tour_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' => 'forest_adventure_tour_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'forest_adventure_tour_customize_partial_blogdescription',
	) );
}
add_action( 'customize_register', 'forest_adventure_tour_customize_register' );

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

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

if (class_exists('WP_Customize_Control')) {

   	class Forest_Adventure_Tour_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="forest-adventure-tour-selected-icon">
	                <i class="fa <?php echo esc_attr($this->value()); ?>"></i>
	                <span><i class="fa fa-angle-down"></i></span>
	            </div>

	            <ul class="forest-adventure-tour-icon-list clearfix">
	                <?php
	                $forest_adventure_tour_font_awesome_icon_array = forest_adventure_tour_font_awesome_icon_array();
	                foreach ($forest_adventure_tour_font_awesome_icon_array as $forest_adventure_tour_font_awesome_icon) {
	                   $icon_class = $this->value() == $forest_adventure_tour_font_awesome_icon ? 'icon-active' : '';
	                   echo '<li class=' . esc_attr($icon_class) . '><i class="' . esc_attr($forest_adventure_tour_font_awesome_icon) . '"></i></li>';
	                }
	                ?>
	            </ul>
	            <input type="hidden" value="<?php $this->value(); ?>" <?php $this->link(); ?> />
	        </label>
	        <?php
      	}
  	}
}
function forest_adventure_tour_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', 'forest_adventure_tour_customizer_script' );