<?php
/**
 * News Current Affair Theme Customizer
 *
 * @package News Current Affair
 */

function News_Current_Affair_Customize_register( $wp_customize ) {
	$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' => 'News_Current_Affair_Customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'News_Current_Affair_Customize_partial_blogdescription',
			)
		);
	}

	/*
    * Theme Options Panel
    */
	$wp_customize->add_panel('news_current_affair_panel', array(
		'priority' => 25,
		'capability' => 'edit_theme_options',
		'title' => __('News Current Affair Theme Options', 'news-current-affair'),
	));

	/*
	* Customizer main header section
	*/

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

	$wp_customize->add_control(
		'news_current_affair_site_title_text',
		array(
			'label'       => __('Enable Title', 'news-current-affair'),
			'description' => __('Enable or Disable Title from the site', 'news-current-affair'),
			'section'     => 'title_tagline',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_site_tagline_text',
		array(
			'label'       => __('Enable Tagline', 'news-current-affair'),
			'description' => __('Enable or Disable Tagline from the site', 'news-current-affair'),
			'section'     => 'title_tagline',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_logo_width',
		array(
			'label'       => __('Logo Width in PX', 'news-current-affair'),
			'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', 'news-current-affair'),
		'panel'       => 'woocommerce',
	));

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

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

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

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

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

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

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

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

	$wp_customize->add_setting('news_current_affair_woocommerce_product_sale',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
        'default'           => 'Right',
        'sanitize_callback' => 'news_current_affair_sanitize_choices'
    ));
    $wp_customize->add_control('news_current_affair_woocommerce_product_sale',array(
        'label'       => esc_html__( 'Woocommerce Product Sale Positions','news-current-affair' ),
        'type' => 'select',
        'section' => 'woocommerce_custom_settings',
        'choices' => array(
            'Right' => __('Right','news-current-affair'),
            'Left' => __('Left','news-current-affair'),
            'Center' => __('Center','news-current-affair')
        ),
    ) );

	/*Additional Options*/
	$wp_customize->add_section('news_current_affair_additional_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Additional Options', 'news-current-affair'),
		'panel'       => 'news_current_affair_panel',
	));

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

	$wp_customize->add_control(
		'news_current_affair_enable_sticky_header',
		array(
			'label'       => __('Enable Sticky Header', 'news-current-affair'),
			'description' => __('Checked to enable sticky header', 'news-current-affair'),
			'section'     => 'news_current_affair_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_enable_preloader',
		array(
			'label'       => __('Enable Preloader', 'news-current-affair'),
			'description' => __('Checked to show preloader', 'news-current-affair'),
			'section'     => 'news_current_affair_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_enable_breadcrumbs',
		array(
			'label'       => __('Enable Breadcrumbs', 'news-current-affair'),
			'description' => __('Checked to show Breadcrumbs', 'news-current-affair'),
			'section'     => 'news_current_affair_additional_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_enable_pagination',
		array(
			'label'       => __('Enable Pagination', 'news-current-affair'),
			'description' => __('Checked to show Pagination', 'news-current-affair'),
			'section'     => 'news_current_affair_additional_section',
			'type'        => 'checkbox',
		)
	);

		/*Pagination Select Type Option*/
	$wp_customize->add_setting('news_current_affair_pagination_type',array(
        'default' => 'type-1',
        'sanitize_callback' => 'news_current_affair_sanitize_choices'
	));
	$wp_customize->add_control('news_current_affair_pagination_type',array(
        'type' => 'select',
        'label' => esc_html__('Select Pagination Type','news-current-affair'),
        'section' => 'news_current_affair_additional_section',
        'choices' => array(
            'type-1' => esc_html__('Type 1','news-current-affair'),
            'type-2' => esc_html__('Type 2','news-current-affair'),
        ),
	) );

	/*Post layout*/
	$wp_customize->add_setting('news_current_affair_archive_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'news_current_affair_sanitize_choices'
	));
	$wp_customize->add_control('news_current_affair_archive_layout',array(
        'type' => 'select',
        'label' => esc_html__('Posts Layout','news-current-affair'),
        'section' => 'news_current_affair_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','news-current-affair'),
            'layout-2' => esc_html__('Sidebar On Left','news-current-affair'),
			'layout-3' => esc_html__('Full Width Layout','news-current-affair')
        ),
	) );

	/*single post layout*/
	$wp_customize->add_setting('news_current_affair_post_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'news_current_affair_sanitize_choices'
	));
	$wp_customize->add_control('news_current_affair_post_layout',array(
        'type' => 'select',
        'label' => esc_html__('Single Post Layout','news-current-affair'),
        'section' => 'news_current_affair_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','news-current-affair'),
            'layout-2' => esc_html__('Sidebar On Left','news-current-affair'),
			'layout-3' => esc_html__('Full Width Layout','news-current-affair')
        ),
	) );

	/*single page layout*/
	$wp_customize->add_setting('news_current_affair_page_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'news_current_affair_sanitize_choices'
	));
	$wp_customize->add_control('news_current_affair_page_layout',array(
        'type' => 'select',
        'label' => esc_html__('Single Page Layout','news-current-affair'),
        'section' => 'news_current_affair_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','news-current-affair'),
            'layout-2' => esc_html__('Sidebar On Left','news-current-affair'),
			'layout-3' => esc_html__('Full Width Layout','news-current-affair')
        ),
	) );

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

	$wp_customize->add_control(
		'news_current_affair_additional_settings_upgraded_features', 
		array(
			'type'=> 'hidden',
			'description' => "
				<div class='customizer-upgraded-features'>
					<span class='pro-head'>Want more additional options?</span><br/>
					<span class='pro-text'>						
						<a target='_blank' href='". esc_url(NEWS_CURRENT_AFFAIR_BUY_NOW) ." '>Check News Current Affair PRO version.</a>
					</div>
				</div>
			",
			'section' => 'news_current_affair_additional_section'
		)
	);

	/*Archive Post Options*/
	$wp_customize->add_section('news_current_affair_blog_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Blog Page Options', 'news-current-affair'),
		'panel'       => 'news_current_affair_panel',
	));

	$wp_customize->add_setting('news_current_affair_enable_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_blog_post_title',array(
		'label'       => __('Enable Blog Post Title', 'news-current-affair'),
		'description' => __('Checked To Show Blog Post Title', 'news-current-affair'),
		'section'     => 'news_current_affair_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('news_current_affair_enable_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_blog_post_meta',array(
		'label'       => __('Enable Blog Post Meta', 'news-current-affair'),
		'description' => __('Checked To Show Blog Post Meta Feilds', 'news-current-affair'),
		'section'     => 'news_current_affair_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('news_current_affair_enable_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_blog_post_tags',array(
		'label'       => __('Enable Blog Post Tags', 'news-current-affair'),
		'description' => __('Checked To Show Blog Post Tags', 'news-current-affair'),
		'section'     => 'news_current_affair_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('news_current_affair_enable_blog_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_blog_post_image',array(
		'label'       => __('Enable Blog Post Image', 'news-current-affair'),
		'description' => __('Checked To Show Blog Post Image', 'news-current-affair'),
		'section'     => 'news_current_affair_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('news_current_affair_enable_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_blog_post_content',array(
		'label'       => __('Enable Blog Post Content', 'news-current-affair'),
		'description' => __('Checked To Show Blog Post Content', 'news-current-affair'),
		'section'     => 'news_current_affair_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('news_current_affair_enable_blog_post_button',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_blog_post_button',array(
		'label'       => __('Enable Blog Post Read More Button', 'news-current-affair'),
		'description' => __('Checked To Show Blog Post Read More Button', 'news-current-affair'),
		'section'     => 'news_current_affair_blog_post_section',
		'type'        => 'checkbox',
	));

	/*Blog post Content layout*/
	$wp_customize->add_setting('news_current_affair_blog_Post_content_layout',array(
        'default' => 'Left',
        'sanitize_callback' => 'news_current_affair_sanitize_choices'
	));
	$wp_customize->add_control('news_current_affair_blog_Post_content_layout',array(
        'type' => 'select',
        'label' => esc_html__('Blog Post Content Layout','news-current-affair'),
        'section' => 'news_current_affair_blog_post_section',
        'choices' => array(
            'Left' => esc_html__('Left','news-current-affair'),
            'Center' => esc_html__('Center','news-current-affair'),
            'Right' => esc_html__('Right','news-current-affair')
        ),
	) );

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

	$wp_customize->add_control(
		'news_current_affair_excerpt_limit',
		array(
			'label'       => __('Excerpt Limit', 'news-current-affair'),
			'section'     => 'news_current_affair_blog_post_section',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 2,
	             'max' => 50,
	             'step' => 2,
	         ),
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_read_more_text',
		array(
			'label'       => __('Edit Button Text ', 'news-current-affair'),
			'section'     => 'news_current_affair_blog_post_section',
			'type'        => 'text',
		)
	);

	/*Single Post Options*/
	$wp_customize->add_section('news_current_affair_single_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Single Post Options', 'news-current-affair'),
		'panel'       => 'news_current_affair_panel',
	));

	$wp_customize->add_setting('news_current_affair_enable_single_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_single_blog_post_title',array(
		'label'       => __('Enable Single Post Title', 'news-current-affair'),
		'description' => __('Checked To Show Single Blog Post Title', 'news-current-affair'),
		'section'     => 'news_current_affair_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('news_current_affair_enable_single_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_single_blog_post_meta',array(
		'label'       => __('Enable Single Post Meta', 'news-current-affair'),
		'description' => __('Checked To Show Single Blog Post Meta Feilds', 'news-current-affair'),
		'section'     => 'news_current_affair_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('news_current_affair_enable_single_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_single_blog_post_tags',array(
		'label'       => __('Enable Single Post Tags', 'news-current-affair'),
		'description' => __('Checked To Show Single Blog Post Tags', 'news-current-affair'),
		'section'     => 'news_current_affair_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('news_current_affair_enable_single_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_single_post_image',array(
		'label'       => __('Enable Single Post Image', 'news-current-affair'),
		'description' => __('Checked To Show Single Post Image', 'news-current-affair'),
		'section'     => 'news_current_affair_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('news_current_affair_enable_single_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
	));
	$wp_customize->add_control('news_current_affair_enable_single_blog_post_content',array(
		'label'       => __('Enable Single Post Content', 'news-current-affair'),
		'description' => __('Checked To Show Single Blog Post Content', 'news-current-affair'),
		'section'     => 'news_current_affair_single_post_section',
		'type'        => 'checkbox',
	));

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

	$wp_customize->add_control(
		'news_current_affair_enable_related_post',
		array(
			'label'       => __('Enable Related Post', 'news-current-affair'),
			'description' => __('Checked to show Related Post', 'news-current-affair'),
			'section'     => 'news_current_affair_single_post_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_related_post_text',
		array(
			'label'       => __('Edit Related Post Text ', 'news-current-affair'),
			'section'     => 'news_current_affair_single_post_section',
			'type'        => 'text',
		)
	);	

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

	$wp_customize->add_control(
		'news_current_affair_related_post_count',
		array(
			'label'       => __('Related Post Count', 'news-current-affair'),
			'section'     => 'news_current_affair_single_post_section',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 9,
	             'step' => 1,
	         ),
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_enable_comment_section',
		array(
			'label'       => __('Enable Comment Section', 'news-current-affair'),
			'description' => __('Checked to show Comment Section', 'news-current-affair'),
			'section'     => 'news_current_affair_single_post_section',
			'type'        => 'checkbox',
		)
	);

	/*
	* Customizer Global COlor
	*/

	/*Global Color Options*/
	$wp_customize->add_section('news_current_affair_global_color_section', array(
		'priority'       => 1,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Global Color Options', 'news-current-affair'),
		'panel'       => 'news_current_affair_panel',
	));

	$wp_customize->add_setting( 'news_current_affair_primary_color',
		array(
		'default'           => '#684AFC',
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control( 
		new WP_Customize_Color_Control( 
		$wp_customize, 
		'news_current_affair_primary_color',
		array(
			'label'      => esc_html__( 'Primary Color', 'news-current-affair' ),
			'section'    => 'news_current_affair_global_color_section',
			'settings'   => 'news_current_affair_primary_color',
		) ) 
	);

	/*Typography Options*/
	$wp_customize->add_section( 'news_current_affair_typography_section', array(
		'panel'       => 'news_current_affair_panel',
        'title'    => __( 'Typography Options', 'news-current-affair' ),
        'priority' => 2,
    ) );

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

/*
	* Customizer main header section
	*/
	/*Main Header Options*/
	$wp_customize->add_section('news_current_affair_header_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Header Options', 'news-current-affair'),
		'panel'       => 'news_current_affair_panel',
	));

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

    // Add Control for Menu Text Transform
    $wp_customize->add_control( 'news_current_affair_menu_text_transform', array(
        'label'    => __( 'Menu Text Transform', 'news-current-affair' ),
        'section'  => 'news_current_affair_header_section',
        'type'     => 'select',
        'choices'  => array(
            'none'       => __( 'None', 'news-current-affair' ),
            'capitalize' => __( 'Capitalize', 'news-current-affair' ),
            'uppercase'  => __( 'Uppercase', 'news-current-affair' ),
            'lowercase'  => __( 'Lowercase', 'news-current-affair' ),
        ),
    ) );

	$wp_customize->add_setting(
		'news_current_affair_header_search',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
		)
	);
	$wp_customize->add_control(
		'news_current_affair_header_search',
		array(
			'label'       => __('Enable Disable Search', 'news-current-affair'),
			'description' => __('Enable or Disable header Search', 'news-current-affair'),
			'section'     => 'news_current_affair_header_section',
			'type'        => 'checkbox',
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_product_social_link1',
		array(
			'label'       => __('Edit Facebook Link', 'news-current-affair'),
			'section'     => 'news_current_affair_header_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'news_current_affair_product_social_link2',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'https://twitter.com',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'news_current_affair_product_social_link2',
		array(
			'label'       => __('Edit Twitter Link', 'news-current-affair'),
			'section'     => 'news_current_affair_header_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'news_current_affair_product_social_link3',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'https://instagram.com',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'news_current_affair_product_social_link3',
		array(
			'label'       => __('Edit Instagram Link', 'news-current-affair'),
			'section'     => 'news_current_affair_header_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'news_current_affair_product_social_link4',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'https://linkedin.com',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'news_current_affair_product_social_link4',
		array(
			'label'       => __('Edit Linkedin Link', 'news-current-affair'),
			'section'     => 'news_current_affair_header_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting(
		'news_current_affair_product_social_link5',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'https://pinterest.com',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'news_current_affair_product_social_link5',
		array(
			'label'       => __('Edit Pinterest Link', 'news-current-affair'),
			'section'     => 'news_current_affair_header_section',
			'type'        => 'text',
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_header_settings_upgraded_features', 
		array(
			'type'=> 'hidden',
			'description' => "
				<div class='customizer-upgraded-features'>
					<span class='pro-head'>Want more header options?</span><br/>
					<span class='pro-text'>						
						<a target='_blank' href='". esc_url(NEWS_CURRENT_AFFAIR_BUY_NOW) ." '>Check News Current Affair PRO version.</a>
					</div>
				</div>
			",
			'section' => 'news_current_affair_header_section'
		)
	);

	/*
	* Customizer main Banner section
	*/
	/*Main Banner Options*/
	$wp_customize->add_section('news_current_affair_slider_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Slider Options', 'news-current-affair'),
		'panel'       => 'news_current_affair_panel',
	));

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

	$wp_customize->add_control(
		'news_current_affair_enable_slider',
		array(
			'label'       => __('Enable Main Slider', 'news-current-affair'),
			'description' => __('Checked to show the main slider', 'news-current-affair'),
			'section'     => 'news_current_affair_slider_section',
			'type'        => 'checkbox',
		)
	);

	$news_current_affair_post_list = get_posts(array('numberposts' => -1));
    $news_current_affair_pst = array('' => 'Select');
    foreach($news_current_affair_post_list as $post){
        $news_current_affair_pst[$post->post_name] = $post->post_title;
    }

    $wp_customize->add_setting('news_current_affair_static_blog_1', array(
	    'default' => 'Global Leaders Unite to Address Climate Crisis at Historic Summit in Geneva',
        'sanitize_callback' => 'news_current_affair_sanitize_choices',
    ));
    $wp_customize->add_control('news_current_affair_static_blog_1', array(
        'type' => 'select',
        'choices' => $news_current_affair_pst,
        'label' => __('Select post 1', 'news-current-affair'),
        'section' => 'news_current_affair_slider_section',
    ));

    $wp_customize->add_setting('news_current_affair_play_button_url1', array(
	    'default' => '',
	    'sanitize_callback' => 'esc_url_raw',
	));
	$wp_customize->add_control('news_current_affair_play_button_url1', array(
	    'label' => __('Play Button URL', 'news-current-affair'),
	    'section' => 'news_current_affair_slider_section',
	    'type' => 'url',
	));

	$wp_customize->add_setting('news_current_affair_static_blog_2', array(
	    'default' => 'Economy Rebounds with g Strong Growth',
        'sanitize_callback' => 'news_current_affair_sanitize_choices',
    ));
    $wp_customize->add_control('news_current_affair_static_blog_2', array(
        'type' => 'select',
        'choices' => $news_current_affair_pst,
        'label' => __('Select post 2', 'news-current-affair'),
        'section' => 'news_current_affair_slider_section',
    ));

    $wp_customize->add_setting('news_current_affair_play_button_url2', array(
	    'default' => '',
	    'sanitize_callback' => 'esc_url_raw',
	));
	$wp_customize->add_control('news_current_affair_play_button_url2', array(
	    'label' => __('Play Button URL', 'news-current-affair'),
	    'section' => 'news_current_affair_slider_section',
	    'type' => 'url',
	));

	$wp_customize->add_setting('news_current_affair_static_blog_3', array(
	    'default' => 'Global Warming Threatens Ecosystem Stabilit',
        'sanitize_callback' => 'news_current_affair_sanitize_choices',
    ));
    $wp_customize->add_control('news_current_affair_static_blog_3', array(
        'type' => 'select',
        'choices' => $news_current_affair_pst,
        'label' => __('Select post 2', 'news-current-affair'),
        'section' => 'news_current_affair_slider_section',
    ));

    $wp_customize->add_setting('news_current_affair_play_button_url3', array(
	    'default' => '',
	    'sanitize_callback' => 'esc_url_raw',
	));
	$wp_customize->add_control('news_current_affair_play_button_url3', array(
	    'label' => __('Play Button URL', 'news-current-affair'),
	    'section' => 'news_current_affair_slider_section',
	    'type' => 'url',
	));

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

	$wp_customize->add_control(
		'news_current_affair_slider_settings_upgraded_features', 
		array(
			'type'=> 'hidden',
			'description' => "
				<div class='customizer-upgraded-features'>
					<span class='pro-head'>Want more slider options?</span><br/>
					<span class='pro-text'>						
						<a target='_blank' href='". esc_url(NEWS_CURRENT_AFFAIR_BUY_NOW) ." '>Check News Current Affair PRO version.</a>
					</div>
				</div>
			",
			'section' => 'news_current_affair_slider_section'
		)
	);

	/*
	* Customizer project section
	*/
	/*=========================================
	service Section
	=========================================*/

	$wp_customize->add_section(
		'news_current_affair_service_section', array(
			'title' => esc_html__( 'Latest News Section', 'news-current-affair' ),
			'priority' => 6,
			'panel' => 'news_current_affair_panel',
		)
	);

	// Hide/ Show Setting // 
	$wp_customize->add_setting( 
		'news_current_affair_service_show_hide' , 
			array(
			'default' => false,
			'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
			'capability' => 'edit_theme_options',
			'priority' => 2,
		) 
	);
	$wp_customize->add_control(
	'news_current_affair_service_show_hide', 
		array(
			'label'	      => esc_html__( 'Hide / Show Section', 'news-current-affair' ),
			'section'     => 'news_current_affair_service_section',
			'settings'    => 'news_current_affair_service_show_hide',
			'type'        => 'checkbox'
		) 
	);

	// Section heading
	$wp_customize->add_setting('news_current_affair_projetcs_main_heading', array(
	    'default'           => 'LATEST NEWS',
	    'sanitize_callback' => 'sanitize_text_field',
	));

	$wp_customize->add_control('news_current_affair_projetcs_main_heading', array(
	    'label'   => esc_html__('Add Section Heading', 'news-current-affair'),
	    'section' => 'news_current_affair_service_section',
	    'type'    => 'text',
	));

	// Number of tabs
	$wp_customize->add_setting('news_current_affair_projetcs_number', array(
	    'default'           => 4,
	    'sanitize_callback' => 'absint',
	));

	$wp_customize->add_control('news_current_affair_projetcs_number', array(
	    'label'       => esc_html__('No of Tabs to show', 'news-current-affair'),
	    'section'     => 'news_current_affair_service_section',
	    'type'        => 'number',
	    'input_attrs' => array(
	        'step' => 1,
	        'min'  => 0,
	        'max'  => 6,
	    ),
	));

    $news_current_affair_featured_post = absint(get_theme_mod('news_current_affair_projetcs_number', 4));
    for ( $news_current_affair_j = 1; $news_current_affair_j <= $news_current_affair_featured_post; $news_current_affair_j++ ) {
        $wp_customize->add_setting('news_current_affair_projetcs_text'.$news_current_affair_j, array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        ));
        $wp_customize->add_control('news_current_affair_projetcs_text'.$news_current_affair_j, array(
            'label'   => esc_html__('Edit Tab Text ', 'news-current-affair').$news_current_affair_j, 
            'section' => 'news_current_affair_service_section',
            'type'    => 'text',
        ));

        $categories = get_categories();
        $cat_posts = array('select' => 'Select');
        foreach ($categories as $category) {
            $cat_posts[$category->slug] = $category->name;
        }

        $wp_customize->add_setting('news_current_affair_projetcs_category'.$news_current_affair_j, array(
            'default'           => 'uncategorized',
            'sanitize_callback' => 'news_current_affair_sanitize_choices',
        ));

        $wp_customize->add_control('news_current_affair_projetcs_category'.$news_current_affair_j, array(
            'type'    => 'select',
            'choices' => $cat_posts,
            'label'   => __('Select Category to display projects', 'news-current-affair'),
            'section' => 'news_current_affair_service_section',
        ));
    }

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

	$wp_customize->add_control(
		'news_current_affair_service_settings_upgraded_features', 
		array(
			'type'=> 'hidden',
			'description' => "
				<div class='customizer-upgraded-features'>
					<span class='pro-head'>Want more News options?</span><br/>
					<span class='pro-text'>						
						<a target='_blank' href='". esc_url(NEWS_CURRENT_AFFAIR_BUY_NOW) ." '>Check News Current Affair PRO version.</a>
					</div>
				</div>
			",
			'section' => 'news_current_affair_service_section'
		)
	);

	/*
	* Customizer Footer Section
	*/
	/*Footer Options*/
	$wp_customize->add_section('news_current_affair_footer_section', array(
		'priority'       => 8,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Footer Options', 'news-current-affair'),
		'panel'       => 'news_current_affair_panel',
	));
	
	/*Footer Enable Option*/
	$wp_customize->add_setting(
		'news_current_affair_enable_footer',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'news_current_affair_sanitize_checkbox',
		)
	);
	$wp_customize->add_control(
		'news_current_affair_enable_footer',
		array(
			'label'       => __('Enable Footer', 'news-current-affair'),
			'description' => __('Checked to show Footer', 'news-current-affair'),
			'section'     => 'news_current_affair_footer_section',
			'type'        => 'checkbox',
		)
	);

	/*Footer bg image Option*/
	$wp_customize->add_setting('news_current_affair_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,'news_current_affair_footer_bg_image',array(
        'label' => __('Footer Background Image','news-current-affair'),
        'section' => 'news_current_affair_footer_section',
    )));

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

    $wp_customize->add_control('news_current_affair_background_attachment', array(
        'label'    => __('Footer Background Attachment', 'news-current-affair'),
        'section'  => 'news_current_affair_footer_section',
        'settings' => 'news_current_affair_background_attachment',
        'type'     => 'select',
        'choices'  => array(
            'fixed' => __('fixed','news-current-affair'),
            'scroll' => __('scroll','news-current-affair'),
        ),
    ));

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

	$wp_customize->add_control(
		'news_current_affair_footer_social_menu',
		array(
			'label'       => __('Enable Footer Social Menu', 'news-current-affair'),
			'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.', 'news-current-affair'),
			'section'     => 'news_current_affair_footer_section',
			'type'        => 'checkbox',
		)
	);	

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

	$wp_customize->add_control(
		'news_current_affair_enable_go_to_top_option',
		array(
			'label'       => __('Enable Go To Top', 'news-current-affair'),
			'description' => __('Checked to enable Go To Top option.', 'news-current-affair'),
			'section'     => 'news_current_affair_footer_section',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting('news_current_affair_go_to_top_position',array(
        'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 'Right',
        'sanitize_callback' => 'news_current_affair_sanitize_choices'
    ));
    $wp_customize->add_control('news_current_affair_go_to_top_position',array(
        'type' => 'select',
        'section' => 'news_current_affair_footer_section',
        'label' => esc_html__('Go To Top Positions','news-current-affair'),
        'choices' => array(
            'Right' => __('Right','news-current-affair'),
            'Left' => __('Left','news-current-affair'),
            'Center' => __('Center','news-current-affair')
        ),
    ) );

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

	$wp_customize->add_control(
		'news_current_affair_copyright_option',
		array(
			'label'       => __('Edit Copyright Text', 'news-current-affair'),
			'description' => __('Edit the Footer Copyright Section.', 'news-current-affair'),
			'section'     => 'news_current_affair_footer_section',
			'type'        => 'text',
		)
	);

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

	$wp_customize->add_control(
		'news_current_affair_footer_settings_upgraded_features', 
		array(
			'type'=> 'hidden',
			'description' => "
				<div class='customizer-upgraded-features'>
					<span class='pro-head'>Want more News options?</span><br/>
					<span class='pro-text'>						
						<a target='_blank' href='". esc_url(NEWS_CURRENT_AFFAIR_BUY_NOW) ." '>Check News Current Affair PRO version.</a>
					</div>
				</div>
			",
			'section' => 'news_current_affair_footer_section'
		)
	);

}
add_action( 'customize_register', 'News_Current_Affair_Customize_register' );

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

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

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function News_Current_Affair_Customize_preview_js() {
	wp_enqueue_script( 'news-current-affair-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), NEWS_CURRENT_AFFAIR_VERSION, true );
}
add_action( 'customize_preview_init', 'News_Current_Affair_Customize_preview_js' );

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

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

		static $news_current_affair_instance = null;

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

		return $news_current_affair_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  $news_current_affair_manager
	 * @return void
	*/
	public function sections( $news_current_affair_manager ) {
		// Load custom sections.
		load_template( trailingslashit( get_template_directory() ) . '/revolution/inc/section-pro.php' );

		// Register custom section types.
		$news_current_affair_manager->register_section_type( 'News_Current_Affair_Customize_Section_Pro' );

		// Register sections.
		$news_current_affair_manager->add_section( new News_Current_Affair_Customize_Section_Pro( $news_current_affair_manager,'news_current_affair_go_pro', array(
			'priority'   => 1,
			'title'    => esc_html__( 'News Current Affair Pro', 'news-current-affair' ),
			'pro_text' => esc_html__( 'Buy Pro', 'news-current-affair' ),
			'pro_url'    => esc_url( NEWS_CURRENT_AFFAIR_BUY_NOW ),
		) )	);

		// Register sections.
		$news_current_affair_manager->add_section( new News_Current_Affair_Customize_Section_Pro( $news_current_affair_manager,'news_current_affair_lite_documentation', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Lite Documentation', 'news-current-affair' ),
			'pro_text' => esc_html__( 'Instruction', 'news-current-affair' ),
			'pro_url'    => esc_url( NEWS_CURRENT_AFFAIR_LITE_DOC ),
		) )	);

		$news_current_affair_manager->add_section( new News_Current_Affair_Customize_Section_Pro( $news_current_affair_manager, 'news_current_affair_live_demo', array(
		    'priority'   => 1,
		    'title'      => esc_html__( 'Pro Theme Demo', 'news-current-affair' ),
		    'pro_text'   => esc_html__( 'Live Preview', 'news-current-affair' ),
		    'pro_url'    => esc_url( NEWS_CURRENT_AFFAIR_LIVE_DEMO ),
		) ) );	
	}

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

		wp_enqueue_script( 'news-current-affair-customize-controls', trailingslashit( get_template_directory_uri() ) . '/revolution/assets/js/customize-controls.js', array( 'customize-controls' ) );

		wp_enqueue_style( 'news-current-affair-customize-controls', trailingslashit( get_template_directory_uri() ) . '/revolution/assets/css/customize-controls.css' );
	}
}

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