<?php
/**
 * Disco Night Club: Customizer
 *
 * @subpackage Disco Night Club
 * @since 1.0
 */

use WPTRT\Customize\Section\Disco_Night_Club_Button;

add_action( 'customize_register', function( $manager ) {

	$manager->register_section_type( Disco_Night_Club_Button::class );

	$manager->add_section(
		new Disco_Night_Club_Button( $manager, 'disco_night_club_pro', [
			'title' => __( 'Disco Night Club Pro', 'disco-night-club' ),
			'priority' => 0,
			'button_text' => __( 'Go Pro', 'disco-night-club' ),
			'button_url'  => esc_url( 'https://www.luzuk.com/products/nightclub-wordpress-theme', 'disco-night-club')
		] )
	);

} );

// Load the JS and CSS.
add_action( 'customize_controls_enqueue_scripts', function() {

	$version = wp_get_theme()->get( 'Version' );

	wp_enqueue_script(
		'disco-night-club-customize-section-button',
		get_theme_file_uri( 'vendor/wptrt/customize-section-button/public/js/customize-controls.js' ),
		[ 'customize-controls' ],
		$version,
		true
	);

	wp_enqueue_style(
		'disco-night-club-customize-section-button',
		get_theme_file_uri( 'vendor/wptrt/customize-section-button/public/css/customize-controls.css' ),
		[ 'customize-controls' ],
 		$version
	);

} );

function disco_night_club_customize_register( $wp_customize ) {

	$wp_customize->add_setting('disco_night_club_logo_size',array(
		'default' => '',
		'sanitize_callback'	=> 'disco_night_club_sanitize_float'
	));
	$wp_customize->add_control('disco_night_club_logo_size',array(
		'type' => 'range',
		'description' => __('Logo Size (0-100%)','disco-night-club'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('disco_night_club_logo_padding',array(
		'sanitize_callback'	=> 'esc_html'
	));
	$wp_customize->add_control('disco_night_club_logo_padding',array(
		'label' => __('Logo Margin','disco-night-club'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('disco_night_club_logo_top_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'disco_night_club_sanitize_float'
	));
	$wp_customize->add_control('disco_night_club_logo_top_padding',array(
		'type' => 'number',
		'description' => __('Top','disco-night-club'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('disco_night_club_logo_bottom_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'disco_night_club_sanitize_float'
	));
	$wp_customize->add_control('disco_night_club_logo_bottom_padding',array(
		'type' => 'number',
		'description' => __('Bottom','disco-night-club'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('disco_night_club_logo_left_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'disco_night_club_sanitize_float'
	));
	$wp_customize->add_control('disco_night_club_logo_left_padding',array(
		'type' => 'number',
		'description' => __('Left','disco-night-club'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('disco_night_club_logo_right_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'disco_night_club_sanitize_float'
 	));
 	$wp_customize->add_control('disco_night_club_logo_right_padding',array(
		'type' => 'number',
		'description' => __('Right','disco-night-club'),
		'section' => 'title_tagline',
    ));

	$wp_customize->add_setting('disco_night_club_show_site_title',array(
		'default' => true,
		'sanitize_callback'	=> 'disco_night_club_sanitize_checkbox'
	));
	$wp_customize->add_control('disco_night_club_show_site_title',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Title','disco-night-club'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting( 'disco_night_club_site_title_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_site_title_color', array(
		'label' => 'Title Color',
		'section' => 'title_tagline',
	)));

	$wp_customize->add_setting('disco_night_club_show_tagline',array(
		'default' => true,
		'sanitize_callback'	=> 'disco_night_club_sanitize_checkbox'
	));
	$wp_customize->add_control('disco_night_club_show_tagline',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Tagline','disco-night-club'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting( 'disco_night_club_site_tagline_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_site_tagline_color', array(
		'label' => 'Tagline Color',
		'section' => 'title_tagline',
	)));

	$wp_customize->add_panel( 'disco_night_club_panel_id', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'theme_supports' => '',
		'title' => __( 'Theme Settings', 'disco-night-club' ),
		'description' => __( 'Description of what this panel does.', 'disco-night-club' ),
	) );

	$wp_customize->add_section( 'disco_night_club_theme_options_section', array(
    	'title'      => __( 'General Settings', 'disco-night-club' ),
		'priority'   => 30,
		'panel' => 'disco_night_club_panel_id'
	) );

	$wp_customize->add_setting('disco_night_club_theme_options',array(
		'default' => 'One Column',
		'sanitize_callback' => 'disco_night_club_sanitize_choices'
	));
	$wp_customize->add_control('disco_night_club_theme_options',array(
		'type' => 'select',
		'label' => __('Blog Page Sidebar Layout','disco-night-club'),
		'section' => 'disco_night_club_theme_options_section',
		'choices' => array(
		   'Left Sidebar' => __('Left Sidebar','disco-night-club'),
		   'Right Sidebar' => __('Right Sidebar','disco-night-club'),
		   'One Column' => __('One Column','disco-night-club'),
		   'Grid Layout' => __('Grid Layout','disco-night-club')
		),
	));

	$wp_customize->add_setting('disco_night_club_single_post_sidebar',array(
		'default' => 'Right Sidebar',
		'sanitize_callback' => 'disco_night_club_sanitize_choices'
	));
	$wp_customize->add_control('disco_night_club_single_post_sidebar',array(
        'type' => 'select',
        'label' => __('Single Post Sidebar Layout','disco-night-club'),
        'section' => 'disco_night_club_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','disco-night-club'),
            'Right Sidebar' => __('Right Sidebar','disco-night-club'),
            'One Column' => __('One Column','disco-night-club')
        ),
	));

	$wp_customize->add_setting('disco_night_club_page_sidebar',array(
		'default' => 'One Column',
		'sanitize_callback' => 'disco_night_club_sanitize_choices'
	));
	$wp_customize->add_control('disco_night_club_page_sidebar',array(
        'type' => 'select',
        'label' => __('Page Sidebar Layout','disco-night-club'),
        'section' => 'disco_night_club_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','disco-night-club'),
            'Right Sidebar' => __('Right Sidebar','disco-night-club'),
            'One Column' => __('One Column','disco-night-club')
        ),
	));

	$wp_customize->add_setting('disco_night_club_archive_page_sidebar',array(
		'default' => 'One Column',
		'sanitize_callback' => 'disco_night_club_sanitize_choices'
	));
	$wp_customize->add_control('disco_night_club_archive_page_sidebar',array(
        'type' => 'select',
        'label' => __('Archive & Search Page Sidebar Layout','disco-night-club'),
        'section' => 'disco_night_club_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','disco-night-club'),
            'Right Sidebar' => __('Right Sidebar','disco-night-club'),
            'One Column' => __('One Column','disco-night-club'),
            'Grid Layout' => __('Grid Layout','disco-night-club')
        ),
	));

	$wp_customize->add_setting( 'disco_night_club_boxfull_width', array(
		'default'           => '',
		'sanitize_callback' => 'disco_night_club_sanitize_choices'
	));
	
	$wp_customize->add_control( 'disco_night_club_boxfull_width', array(
		'label'    => __( 'Section Width', 'disco-night-club' ),
		'section'  => 'disco_night_club_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'container'  => __('Box Width', 'disco-night-club'),
			'container-fluid' => __('Full Width', 'disco-night-club'),
			'none' => __('None', 'disco-night-club')
		),
	));

	$wp_customize->add_setting( 'disco_night_club_dropdown_anim', array(
		'default'           => 'None',
		'sanitize_callback' => 'disco_night_club_sanitize_choices'
	));
	$wp_customize->add_control( 'disco_night_club_dropdown_anim', array(
		'label'    => __( 'Menu Dropdown Animations', 'disco-night-club' ),
		'section'  => 'disco_night_club_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInUp'  => __('bounceInUp', 'disco-night-club'),
			'fadeInUp' => __('fadeInUp', 'disco-night-club'),
			'zoomIn'    => __('zoomIn', 'disco-night-club'),
			'None'    => __('None', 'disco-night-club')
		),
	));

	//home page header
	$wp_customize->add_section( 'disco_night_club_header_section' , array(
    	'title'    => __( 'Header Settings', 'disco-night-club' ),
		'priority' => null,
		'panel' => 'disco_night_club_panel_id'
	) );

	$wp_customize->add_setting( 'disco_night_club_menu_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_menu_color', array(
		'label' => 'Menus Color',
		'section' => 'disco_night_club_header_section',
	)));

	$wp_customize->add_setting( 'disco_night_club_submenu_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_submenu_color', array(
		'label' => 'Submenus Color',
		'section' => 'disco_night_club_header_section',
	)));

	$wp_customize->add_setting( 'disco_night_club_submenubg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_submenubg_color', array(
		'label' => 'Submenus Bg Color',
		'section' => 'disco_night_club_header_section',
	)));

	//home page banner
	$wp_customize->add_section( 'disco_night_club_banner_section' , array(
    	'title'    => __( 'Banner Settings', 'disco-night-club' ),
		'priority' => null,
		'panel' => 'disco_night_club_panel_id'
	) );

	$wp_customize->add_setting('disco_night_club_banner_hide_show',array(
    	'default' => true,
    	'sanitize_callback'	=> 'disco_night_club_sanitize_checkbox'
	));
	$wp_customize->add_control('disco_night_club_banner_hide_show',array(
	   	'type' => 'checkbox',
	   	'label' => __('Show / Hide Banner','disco-night-club'),
	   	'section' => 'disco_night_club_banner_section',
	));

	$wp_customize->add_setting( 'disco_night_club_banner_effect', array(
		'default'           => '',
		'sanitize_callback' => 'disco_night_club_sanitize_choices'
	));
	$wp_customize->add_control( 'disco_night_club_banner_effect', array(
		'label'    => __( 'Onload Transactions Effects', 'disco-night-club' ),
		'section'  => 'disco_night_club_banner_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInLeft'  => __('bounceInLeft', 'disco-night-club'),
			'bounceInRight' => __('bounceInRight', 'disco-night-club'),
			'bounceInUp'    => __('bounceInUp', 'disco-night-club'),
			'bounceInDown'    => __('bounceInDown', 'disco-night-club'),
			'zoomIn'  => __('zoomIn', 'disco-night-club'),
			'zoomOut' => __('zoomOut', 'disco-night-club'),
			'fadeInDown'    => __('fadeInDown', 'disco-night-club'),
			'fadeInUp'    => __('fadeInUp', 'disco-night-club'),
			'fadeInLeft'  => __('fadeInLeft', 'disco-night-club'),
			'fadeInRight' => __('fadeInRight', 'disco-night-club'),
			'flip-up'    => __('flip-up', 'disco-night-club'),
			'none'    => __('none', 'disco-night-club')
		),
	));

	$wp_customize->add_setting('disco_night_club_banneryoutubevideourl',array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_banneryoutubevideourl',array(
		'label'	=> __('Youtube Video URL','disco-night-club'),
		'section' => 'disco_night_club_banner_section',
		'type' => 'text'
	));

	$wp_customize->add_setting('disco_night_club_bannertitle',array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_bannertitle',array(
		'label'	=> __('Title','disco-night-club'),
		'section' => 'disco_night_club_banner_section',
		'type' => 'text'
	));

	$wp_customize->add_setting('disco_night_club_bannertitle_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'disco_night_club_sanitize_float'
	));
	$wp_customize->add_control('disco_night_club_bannertitle_font_size',array(
		'type' => 'number',
		'label' => __('Title Font Size','disco-night-club'),
		'section' => 'disco_night_club_banner_section',
	));

	$wp_customize->add_setting('disco_night_club_bannerdescription',array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_bannerdescription',array(
		'label'	=> __('Description','disco-night-club'),
		'section' => 'disco_night_club_banner_section',
		'type' => 'text'
	));

	$wp_customize->add_setting('disco_night_club_bannerdescription_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'disco_night_club_sanitize_float'
	));
	$wp_customize->add_control('disco_night_club_bannerdescription_font_size',array(
		'type' => 'number',
		'label' => __('Description Font Size','disco-night-club'),
		'section' => 'disco_night_club_banner_section',
	));

	$wp_customize->add_setting('disco_night_club_bannerbuttontext',array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_bannerbuttontext',array(
		'label'	=> __('Button Text','disco-night-club'),
		'section' => 'disco_night_club_banner_section',
		'type' => 'text'
	));

	$wp_customize->add_setting('disco_night_club_bannerbuttonlink',array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_bannerbuttonlink',array(
		'label'	=> __('Button Link','disco-night-club'),
		'section' => 'disco_night_club_banner_section',
		'type' => 'text'
	));

	$wp_customize->add_setting( 'disco_night_club_banner_title_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_banner_title_color', array(
		'label' => 'Title Color',
		'section' => 'disco_night_club_banner_section',
	)));

	$wp_customize->add_setting( 'disco_night_club_banner_text_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_banner_text_color', array(
		'label' => 'Description Color',
		'section' => 'disco_night_club_banner_section',
	)));

	$wp_customize->add_setting( 'disco_night_club_banner_btn_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_banner_btn_color', array(
		'label' => 'Button Text Color',
		'section' => 'disco_night_club_banner_section',
	)));

	$wp_customize->add_setting( 'disco_night_club_banner_btnbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_banner_btnbg_color', array(
		'label' => 'Button Bg Color',
		'section' => 'disco_night_club_banner_section',
	)));

	//Feature Section
	$wp_customize->add_section('disco_night_club_feature_section',array(
		'title'	=> __('Feature Section','disco-night-club'),
		'description'=> __('<b>Note :</b> This section will appear below the Banner.','disco-night-club'),
		'panel' => 'disco_night_club_panel_id',
	));

 
    $wp_customize->add_setting('disco_night_club_section_titleservice',array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_section_titleservice',array(
		'label'	=> __('Section Title','disco-night-club'),
		'section' => 'disco_night_club_feature_section',
		'type' => 'text'
	));

	$wp_customize->add_setting('disco_night_club_section_titleservice_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'disco_night_club_sanitize_float'
	));
	$wp_customize->add_control('disco_night_club_section_titleservice_font_size',array(
		'type' => 'number',
		'label' => __('Font Size','disco-night-club'),
		'section' => 'disco_night_club_banner_section',
	));

	$wp_customize->add_setting('disco_night_club_section_subtitleservice',array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_section_subtitleservice',array(
		'label'	=> __('Section SubTitle','disco-night-club'),
		'section' => 'disco_night_club_feature_section',
		'type' => 'text'
	));

	$wp_customize->add_setting('disco_night_club_section_subtitleservice_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'disco_night_club_sanitize_float'
	));
	$wp_customize->add_control('disco_night_club_section_subtitleservice_font_size',array(
		'type' => 'number',
		'label' => __('Font Size','disco-night-club'),
		'section' => 'disco_night_club_banner_section',
	));

	$categories = get_categories();
	$cats = array();
	$i = 0;
	$cat_pst[]= 'select';
	foreach($categories as $category){
		if($i==0){
			$default = $category->slug;
			$i++;
		}
		$cat_pst[$category->slug] = $category->name;
	}

	$wp_customize->add_setting('disco_night_club_category_settingfeature',array(
		'default' => 'select',
		'sanitize_callback' => 'disco_night_club_sanitize_choices',
	));
	$wp_customize->add_control('disco_night_club_category_settingfeature',array(
		'type' => 'select',
		'choices' => $cat_pst,
		'label' => __('Select Category To Display Post','disco-night-club'),
		'section' => 'disco_night_club_feature_section',
	));


	$wp_customize->add_setting('disco_night_club_features_number',array(
		'default'	=> '4',
		'sanitize_callback'	=> 'sanitize_text_field',
	));
	$wp_customize->add_control('disco_night_club_features_number',array(
		'label'	=> __('Number Of Icons To Show In A Category','disco-night-club'),
		'section' => 'disco_night_club_feature_section',
		'type'	  => 'number'
	));

	$disco_night_club_features_number = get_theme_mod('disco_night_club_features_number', 4);
	for ($i=1; $i <= $disco_night_club_features_number; $i++) { 
	   	$wp_customize->add_setting('disco_night_club_feature_icon' . $i, array(
	      	'default' => 'fas fa-utensils',
	      	'sanitize_callback' => 'sanitize_text_field'
	   	));
	   	$wp_customize->add_control(new disco_night_club_Fontawesome_Icon_Chooser($wp_customize, 'disco_night_club_feature_icon' . $i, array(
	      	'section' => 'disco_night_club_feature_section',
	      	'type' => 'icon',
	      	'label' => esc_html__('Feature Icon ', 'disco-night-club') . $i
	  	)));
	}

	$wp_customize->add_setting( 'disco_night_club_features_title_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_features_title_color', array(
		'label' => 'Title Color',
		'section' => 'disco_night_club_feature_section',
	)));

	$wp_customize->add_setting( 'disco_night_club_features_subtitle_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_features_subtitle_color', array(
		'label' => 'Sub Title Color',
		'section' => 'disco_night_club_feature_section',
	)));

	//Service Section
	$wp_customize->add_section('disco_night_club_service_section',array(
		'title'	=> __('Service Section','disco-night-club'),
		'description'=> __('<b>Note :</b> This section will appear below the Feature.','disco-night-club'),
		'panel' => 'disco_night_club_panel_id',
	));

 
    $wp_customize->add_setting('disco_night_club_section_title',array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_section_title',array(
		'label'	=> __('Section Title','disco-night-club'),
		'section' => 'disco_night_club_service_section',
		'type' => 'text'
	));

	$wp_customize->add_setting('disco_night_club_section_subtitle',array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_section_subtitle',array(
		'label'	=> __('Section SubTitle','disco-night-club'),
		'section' => 'disco_night_club_service_section',
		'type' => 'text'
	));

	$categories = get_categories();
	$cats = array();
	$i = 0;
	$cat_pst[]= 'select';
	foreach($categories as $category){
		if($i==0){
			$default = $category->slug;
			$i++;
		}
		$cat_pst[$category->slug] = $category->name;
	}

	$wp_customize->add_setting('disco_night_club_category_setting',array(
		'default' => 'select',
		'sanitize_callback' => 'disco_night_club_sanitize_choices',
	));
	$wp_customize->add_control('disco_night_club_category_setting',array(
		'type' => 'select',
		'choices' => $cat_pst,
		'label' => __('Select Category To Display Post','disco-night-club'),
		'section' => 'disco_night_club_service_section',
	));

	$wp_customize->add_setting( 'disco_night_club_service_title_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_service_title_color', array(
		'label' => 'Title Color',
		'section' => 'disco_night_club_service_section',
	)));

	$wp_customize->add_setting( 'disco_night_club_service_subtitle_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_service_subtitle_color', array(
		'label' => 'Sub Title Color',
		'section' => 'disco_night_club_service_section',
	)));

	//Footer
    $wp_customize->add_section( 'disco_night_club_footer', array(
    	'title'  => __( 'Footer Settings', 'disco-night-club' ),
		'priority' => null,
		'panel' => 'disco_night_club_panel_id'
	) );

	$wp_customize->add_setting('disco_night_club_show_back_totop',array(
       'default' => true,
       'sanitize_callback'	=> 'disco_night_club_sanitize_checkbox'
    ));
    $wp_customize->add_control('disco_night_club_show_back_totop',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Back to Top','disco-night-club'),
       'section' => 'disco_night_club_footer'
    ));

    $wp_customize->add_setting('disco_night_club_footer_copy',array(
		'default' => 'Disco Night Club WordPress Theme By Luzuk',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_footer_copy',array(
		'label'	=> __('Footer Text','disco-night-club'),
		'section' => 'disco_night_club_footer',
		'setting' => 'disco_night_club_footer_copy',
		'type' => 'text'
	));

	$wp_customize->add_setting('disco_night_club_footer_copylink',array(
		'default' => 'https://www.luzuk.com/products/disco-night-club-wordpress-theme',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('disco_night_club_footer_copylink',array(
		'label'	=> __('Footer Link','disco-night-club'),
		'section' => 'disco_night_club_footer',
		'setting' => 'disco_night_club_footer_copylink',
		'type' => 'text'
	));

	$wp_customize->add_setting( 'disco_night_club_footer_copy_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_footer_copy_color', array(
		'label' => 'Copyright Text Color',
		'section' => 'disco_night_club_footer',
	)));

	$wp_customize->add_setting( 'disco_night_club_footer_copybg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'disco_night_club_footer_copybg_color', array(
		'label' => 'Copyright Background Color',
		'section' => 'disco_night_club_footer',
	)));

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

	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.site-title a',
		'render_callback' => 'disco_night_club_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'disco_night_club_customize_partial_blogdescription',
	) );
}
add_action( 'customize_register', 'disco_night_club_customize_register' );

function disco_night_club_customize_partial_blogname() {
	bloginfo( 'name' );
}

function disco_night_club_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

if (class_exists('WP_Customize_Control')) {

   	class disco_night_club_Fontawesome_Icon_Chooser extends WP_Customize_Control {

      	public $type = 'icon';

      	public function render_content() { ?>
	     	<label>
	            <span class="customize-control-title">
	               <?php echo esc_html($this->label); ?>
	            </span>

	            <?php if ($this->description) { ?>
	                <span class="description customize-control-description">
	                   <?php echo wp_kses_post($this->description); ?>
	                </span>
	            <?php } ?>

	            <div class="disco-night-club-selected-icon">
	                <i class="fa <?php echo esc_attr($this->value()); ?>"></i>
	                <span><i class="fa fa-angle-down"></i></span>
	            </div>

	            <ul class="disco-night-club-icon-list clearfix">
	                <?php
	                $disco_night_club_font_awesome_icon_array = disco_night_club_font_awesome_icon_array();
	                foreach ($disco_night_club_font_awesome_icon_array as $disco_night_club_font_awesome_icon) {
	                   $icon_class = $this->value() == $disco_night_club_font_awesome_icon ? 'icon-active' : '';
	                   echo '<li class=' . esc_attr($icon_class) . '><i class="' . esc_attr($disco_night_club_font_awesome_icon) . '"></i></li>';
	                }
	                ?>
	            </ul>
	            <input type="hidden" value="<?php $this->value(); ?>" <?php $this->link(); ?> />
	        </label>
	        <?php
      	}
  	}
}
function disco_night_club_customizer_script() {
   wp_enqueue_style( 'font-awesome-1', get_template_directory_uri().'/assets/css/fontawesome-all.css');
}
add_action( 'customize_controls_enqueue_scripts', 'disco_night_club_customizer_script' );