<?php
/**
 * Wildlife Photography Theme Customizer
 *
 * @package Wildlife Photography
 */

function Wildlife_Photography_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' => 'Wildlife_Photography_Customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'Wildlife_Photography_Customize_partial_blogdescription',
			)
		);
	}

	/*
    * Theme Options Panel
    */
	$wp_customize->add_panel('wildlife_photography_panel', array(
		'priority' => 25,
		'capability' => 'edit_theme_options',
		'title' => __('Wildlife Theme Options', 'wildlife-photography'),
	));

	/*
	* Customizer main header section
	*/

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

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

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

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

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

	$wp_customize->add_control(
		'wildlife_photography_logo_width',
		array(
			'label'       => __('Logo Width in PX', 'wildlife-photography'),
			'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', 'wildlife-photography'),
		'panel'       => 'woocommerce',
	));

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

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

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

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

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

	$wp_customize->add_control(
		'wildlife_photography_enable_related_product',
		array(
			'label'       => __('Enable Related Product', 'wildlife-photography'),
			'description' => __('Checked to show Related Product', 'wildlife-photography'),
			'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', 'wildlife-photography'),
			'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', 'wildlife-photography'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'number',
			'input_attrs' => array(
				'min' => 1,
				'max' => 4,
				'step' => 1,
			),
		)
	);

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

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

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

	/*Additional Options*/
	$wp_customize->add_section('wildlife_photography_additional_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Additional Options', 'wildlife-photography'),
		'panel'       => 'wildlife_photography_panel',
	));

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

	$wp_customize->add_control(
		'wildlife_photography_enable_sticky_header',
		array(
			'label'       => __('Enable Sticky Header', 'wildlife-photography'),
			'description' => __('Checked to enable sticky header', 'wildlife-photography'),
			'section'     => 'wildlife_photography_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'wildlife_photography_enable_preloader',
		array(
			'label'       => __('Enable Preloader', 'wildlife-photography'),
			'description' => __('Checked to show preloader', 'wildlife-photography'),
			'section'     => 'wildlife_photography_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'wildlife_photography_enable_breadcrumbs',
		array(
			'label'       => __('Enable Breadcrumbs', 'wildlife-photography'),
			'description' => __('Checked to show Breadcrumbs', 'wildlife-photography'),
			'section'     => 'wildlife_photography_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'wildlife_photography_enable_pagination',
		array(
			'label'       => __('Enable Pagination', 'wildlife-photography'),
			'description' => __('Checked to show Pagination', 'wildlife-photography'),
			'section'     => 'wildlife_photography_additional_section',
			'type'        => 'checkbox',
		)
	);

		/*Pagination Select Type Option*/
	$wp_customize->add_setting('wildlife_photography_pagination_type',array(
        'default' => 'type-1',
        'sanitize_callback' => 'wildlife_photography_sanitize_choices'
	));
	$wp_customize->add_control('wildlife_photography_pagination_type',array(
        'type' => 'select',
        'label' => esc_html__('Select Pagination Type','wildlife-photography'),
        'section' => 'wildlife_photography_additional_section',
        'choices' => array(
            'type-1' => esc_html__('Type 1','wildlife-photography'),
            'type-2' => esc_html__('Type 2','wildlife-photography'),
        ),
	) );

	/*Post layout*/
	$wp_customize->add_setting('wildlife_photography_archive_layout',array(
		'default' => 'layout-1',
		'sanitize_callback' => 'wildlife_photography_sanitize_choices'
	));
	$wp_customize->add_control('wildlife_photography_archive_layout',array(
		'type' => 'select',
		'label' => esc_html__('Posts Layout','wildlife-photography'),
		'section' => 'wildlife_photography_additional_section',
		'choices' => array(
			'layout-1' => esc_html__('Sidebar On Right','wildlife-photography'),
			'layout-2' => esc_html__('Sidebar On Left','wildlife-photography'),
			'layout-3' => esc_html__('Full Width Layout','wildlife-photography')
		),
	) );

	/*single post layout*/
	$wp_customize->add_setting('wildlife_photography_post_layout',array(
		'default' => 'layout-1',
		'sanitize_callback' => 'wildlife_photography_sanitize_choices'
	));
	$wp_customize->add_control('wildlife_photography_post_layout',array(
		'type' => 'select',
		'label' => esc_html__('Single Post Layout','wildlife-photography'),
		'section' => 'wildlife_photography_additional_section',
		'choices' => array(
			'layout-1' => esc_html__('Sidebar On Right','wildlife-photography'),
			'layout-2' => esc_html__('Sidebar On Left','wildlife-photography'),
			'layout-3' => esc_html__('Full Width Layout','wildlife-photography')
		),
	) );

	/*single page layout*/
	$wp_customize->add_setting('wildlife_photography_page_layout',array(
		'default' => 'layout-1',
		'sanitize_callback' => 'wildlife_photography_sanitize_choices'
	));
	$wp_customize->add_control('wildlife_photography_page_layout',array(
		'type' => 'select',
		'label' => esc_html__('Single Page Layout','wildlife-photography'),
		'section' => 'wildlife_photography_additional_section',
		'choices' => array(
			'layout-1' => esc_html__('Sidebar On Right','wildlife-photography'),
			'layout-2' => esc_html__('Sidebar On Left','wildlife-photography'),
			'layout-3' => esc_html__('Full Width Layout','wildlife-photography')
		),
	) );

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

	$wp_customize->add_control(
		'wildlife_photography_additional_settings_upgraded_features', 
		array(
			'type'=> 'hidden',
			'description' => "
				<div class='customizer-upgraded-features'>
					<span class='pro-head'>Want more additional options?</span><br/>
					<span class='pro-text'>						
						<a target='_blank' href='". esc_url(WILDLIFE_PHOTOGRAPHY_BUY_NOW) ." '>Check Wildlife Photography PRO version.</a>
					</div>
				</div>
			",
			'section' => 'wildlife_photography_additional_section'
		)
	);

	/*Archive Post Options*/
	$wp_customize->add_section('wildlife_photography_blog_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Blog Page Options', 'wildlife-photography'),
		'panel'       => 'wildlife_photography_panel',
	));

	$wp_customize->add_setting('wildlife_photography_enable_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_blog_post_title',array(
		'label'       => __('Enable Blog Post Title', 'wildlife-photography'),
		'description' => __('Checked To Show Blog Post Title', 'wildlife-photography'),
		'section'     => 'wildlife_photography_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('wildlife_photography_enable_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_blog_post_meta',array(
		'label'       => __('Enable Blog Post Meta', 'wildlife-photography'),
		'description' => __('Checked To Show Blog Post Meta Feilds', 'wildlife-photography'),
		'section'     => 'wildlife_photography_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('wildlife_photography_enable_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_blog_post_tags',array(
		'label'       => __('Enable Blog Post Tags', 'wildlife-photography'),
		'description' => __('Checked To Show Blog Post Tags', 'wildlife-photography'),
		'section'     => 'wildlife_photography_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('wildlife_photography_enable_blog_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_blog_post_image',array(
		'label'       => __('Enable Blog Post Image', 'wildlife-photography'),
		'description' => __('Checked To Show Blog Post Image', 'wildlife-photography'),
		'section'     => 'wildlife_photography_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('wildlife_photography_enable_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_blog_post_content',array(
		'label'       => __('Enable Blog Post Content', 'wildlife-photography'),
		'description' => __('Checked To Show Blog Post Content', 'wildlife-photography'),
		'section'     => 'wildlife_photography_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('wildlife_photography_enable_blog_post_button',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_blog_post_button',array(
		'label'       => __('Enable Blog Post Read More Button', 'wildlife-photography'),
		'description' => __('Checked To Show Blog Post Read More Button', 'wildlife-photography'),
		'section'     => 'wildlife_photography_blog_post_section',
		'type'        => 'checkbox',
	));

	/*Blog post Content layout*/
	$wp_customize->add_setting('wildlife_photography_blog_Post_content_layout',array(
		'default' => 'Left',
		'sanitize_callback' => 'wildlife_photography_sanitize_choices'
	));
	$wp_customize->add_control('wildlife_photography_blog_Post_content_layout',array(
		'type' => 'select',
		'label' => esc_html__('Blog Post Content Layout','wildlife-photography'),
		'section' => 'wildlife_photography_blog_post_section',
		'choices' => array(
			'Left' => esc_html__('Left','wildlife-photography'),
			'Center' => esc_html__('Center','wildlife-photography'),
			'Right' => esc_html__('Right','wildlife-photography')
		),
	) );

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

	$wp_customize->add_control(
		'wildlife_photography_excerpt_limit',
		array(
			'label'       => __('Excerpt Limit', 'wildlife-photography'),
			'section'     => 'wildlife_photography_blog_post_section',
			'type'        => 'number',
			'input_attrs' => array(
				'min' => 2,
				'max' => 50,
				'step' => 2,
			),
		)
	);

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

	$wp_customize->add_control(
		'wildlife_photography_read_more_text',
		array(
			'label'       => __('Edit Button Text ', 'wildlife-photography'),
			'section'     => 'wildlife_photography_blog_post_section',
			'type'        => 'text',
		)
	);

	/*Single Post Options*/
	$wp_customize->add_section('wildlife_photography_single_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Single Post Options', 'wildlife-photography'),
		'panel'       => 'wildlife_photography_panel',
	));

	$wp_customize->add_setting('wildlife_photography_enable_single_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_single_blog_post_title',array(
		'label'       => __('Enable Single Post Title', 'wildlife-photography'),
		'description' => __('Checked To Show Single Blog Post Title', 'wildlife-photography'),
		'section'     => 'wildlife_photography_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('wildlife_photography_enable_single_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_single_blog_post_meta',array(
		'label'       => __('Enable Single Post Meta', 'wildlife-photography'),
		'description' => __('Checked To Show Single Blog Post Meta Feilds', 'wildlife-photography'),
		'section'     => 'wildlife_photography_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('wildlife_photography_enable_single_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_single_blog_post_tags',array(
		'label'       => __('Enable Single Post Tags', 'wildlife-photography'),
		'description' => __('Checked To Show Single Blog Post Tags', 'wildlife-photography'),
		'section'     => 'wildlife_photography_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('wildlife_photography_enable_single_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_single_post_image',array(
		'label'       => __('Enable Single Post Image', 'wildlife-photography'),
		'description' => __('Checked To Show Single Post Image', 'wildlife-photography'),
		'section'     => 'wildlife_photography_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('wildlife_photography_enable_single_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
	));
	$wp_customize->add_control('wildlife_photography_enable_single_blog_post_content',array(
		'label'       => __('Enable Single Post Content', 'wildlife-photography'),
		'description' => __('Checked To Show Single Blog Post Content', 'wildlife-photography'),
		'section'     => 'wildlife_photography_single_post_section',
		'type'        => 'checkbox',
	));

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

	$wp_customize->add_control(
		'wildlife_photography_enable_related_post',
		array(
			'label'       => __('Enable Related Post', 'wildlife-photography'),
			'description' => __('Checked to show Related Post', 'wildlife-photography'),
			'section'     => 'wildlife_photography_single_post_section',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting(
		'wildlife_photography_related_post_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Related Post',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'wildlife_photography_related_post_text',
		array(
			'label'       => __('Edit Related Post Text ', 'wildlife-photography'),
			'section'     => 'wildlife_photography_single_post_section',
			'type'        => 'text',
		)
	);	

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

	$wp_customize->add_control(
		'wildlife_photography_related_post_count',
		array(
			'label'       => __('Related Post Count', 'wildlife-photography'),
			'section'     => 'wildlife_photography_single_post_section',
			'type'        => 'number',
			'input_attrs' => array(
				'min' => 1,
				'max' => 9,
				'step' => 1,
			),
		)
	);

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

	$wp_customize->add_control(
		'wildlife_photography_enable_comment_section',
		array(
			'label'       => __('Enable Comment Section', 'wildlife-photography'),
			'description' => __('Checked to show Comment Section', 'wildlife-photography'),
			'section'     => 'wildlife_photography_single_post_section',
			'type'        => 'checkbox',
		)
	);

		/*
	* Customizer Global COlor
	*/

	/*Global Color Options*/
	$wp_customize->add_section('wildlife_photography_global_color_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Global Color Options', 'wildlife-photography'),
		'panel'       => 'wildlife_photography_panel',
	));

	$wp_customize->add_setting( 'wildlife_photography_primary_color',
		array(
		'default'           => '#FD5634',
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control( 
		new WP_Customize_Color_Control( 
		$wp_customize, 
		'wildlife_photography_primary_color',
		array(
			'label'      => esc_html__( 'Primary Color', 'wildlife-photography' ),
			'section'    => 'wildlife_photography_global_color_section',
			'settings'   => 'wildlife_photography_primary_color',
		) ) 
	);

	$wp_customize->add_setting( 'wildlife_photography_tertiary_color',
		array(
		'default'           => '#FEB916',
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control( 
		new WP_Customize_Color_Control( 
		$wp_customize, 
		'wildlife_photography_tertiary_color',
		array(
			'label'      => esc_html__( 'Tertiary Color', 'wildlife-photography' ),
			'section'    => 'wildlife_photography_global_color_section',
			'settings'   => 'wildlife_photography_tertiary_color',
		) ) 
	);

	/*Typography Options*/
	$wp_customize->add_section( 'wildlife_photography_typography_section', array(
		'panel'       => 'wildlife_photography_panel',
        'title'    => __( 'Typography Options', 'wildlife-photography' ),
        'priority' => 2,
    ) );

    $wp_customize->add_setting( 'wildlife_photography_font_family', array(
		'default'           => 'default',
		'sanitize_callback' => 'wildlife_photography_sanitize_font_family',
	) );
	
	$wp_customize->add_control( 'wildlife_photography_font_family', array(
		'label'    => __( 'Global Font Family', 'wildlife-photography' ),
		'section'  => 'wildlife_photography_typography_section',
		'type'     => 'select',
		'choices'  => array(
			'default'          => __( 'Default (Theme Font)', 'wildlife-photography' ),
			'bad_script'       => 'Bad Script',
			'roboto'           => 'Roboto',
			'playfair_display' => 'Playfair Display',
			'open_sans'        => 'Open Sans',
			'lobster'          => 'Lobster',
			'merriweather'     => 'Merriweather',
			'oswald'           => 'Oswald',
			'raleway'          => 'Raleway',
		),
	) );

	/*
	* Customizer main header section
	*/

	/*Main Header Options*/
	$wp_customize->add_section('wildlife_photography_header_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Header Options', 'wildlife-photography'),
		'panel'       => 'wildlife_photography_panel',
	));

	// Add Setting for Menu Text Transform
    $wp_customize->add_setting( 'wildlife_photography_menu_text_transform', array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 'uppercase',
        'sanitize_callback' => 'wildlife_photography_sanitize_choices'
    ) );

    // Add Control for Menu Text Transform
    $wp_customize->add_control( 'wildlife_photography_menu_text_transform', array(
        'label'    => __( 'Menu Text Transform', 'wildlife-photography' ),
        'section'  => 'wildlife_photography_header_section',
        'type'     => 'select',
        'choices'  => array(
            'none'       => __( 'None', 'wildlife-photography' ),
            'capitalize' => __( 'Capitalize', 'wildlife-photography' ),
            'uppercase'  => __( 'Uppercase', 'wildlife-photography' ),
            'lowercase'  => __( 'Lowercase', 'wildlife-photography' ),
        ),
    ) );

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

	$wp_customize->add_control(
		'wildlife_photography_header_search',
		array(
			'label'       => __('Enable Disable Search', 'wildlife-photography'),
			'description' => __('Enable or Disable header Search', 'wildlife-photography'),
			'section'     => 'wildlife_photography_header_section',
			'type'        => 'checkbox',
		)
	);

	/*Main Header Button Text*/
	$wp_customize->add_setting(
		'wildlife_photography_header_button_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Book Now',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_header_button_text',
		array(
			'label'       => __('Edit Button Text ', 'wildlife-photography'),
			'section'     => 'wildlife_photography_header_section',
			'type'        => 'text',
		)
	);

	/*Main Header Button Link*/
	$wp_customize->add_setting(
		'wildlife_photography_header_button_link',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'esc_url_raw',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_header_button_link',
		array(
			'label'       => __('Edit Button Link ', 'wildlife-photography'),
			'section'     => 'wildlife_photography_header_section',
			'type'        => 'url',
		)
	);

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

	$wp_customize->add_control(
		'wildlife_photography_header_settings_upgraded_features', 
		array(
			'type'=> 'hidden',
			'description' => "
				<div class='customizer-upgraded-features'>
					<span class='pro-head'>Want more header options?</span><br/>
					<span class='pro-text'>						
						<a target='_blank' href='". esc_url(WILDLIFE_PHOTOGRAPHY_BUY_NOW) ." '>Check Wildlife Photography PRO version.</a>
					</div>
				</div>
			",
			'section' => 'wildlife_photography_header_section'
		)
	);

	/*
	* Customizer main slider section
	*/
	/*Main Slider Options*/
	$wp_customize->add_section('wildlife_photography_slider_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Slider Options', 'wildlife-photography'),
		'panel'       => 'wildlife_photography_panel',
	));

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

	$wp_customize->add_control(
		'wildlife_photography_enable_slider',
		array(
			'label'       => __('Enable Main Slider', 'wildlife-photography'),
			'description' => __('Checked to show the main slider', 'wildlife-photography'),
			'section'     => 'wildlife_photography_slider_section',
			'type'        => 'checkbox',
		)
	);

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

		/*Main Slider Image*/
		$wp_customize->add_setting(
			'wildlife_photography_slider_image'.$wildlife_photography_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, 
				'wildlife_photography_slider_image'.$wildlife_photography_i, 
				array(
			        'label' => __('Edit Slider Image ', 'wildlife-photography') .$wildlife_photography_i,
			        'description' => __('Edit the slider image.', 'wildlife-photography'),
			        'section' => 'wildlife_photography_slider_section',
				)
			)
		);

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

		$wp_customize->add_control(
			'wildlife_photography_slider_top_text'.$wildlife_photography_i,
			array(
				'label'       => __('Edit Slider Top Text ', 'wildlife-photography') .$wildlife_photography_i,
				'description' => __('Edit the slider Top text.', 'wildlife-photography'),
				'section'     => 'wildlife_photography_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'wildlife_photography_slider_heading'.$wildlife_photography_i,
			array(
				'label'       => __('Edit Heading Text ', 'wildlife-photography') .$wildlife_photography_i,
				'description' => __('Edit the slider heading text.', 'wildlife-photography'),
				'section'     => 'wildlife_photography_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'wildlife_photography_slider_text'.$wildlife_photography_i,
			array(
				'label'       => __('Edit Content Text ', 'wildlife-photography') .$wildlife_photography_i,
				'description' => __('Edit the slider content text.', 'wildlife-photography'),
				'section'     => 'wildlife_photography_slider_section',
				'type'        => 'text',
			)
		);

		/*Main Slider Button1 Text*/
		$wp_customize->add_setting(
			'wildlife_photography_slider_button1_text'.$wildlife_photography_i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);
		$wp_customize->add_control(
			'wildlife_photography_slider_button1_text'.$wildlife_photography_i,
			array(
				'label'       => __('Edit Button #1 Text ', 'wildlife-photography') .$wildlife_photography_i,
				'description' => __('Edit the slider button text.', 'wildlife-photography'),
				'section'     => 'wildlife_photography_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'wildlife_photography_slider_button1_link'.$wildlife_photography_i,
			array(
				'label'       => __('Edit Button #1 URL ', 'wildlife-photography') .$wildlife_photography_i,
				'description' => __('Edit the slider button url.', 'wildlife-photography'),
				'section'     => 'wildlife_photography_slider_section',
				'type'        => 'url',
			)
		);

		/*Main Slider Button2 Text*/
		$wp_customize->add_setting(
			'wildlife_photography_slider_button2_text'.$wildlife_photography_i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);
		$wp_customize->add_control(
			'wildlife_photography_slider_button2_text'.$wildlife_photography_i,
			array(
				'label'       => __('Edit Button #2 Text ', 'wildlife-photography') .$wildlife_photography_i,
				'description' => __('Edit the slider button text.', 'wildlife-photography'),
				'section'     => 'wildlife_photography_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'wildlife_photography_slider_button2_link'.$wildlife_photography_i,
			array(
				'label'       => __('Edit Button #2 URL ', 'wildlife-photography') .$wildlife_photography_i,
				'description' => __('Edit the slider button url.', 'wildlife-photography'),
				'section'     => 'wildlife_photography_slider_section',
				'type'        => 'url',
			)
		);

	}

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

	$wp_customize->add_control(
		'wildlife_photography_slider_settings_upgraded_features', 
		array(
			'type'=> 'hidden',
			'description' => "
				<div class='customizer-upgraded-features'>
					<span class='pro-head'>Want more slider options?</span><br/>
					<span class='pro-text'>						
						<a target='_blank' href='". esc_url(WILDLIFE_PHOTOGRAPHY_BUY_NOW) ." '>Check Wildlife Photography PRO version.</a>
					</div>
				</div>
			",
			'section' => 'wildlife_photography_slider_section'
		)
	);

	//gallerys Section
	$wp_customize->add_section('wildlife_photography_service_section', array(
		'priority'       => 7,
	    'title'    => __('Our Gallery Section', 'wildlife-photography'),
	    'panel'    => 'wildlife_photography_panel',
	    'priority' => 7,
	));

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

	$wp_customize->add_control(
		'wildlife_photography_gallery_sec_enable',
		array(
			'label'       => __('Show / Hide Our Gallery Section', 'wildlife-photography'),
			'description' => __('Checked to enable Our Gallery option.', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting('wildlife_photography_service_sub_heading', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_service_sub_heading', array(
	    'label'    => __('Add Gallery Heading', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting('wildlife_photography_service_about_us', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_service_about_us', array(
	    'label'    => __('Add Gallery Content', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));


	$wp_customize->add_setting('wildlife_photography_gallery_first',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw',
	));
	$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'wildlife_photography_gallery_first',array(
	    'label' => __('Select Banner Image 1','wildlife-photography'),
	     'section' => 'wildlife_photography_service_section'
	)));

	$wp_customize->add_setting('wildlife_photography_banner_first_heading', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_banner_first_heading', array(
	    'label'    => __('Add Title for Banner 1', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting('wildlife_photography_banner_first_date_time', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_banner_first_date_time', array(
	    'label'    => __('Add Date & Time for Banner 1', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting(
		'wildlife_photography_banner_first_button_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Read More',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_banner_first_button_text',
		array(
			'label'       => __('Edit Button Text for Banner 1', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'wildlife_photography_banner_first_button_link',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'esc_url_raw',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_banner_first_button_link',
		array(
			'label'       => __('Add Button Link for Banner 1', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'url',
		)
	);

	// banner2
	$wp_customize->add_setting('wildlife_photography_gallery_sec',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw',
	));
	$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'wildlife_photography_gallery_sec',array(
	    'label' => __('Select Banner Image 2','wildlife-photography'),
	     'section' => 'wildlife_photography_service_section'
	)));

	$wp_customize->add_setting('wildlife_photography_banner_sec_heading', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_banner_sec_heading', array(
	    'label'    => __('Add Title for Banner 2', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting('wildlife_photography_banner_sec_date_time', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_banner_sec_date_time', array(
	    'label'    => __('Add Date & Time for Banner 2', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting(
		'wildlife_photography_banner_sec_button_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Read More',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_banner_sec_button_text',
		array(
			'label'       => __('Edit Button Text for Banner 2', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'wildlife_photography_banner_sec_button_link',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'esc_url_raw',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_banner_sec_button_link',
		array(
			'label'       => __('Add Button Link for Banner 2', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'url',
		)
	);

	// middle banner
	$wp_customize->add_setting('wildlife_photography_gallery_third',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw',
	));
	$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'wildlife_photography_gallery_third',array(
	    'label' => __('Select Middle Banner Image','wildlife-photography'),
	     'section' => 'wildlife_photography_service_section'
	)));

	$wp_customize->add_setting('wildlife_photography_banner_third_heading', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_banner_third_heading', array(
	    'label'    => __('Add Title for Middle Banner', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting('wildlife_photography_banner_third_date_time', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_banner_third_date_time', array(
	    'label'    => __('Add Date & Time for Middle Banner', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting(
		'wildlife_photography_banner_third_button_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Read More',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_banner_third_button_text',
		array(
			'label'       => __('Edit Button Text for Middle Banner', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'wildlife_photography_banner_third_button_link',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'esc_url_raw',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_banner_third_button_link',
		array(
			'label'       => __('Add Button Link for Middle Banner', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'url',
		)
	);

	// 4th banner
	$wp_customize->add_setting('wildlife_photography_gallery_fourth',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw',
	));
	$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'wildlife_photography_gallery_fourth',array(
	    'label' => __('Select Banner Image 4','wildlife-photography'),
	     'section' => 'wildlife_photography_service_section'
	)));

	$wp_customize->add_setting('wildlife_photography_banner_fourth_heading', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_banner_fourth_heading', array(
	    'label'    => __('Add Title for Banner 4', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting('wildlife_photography_banner_fourth_date_time', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_banner_fourth_date_time', array(
	    'label'    => __('Add Date & Time for Banner 4', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting(
		'wildlife_photography_banner_fourth_button_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Read More',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_banner_fourth_button_text',
		array(
			'label'       => __('Edit Button Text for Banner 4', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'wildlife_photography_banner_fourth_button_link',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'esc_url_raw',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_banner_fourth_button_link',
		array(
			'label'       => __('Add Button Link for Banner 4', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'url',
		)
	);

	// 5th banner
	$wp_customize->add_setting('wildlife_photography_gallery_fifth',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw',
	));
	$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'wildlife_photography_gallery_fifth',array(
	    'label' => __('Select Banner Image 5','wildlife-photography'),
	     'section' => 'wildlife_photography_service_section'
	)));

	$wp_customize->add_setting('wildlife_photography_banner_fifth_heading', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_banner_fifth_heading', array(
	    'label'    => __('Add Title for Banner 5', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting('wildlife_photography_banner_fifth_date_time', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('wildlife_photography_banner_fifth_date_time', array(
	    'label'    => __('Add Date & Time for Banner 5', 'wildlife-photography'),
	    'section'  => 'wildlife_photography_service_section',
	    'type'     => 'text'
	));

	$wp_customize->add_setting(
		'wildlife_photography_banner_fifth_button_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Read More',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_banner_fifth_button_text',
		array(
			'label'       => __('Edit Button Text for Banner 5', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'wildlife_photography_banner_fifth_button_link',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'esc_url_raw',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_banner_fifth_button_link',
		array(
			'label'       => __('Add Button Link for Banner 5', 'wildlife-photography'),
			'section'     => 'wildlife_photography_service_section',
			'type'        => 'url',
		)
	);

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

	$wp_customize->add_control(
		'wildlife_photography_service_settings_upgraded_features', 
		array(
			'type'=> 'hidden',
			'description' => "
				<div class='customizer-upgraded-features'>
					<span class='pro-head'>Want more gallery options?</span><br/>
					<span class='pro-text'>						
						<a target='_blank' href='". esc_url(WILDLIFE_PHOTOGRAPHY_BUY_NOW) ." '>Check Wildlife Photography PRO version.</a>
					</div>
				</div>
			",
			'section' => 'wildlife_photography_service_section'
		)
	);

	/*
	* Customizer Footer Section
	*/
	/*Footer Options*/
	$wp_customize->add_section('wildlife_photography_footer_section', array(
		'priority'       => 8,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Footer Options', 'wildlife-photography'),
		'panel'       => 'wildlife_photography_panel',
	));

	/*Footer Enable Option*/
	$wp_customize->add_setting(
		'wildlife_photography_enable_footer',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'wildlife_photography_sanitize_checkbox',
		)
	);
	$wp_customize->add_control(
		'wildlife_photography_enable_footer',
		array(
			'label'       => __('Enable Footer', 'wildlife-photography'),
			'description' => __('Checked to show Footer', 'wildlife-photography'),
			'section'     => 'wildlife_photography_footer_section',
			'type'        => 'checkbox',
		)
	);

	/*Footer bg image Option*/
	$wp_customize->add_setting('wildlife_photography_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,'wildlife_photography_footer_bg_image',array(
        'label' => __('Footer Background Image','wildlife-photography'),
        'section' => 'wildlife_photography_footer_section',
    )));

	/** Footer bg Image Attachment */
    $wp_customize->add_setting('wildlife_photography_background_attachment', array(
        'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 'scroll',
        'sanitize_callback' => 'wildlife_photography_sanitize_choices'
    ));

    $wp_customize->add_control('wildlife_photography_background_attachment', array(
        'label'    => __('Footer Background Attachment', 'wildlife-photography'),
        'section'  => 'wildlife_photography_footer_section',
        'settings' => 'wildlife_photography_background_attachment',
        'type'     => 'select',
        'choices'  => array(
            'fixed' => __('fixed','wildlife-photography'),
            'scroll' => __('scroll','wildlife-photography'),
        ),
    ));

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

	$wp_customize->add_control(
		'wildlife_photography_footer_social_menu',
		array(
			'label'       => __('Enable Footer Social Menu', 'wildlife-photography'),
			'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.', 'wildlife-photography'),
			'section'     => 'wildlife_photography_footer_section',
			'type'        => 'checkbox',
		)
	);	

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

	$wp_customize->add_control(
		'wildlife_photography_enable_go_to_top_option',
		array(
			'label'       => __('Enable Go To Top', 'wildlife-photography'),
			'description' => __('Checked to enable Go To Top option.', 'wildlife-photography'),
			'section'     => 'wildlife_photography_footer_section',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting('wildlife_photography_go_to_top_position',array(
        'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 'Right',
        'sanitize_callback' => 'wildlife_photography_sanitize_choices'
    ));
    $wp_customize->add_control('wildlife_photography_go_to_top_position',array(
        'type' => 'select',
        'section' => 'wildlife_photography_footer_section',
        'label' => esc_html__('Go To Top Positions','wildlife-photography'),
        'choices' => array(
            'Right' => __('Right','wildlife-photography'),
            'Left' => __('Left','wildlife-photography'),
            'Center' => __('Center','wildlife-photography')
        ),
    ) );

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

	$wp_customize->add_control(
		'wildlife_photography_copyright_option',
		array(
			'label'       => __('Edit Copyright Text', 'wildlife-photography'),
			'description' => __('Edit the Footer Copyright Section.', 'wildlife-photography'),
			'section'     => 'wildlife_photography_footer_section',
			'type'        => 'text',
		)
	);
}
add_action( 'customize_register', 'Wildlife_Photography_Customize_register' );

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

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

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

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

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

		static $wildlife_photography_instance = null;

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

		return $wildlife_photography_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  $wildlife_photography_manager
	 * @return void
	*/
	public function sections( $wildlife_photography_manager ) {

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

		// Register custom section types.
		$wildlife_photography_manager->register_section_type( 'Wildlife_Photography_Customize_Section_Pro' );

		// Register sections.
		$wildlife_photography_manager->add_section( new Wildlife_Photography_Customize_Section_Pro( $wildlife_photography_manager,'wildlife_photography_go_pro', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Wildlife Photography Pro', 'wildlife-photography' ),
			'pro_text' => esc_html__( 'Buy Pro', 'wildlife-photography' ),
			'pro_url'    => esc_url( WILDLIFE_PHOTOGRAPHY_BUY_NOW ),
		) )	);

		// Register sections.
		$wildlife_photography_manager->add_section( new Wildlife_Photography_Customize_Section_Pro( $wildlife_photography_manager,'wildlife_photography_lite_documentation', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Lite Documentation', 'wildlife-photography' ),
			'pro_text' => esc_html__( 'Instruction', 'wildlife-photography' ),
			'pro_url'    => esc_url( WILDLIFE_PHOTOGRAPHY_LITE_DOC ),
		) )	);

		$wildlife_photography_manager->add_section( new Wildlife_Photography_Customize_Section_Pro( $wildlife_photography_manager, 'wildlife_photography_live_demo', array(
		    'priority'   => 1,
		    'title'      => esc_html__( 'Pro Theme Demo', 'wildlife-photography' ),
		    'pro_text'   => esc_html__( 'Live Preview', 'wildlife-photography' ),
		    'pro_url'    => esc_url( WILDLIFE_PHOTOGRAPHY_LIVE_DEMO ),
		) ) );	
	}

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

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

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

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