<?php
/**
 * Pizza Parlor Theme Customizer
 *
 * @package Pizza Parlor
 */

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

	/*
    * Theme Options Panel
    */
	$wp_customize->add_panel('pizza_parlor_panel', array(
		'priority' => 25,
		'capability' => 'edit_theme_options',
		'title' => __('Pizza Parlor Theme Options', 'pizza-parlor'),
	));

	/*
	* Customizer main header section
	*/

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


	/*Additional Options*/
	$wp_customize->add_section('pizza_parlor_additional_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Additional Options', 'pizza-parlor'),
		'panel'       => 'pizza_parlor_panel',
	));

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

	$wp_customize->add_control(
		'pizza_parlor_enable_sticky_header',
		array(
			'label'       => __('Enable Sticky Header', 'pizza-parlor'),
			'description' => __('Checked to enable sticky header', 'pizza-parlor'),
			'section'     => 'pizza_parlor_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'pizza_parlor_enable_preloader',
		array(
			'label'       => __('Enable Preloader', 'pizza-parlor'),
			'description' => __('Checked to show preloader', 'pizza-parlor'),
			'section'     => 'pizza_parlor_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'pizza_parlor_enable_breadcrumbs',
		array(
			'label'       => __('Enable Breadcrumbs', 'pizza-parlor'),
			'description' => __('Checked to show Breadcrumbs', 'pizza-parlor'),
			'section'     => 'pizza_parlor_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'pizza_parlor_enable_pagination',
		array(
			'label'       => __('Enable Pagination', 'pizza-parlor'),
			'description' => __('Checked to show Pagination', 'pizza-parlor'),
			'section'     => 'pizza_parlor_additional_section',
			'type'        => 'checkbox',
		)
	);

	/*Pagination Select Type Option*/
	$wp_customize->add_setting('pizza_parlor_pagination_type',array(
        'default' => 'type-1',
        'sanitize_callback' => 'pizza_parlor_sanitize_choices'
	));
	$wp_customize->add_control('pizza_parlor_pagination_type',array(
        'type' => 'select',
        'label' => esc_html__('Select Pagination Type','pizza-parlor'),
        'section' => 'pizza_parlor_additional_section',
        'choices' => array(
            'type-1' => esc_html__('Type 1','pizza-parlor'),
            'type-2' => esc_html__('Type 2','pizza-parlor'),
        ),
	) );

	/*Post layout*/
	$wp_customize->add_setting('pizza_parlor_archive_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'pizza_parlor_sanitize_choices'
	));
	$wp_customize->add_control('pizza_parlor_archive_layout',array(
        'type' => 'select',
        'label' => esc_html__('Posts Layout','pizza-parlor'),
        'section' => 'pizza_parlor_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','pizza-parlor'),
            'layout-2' => esc_html__('Sidebar On Left','pizza-parlor'),
			'layout-3' => esc_html__('Full Width Layout','pizza-parlor')
        ),
	) );

	/*single post layout*/
	$wp_customize->add_setting('pizza_parlor_post_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'pizza_parlor_sanitize_choices'
	));
	$wp_customize->add_control('pizza_parlor_post_layout',array(
        'type' => 'select',
        'label' => esc_html__('Single Post Layout','pizza-parlor'),
        'section' => 'pizza_parlor_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','pizza-parlor'),
            'layout-2' => esc_html__('Sidebar On Left','pizza-parlor'),
			'layout-3' => esc_html__('Full Width Layout','pizza-parlor')
        ),
	) );

	/*single page layout*/
	$wp_customize->add_setting('pizza_parlor_page_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'pizza_parlor_sanitize_choices'
	));
	$wp_customize->add_control('pizza_parlor_page_layout',array(
        'type' => 'select',
        'label' => esc_html__('Single Page Layout','pizza-parlor'),
        'section' => 'pizza_parlor_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','pizza-parlor'),
            'layout-2' => esc_html__('Sidebar On Left','pizza-parlor'),
			'layout-3' => esc_html__('Full Width Layout','pizza-parlor')
        ),
	) );

	/*Archive Post Options*/
	$wp_customize->add_section('pizza_parlor_blog_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Blog Page Options', 'pizza-parlor'),
		'panel'       => 'pizza_parlor_panel',
	));

	$wp_customize->add_setting('pizza_parlor_enable_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_blog_post_title',array(
		'label'       => __('Enable Blog Post Title', 'pizza-parlor'),
		'description' => __('Checked To Show Blog Post Title', 'pizza-parlor'),
		'section'     => 'pizza_parlor_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('pizza_parlor_enable_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_blog_post_meta',array(
		'label'       => __('Enable Blog Post Meta', 'pizza-parlor'),
		'description' => __('Checked To Show Blog Post Meta Feilds', 'pizza-parlor'),
		'section'     => 'pizza_parlor_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('pizza_parlor_enable_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_blog_post_tags',array(
		'label'       => __('Enable Blog Post Tags', 'pizza-parlor'),
		'description' => __('Checked To Show Blog Post Tags', 'pizza-parlor'),
		'section'     => 'pizza_parlor_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('pizza_parlor_enable_blog_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_blog_post_image',array(
		'label'       => __('Enable Blog Post Image', 'pizza-parlor'),
		'description' => __('Checked To Show Blog Post Image', 'pizza-parlor'),
		'section'     => 'pizza_parlor_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('pizza_parlor_enable_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_blog_post_content',array(
		'label'       => __('Enable Blog Post Content', 'pizza-parlor'),
		'description' => __('Checked To Show Blog Post Content', 'pizza-parlor'),
		'section'     => 'pizza_parlor_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('pizza_parlor_enable_blog_post_button',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_blog_post_button',array(
		'label'       => __('Enable Blog Post Read More Button', 'pizza-parlor'),
		'description' => __('Checked To Show Blog Post Read More Button', 'pizza-parlor'),
		'section'     => 'pizza_parlor_blog_post_section',
		'type'        => 'checkbox',
	));

	/*Blog post Content layout*/
	$wp_customize->add_setting('pizza_parlor_blog_Post_content_layout',array(
        'default' => 'Left',
        'sanitize_callback' => 'pizza_parlor_sanitize_choices'
	));
	$wp_customize->add_control('pizza_parlor_blog_Post_content_layout',array(
        'type' => 'select',
        'label' => esc_html__('Blog Post Content Layout','pizza-parlor'),
        'section' => 'pizza_parlor_blog_post_section',
        'choices' => array(
            'Left' => esc_html__('Left','pizza-parlor'),
            'Center' => esc_html__('Center','pizza-parlor'),
            'Right' => esc_html__('Right','pizza-parlor')
        ),
	) );

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

	$wp_customize->add_control(
		'pizza_parlor_excerpt_limit',
		array(
			'label'       => __('Excerpt Limit', 'pizza-parlor'),
			'section'     => 'pizza_parlor_blog_post_section',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 2,
	             'max' => 50,
	             'step' => 2,
	         ),
		)
	);

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

	$wp_customize->add_control(
		'pizza_parlor_read_more_text',
		array(
			'label'       => __('Edit Button Text ', 'pizza-parlor'),
			'section'     => 'pizza_parlor_blog_post_section',
			'type'        => 'text',
		)
	);

	/*Single Post Options*/
	$wp_customize->add_section('pizza_parlor_single_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Single Post Options', 'pizza-parlor'),
		'panel'       => 'pizza_parlor_panel',
	));
	
	$wp_customize->add_setting('pizza_parlor_enable_single_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_single_blog_post_title',array(
		'label'       => __('Enable Single Post Title', 'pizza-parlor'),
		'description' => __('Checked To Show Single Blog Post Title', 'pizza-parlor'),
		'section'     => 'pizza_parlor_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('pizza_parlor_enable_single_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_single_blog_post_meta',array(
		'label'       => __('Enable Single Post Meta', 'pizza-parlor'),
		'description' => __('Checked To Show Single Blog Post Meta Feilds', 'pizza-parlor'),
		'section'     => 'pizza_parlor_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('pizza_parlor_enable_single_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_single_blog_post_tags',array(
		'label'       => __('Enable Single Post Tags', 'pizza-parlor'),
		'description' => __('Checked To Show Single Blog Post Tags', 'pizza-parlor'),
		'section'     => 'pizza_parlor_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('pizza_parlor_enable_single_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_single_post_image',array(
		'label'       => __('Enable Single Post Image', 'pizza-parlor'),
		'description' => __('Checked To Show Single Post Image', 'pizza-parlor'),
		'section'     => 'pizza_parlor_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('pizza_parlor_enable_single_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
	));
	$wp_customize->add_control('pizza_parlor_enable_single_blog_post_content',array(
		'label'       => __('Enable Single Post Content', 'pizza-parlor'),
		'description' => __('Checked To Show Single Blog Post Content', 'pizza-parlor'),
		'section'     => 'pizza_parlor_single_post_section',
		'type'        => 'checkbox',
	));

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

	$wp_customize->add_control(
		'pizza_parlor_enable_related_post',
		array(
			'label'       => __('Enable Related Post', 'pizza-parlor'),
			'description' => __('Checked to show Related Post', 'pizza-parlor'),
			'section'     => 'pizza_parlor_single_post_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'pizza_parlor_related_post_text',
		array(
			'label'       => __('Edit Related Post Text ', 'pizza-parlor'),
			'section'     => 'pizza_parlor_single_post_section',
			'type'        => 'text',
		)
	);	

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

	$wp_customize->add_control(
		'pizza_parlor_related_post_count',
		array(
			'label'       => __('Related Post Count', 'pizza-parlor'),
			'section'     => 'pizza_parlor_single_post_section',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 9,
	             'step' => 1,
	         ),
		)
	);

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

	$wp_customize->add_control(
		'pizza_parlor_enable_comment_section',
		array(
			'label'       => __('Enable Comment Section', 'pizza-parlor'),
			'description' => __('Checked to show Comment Section', 'pizza-parlor'),
			'section'     => 'pizza_parlor_single_post_section',
			'type'        => 'checkbox',
		)
	);

		/*
	* Customizer Global COlor
	*/

	/*Global Color Options*/
	$wp_customize->add_section('pizza_parlor_global_color_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Global Color Options', 'pizza-parlor'),
		'panel'       => 'pizza_parlor_panel',
	));

	$wp_customize->add_setting( 'pizza_parlor_primary_color',
		array(
		'default'           => '#333029',
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control( 
		new WP_Customize_Color_Control( 
		$wp_customize, 
		'pizza_parlor_primary_color',
		array(
			'label'      => esc_html__( 'Primary Color', 'pizza-parlor' ),
			'section'    => 'pizza_parlor_global_color_section',
			'settings'   => 'pizza_parlor_primary_color',
		) ) 
	);

	$wp_customize->add_setting( 'pizza_parlor_secondary_color',
		array(
		'default'           => '#CE0000',
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control( 
		new WP_Customize_Color_Control( 
		$wp_customize, 
		'pizza_parlor_secondary_color',
		array(
			'label'      => esc_html__( 'Secondary Color', 'pizza-parlor' ),
			'section'    => 'pizza_parlor_global_color_section',
			'settings'   => 'pizza_parlor_secondary_color',
		) ) 
	);

	/*Typography Options*/
	$wp_customize->add_section( 'pizza_parlor_typography_section', array(
		'panel'       => 'pizza_parlor_panel',
        'title'    => __( 'Typography Options', 'pizza-parlor' ),
        'priority' => 2,
    ) );

    $wp_customize->add_setting( 'pizza_parlor_font_family', array(
		'default'           => 'default',
		'sanitize_callback' => 'pizza_parlor_sanitize_font_family',
	) );
	
	$wp_customize->add_control( 'pizza_parlor_font_family', array(
		'label'    => __( 'Global Font Family', 'pizza-parlor' ),
		'section'  => 'pizza_parlor_typography_section',
		'type'     => 'select',
		'choices'  => array(
			'default'          => __( 'Default (Theme Font)', 'pizza-parlor' ),
			'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',
		),
	) );
	
	/*Main Header Options*/
	$wp_customize->add_section('pizza_parlor_header_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Header Options', 'pizza-parlor'),
		'panel'       => 'pizza_parlor_panel',
	));

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

	$wp_customize->add_control(
		'pizza_parlor_header_search',
		array(
			'label'       => __('Enable Disable Search', 'pizza-parlor'),
			'description' => __('Enable or Disable header Search', 'pizza-parlor'),
			'section'     => 'pizza_parlor_header_section',
			'type'        => 'checkbox',
		)
	);

	/*
	* Customizer main slider section
	*/
	/*Main Slider Options*/
	$wp_customize->add_section('pizza_parlor_slider_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Slider Options', 'pizza-parlor'),
		'panel'       => 'pizza_parlor_panel',
	));

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

	$wp_customize->add_control(
		'pizza_parlor_enable_slider',
		array(
			'label'       => __('Enable Main Slider', 'pizza-parlor'),
			'description' => __('Checked to show the main slider', 'pizza-parlor'),
			'section'     => 'pizza_parlor_slider_section',
			'type'        => 'checkbox',
		)
	);

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

		/*Main Slider Image*/
		$wp_customize->add_setting(
			'pizza_parlor_slider_image'.$pizza_parlor_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, 
				'pizza_parlor_slider_image'.$pizza_parlor_i, 
				array(
			        'label' => __('Edit Slider Image ', 'pizza-parlor') .$pizza_parlor_i,
			        'description' => __('Edit the slider image.', 'pizza-parlor'),
			        'section' => 'pizza_parlor_slider_section',
				)
			)
		);

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

		$wp_customize->add_control(
			'pizza_parlor_slider_heading'.$pizza_parlor_i,
			array(
				'label'       => __('Edit Heading Text ', 'pizza-parlor') .$pizza_parlor_i,
				'description' => __('Edit the slider heading text.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'pizza_parlor_slider_text'.$pizza_parlor_i,
			array(
				'label'       => __('Edit Sub Heading Text ', 'pizza-parlor') .$pizza_parlor_i,
				'description' => __('Edit the slider Sub Heading text.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'pizza_parlor_slider_button1_text'.$pizza_parlor_i,
			array(
				'label'       => __('Edit Button #1 Text ', 'pizza-parlor') .$pizza_parlor_i,
				'description' => __('Edit the slider button text.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'pizza_parlor_slider_button1_link'.$pizza_parlor_i,
			array(
				'label'       => __('Edit Button #1 URL ', 'pizza-parlor') .$pizza_parlor_i,
				'description' => __('Edit the slider button url.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_slider_section',
				'type'        => 'url',
			)
		);
	}

	/*
	* Customizer project section
	*/
	/*Our Chef Options*/
	$wp_customize->add_section('pizza_parlor_project_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Our Chef Options', 'pizza-parlor'),
		'panel'       => 'pizza_parlor_panel',
	));

	/*Our Chef Enable Option*/
	$wp_customize->add_setting(
		'pizza_parlor_enable_project',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 0,
			'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'pizza_parlor_enable_project',
		array(
			'label'       => __('Enable Our Chef Section', 'pizza-parlor'),
			'description' => __('Checked to show the project', 'pizza-parlor'),
			'section'     => 'pizza_parlor_project_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'pizza_parlor_project_short_heading',
		array(
			'label'       => __('Edit Main Short Heading ', 'pizza-parlor'),
			'description' => __('Edit the main section title.', 'pizza-parlor'),
			'section'     => 'pizza_parlor_project_section',
			'type'        => 'text',
		)
	);

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

	$wp_customize->add_control(
		'pizza_parlor_project_heading',
		array(
			'label'       => __('Edit Main Heading ', 'pizza-parlor'),
			'description' => __('Edit the main section title.', 'pizza-parlor'),
			'section'     => 'pizza_parlor_project_section',
			'type'        => 'text',
		)
	);

	/*Main Tab1*/
	/*Our Chef Image*/
		$wp_customize->add_setting(
			'pizza_parlor_project_image_tab1',
			array(
				'capability'    => 'edit_theme_options',
		        'default'       => '',
		        'transport'     => 'postMessage',
		        'sanitize_callback' => 'esc_url_raw',
	    	)
	    );

		$wp_customize->add_control( 
			new WP_Customize_Image_Control( $wp_customize, 
				'pizza_parlor_project_image_tab1', 
				array(
			        'label' => __('Edit Our Chef Image ', 'pizza-parlor') ,
			        'description' => __('Edit the project image.', 'pizza-parlor'),
			        'section' => 'pizza_parlor_project_section',
				)
			)
		);

		/*Our Chef Title*/
		$wp_customize->add_setting(
			'pizza_parlor_project_box_heading_tab1',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'pizza_parlor_project_box_heading_tab1',
			array(
				'label'       => __('Edit Staff Name ', 'pizza-parlor'),
				'description' => __('Edit the Staff name.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

		/*Our Chef Title*/
		$wp_customize->add_setting(
			'pizza_parlor_project_box_designation_tab1',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'pizza_parlor_project_box_designation_tab1',
			array(
				'label'       => __('Edit Staff Designation ', 'pizza-parlor'),
				'description' => __('Edit the Designation.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

		/*Our Chef Content*/
		$wp_customize->add_setting(
			'pizza_parlor_project_box_text_tab1',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'pizza_parlor_project_box_text_tab1',
			array(
				'label'       => __('Edit Our Chef Content ', 'pizza-parlor') ,
				'description' => __('Edit the project content.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

	/*Main Tab2*/
	/*Our Chef Image*/
		$wp_customize->add_setting(
			'pizza_parlor_project_image_tab2',
			array(
				'capability'    => 'edit_theme_options',
		        'default'       => '',
		        'transport'     => 'postMessage',
		        'sanitize_callback' => 'esc_url_raw',
	    	)
	    );

		$wp_customize->add_control( 
			new WP_Customize_Image_Control( $wp_customize, 
				'pizza_parlor_project_image_tab2', 
				array(
			        'label' => __('Edit Our Chef Image ', 'pizza-parlor') ,
			        'description' => __('Edit the project image.', 'pizza-parlor'),
			        'section' => 'pizza_parlor_project_section',
				)
			)
		);

		/*Our Chef Staff Name*/
		$wp_customize->add_setting(
			'pizza_parlor_project_box_heading_tab2',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'pizza_parlor_project_box_heading_tab2',
			array(
				'label'       => __('Edit Staff Name', 'pizza-parlor'),
				'description' => __('Edit the Staff name.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

		/*Our Chef Designation*/
		$wp_customize->add_setting(
			'pizza_parlor_project_box_designation_tab2',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'pizza_parlor_project_box_designation_tab2',
			array(
				'label'       => __('Edit Designation', 'pizza-parlor'),
				'description' => __('Edit the Designation.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

		/*Our Chef Content*/
		$wp_customize->add_setting(
			'pizza_parlor_project_box_text_tab2',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'pizza_parlor_project_box_text_tab2',
			array(
				'label'       => __('Edit Our Chef Content ', 'pizza-parlor'),
				'description' => __('Edit the project content.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

	/*Main Tab3*/
	/*Our Chef Image*/
		$wp_customize->add_setting(
			'pizza_parlor_project_image_tab3',
			array(
				'capability'    => 'edit_theme_options',
		        'default'       => '',
		        'transport'     => 'postMessage',
		        'sanitize_callback' => 'esc_url_raw',
	    	)
	    );

		$wp_customize->add_control( 
			new WP_Customize_Image_Control( $wp_customize, 
				'pizza_parlor_project_image_tab3', 
				array(
			        'label' => __('Edit Our Chef Image ', 'pizza-parlor') ,
			        'description' => __('Edit the project image.', 'pizza-parlor'),
			        'section' => 'pizza_parlor_project_section',
				)
			)
		);

		/*Staff Name*/
		$wp_customize->add_setting(
			'pizza_parlor_project_box_heading_tab_3',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'pizza_parlor_project_box_heading_tab_3',
			array(
				'label'       => __('Edit Staff Name', 'pizza-parlor'),
				'description' => __('Edit the Staff name.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'pizza_parlor_project_box_designation_tab_3',
			array(
				'label'       => __('Edit Designation', 'pizza-parlor'),
				'description' => __('Edit the Designation name.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

		/*Our Chef Content*/
		$wp_customize->add_setting(
			'pizza_parlor_project_box_text_tab_3',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'pizza_parlor_project_box_text_tab_3',
			array(
				'label'       => __('Edit Our Chef Content ', 'pizza-parlor'),
				'description' => __('Edit the project content.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

		/*Main Tab4*/
	/*Staff Image*/
		$wp_customize->add_setting(
			'pizza_parlor_project_image_tab4',
			array(
				'capability'    => 'edit_theme_options',
		        'default'       => '',
		        'transport'     => 'postMessage',
		        'sanitize_callback' => 'esc_url_raw',
	    	)
	    );

		$wp_customize->add_control( 
			new WP_Customize_Image_Control( $wp_customize, 
				'pizza_parlor_project_image_tab4', 
				array(
			        'label' => __('Edit Staff Image ', 'pizza-parlor') ,
			        'description' => __('Edit the Staff image.', 'pizza-parlor'),
			        'section' => 'pizza_parlor_project_section',
				)
			)
		);

		/*Staff Name*/
		$wp_customize->add_setting(
			'pizza_parlor_project_box_heading_tab_4',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'pizza_parlor_project_box_heading_tab_4',
			array(
				'label'       => __('Edit Staff Name', 'pizza-parlor'),
				'description' => __('Edit the Staff name.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'pizza_parlor_project_box_designation_tab_4',
			array(
				'label'       => __('Edit Designation', 'pizza-parlor'),
				'description' => __('Edit the Designation name.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);

		/*Our Chef Content*/
		$wp_customize->add_setting(
			'pizza_parlor_project_box_text_tab_4',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'pizza_parlor_project_box_text_tab_4',
			array(
				'label'       => __('Edit Our Chef Content ', 'pizza-parlor'),
				'description' => __('Edit the project content.', 'pizza-parlor'),
				'section'     => 'pizza_parlor_project_section',
				'type'        => 'text',
			)
		);
	
	/*
	* Customizer Footer Section
	*/
	/*Footer Options*/
	$wp_customize->add_section('pizza_parlor_footer_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Footer Options', 'pizza-parlor'),
		'panel'       => 'pizza_parlor_panel',
	));

	/*Footer Enable Option*/
	$wp_customize->add_setting(
		'pizza_parlor_enable_footer',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
		)
	);
	$wp_customize->add_control(
		'pizza_parlor_enable_footer',
		array(
			'label'       => __('Enable Footer', 'pizza-parlor'),
			'description' => __('Checked to show Footer', 'pizza-parlor'),
			'section'     => 'pizza_parlor_footer_section',
			'type'        => 'checkbox',
		)
	);

	/*Footer bg image Option*/
	$wp_customize->add_setting('pizza_parlor_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,'pizza_parlor_footer_bg_image',array(
        'label' => __('Footer Background Image','pizza-parlor'),
        'section' => 'pizza_parlor_footer_section',
        'priority' => 1,
    )));

	/*Footer Social Menu Option*/
	$wp_customize->add_setting(
		'pizza_parlor_footer_social_menu',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
		)
	);
	$wp_customize->add_control(
		'pizza_parlor_footer_social_menu',
		array(
			'label'       => __('Enable Footer Social Menu', 'pizza-parlor'),
			'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.', 'pizza-parlor'),
			'section'     => 'pizza_parlor_footer_section',
			'type'        => 'checkbox',
		)
	);	

	/*Go To Top Option*/
	$wp_customize->add_setting(
		'pizza_parlor_enable_go_to_top_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'pizza_parlor_sanitize_checkbox',
		)
	);
	$wp_customize->add_control(
		'pizza_parlor_enable_go_to_top_option',
		array(
			'label'       => __('Enable Go To Top', 'pizza-parlor'),
			'description' => __('Checked to enable Go To Top option.', 'pizza-parlor'),
			'section'     => 'pizza_parlor_footer_section',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting('pizza_parlor_go_to_top_position',array(
        'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 'Right',
        'sanitize_callback' => 'pizza_parlor_sanitize_choices'
    ));
    $wp_customize->add_control('pizza_parlor_go_to_top_position',array(
        'type' => 'select',
        'section' => 'pizza_parlor_footer_section',
        'label' => esc_html__('Go To Top Positions','pizza-parlor'),
        'choices' => array(
            'Right' => __('Right','pizza-parlor'),
            'Left' => __('Left','pizza-parlor'),
            'Center' => __('Center','pizza-parlor')
        ),
    ) );

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

	$wp_customize->add_control(
		'pizza_parlor_copyright_option',
		array(
			'label'       => __('Edit Copyright Text', 'pizza-parlor'),
			'description' => __('Edit the Footer Copyright Section.', 'pizza-parlor'),
			'section'     => 'pizza_parlor_footer_section',
			'type'        => 'text',
		)
	);
}
add_action( 'customize_register', 'pizza_parlor_customize_register' );

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

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

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

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

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

		static $instance = null;

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

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

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

		// Register custom section types.
		$manager->register_section_type( 'Pizza_Parlor_Customize_Section_Pro' );

		// Register sections.
		$manager->add_section( new Pizza_Parlor_Customize_Section_Pro( $manager,'pizza_parlor_go_pro', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Pizza Parlor', 'pizza-parlor' ),
			'pro_text' => esc_html__( 'Buy Pro', 'pizza-parlor' ),
			'pro_url'    => esc_url( PIZZA_PARLOR_BUY_NOW ),
		) )	);

		// Register sections.
		$manager->add_section( new Pizza_Parlor_Customize_Section_Pro( $manager,'pizza_parlor_lite_documentation', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Lite Documentation', 'pizza-parlor' ),
			'pro_text' => esc_html__( 'Instruction', 'pizza-parlor' ),
			'pro_url'    => esc_url( PIZZA_PARLOR_LITE_DOC ),
		) )	);
		
		$manager->add_section( new Pizza_Parlor_Customize_Section_Pro( $manager, 'pizza_parlor_live_demo', array(
			'priority'   => 1,
			'title'      => esc_html__( 'Pro Theme Demo', 'pizza-parlor' ),
			'pro_text'   => esc_html__( 'Live Preview', 'pizza-parlor' ),
			'pro_url'    => esc_url( PIZZA_PARLOR_LIVE_DEMO ),
		) ) );
	}

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

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

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

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