<?php
/**
 * Fashion Outfit Theme Customizer
 *
 * @package Fashion Outfit
 */

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

	/*
    * Theme Options Panel
    */
	$wp_customize->add_panel('fashion_outfit_panel', array(
		'priority' => 25,
		'capability' => 'edit_theme_options',
		'title' => __('Fashion Outfit Theme Options', 'fashion-outfit'),
	));

	/*
	* Customizer main header section
	*/

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

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

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

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

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

	$wp_customize->add_control(
		'fashion_outfit_logo_width',
		array(
			'label'       => __('Logo Width in PX', 'fashion-outfit'),
			'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', 'fashion-outfit'),
			'panel'       => 'woocommerce',
		));
	
		$wp_customize->add_setting(
			'fashion_outfit_per_columns',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '3',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);
	
		$wp_customize->add_control(
			'fashion_outfit_per_columns',
			array(
				'label'       => __('Product Per Single Row', 'fashion-outfit'),
				'section'     => 'woocommerce_custom_settings',
				'type'        => 'number',
				'input_attrs' => array(
					'min' => 1,
					 'max' => 4,
					 'step' => 1,
				 ),
			)
		);
	
		$wp_customize->add_setting(
			'fashion_outfit_product_per_page',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '6',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);
	
		$wp_customize->add_control(
			'fashion_outfit_product_per_page',
			array(
				'label'       => __('Product Per One Page', 'fashion-outfit'),
				'section'     => 'woocommerce_custom_settings',
				'type'        => 'number',
				'input_attrs' => array(
					'min' => 1,
					 'max' => 12,
					 'step' => 1,
				 ),
			)
		);
	
		/*Related Products Enable Option*/
		$wp_customize->add_setting(
			'fashion_outfit_enable_related_product',
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => 1,
				'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
			)
		);
	
		$wp_customize->add_control(
			'fashion_outfit_enable_related_product',
			array(
				'label'       => __('Enable Related Product', 'fashion-outfit'),
				'description' => __('Checked to show Related Product', 'fashion-outfit'),
				'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', 'fashion-outfit'),
				'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', 'fashion-outfit'),
				'section'     => 'woocommerce_custom_settings',
				'type'        => 'number',
				'input_attrs' => array(
					'min' => 1,
					 'max' => 4,
					 'step' => 1,
				 ),
			)
		);
	
		/*Archive Product layout*/
		$wp_customize->add_setting('fashion_outfit_archive_product_layout',array(
			'default' => 'layout-1',
			'sanitize_callback' => 'fashion_outfit_sanitize_choices'
		));
		$wp_customize->add_control('fashion_outfit_archive_product_layout',array(
			'type' => 'select',
			'label' => esc_html__('Archive Product Layout','fashion-outfit'),
			'section' => 'woocommerce_custom_settings',
			'choices' => array(
				'layout-1' => esc_html__('Sidebar On Right','fashion-outfit'),
				'layout-2' => esc_html__('Sidebar On Left','fashion-outfit'),
				'layout-3' => esc_html__('Full Width Layout','fashion-outfit')
			),
		) );
	
		/*Single Product layout*/
		$wp_customize->add_setting('fashion_outfit_single_product_layout',array(
			'default' => 'layout-1',
			'sanitize_callback' => 'fashion_outfit_sanitize_choices'
		));
		$wp_customize->add_control('fashion_outfit_single_product_layout',array(
			'type' => 'select',
			'label' => esc_html__('Single Product Layout','fashion-outfit'),
			'section' => 'woocommerce_custom_settings',
			'choices' => array(
				'layout-1' => esc_html__('Sidebar On Right','fashion-outfit'),
				'layout-2' => esc_html__('Sidebar On Left','fashion-outfit'),
				'layout-3' => esc_html__('Full Width Layout','fashion-outfit')
			),
		) );
	
		$wp_customize->add_setting('fashion_outfit_woocommerce_product_sale',array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Right',
			'sanitize_callback' => 'fashion_outfit_sanitize_choices'
		));
		$wp_customize->add_control('fashion_outfit_woocommerce_product_sale',array(
			'label'       => esc_html__( 'Woocommerce Product Sale Positions','fashion-outfit' ),
			'type' => 'select',
			'section' => 'woocommerce_custom_settings',
			'choices' => array(
				'Right' => __('Right','fashion-outfit'),
				'Left' => __('Left','fashion-outfit'),
				'Center' => __('Center','fashion-outfit')
			),
		) );

	/*Additional Options*/
	$wp_customize->add_section('fashion_outfit_additional_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Additional Options', 'fashion-outfit'),
		'panel'       => 'fashion_outfit_panel',
	));

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

	$wp_customize->add_control(
		'fashion_outfit_enable_sticky_header',
		array(
			'label'       => __('Enable Sticky Header', 'fashion-outfit'),
			'description' => __('Checked to enable sticky header', 'fashion-outfit'),
			'section'     => 'fashion_outfit_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'fashion_outfit_enable_preloader',
		array(
			'label'       => __('Enable Preloader', 'fashion-outfit'),
			'description' => __('Checked to show preloader', 'fashion-outfit'),
			'section'     => 'fashion_outfit_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'fashion_outfit_enable_breadcrumbs',
		array(
			'label'       => __('Enable Breadcrumbs', 'fashion-outfit'),
			'description' => __('Checked to show Breadcrumbs', 'fashion-outfit'),
			'section'     => 'fashion_outfit_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'fashion_outfit_enable_pagination',
		array(
			'label'       => __('Enable Pagination', 'fashion-outfit'),
			'description' => __('Checked to show Pagination', 'fashion-outfit'),
			'section'     => 'fashion_outfit_additional_section',
			'type'        => 'checkbox',
		)
	);

	/*Pagination Select Type Option*/
	$wp_customize->add_setting('fashion_outfit_pagination_type',array(
        'default' => 'type-1',
        'sanitize_callback' => 'fashion_outfit_sanitize_choices'
	));
	$wp_customize->add_control('fashion_outfit_pagination_type',array(
        'type' => 'select',
        'label' => esc_html__('Select Pagination Type','fashion-outfit'),
        'section' => 'fashion_outfit_additional_section',
        'choices' => array(
            'type-1' => esc_html__('Type 1','fashion-outfit'),
            'type-2' => esc_html__('Type 2','fashion-outfit'),
        ),
	) );

	/*Post layout*/
	$wp_customize->add_setting('fashion_outfit_archive_layout',array(
		'default' => 'layout-1',
		'sanitize_callback' => 'fashion_outfit_sanitize_choices'
	));
	$wp_customize->add_control('fashion_outfit_archive_layout',array(
		'type' => 'select',
		'label' => esc_html__('Posts Layout','fashion-outfit'),
		'section' => 'fashion_outfit_additional_section',
		'choices' => array(
			'layout-1' => esc_html__('Sidebar On Right','fashion-outfit'),
			'layout-2' => esc_html__('Sidebar On Left','fashion-outfit'),
			'layout-3' => esc_html__('Full Width Layout','fashion-outfit')
		),
	) );

	/*single post layout*/
	$wp_customize->add_setting('fashion_outfit_post_layout',array(
		'default' => 'layout-1',
		'sanitize_callback' => 'fashion_outfit_sanitize_choices'
	));
	$wp_customize->add_control('fashion_outfit_post_layout',array(
		'type' => 'select',
		'label' => esc_html__('Single Post Layout','fashion-outfit'),
		'section' => 'fashion_outfit_additional_section',
		'choices' => array(
			'layout-1' => esc_html__('Sidebar On Right','fashion-outfit'),
			'layout-2' => esc_html__('Sidebar On Left','fashion-outfit'),
			'layout-3' => esc_html__('Full Width Layout','fashion-outfit')
		),
	) );

	/*single page layout*/
	$wp_customize->add_setting('fashion_outfit_page_layout',array(
		'default' => 'layout-1',
		'sanitize_callback' => 'fashion_outfit_sanitize_choices'
	));
	$wp_customize->add_control('fashion_outfit_page_layout',array(
		'type' => 'select',
		'label' => esc_html__('Single Page Layout','fashion-outfit'),
		'section' => 'fashion_outfit_additional_section',
		'choices' => array(
			'layout-1' => esc_html__('Sidebar On Right','fashion-outfit'),
			'layout-2' => esc_html__('Sidebar On Left','fashion-outfit'),
			'layout-3' => esc_html__('Full Width Layout','fashion-outfit')
		),
	) );

	/*Archive Post Options*/
	$wp_customize->add_section('fashion_outfit_blog_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Blog Page Options', 'fashion-outfit'),
		'panel'       => 'fashion_outfit_panel',
	));

	$wp_customize->add_setting('fashion_outfit_enable_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_blog_post_title',array(
		'label'       => __('Enable Blog Post Title', 'fashion-outfit'),
		'description' => __('Checked To Show Blog Post Title', 'fashion-outfit'),
		'section'     => 'fashion_outfit_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('fashion_outfit_enable_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_blog_post_meta',array(
		'label'       => __('Enable Blog Post Meta', 'fashion-outfit'),
		'description' => __('Checked To Show Blog Post Meta Feilds', 'fashion-outfit'),
		'section'     => 'fashion_outfit_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('fashion_outfit_enable_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_blog_post_tags',array(
		'label'       => __('Enable Blog Post Tags', 'fashion-outfit'),
		'description' => __('Checked To Show Blog Post Tags', 'fashion-outfit'),
		'section'     => 'fashion_outfit_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('fashion_outfit_enable_blog_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_blog_post_image',array(
		'label'       => __('Enable Blog Post Image', 'fashion-outfit'),
		'description' => __('Checked To Show Blog Post Image', 'fashion-outfit'),
		'section'     => 'fashion_outfit_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('fashion_outfit_enable_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_blog_post_content',array(
		'label'       => __('Enable Blog Post Content', 'fashion-outfit'),
		'description' => __('Checked To Show Blog Post Content', 'fashion-outfit'),
		'section'     => 'fashion_outfit_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('fashion_outfit_enable_blog_post_button',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_blog_post_button',array(
		'label'       => __('Enable Blog Post Read More Button', 'fashion-outfit'),
		'description' => __('Checked To Show Blog Post Read More Button', 'fashion-outfit'),
		'section'     => 'fashion_outfit_blog_post_section',
		'type'        => 'checkbox',
	));

	/*Blog post Content layout*/
	$wp_customize->add_setting('fashion_outfit_blog_Post_content_layout',array(
		'default' => 'Left',
		'sanitize_callback' => 'fashion_outfit_sanitize_choices'
	));
	$wp_customize->add_control('fashion_outfit_blog_Post_content_layout',array(
		'type' => 'select',
		'label' => esc_html__('Blog Post Content Layout','fashion-outfit'),
		'section' => 'fashion_outfit_blog_post_section',
		'choices' => array(
			'Left' => esc_html__('Left','fashion-outfit'),
			'Center' => esc_html__('Center','fashion-outfit'),
			'Right' => esc_html__('Right','fashion-outfit')
		),
	) );

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

	$wp_customize->add_control(
		'fashion_outfit_excerpt_limit',
		array(
			'label'       => __('Excerpt Limit', 'fashion-outfit'),
			'section'     => 'fashion_outfit_blog_post_section',
			'type'        => 'number',
			'input_attrs' => array(
				'min' => 2,
					'max' => 50,
					'step' => 2,
				),
		)
	);

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

	$wp_customize->add_control(
		'fashion_outfit_read_more_text',
		array(
			'label'       => __('Edit Button Text ', 'fashion-outfit'),
			'section'     => 'fashion_outfit_blog_post_section',
			'type'        => 'text',
		)
	);

	/*Single Post Options*/
	$wp_customize->add_section('fashion_outfit_single_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Single Post Options', 'fashion-outfit'),
		'panel'       => 'fashion_outfit_panel',
	));

	$wp_customize->add_setting('fashion_outfit_enable_single_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_single_blog_post_title',array(
		'label'       => __('Enable Single Post Title', 'fashion-outfit'),
		'description' => __('Checked To Show Single Blog Post Title', 'fashion-outfit'),
		'section'     => 'fashion_outfit_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('fashion_outfit_enable_single_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_single_blog_post_meta',array(
		'label'       => __('Enable Single Post Meta', 'fashion-outfit'),
		'description' => __('Checked To Show Single Blog Post Meta Feilds', 'fashion-outfit'),
		'section'     => 'fashion_outfit_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('fashion_outfit_enable_single_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_single_blog_post_tags',array(
		'label'       => __('Enable Single Post Tags', 'fashion-outfit'),
		'description' => __('Checked To Show Single Blog Post Tags', 'fashion-outfit'),
		'section'     => 'fashion_outfit_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('fashion_outfit_enable_single_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_single_post_image',array(
		'label'       => __('Enable Single Post Image', 'fashion-outfit'),
		'description' => __('Checked To Show Single Post Image', 'fashion-outfit'),
		'section'     => 'fashion_outfit_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('fashion_outfit_enable_single_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
	));
	$wp_customize->add_control('fashion_outfit_enable_single_blog_post_content',array(
		'label'       => __('Enable Single Post Content', 'fashion-outfit'),
		'description' => __('Checked To Show Single Blog Post Content', 'fashion-outfit'),
		'section'     => 'fashion_outfit_single_post_section',
		'type'        => 'checkbox',
	));

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

	$wp_customize->add_control(
		'fashion_outfit_enable_related_post',
		array(
			'label'       => __('Enable Related Post', 'fashion-outfit'),
			'description' => __('Checked to show Related Post', 'fashion-outfit'),
			'section'     => 'fashion_outfit_single_post_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'fashion_outfit_related_post_text',
		array(
			'label'       => __('Edit Related Post Text ', 'fashion-outfit'),
			'section'     => 'fashion_outfit_single_post_section',
			'type'        => 'text',
		)
	);	

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

	$wp_customize->add_control(
		'fashion_outfit_related_post_count',
		array(
			'label'       => __('Related Post Count', 'fashion-outfit'),
			'section'     => 'fashion_outfit_single_post_section',
			'type'        => 'number',
			'input_attrs' => array(
				'min' => 1,
					'max' => 9,
					'step' => 1,
				),
		)
	);

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

	$wp_customize->add_control(
		'fashion_outfit_enable_comment_section',
		array(
			'label'       => __('Enable Comment Section', 'fashion-outfit'),
			'description' => __('Checked to show Comment Section', 'fashion-outfit'),
			'section'     => 'fashion_outfit_single_post_section',
			'type'        => 'checkbox',
		)
	);

		/*
	* Customizer Global COlor
	*/

	/*Global Color Options*/
	$wp_customize->add_section('fashion_outfit_global_color_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Global Color Options', 'fashion-outfit'),
		'panel'       => 'fashion_outfit_panel',
	));

	$wp_customize->add_setting( 'fashion_outfit_primary_color',
		array(
		'default'           => '#c984b3',
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control( 
		new WP_Customize_Color_Control( 
		$wp_customize, 
		'fashion_outfit_primary_color',
		array(
			'label'      => esc_html__( 'Primary Color', 'fashion-outfit' ),
			'section'    => 'fashion_outfit_global_color_section',
			'settings'   => 'fashion_outfit_primary_color',
		) ) 
	);

	$wp_customize->add_setting( 'fashion_outfit_secondary_color',
		array(
		'default'           => '#000',
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control( 
		new WP_Customize_Color_Control( 
		$wp_customize, 
		'fashion_outfit_secondary_color',
		array(
			'label'      => esc_html__( 'Secondary Color', 'fashion-outfit' ),
			'section'    => 'fashion_outfit_global_color_section',
			'settings'   => 'fashion_outfit_secondary_color',
		) ) 
	);

	/*Typography Options*/
	$wp_customize->add_section( 'fashion_outfit_typography_section', array(
		'panel'       => 'fashion_outfit_panel',
        'title'    => __( 'Typography Options', 'fashion-outfit' ),
        'priority' => 2,
    ) );

    $wp_customize->add_setting( 'fashion_outfit_font_family', array(
		'default'           => 'default',
		'sanitize_callback' => 'fashion_outfit_sanitize_font_family',
	) );
	
	$wp_customize->add_control( 'fashion_outfit_font_family', array(
		'label'    => __( 'Global Font Family', 'fashion-outfit' ),
		'section'  => 'fashion_outfit_typography_section',
		'type'     => 'select',
		'choices'  => array(
			'default'          => __( 'Default (Theme Font)', 'fashion-outfit' ),
			'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('fashion_outfit_header_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Header Options', 'fashion-outfit'),
		'panel'       => 'fashion_outfit_panel',
	));

	/*Main Header Checkbox*/
	$wp_customize->add_setting(
		'fashion_outfit_header_info',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_header_info',
		array(
			'label'       => __('Enable Topbar Details', 'fashion-outfit'),
			'description' => __('Enable or Disable Topbar Details', 'fashion-outfit'),
			'section'     => 'fashion_outfit_header_section',
			'type'        => 'checkbox',
		)
	);

	/*Main Header Topbar Text*/
	$wp_customize->add_setting(
		'fashion_outfit_topheader_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'GET 50% OFF ON BRAND AFFILIATED PRODUCTS, USE CODE ELBLOI',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_topheader_text',
		array(
			'label'       => __('Edit Topbar Text ', 'fashion-outfit'),
			'section'     => 'fashion_outfit_header_section',
			'type'        => 'text',
		)
	);

	/*Facebook Link*/
	$wp_customize->add_setting(
		'fashion_outfit_facebook_link_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_facebook_link_option',
		array(
			'label'       => __('Edit Facebook Link', 'fashion-outfit'),
			'section'     => 'fashion_outfit_header_section',
			'type'        => 'url',
		)
	);

	/*Twitter Link*/
	$wp_customize->add_setting(
		'fashion_outfit_twitter_link_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_twitter_link_option',
		array(
			'label'       => __('Edit Twitter Link', 'fashion-outfit'),
			'section'     => 'fashion_outfit_header_section',
			'type'        => 'url',
		)
	);

	/*Youtube Link*/
	$wp_customize->add_setting(
		'fashion_outfit_youtube_link_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_youtube_link_option',
		array(
			'label'       => __('Edit Youtube Link', 'fashion-outfit'),
			'section'     => 'fashion_outfit_header_section',
			'type'        => 'url',
		)
	);

	/*Instagram Link*/
	$wp_customize->add_setting(
		'fashion_outfit_instagram_link_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_instagram_link_option',
		array(
			'label'       => __('Edit Instagram Link', 'fashion-outfit'),
			'section'     => 'fashion_outfit_header_section',
			'type'        => 'url',
		)
	);

	/*
	* Customizer main slider section
	*/
	/*Main Slider Options*/
	$wp_customize->add_section('fashion_outfit_slider_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Slider Options', 'fashion-outfit'),
		'panel'       => 'fashion_outfit_panel',
	));

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

	$wp_customize->add_control(
		'fashion_outfit_enable_slider',
		array(
			'label'       => __('Enable Main Slider', 'fashion-outfit'),
			'description' => __('Checked to show the main slider', 'fashion-outfit'),
			'section'     => 'fashion_outfit_slider_section',
			'type'        => 'checkbox',
		)
	);

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

		/*Main Slider Image*/
		$wp_customize->add_setting(
			'fashion_outfit_slider_image'.$fashion_outfit_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, 
				'fashion_outfit_slider_image'.$fashion_outfit_i, 
				array(
			        'label' => __('Edit Slider Image ', 'fashion-outfit') .$fashion_outfit_i,
			        'description' => __('Edit the slider image.', 'fashion-outfit'),
			        'section' => 'fashion_outfit_slider_section',
				)
			)
		);

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

		$wp_customize->add_control(
			'fashion_outfit_slider_top_text'.$fashion_outfit_i,
			array(
				'label'       => __('Edit Slider Top Text ', 'fashion-outfit') .$fashion_outfit_i,
				'description' => __('Edit the slider Top text.', 'fashion-outfit'),
				'section'     => 'fashion_outfit_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'fashion_outfit_slider_heading'.$fashion_outfit_i,
			array(
				'label'       => __('Edit Heading Text ', 'fashion-outfit') .$fashion_outfit_i,
				'description' => __('Edit the slider heading text.', 'fashion-outfit'),
				'section'     => 'fashion_outfit_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'fashion_outfit_slider_text'.$fashion_outfit_i,
			array(
				'label'       => __('Edit Content Text ', 'fashion-outfit') .$fashion_outfit_i,
				'description' => __('Edit the slider content text.', 'fashion-outfit'),
				'section'     => 'fashion_outfit_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'fashion_outfit_slider_button1_text'.$fashion_outfit_i,
			array(
				'label'       => __('Edit Button #1 Text ', 'fashion-outfit') .$fashion_outfit_i,
				'description' => __('Edit the slider button text.', 'fashion-outfit'),
				'section'     => 'fashion_outfit_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'fashion_outfit_slider_button1_link'.$fashion_outfit_i,
			array(
				'label'       => __('Edit Button #1 URL ', 'fashion-outfit') .$fashion_outfit_i,
				'description' => __('Edit the slider button url.', 'fashion-outfit'),
				'section'     => 'fashion_outfit_slider_section',
				'type'        => 'url',
			)
		);

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

		$wp_customize->add_control(
			'fashion_outfit_slider_button2_text'.$fashion_outfit_i,
			array(
				'label'       => __('Edit Button #2 Text ', 'fashion-outfit') .$fashion_outfit_i,
				'description' => __('Edit the slider button text.', 'fashion-outfit'),
				'section'     => 'fashion_outfit_slider_section',
				'type'        => 'text',
			)
		);

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

		$wp_customize->add_control(
			'fashion_outfit_slider_button2_link'.$fashion_outfit_i,
			array(
				'label'       => __('Edit Button #2 URL ', 'fashion-outfit') .$fashion_outfit_i,
				'description' => __('Edit the slider button url.', 'fashion-outfit'),
				'section'     => 'fashion_outfit_slider_section',
				'type'        => 'url',
			)
		);
	}

	/*
	* Customizer New Arrivals section
	*/
	/*New Arrivals Options*/
	$wp_customize->add_section('fashion_outfit_product_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Our Products Option', 'fashion-outfit'),
		'panel'       => 'fashion_outfit_panel',
	));

	/*New Arrivals Enable Option*/
	$wp_customize->add_setting(
		'fashion_outfit_enable_new_arrivals',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 0,
			'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_enable_new_arrivals',
		array(
			'label'       => __('Enable Our Product Section', 'fashion-outfit'),
			'description' => __('Checked to show the category', 'fashion-outfit'),
			'section'     => 'fashion_outfit_product_section',
			'type'        => 'checkbox',
		)
	);

	/*New Arrivals Heading 2*/
	$wp_customize->add_setting(
		'fashion_outfit_product_top_heading',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_product_top_heading',
		array(
			'label'       => __('Edit Section Top Heading', 'fashion-outfit'),
			'description' => __('Edit section top heading', 'fashion-outfit'),
			'section'     => 'fashion_outfit_product_section',
			'type'        => 'text',
		)
	);

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

	$wp_customize->add_control(
		'fashion_outfit_product_main_heading',
		array(
			'label'       => __('Edit Section Heading', 'fashion-outfit'),
			'description' => __('Edit section main heading', 'fashion-outfit'),
			'section'     => 'fashion_outfit_product_section',
			'type'        => 'text',
		)
	);

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

	$wp_customize->add_control(
		'fashion_outfit_product_content',
		array(
			'label'       => __('Edit Section Content', 'fashion-outfit'),
			'description' => __('Edit section Content', 'fashion-outfit'),
			'section'     => 'fashion_outfit_product_section',
			'type'        => 'text',
		)
	);

	/*New Arrivals Products*/
	$fashion_outfit_args = array(
       'type'      => 'product',
        'taxonomy' => 'product_cat'
    );
	$fashion_outfit_categories = get_categories($fashion_outfit_args);
		$fashion_outfit_cat_posts = array();
			$fashion_outfit_i = 0;
			$fashion_outfit_cat_posts[]='Select';
		foreach($fashion_outfit_categories as $fashion_outfit_category){
			if($fashion_outfit_i==0){
			$fashion_outfit_default = $fashion_outfit_category->slug;
			$fashion_outfit_i++;
		}
		$fashion_outfit_cat_posts[$fashion_outfit_category->slug] = $fashion_outfit_category->name;
	}

	$wp_customize->add_setting('fashion_outfit_product_category',array(
		'sanitize_callback' => 'fashion_outfit_sanitize_choices',
	));
	$wp_customize->add_control('fashion_outfit_product_category',array(
		'type'    => 'select',
		'choices' => $fashion_outfit_cat_posts,
		'label' => __('Select Product Category','fashion-outfit'),
		'section' => 'fashion_outfit_product_section',
	));

	/*SOCIAL LINK*/
	$wp_customize->add_setting(
		'fashion_outfit_product_social_link1',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'https://facebook.com',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_product_social_link1',
		array(
			'label'       => __('Edit Facebook Link', 'fashion-outfit'),
			'section'     => 'fashion_outfit_product_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'fashion_outfit_product_social_link2',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'https://twitter.com',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_product_social_link2',
		array(
			'label'       => __('Edit Twitter Link', 'fashion-outfit'),
			'section'     => 'fashion_outfit_product_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'fashion_outfit_product_social_link3',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'https://instagram.com',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'fashion_outfit_product_social_link3',
		array(
			'label'       => __('Edit Instagram Link', 'fashion-outfit'),
			'section'     => 'fashion_outfit_product_section',
			'type'        => 'text',
		)
	);

	/*
	* Customizer Footer Section
	*/
	/*Footer Options*/
	$wp_customize->add_section('fashion_outfit_footer_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Footer Options', 'fashion-outfit'),
		'panel'       => 'fashion_outfit_panel',
	));

	/*Footer Enable Option*/
	$wp_customize->add_setting(
		'fashion_outfit_enable_footer',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'fashion_outfit_sanitize_checkbox',
		)
	);
	$wp_customize->add_control(
		'fashion_outfit_enable_footer',
		array(
			'label'       => __('Enable Footer', 'fashion-outfit'),
			'description' => __('Checked to show Footer', 'fashion-outfit'),
			'section'     => 'fashion_outfit_footer_section',
			'type'        => 'checkbox',
		)
	);

	/*Footer bg image Option*/
	$wp_customize->add_setting('fashion_outfit_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,'fashion_outfit_footer_bg_image',array(
        'label' => __('Footer Background Image','fashion-outfit'),
        'section' => 'fashion_outfit_footer_section',
        'priority' => 1,
    )));

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

	$wp_customize->add_control(
		'fashion_outfit_footer_social_menu',
		array(
			'label'       => __('Enable Footer Social Menu', 'fashion-outfit'),
			'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.', 'fashion-outfit'),
			'section'     => 'fashion_outfit_footer_section',
			'type'        => 'checkbox',
		)
	);	

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

	$wp_customize->add_control(
		'fashion_outfit_enable_go_to_top_option',
		array(
			'label'       => __('Enable Go To Top', 'fashion-outfit'),
			'description' => __('Checked to enable Go To Top option.', 'fashion-outfit'),
			'section'     => 'fashion_outfit_footer_section',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting('fashion_outfit_go_to_top_position',array(
        'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 'Right',
        'sanitize_callback' => 'fashion_outfit_sanitize_choices'
    ));
    $wp_customize->add_control('fashion_outfit_go_to_top_position',array(
        'type' => 'select',
        'section' => 'fashion_outfit_footer_section',
        'label' => esc_html__('Go To Top Positions','fashion-outfit'),
        'choices' => array(
            'Right' => __('Right','fashion-outfit'),
            'Left' => __('Left','fashion-outfit'),
            'Center' => __('Center','fashion-outfit')
        ),
    ) );

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

	$wp_customize->add_control(
		'fashion_outfit_copyright_option',
		array(
			'label'       => __('Edit Copyright Text', 'fashion-outfit'),
			'description' => __('Edit the Footer Copyright Section.', 'fashion-outfit'),
			'section'     => 'fashion_outfit_footer_section',
			'type'        => 'text',
		)
	);
}
add_action( 'customize_register', 'Fashion_Outfit_Customize_register' );

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

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

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

/**
 * Singleton class for handling the theme's customizer integration.
 *
 * @since  1.0.0
 * @access public
 */
final class Fashion_Outfit_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( 'fashion_outfit_Customize_Section_Pro' );

		// Register sections.
		$manager->add_section( new Fashion_Outfit_Customize_Section_Pro( $manager,'fashion_outfit_go_pro', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Fashion Outfit Pro', 'fashion-outfit' ),
			'pro_text' => esc_html__( 'Buy Pro', 'fashion-outfit' ),
			'pro_url'    => esc_url( FASHION_OUTFIT_BUY_NOW ),
		) )	);

		// Register sections.
		$manager->add_section( new Fashion_Outfit_Customize_Section_Pro( $manager,'fashion_outfit_lite_documentation', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Lite Documentation', 'fashion-outfit' ),
			'pro_text' => esc_html__( 'Instruction', 'fashion-outfit' ),
			'pro_url'    => esc_url( FASHION_OUTFIT_LITE_DOC ),
		) )	);

		$manager->add_section( new Fashion_Outfit_Customize_Section_Pro( $manager, 'fashion_outfit_live_demo', array(
		    'priority'   => 1,
		    'title'      => esc_html__( 'Pro Theme Demo', 'fashion-outfit' ),
		    'pro_text'   => esc_html__( 'Live Preview', 'fashion-outfit' ),
		    'pro_url'    => esc_url( FASHION_OUTFIT_LIVE_DEMO ),
		) ) );

		// Register sections.
		$manager->add_section( new Fashion_Outfit_Customize_Section_Pro( $manager, 'fashion_outfit_bundle', array(
			'priority'   => 1,
			'title'      => esc_html__( 'Theme Bundle', 'fashion-outfit' ),
			'pro_text'   => esc_html__( 'Get Bundle', 'fashion-outfit' ),
			'pro_url'    => esc_url( FASHION_OUTFIT_BUNDLE ),
		) ) );	
	}

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

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

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

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