<?php
/**
 * Forest Safari Theme Customizer
 *
 * @package Forest Safari
 */

function forest_safari_customize_register( $wp_customize ) {

	load_template( trailingslashit( get_template_directory() ) . 'revolution/inc/fontawesome-change.php' );

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

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'        => '.site-title a',
				'render_callback' => 'forest_safari_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'forest_safari_customize_partial_blogdescription',
			)
		);
	}

	/*
    * Theme Options Panel
    */
	$wp_customize->add_panel('forest_safari_panel', array(
		'priority' => 25,
		'capability' => 'edit_theme_options',
		'title' => __('Forest Safari Theme Options', 'forest-safari'),
	));

	/*Additional Options*/
	$wp_customize->add_section('forest_safari_additional_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Additional Options', 'forest-safari'),
		'panel'       => 'forest_safari_panel',
	));

	/*Main Slider Enable Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_sticky_header',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => false,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_enable_sticky_header',
		array(
			'label'       => __('Enable Sticky Header', 'forest-safari'),
			'description' => __('Checked to enable sticky header', 'forest-safari'),
			'section'     => 'forest_safari_additional_section',
			'type'        => 'checkbox',
		)
	);

	/*Main Slider Enable Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_preloader',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 0,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_enable_preloader',
		array(
			'label'       => __('Enable Preloader', 'forest-safari'),
			'description' => __('Checked to show preloader', 'forest-safari'),
			'section'     => 'forest_safari_additional_section',
			'type'        => 'checkbox',
		)
	);

	/*Breadcrumbs Enable Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_breadcrumbs',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_enable_breadcrumbs',
		array(
			'label'       => __('Enable Breadcrumbs', 'forest-safari'),
			'description' => __('Checked to show Breadcrumbs', 'forest-safari'),
			'section'     => 'forest_safari_additional_section',
			'type'        => 'checkbox',
		)
	);

	/*Pagination Enable Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_pagination',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_enable_pagination',
		array(
			'label'       => __('Enable Pagination', 'forest-safari'),
			'description' => __('Checked to show Pagination', 'forest-safari'),
			'section'     => 'forest_safari_additional_section',
			'type'        => 'checkbox',
		)
	);

	/*Pagination Select Type Option*/
	$wp_customize->add_setting('forest_safari_pagination_type',array(
        'default' => 'type-1',
        'sanitize_callback' => 'forest_safari_sanitize_choices'
	));
	$wp_customize->add_control('forest_safari_pagination_type',array(
        'type' => 'select',
        'label' => esc_html__('Select Pagination Type','forest-safari'),
        'section' => 'forest_safari_additional_section',
        'choices' => array(
            'type-1' => esc_html__('Type 1','forest-safari'),
            'type-2' => esc_html__('Type 2','forest-safari'),
        ),
	) );

	/*Post layout*/
	$wp_customize->add_setting('forest_safari_archive_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'forest_safari_sanitize_choices'
	));
	$wp_customize->add_control('forest_safari_archive_layout',array(
        'type' => 'select',
        'label' => esc_html__('Post Layout','forest-safari'),
        'section' => 'forest_safari_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','forest-safari'),
            'layout-2' => esc_html__('Sidebar On Left','forest-safari'),
			'layout-3' => esc_html__('Full Width Layout','forest-safari')
        ),
	) );

	/*single post layout*/
	$wp_customize->add_setting('forest_safari_post_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'forest_safari_sanitize_choices'
	));
	$wp_customize->add_control('forest_safari_post_layout',array(
        'type' => 'select',
        'label' => esc_html__('Single Post Layout','forest-safari'),
        'section' => 'forest_safari_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','forest-safari'),
            'layout-2' => esc_html__('Sidebar On Left','forest-safari'),
			'layout-3' => esc_html__('Full Width Layout','forest-safari')
        ),
	) );

	/*single page layout*/
	$wp_customize->add_setting('forest_safari_page_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'forest_safari_sanitize_choices'
	));
	$wp_customize->add_control('forest_safari_page_layout',array(
        'type' => 'select',
        'label' => esc_html__('Single Page Layout','forest-safari'),
        'section' => 'forest_safari_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','forest-safari'),
            'layout-2' => esc_html__('Sidebar On Left','forest-safari'),
			'layout-3' => esc_html__('Full Width Layout','forest-safari')
        ),
	) );

	/*Archive Post Options*/
	$wp_customize->add_section('forest_safari_blog_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Blog Page Options', 'forest-safari'),
		'panel'       => 'forest_safari_panel',
	));

	$wp_customize->add_setting('forest_safari_enable_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_blog_post_title',array(
		'label'       => __('Enable Blog Post Title', 'forest-safari'),
		'description' => __('Checked To Show Blog Post Title', 'forest-safari'),
		'section'     => 'forest_safari_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('forest_safari_enable_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_blog_post_meta',array(
		'label'       => __('Enable Blog Post Meta', 'forest-safari'),
		'description' => __('Checked To Show Blog Post Meta Feilds', 'forest-safari'),
		'section'     => 'forest_safari_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('forest_safari_enable_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_blog_post_tags',array(
		'label'       => __('Enable Blog Post Tags', 'forest-safari'),
		'description' => __('Checked To Show Blog Post Tags', 'forest-safari'),
		'section'     => 'forest_safari_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('forest_safari_enable_blog_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_blog_post_image',array(
		'label'       => __('Enable Blog Post Image', 'forest-safari'),
		'description' => __('Checked To Show Blog Post Image', 'forest-safari'),
		'section'     => 'forest_safari_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('forest_safari_enable_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_blog_post_content',array(
		'label'       => __('Enable Blog Post Content', 'forest-safari'),
		'description' => __('Checked To Show Blog Post Content', 'forest-safari'),
		'section'     => 'forest_safari_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('forest_safari_enable_blog_post_button',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_blog_post_button',array(
		'label'       => __('Enable Blog Post Read More Button', 'forest-safari'),
		'description' => __('Checked To Show Blog Post Read More Button', 'forest-safari'),
		'section'     => 'forest_safari_blog_post_section',
		'type'        => 'checkbox',
	));

	/*Blog post Content layout*/
	$wp_customize->add_setting('forest_safari_blog_Post_content_layout',array(
        'default' => 'Left',
        'sanitize_callback' => 'forest_safari_sanitize_choices'
	));
	$wp_customize->add_control('forest_safari_blog_Post_content_layout',array(
        'type' => 'select',
        'label' => esc_html__('Blog Post Content Layout','forest-safari'),
        'section' => 'forest_safari_blog_post_section',
        'choices' => array(
            'Left' => esc_html__('Left','forest-safari'),
            'Center' => esc_html__('Center','forest-safari'),
            'Right' => esc_html__('Right','forest-safari')
        ),
	) );


	/*Excerpt*/
    $wp_customize->add_setting(
		'forest_safari_excerpt_limit',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '25',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_excerpt_limit',
		array(
			'label'       => __('Excerpt Limit', 'forest-safari'),
			'section'     => 'forest_safari_blog_post_section',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 2,
	             'max' => 50,
	             'step' => 2,
	         ),
		)
	);

	/*Archive Button Text*/
	$wp_customize->add_setting(
		'forest_safari_read_more_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Continue Reading....',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_read_more_text',
		array(
			'label'       => __('Edit Button Text ', 'forest-safari'),
			'section'     => 'forest_safari_blog_post_section',
			'type'        => 'text',
		)
	);

	/*Single Post Options*/
	$wp_customize->add_section('forest_safari_single_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Single Post Options', 'forest-safari'),
		'panel'       => 'forest_safari_panel',
	));

	$wp_customize->add_setting('forest_safari_enable_single_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_single_blog_post_title',array(
		'label'       => __('Enable Single Post Title', 'forest-safari'),
		'description' => __('Checked To Show Single Blog Post Title', 'forest-safari'),
		'section'     => 'forest_safari_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('forest_safari_enable_single_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_single_blog_post_meta',array(
		'label'       => __('Enable Single Post Meta', 'forest-safari'),
		'description' => __('Checked To Show Single Blog Post Meta Feilds', 'forest-safari'),
		'section'     => 'forest_safari_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('forest_safari_enable_single_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_single_blog_post_tags',array(
		'label'       => __('Enable Single Post Tags', 'forest-safari'),
		'description' => __('Checked To Show Single Blog Post Tags', 'forest-safari'),
		'section'     => 'forest_safari_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('forest_safari_enable_single_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_single_post_image',array(
		'label'       => __('Enable Single Post Image', 'forest-safari'),
		'description' => __('Checked To Show Single Post Image', 'forest-safari'),
		'section'     => 'forest_safari_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('forest_safari_enable_single_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'forest_safari_sanitize_checkbox',
	));
	$wp_customize->add_control('forest_safari_enable_single_blog_post_content',array(
		'label'       => __('Enable Single Post Content', 'forest-safari'),
		'description' => __('Checked To Show Single Blog Post Content', 'forest-safari'),
		'section'     => 'forest_safari_single_post_section',
		'type'        => 'checkbox',
	));

	/*Related Post Enable Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_related_post',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_enable_related_post',
		array(
			'label'       => __('Enable Related Post', 'forest-safari'),
			'description' => __('Checked to show Related Post', 'forest-safari'),
			'section'     => 'forest_safari_single_post_section',
			'type'        => 'checkbox',
		)
	);

	/*Related post Edit Text*/
	$wp_customize->add_setting(
		'forest_safari_related_post_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Related Post',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_related_post_text',
		array(
			'label'       => __('Edit Related Post Text ', 'forest-safari'),
			'section'     => 'forest_safari_single_post_section',
			'type'        => 'text',
		)
	);	

	/*Related Post Per Page*/
	$wp_customize->add_setting(
		'forest_safari_related_post_count',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '3',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_related_post_count',
		array(
			'label'       => __('Related Post Count', 'forest-safari'),
			'section'     => 'forest_safari_single_post_section',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 9,
	             'step' => 1,
	         ),
		)
	);

	/* Comment Section Enable Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_comment_section',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_enable_comment_section',
		array(
			'label'       => __('Enable Comment Section', 'forest-safari'),
			'description' => __('Checked to show Comment Section', 'forest-safari'),
			'section'     => 'forest_safari_single_post_section',
			'type'        => 'checkbox',
		)
	);

	/*
	* Customizer top header section
	*/

	$wp_customize->add_setting(
		'forest_safari_site_title_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_site_title_text',
		array(
			'label'       => __('Enable Title', 'forest-safari'),
			'description' => __('Enable or Disable Title from the site', 'forest-safari'),
			'section'     => 'title_tagline',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting(
		'forest_safari_site_tagline_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 0,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_site_tagline_text',
		array(
			'label'       => __('Enable Tagline', 'forest-safari'),
			'description' => __('Enable or Disable Tagline from the site', 'forest-safari'),
			'section'     => 'title_tagline',
			'type'        => 'checkbox',
		)
	);

	

	$wp_customize->add_setting(
		'forest_safari_logo_width',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '150',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_logo_width',
		array(
			'label'       => __('Logo Width in PX', 'forest-safari'),
			'section'     => 'title_tagline',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 100,
	             'max' => 300,
	             'step' => 1,
	         ),
		)
	);

	/* WooCommerce custom settings */

	$wp_customize->add_section('woocommerce_custom_settings', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('WooCommerce Custom Settings', 'forest-safari'),
		'panel'       => 'woocommerce',
	));

	$wp_customize->add_setting(
		'forest_safari_per_columns',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '3',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_per_columns',
		array(
			'label'       => __('Product Per Single Row', 'forest-safari'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 4,
	             'step' => 1,
	         ),
		)
	);

	$wp_customize->add_setting(
		'forest_safari_product_per_page',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '6',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_product_per_page',
		array(
			'label'       => __('Product Per One Page', 'forest-safari'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 12,
	             'step' => 1,
	         ),
		)
	);

	/*Related Products Enable Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_related_product',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_enable_related_product',
		array(
			'label'       => __('Enable Related Product', 'forest-safari'),
			'description' => __('Checked to show Related Product', 'forest-safari'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting(
		'custom_related_products_number',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '3',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'custom_related_products_number',
		array(
			'label'       => __('Related Product Count', 'forest-safari'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 20,
	             'step' => 1,
	         ),
		)
	);

	$wp_customize->add_setting(
		'custom_related_products_number_per_row',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '3',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'custom_related_products_number_per_row',
		array(
			'label'       => __('Related Product Per Row', 'forest-safari'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 4,
	             'step' => 1,
	         ),
		)
	);

	/*Archive Product layout*/
	$wp_customize->add_setting('forest_safari_archive_product_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'forest_safari_sanitize_choices'
	));
	$wp_customize->add_control('forest_safari_archive_product_layout',array(
        'type' => 'select',
        'label' => esc_html__('Archive Product Layout','forest-safari'),
        'section' => 'woocommerce_custom_settings',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','forest-safari'),
            'layout-2' => esc_html__('Sidebar On Left','forest-safari'),
			'layout-3' => esc_html__('Full Width Layout','forest-safari')
        ),
	) );

	/*Single Product layout*/
	$wp_customize->add_setting('forest_safari_single_product_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'forest_safari_sanitize_choices'
	));
	$wp_customize->add_control('forest_safari_single_product_layout',array(
        'type' => 'select',
        'label' => esc_html__('Single Product Layout','forest-safari'),
        'section' => 'woocommerce_custom_settings',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','forest-safari'),
            'layout-2' => esc_html__('Sidebar On Left','forest-safari'),
			'layout-3' => esc_html__('Full Width Layout','forest-safari')
        ),
	) );

	$wp_customize->add_setting('forest_safari_woocommerce_product_sale',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
        'default'           => 'Right',
        'sanitize_callback' => 'forest_safari_sanitize_choices'
    ));
    $wp_customize->add_control('forest_safari_woocommerce_product_sale',array(
        'label'       => esc_html__( 'Woocommerce Product Sale Positions','forest-safari' ),
        'type' => 'select',
        'section' => 'woocommerce_custom_settings',
        'choices' => array(
            'Right' => __('Right','forest-safari'),
            'Left' => __('Left','forest-safari'),
            'Center' => __('Center','forest-safari')
        ),
    ) );

	/*
	* Customizer Global COlor
	*/

	/*Global Color Options*/
	$wp_customize->add_section('forest_safari_global_color_section', array(
		'priority'       => 1,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Global Color Options', 'forest-safari'),
		'panel'       => 'forest_safari_panel',
	));

	$wp_customize->add_setting( 'forest_safari_primary_color',
		array(
		'default'           => '#057357',
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control( 
		new WP_Customize_Color_Control( 
		$wp_customize, 
		'forest_safari_primary_color',
		array(
			'label'      => esc_html__( 'Primary Color', 'forest-safari' ),
			'section'    => 'forest_safari_global_color_section',
			'settings'   => 'forest_safari_primary_color',
		) ) 
	);

	/*Typography Options*/
	$wp_customize->add_section( 'forest_safari_typography_section', array(
		'panel'       => 'forest_safari_panel',
        'title'    => __( 'Typography Options', 'forest-safari' ),
        'priority' => 2,
    ) );

    $wp_customize->add_setting( 'forest_safari_font_family', array(
		'default'           => 'default',
		'sanitize_callback' => 'forest_safari_sanitize_font_family',
	) );
	
	$wp_customize->add_control( 'forest_safari_font_family', array(
		'label'    => __( 'Global Font Family', 'forest-safari' ),
		'section'  => 'forest_safari_typography_section',
		'type'     => 'select',
		'choices'  => array(
			'default'          => __( 'Default (Theme Font)', 'forest-safari' ),
			'bad_script'       => 'Bad Script',
			'roboto'           => 'Roboto',
			'playfair_display' => 'Playfair Display',
			'open_sans'        => 'Open Sans',
			'lobster'          => 'Lobster',
			'merriweather'     => 'Merriweather',
			'oswald'           => 'Oswald',
			'raleway'          => 'Raleway',
			// Add new fonts here
			'poppins'            => 'Poppins',
			'lato'               => 'Lato',
			'source_sans_pro'    => 'Source Sans Pro',
			'quicksand'          => 'Quicksand',
			'nunito'             => 'Nunito',
			'montserrat'         => 'Montserrat',
			'roboto_condensed'   => 'Roboto Condensed',
			'playfair_display_sc'=> 'Playfair Display SC',
			'alegreya'           => 'Alegreya',
			'fira_sans'          => 'Fira Sans',
		),
	) );
	
	/*Top Header Options*/
	$wp_customize->add_section('forest_safari_topbar_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Top Header Options', 'forest-safari'),
		'panel'       => 'forest_safari_panel',
	));

	/*Top Header Text*/
	$wp_customize->add_setting(
		'forest_safari_header_topbar_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'For financial peace of mind you can trust Fintech',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_header_topbar_text',
		array(
			'label'       => __('Edit Header Text ', 'forest-safari'),
			'section'     => 'forest_safari_topbar_section',
			'type'        => 'text',
		)
	);

	/*Top Header Button 1 Text*/
	$wp_customize->add_setting(
		'forest_safari_topbar_button1_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Help',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_topbar_button1_text',
		array(
			'label'       => __('Edit Help Text ', 'forest-safari'),
			'section'     => 'forest_safari_topbar_section',
			'type'        => 'text',
		)
	);

	/*Top Header Button 1 Link*/
	$wp_customize->add_setting(
		'forest_safari_topbar_button1_link',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'forest_safari_topbar_button1_link',
		array(
			'label'       => __('Edit Help Page Link ', 'forest-safari'),
			'section'     => 'forest_safari_topbar_section',
			'type'        => 'url',
		)
	);

	/*Top Header Button 2 Text*/
	$wp_customize->add_setting(
		'forest_safari_topbar_button2_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'What We Do',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_topbar_button2_text',
		array(
			'label'       => __('Edit What We Do Text ', 'forest-safari'),
			'section'     => 'forest_safari_topbar_section',
			'type'        => 'text',
		)
	);

	/*Top Header Button2 Link*/
	$wp_customize->add_setting(
		'forest_safari_topbar_button2_link',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'forest_safari_topbar_button2_link',
		array(
			'label'       => __('Edit What We Do Page Link ', 'forest-safari'),
			'section'     => 'forest_safari_topbar_section',
			'type'        => 'url',
		)
	);

	/*Top Header Button 3 Text*/
	$wp_customize->add_setting(
		'forest_safari_topbar_button3_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Faqs',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_topbar_button3_text',
		array(
			'label'       => __('Edit Faqs Text ', 'forest-safari'),
			'section'     => 'forest_safari_topbar_section',
			'type'        => 'text',
		)
	);

	/*Top Header Button 3 Link*/
	$wp_customize->add_setting(
		'forest_safari_topbar_button3_link',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'forest_safari_topbar_button3_link',
		array(
			'label'       => __('Edit Faqs Page Link ', 'forest-safari'),
			'section'     => 'forest_safari_topbar_section',
			'type'        => 'url',
		)
	);

	/*
	* Customizer main header section
	*/

	/*Main Header Options*/
	$wp_customize->add_section('forest_safari_header_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Header Options', 'forest-safari'),
		'panel'       => 'forest_safari_panel',
	));

	/*Main Header Address Text*/
	$wp_customize->add_setting(
		'forest_safari_header_info_address',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_header_info_address',
		array(
			'label'       => __('Edit Address', 'forest-safari'),
			'section'     => 'forest_safari_header_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting('forest_safari_header_location_icon',array(
		'default'	=> 'fas fa-map-marker-alt',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Forest_Safari_Icon_Changer(
        $wp_customize,'forest_safari_header_location_icon',array(
		'label'	=> __('Location Icon','forest-safari'),
		'transport' => 'refresh',
		'section'	=> 'forest_safari_header_section',
		'type'		=> 'icon'
	)));

	/*Main Header Phone Text*/
	$wp_customize->add_setting(
		'forest_safari_header_info_phone',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_header_info_phone',
		array(
			'label'       => __('Edit Phone Number', 'forest-safari'),
			'section'     => 'forest_safari_header_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting('forest_safari_header_phone_icon',array(
		'default'	=> 'fas fa-phone-alt',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Forest_Safari_Icon_Changer(
        $wp_customize,'forest_safari_header_phone_icon',array(
		'label'	=> __('Phone Number Icon','forest-safari'),
		'transport' => 'refresh',
		'section'	=> 'forest_safari_header_section',
		'type'		=> 'icon'
	)));

	/*Main Header Phone Text*/
	$wp_customize->add_setting(
		'forest_safari_header_info_email',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_header_info_email',
		array(
			'label'       => __('Edit Email Address ', 'forest-safari'),
			'section'     => 'forest_safari_header_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting('forest_safari_header_mail_icon',array(
		'default'	=> 'fas fa-envelope',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Forest_Safari_Icon_Changer(
        $wp_customize,'forest_safari_header_mail_icon',array(
		'label'	=> __('Mail Icon','forest-safari'),
		'transport' => 'refresh',
		'section'	=> 'forest_safari_header_section',
		'type'		=> 'icon'
	)));


	/*Main Header Button Text*/
	$wp_customize->add_setting(
		'forest_safari_header_button_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'REQUEST A QUOTE',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_header_button_text',
		array(
			'label'       => __('Edit Button Text ', 'forest-safari'),
			'section'     => 'forest_safari_header_section',
			'type'        => 'text',
		)
	);

	/*Main Header Button Link*/
	$wp_customize->add_setting(
		'forest_safari_header_button_link',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'forest_safari_header_button_link',
		array(
			'label'       => __('Edit Button Link ', 'forest-safari'),
			'section'     => 'forest_safari_header_section',
			'type'        => 'url',
		)
	);

		$wp_customize->add_setting(
		'forest_safari_header_search',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_header_search',
		array(
			'label'       => __('Enable Disable Search', 'forest-safari'),
			'description' => __('Enable or Disable header Search', 'forest-safari'),
			'section'     => 'forest_safari_header_section',
			'type'        => 'checkbox',
		)
	);

	/*
	* Customizer main slider section
	*/
	/*Main Slider Options*/
	$wp_customize->add_section('forest_safari_slider_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Slider Options', 'forest-safari'),
		'panel'       => 'forest_safari_panel',
	));

	/*Main Slider Enable Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_slider',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 0,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_enable_slider',
		array(
			'label'       => __('Enable Main Slider', 'forest-safari'),
			'description' => __('Checked to show the main slider', 'forest-safari'),
			'section'     => 'forest_safari_slider_section',
			'type'        => 'checkbox',
		)
	);

	for ($forest_safari_i=1; $forest_safari_i <= 3; $forest_safari_i++) { 

		/*Main Slider Image*/
		$wp_customize->add_setting(
			'forest_safari_slider_image'.$forest_safari_i,
			array(
				'capability'    => 'edit_theme_options',
		        'default'       => '',
		        'transport'     => 'postMessage',
		        'sanitize_callback' => 'esc_url_raw',
	    	)
	    );

		$wp_customize->add_control( 
			new WP_Customize_Image_Control( $wp_customize, 
				'forest_safari_slider_image'.$forest_safari_i, 
				array(
			        'label' => __('Edit Slider Image ', 'forest-safari') .$forest_safari_i,
			        'description' => __('Edit the slider image.', 'forest-safari'),
			        'section' => 'forest_safari_slider_section',
				)
			)
		);

		/*Main Slider Heading*/
		$wp_customize->add_setting(
			'forest_safari_slider_heading'.$forest_safari_i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'forest_safari_slider_heading'.$forest_safari_i,
			array(
				'label'       => __('Edit Heading Text ', 'forest-safari') .$forest_safari_i,
				'description' => __('Edit the slider heading text.', 'forest-safari'),
				'section'     => 'forest_safari_slider_section',
				'type'        => 'text',
			)
		);

		/*Main Slider Content*/
		$wp_customize->add_setting(
			'forest_safari_slider_text'.$forest_safari_i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'forest_safari_slider_text'.$forest_safari_i,
			array(
				'label'       => __('Edit Content Text ', 'forest-safari') .$forest_safari_i,
				'description' => __('Edit the slider content text.', 'forest-safari'),
				'section'     => 'forest_safari_slider_section',
				'type'        => 'text',
			)
		);

		/*Main Slider Button1 Text*/
		$wp_customize->add_setting(
			'forest_safari_slider_button1_text'.$forest_safari_i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'forest_safari_slider_button1_text'.$forest_safari_i,
			array(
				'label'       => __('Edit Button #1 Text ', 'forest-safari') .$forest_safari_i,
				'description' => __('Edit the slider button text.', 'forest-safari'),
				'section'     => 'forest_safari_slider_section',
				'type'        => 'text',
			)
		);

		/*Main Slider Button1 URL*/
		$wp_customize->add_setting(
			'forest_safari_slider_button1_link'.$forest_safari_i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'esc_url_raw',
			)
		);

		$wp_customize->add_control(
			'forest_safari_slider_button1_link'.$forest_safari_i,
			array(
				'label'       => __('Edit Button #1 URL ', 'forest-safari') .$forest_safari_i,
				'description' => __('Edit the slider button url.', 'forest-safari'),
				'section'     => 'forest_safari_slider_section',
				'type'        => 'url',
			)
		);
	}

	/*
	* Customizer About Us section
	*/
	/*About Us Options*/
	$wp_customize->add_section('forest_safari_aboutus_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('About Us Option', 'forest-safari'),
		'panel'       => 'forest_safari_panel',
	));

	/*About Us Enable Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_aboutus',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 0,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_enable_aboutus',
		array(
			'label'       => __('Enable About Us Section', 'forest-safari'),
			'description' => __('Checked to show the category', 'forest-safari'),
			'section'     => 'forest_safari_aboutus_section',
			'type'        => 'checkbox',
		)
	);

	/*About Us Image*/
	$wp_customize->add_setting(
		'forest_safari_aboutus_image',
		array(
			'capability'    => 'edit_theme_options',
	        'default'       => '',
	        'transport'     => 'postMessage',
	        'sanitize_callback' => 'esc_url_raw',
    	)
    );

	$wp_customize->add_control( 
		new WP_Customize_Image_Control( $wp_customize, 
			'forest_safari_aboutus_image', 
			array(
		        'label' => __('Edit About Us Image ', 'forest-safari'),
		        'description' => __('Edit the category image.', 'forest-safari'),
		        'section' => 'forest_safari_aboutus_section',
			)
		)
	);

	/*About Us Short Heading*/
	$wp_customize->add_setting(
		'forest_safari_aboutus_short_heading',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_aboutus_short_heading',
		array(
			'label'       => __('Edit Section Short Heading', 'forest-safari'),
			'description' => __('Edit about us section short heading', 'forest-safari'),
			'section'     => 'forest_safari_aboutus_section',
			'type'        => 'text',
		)
	);

	/*About Us Heading*/
	$wp_customize->add_setting(
		'forest_safari_aboutus_heading',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_aboutus_heading',
		array(
			'label'       => __('Edit Section Heading', 'forest-safari'),
			'description' => __('Edit about us section heading', 'forest-safari'),
			'section'     => 'forest_safari_aboutus_section',
			'type'        => 'text',
		)
	);

	/*About Us Text*/
	$wp_customize->add_setting(
		'forest_safari_aboutus_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_aboutus_text',
		array(
			'label'       => __('Edit Section Content', 'forest-safari'),
			'description' => __('Edit About Us section Content', 'forest-safari'),
			'section'     => 'forest_safari_aboutus_section',
			'type'        => 'text',
		)
	);

	for ($forest_safari_i=1; $forest_safari_i <= 6; $forest_safari_i++) {

		/*About Us List Icon*/
		$wp_customize->add_setting(
			'forest_safari_aboutus_list_icon'.$forest_safari_i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'forest_safari_aboutus_list_icon'.$forest_safari_i,
			array(
				'label'       => __('Edit List Icon ', 'forest-safari') .$forest_safari_i,
				'description' => __('Edit about us list icon.', 'forest-safari'),
				'section'     => 'forest_safari_aboutus_section',
				'type'        => 'text',
			)
		);

		/*About Us List*/
		$wp_customize->add_setting(
			'forest_safari_aboutus_list'.$forest_safari_i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'forest_safari_aboutus_list'.$forest_safari_i,
			array(
				'label'       => __('Edit List ', 'forest-safari') .$forest_safari_i,
				'description' => __('Edit about us list.', 'forest-safari'),
				'section'     => 'forest_safari_aboutus_section',
				'type'        => 'text',
			)
		);
	}

	/*
	* Customizer Footer Section
	*/
	/*Footer Options*/
	$wp_customize->add_section('forest_safari_footer_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Footer Options', 'forest-safari'),
		'panel'       => 'forest_safari_panel',
	));

	/*Footer Enable Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_footer',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);
	$wp_customize->add_control(
		'forest_safari_enable_footer',
		array(
			'label'       => __('Enable Footer', 'forest-safari'),
			'description' => __('Checked to show Footer', 'forest-safari'),
			'section'     => 'forest_safari_footer_section',
			'type'        => 'checkbox',
		)
	);

	/*Footer bg image Option*/
	$wp_customize->add_setting('forest_safari_footer_bg_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
        'default'           => '',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'forest_safari_footer_bg_image',array(
        'label' => __('Footer Background Image','forest-safari'),
        'section' => 'forest_safari_footer_section',
        'priority' => 1,
    )));

	/*Footer Social Menu Option*/
	$wp_customize->add_setting(
		'forest_safari_footer_social_menu',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_footer_social_menu',
		array(
			'label'       => __('Enable Footer Social Menu', 'forest-safari'),
			'description' => __('Checked to show the footer social menu. Go to Dashboard >> Appearance >> Menus >> Create New Menu >> Add Custom Link >> Add Social Menu >> Checked Social Menu >> Save Menu.', 'forest-safari'),
			'section'     => 'forest_safari_footer_section',
			'type'        => 'checkbox',
		)
	);	

	/*Go To Top Option*/
	$wp_customize->add_setting(
		'forest_safari_enable_go_to_top_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'forest_safari_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'forest_safari_enable_go_to_top_option',
		array(
			'label'       => __('Enable Go To Top', 'forest-safari'),
			'description' => __('Checked to enable Go To Top option.', 'forest-safari'),
			'section'     => 'forest_safari_footer_section',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting('forest_safari_go_to_top_position',array(
        'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 'Right',
        'sanitize_callback' => 'forest_safari_sanitize_choices'
    ));
    $wp_customize->add_control('forest_safari_go_to_top_position',array(
        'type' => 'select',
        'section' => 'forest_safari_footer_section',
        'label' => esc_html__('Go To Top Positions','forest-safari'),
        'choices' => array(
            'Right' => __('Right','forest-safari'),
            'Left' => __('Left','forest-safari'),
            'Center' => __('Center','forest-safari')
        ),
    ) );

	/*Footer Copyright Text Enable*/
	$wp_customize->add_setting(
		'forest_safari_copyright_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'forest_safari_copyright_option',
		array(
			'label'       => __('Edit Copyright Text', 'forest-safari'),
			'description' => __('Edit the Footer Copyright Section.', 'forest-safari'),
			'section'     => 'forest_safari_footer_section',
			'type'        => 'text',
		)
	);
}
add_action( 'customize_register', 'forest_safari_customize_register' );

/**
 * Render the site title for the selective refresh partial.
 *
 * @return void
 */
function forest_safari_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @return void
 */
function forest_safari_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function forest_safari_customize_preview_js() {
	wp_enqueue_script( 'forest-safari-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), FOREST_SAFARI_VERSION, true );
}
add_action( 'customize_preview_init', 'forest_safari_customize_preview_js' );

/**
 * Singleton class for handling the theme's customizer integration.
 *
 * @since  1.0.0
 * @access public
 */
final class Forest_Safari_Customize {

	/**
	 * Returns the instance.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return object
	 */
	public static function get_instance() {

		static $forest_safari_instance = null;

		if ( is_null( $forest_safari_instance ) ) {
			$forest_safari_instance = new self;
			$forest_safari_instance->setup_actions();
		}

		return $forest_safari_instance;
	}

	/**
	 * Constructor method.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function __construct() {}

	/**
	 * Sets up initial actions.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function setup_actions() {

		// Register panels, sections, settings, controls, and partials.
		add_action( 'customize_register', array( $this, 'sections' ) );

		// Register scripts and styles for the controls.
		add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
	}

	/**
	 * Sets up the customizer sections.
	 *
	 * @since  1.0.0
	 * @access public
	 * @param  object  $forest_safari_manager
	 * @return void
	*/
	public function sections( $forest_safari_manager ) {

		// Load custom sections.
		load_template( trailingslashit( get_template_directory() ) . '/revolution/inc/section-pro.php' );

		// Register custom section types.
		$forest_safari_manager->register_section_type( 'Forest_Safari_Customize_Section_Pro' );

		// Register sections.
		$forest_safari_manager->add_section( new Forest_Safari_Customize_Section_Pro( $forest_safari_manager,'forest_safari_go_pro', array(
			'priority'   => 1,
			'title'    => FOREST_SAFARI_PRO_NAME,
			'pro_text' => esc_html__( 'Buy Pro', 'forest-safari' ),
			'pro_url'    => esc_url( FOREST_SAFARI_BUY_NOW ),
		) )	);

		// Register sections.
		$forest_safari_manager->add_section( new Forest_Safari_Customize_Section_Pro( $forest_safari_manager,'forest_safari_lite_documentation', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Lite Documentation', 'forest-safari' ),
			'pro_text' => esc_html__( 'Instruction', 'forest-safari' ),
			'pro_url'    => esc_url( FOREST_SAFARI_LITE_DOC ),
		) )	);

		$forest_safari_manager->add_section( new Forest_Safari_Customize_Section_Pro( $forest_safari_manager, 'forest_safari_live_demo', array(
			'priority'   => 1,
			'title'      => esc_html__( 'Pro Theme Demo', 'forest-safari' ),
			'pro_text'   => esc_html__( 'Live Preview', 'forest-safari' ),
			'pro_url'    => esc_url( FOREST_SAFARI_LIVE_DEMO ),
		) ) );		
	}

	/**
	 * Loads theme customizer CSS.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return void
	 */
	public function enqueue_control_scripts() {

		wp_enqueue_script( 'forest-safari-customize-controls', trailingslashit( get_template_directory_uri() ) . '/revolution/assets/js/customize-controls.js', array( 'customize-controls' ) );

		wp_enqueue_style( 'forest-safari-customize-controls', trailingslashit( get_template_directory_uri() ) . '/revolution/assets/css/customize-controls.css' );
	}
}

// Doing this customizer thang!
Forest_Safari_Customize::get_instance();