<?php
/**
 * Dry Cleaning Services Theme Customizer
 *
 * @package Dry Cleaning Services
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function dry_cleaning_services_customize_register( $wp_customize ) {

	function dry_cleaning_services_sanitize_dropdown_pages( $page_id, $setting ) {
  		$page_id = absint( $page_id );
  		return ( 'publish' == get_post_status( $page_id ) ? $page_id : $setting->default );
	}

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

	wp_enqueue_style('dry-cleaning-services-customize-controls', trailingslashit(esc_url(get_template_directory_uri())).'/css/customize-controls.css');

	if ( class_exists( 'WP_Customize_Control' ) ) {
		require_once get_template_directory() . '/inc/customizer-custom-controls.php';
	}

	// Enable / Disable Logo
	$wp_customize->add_setting('dry_cleaning_services_logo_enable',array(
		'default' => true,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	));
	$wp_customize->add_control( 'dry_cleaning_services_logo_enable', array(
		'settings' => 'dry_cleaning_services_logo_enable',
		'section'   => 'title_tagline',
		'label'     => __('Enable Logo','dry-cleaning-services'),
		'type'      => 'checkbox'
	));

	//Logo
    $wp_customize->add_setting('dry_cleaning_services_logo_width', array(
        'default' => '',
        'transport' => 'refresh',
        'sanitize_callback' => 'dry_cleaning_services_sanitize_integer'
    ));
    $wp_customize->add_control(new Dry_Cleaning_Services_Slider_Custom_Control($wp_customize, 'dry_cleaning_services_logo_width', array(
    	'label'          => __( 'Logo Width', 'dry-cleaning-services'),
        'section' => 'title_tagline',
        'settings' => 'dry_cleaning_services_logo_width',
        'input_attrs' => array(
            'step' => 1,
            'min' => 0,
            'max' => 300,
        ),
    )));

	// color site title
	$wp_customize->add_setting('dry_cleaning_services_sitetitle_color',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_sitetitle_color', array(
	   'settings' => 'dry_cleaning_services_sitetitle_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Title Color', 'dry-cleaning-services'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('dry_cleaning_services_title_enable',array(
		'default' => false,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	));
	$wp_customize->add_control( 'dry_cleaning_services_title_enable', array(
	   'settings' => 'dry_cleaning_services_title_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Title','dry-cleaning-services'),
	   'type'      => 'checkbox'
	));

	// color site tagline
	$wp_customize->add_setting('dry_cleaning_services_sitetagline_color',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_sitetagline_color', array(
	   'settings' => 'dry_cleaning_services_sitetagline_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Tagline Color', 'dry-cleaning-services'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('dry_cleaning_services_tagline_enable',array(
		'default' => false,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	));
	$wp_customize->add_control( 'dry_cleaning_services_tagline_enable', array(
	   'settings' => 'dry_cleaning_services_tagline_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Tagline','dry-cleaning-services'),
	   'type'      => 'checkbox'
	));

	// woocommerce section
	$wp_customize->add_section('dry_cleaning_services_woocommerce_page_settings', array(
		'title'    => __('WooCommerce Page Settings', 'dry-cleaning-services'),
		'priority' => null,
		'panel'    => 'woocommerce',
	));

	$wp_customize->add_setting('dry_cleaning_services_shop_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'dry_cleaning_services_sanitize_checkbox'
	 ));
	 $wp_customize->add_control('dry_cleaning_services_shop_page_sidebar',array(
		'type' => 'checkbox',
		'label' => __(' Check To Enable Shop page sidebar','dry-cleaning-services'),
		'section' => 'dry_cleaning_services_woocommerce_page_settings',
	 ));

    // shop page sidebar alignment
    $wp_customize->add_setting('dry_cleaning_services_shop_page_sidebar_position', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_choices',
	));
	$wp_customize->add_control('dry_cleaning_services_shop_page_sidebar_position',array(
		'type'           => 'radio',
		'label'          => __('Shop Page Sidebar', 'dry-cleaning-services'),
		'section'        => 'dry_cleaning_services_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'dry-cleaning-services'),
			'Right Sidebar' => __('Right Sidebar', 'dry-cleaning-services'),
		),
	));	 

	$wp_customize->add_setting('dry_cleaning_services_wooproducts_nav',array(
		'default' => 'Yes',
		'sanitize_callback'	=> 'dry_cleaning_services_sanitize_choices'
	));
	$wp_customize->add_control('dry_cleaning_services_wooproducts_nav',array(
		'type' => 'select',
		'label' => __('Shop Page Products Navigation','dry-cleaning-services'),
		'choices' => array(
			 'Yes' => __('Yes','dry-cleaning-services'),
			 'No' => __('No','dry-cleaning-services'),
		 ),
		'section' => 'dry_cleaning_services_woocommerce_page_settings',
	));

	 $wp_customize->add_setting( 'dry_cleaning_services_single_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'dry_cleaning_services_sanitize_checkbox'
    ) );
    $wp_customize->add_control('dry_cleaning_services_single_page_sidebar',array(
    	'type' => 'checkbox',
       	'label' => __('Check To Enable Single Product Page Sidebar','dry-cleaning-services'),
		'section' => 'dry_cleaning_services_woocommerce_page_settings'
    ));

	// single product page sidebar alignment
    $wp_customize->add_setting('dry_cleaning_services_single_product_page_layout', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_choices',
	));
	$wp_customize->add_control('dry_cleaning_services_single_product_page_layout',array(
		'type'           => 'radio',
		'label'          => __('Single product Page Sidebar', 'dry-cleaning-services'),
		'section'        => 'dry_cleaning_services_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'dry-cleaning-services'),
			'Right Sidebar' => __('Right Sidebar', 'dry-cleaning-services'),
		),
	));

	$wp_customize->add_setting('dry_cleaning_services_related_product_enable',array(
		'default' => true,
		'sanitize_callback'	=> 'dry_cleaning_services_sanitize_checkbox'
	));
	$wp_customize->add_control('dry_cleaning_services_related_product_enable',array(
		'type' => 'checkbox',
		'label' => __('Check To Enable Related product','dry-cleaning-services'),
		'section' => 'dry_cleaning_services_woocommerce_page_settings',
	));	

	$wp_customize->add_setting( 'dry_cleaning_services_woo_product_img_border_radius', array(
        'default'              => '0',
        'transport'            => 'refresh',
        'sanitize_callback'    => 'dry_cleaning_services_sanitize_integer'
    ) );
    $wp_customize->add_control(new Dry_Cleaning_Services_Slider_Custom_Control( $wp_customize, 'dry_cleaning_services_woo_product_img_border_radius',array(
		'label'	=> esc_html__('Product Img Border Radius','dry-cleaning-services'),
		'section'=> 'dry_cleaning_services_woocommerce_page_settings',
		'settings'=>'dry_cleaning_services_woo_product_img_border_radius',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 100,
        ),
	)));

    // Add a setting for number of products per row
    $wp_customize->add_setting('dry_cleaning_services_products_per_row', array(
	    'default'   => '4',
	    'transport' => 'refresh',
	    'sanitize_callback' => 'dry_cleaning_services_sanitize_integer'  
    ));
    $wp_customize->add_control('dry_cleaning_services_products_per_row', array(
	   'label'    => __('Products Per Row', 'dry-cleaning-services'),
	   'section'  => 'dry_cleaning_services_woocommerce_page_settings',
	   'settings' => 'dry_cleaning_services_products_per_row',
	   'type'     => 'select',
	   'choices'  => array(
		      '2' => '2',
		'      3' => '3',
		      '4' => '4',
	  ),
    ) );

	// Add a setting for the number of products per page
	$wp_customize->add_setting('dry_cleaning_services_products_per_page', array(
		'default'   => '9',
		'transport' => 'refresh',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_integer'
	));
	$wp_customize->add_control('dry_cleaning_services_products_per_page', array(
		'label'    => __('Products Per Page', 'dry-cleaning-services'),
		'section'  => 'dry_cleaning_services_woocommerce_page_settings',
		'settings' => 'dry_cleaning_services_products_per_page',
		'type'     => 'number',
		'input_attrs' => array(
			'min'  => 1,
			'step' => 1,
		),
	));	

    $wp_customize->add_setting('dry_cleaning_services_product_sale_position',array(
        'default' => 'Left',
        'sanitize_callback' => 'dry_cleaning_services_sanitize_choices'
	));
	$wp_customize->add_control('dry_cleaning_services_product_sale_position',array(
        'type' => 'radio',
        'label' => __('Product Sale Position','dry-cleaning-services'),
        'section' => 'dry_cleaning_services_woocommerce_page_settings',
        'choices' => array(
            'Left' => __('Left','dry-cleaning-services'),
            'Right' => __('Right','dry-cleaning-services'),
        ),
	) ); 

	//Theme Options
	$wp_customize->add_panel( 'dry_cleaning_services_panel_area', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'title' => __( 'Theme Options Panel', 'dry-cleaning-services' ),
	) );

	//Site Layout Section
	$wp_customize->add_section('dry_cleaning_services_site_layoutsec',array(
		'title'	=> __('Manage Site Layout Section ','dry-cleaning-services'),
		'description' => __('<p class="sec-title">Manage Site Layout Section</p>','dry-cleaning-services'),
		'priority'	=> 1,
		'panel' => 'dry_cleaning_services_panel_area',
	));

	$wp_customize->add_setting('dry_cleaning_services_preloader',array(
		'default' => false,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	));
	$wp_customize->add_control( 'dry_cleaning_services_preloader', array(
	   'section'   => 'dry_cleaning_services_site_layoutsec',
	   'label'	=> __('Check to Show preloader','dry-cleaning-services'),
	   'type'      => 'checkbox'
 	));

	$wp_customize->add_setting('dry_cleaning_services_box_layout',array(
		'default' => false,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	));
	$wp_customize->add_control( 'dry_cleaning_services_box_layout', array(
	   'section'   => 'dry_cleaning_services_site_layoutsec',
	   'label'	=> __('Check to Show Box Layout','dry-cleaning-services'),
	   'type'      => 'checkbox'
 	));

    // Add Settings and Controls for Page Layout
    $wp_customize->add_setting('dry_cleaning_services_sidebar_page_layout',array(
	  'default' => 'full',
	  'sanitize_callback' => 'dry_cleaning_services_sanitize_choices'
	));
	$wp_customize->add_control('dry_cleaning_services_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'dry-cleaning-services'),
		'section' => 'dry_cleaning_services_site_layoutsec',
		'choices' => array(
			'left' => __('Left','dry-cleaning-services'),
			'right' => __('Right','dry-cleaning-services'),
			'full' => __('No Sidebar','dry-cleaning-services')
	),
	) );	

	$wp_customize->add_setting( 'dry_cleaning_services_layoutsec_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_layoutsec_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_site_layoutsec'
	));	

	//Global Color
	$wp_customize->add_section('dry_cleaning_services_global_color', array(
		'title'    => __('Manage Global Color Section', 'dry-cleaning-services'),
		'panel'    => 'dry_cleaning_services_panel_area',
	));

	$wp_customize->add_setting('dry_cleaning_services_first_color', array(
		'default'           => '#007CFB',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'dry_cleaning_services_first_color', array(
		'label'    => __('Theme Color', 'dry-cleaning-services'),
		'section'  => 'dry_cleaning_services_global_color',
		'settings' => 'dry_cleaning_services_first_color',
	)));	

	$wp_customize->add_setting('dry_cleaning_services_second_color', array(
		'default'           => '#16285C',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'dry_cleaning_services_second_color', array(
		'label'    => __('Theme Color', 'dry-cleaning-services'),
		'section'  => 'dry_cleaning_services_global_color',
		'settings' => 'dry_cleaning_services_second_color',
	)));	

    $wp_customize->add_setting( 'dry_cleaning_services_global_color_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_global_color_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_global_color'
	));   

 	// Header Section
	$wp_customize->add_section('dry_cleaning_services_header_section', array(
        'title' => __('Manage Header Section', 'dry-cleaning-services'),
		'description' => __('<p class="sec-title">Manage Header Section</p>','dry-cleaning-services'),
        'priority' => null,
		'panel' => 'dry_cleaning_services_panel_area',
 	));

	// Sticky Header
	$wp_customize->add_setting( 'dry_cleaning_services_sticky_header',array(
        'default' => false,
        'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
		'capability' => 'edit_theme_options',
    ));
    $wp_customize->add_control( 'dry_cleaning_services_sticky_header',array(
		'settings' => 'dry_cleaning_services_sticky_header',
	    'section'   => 'dry_cleaning_services_header_section',
        'label' => esc_html__( 'Check To Enable Sticky Header','dry-cleaning-services' ),
        'type'      => 'checkbox'
    ));

	$wp_customize->add_setting('dry_cleaning_services_contact_section',array(
		'default' => true,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_contact_section', array(
	   'settings' => 'dry_cleaning_services_contact_section',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label'     => __('Check To Enable This Section','dry-cleaning-services'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting('dry_cleaning_services_email_address',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_email',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_email_address', array(
	   'settings' => 'dry_cleaning_services_email_address',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label' => __('Add Email Address', 'dry-cleaning-services'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('dry_cleaning_services_time',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_time', array(
	   'settings' => 'dry_cleaning_services_time',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label' => __('Add Opening Time', 'dry-cleaning-services'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('dry_cleaning_services_header_btn_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_header_btn_text', array(
	   'settings' => 'dry_cleaning_services_header_btn_text',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label' => __('Add Button Text', 'dry-cleaning-services'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('dry_cleaning_services_header_btn_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_header_btn_url', array(
	   'settings' => 'dry_cleaning_services_header_btn_url',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label' => __('Add Button URL', 'dry-cleaning-services'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('dry_cleaning_services_phone_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_phone_text', array(
	   'settings' => 'dry_cleaning_services_phone_text',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label' => __('Add Call Title', 'dry-cleaning-services'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('dry_cleaning_services_phone_number',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_phone_number',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_phone_number', array(
	   'settings' => 'dry_cleaning_services_phone_number',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label' => __('Add Phone Number', 'dry-cleaning-services'),
	   'type'      => 'text'
	));

	// header menu
	$wp_customize->add_setting('dry_cleaning_services_menu_color',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_menu_color', array(
	   'settings' => 'dry_cleaning_services_menu_color',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label' => __('Menu Color', 'dry-cleaning-services'),
	   'type'      => 'color'
	));

	// header menu hover color
	$wp_customize->add_setting('dry_cleaning_services_menuhrv_color',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_menuhrv_color', array(
	   'settings' => 'dry_cleaning_services_menuhrv_color',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label' => __('Menu Hover Color', 'dry-cleaning-services'),
	   'type'      => 'color'
	));

	// header sub menu color
	$wp_customize->add_setting('dry_cleaning_services_submenu_color',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_submenu_color', array(
	   'settings' => 'dry_cleaning_services_submenu_color',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label' => __('SubMenu Color', 'dry-cleaning-services'),
	   'type'      => 'color'
	));

	// header sub menu hover color
	$wp_customize->add_setting('dry_cleaning_services_submenuhrv_color',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_submenuhrv_color', array(
	   'settings' => 'dry_cleaning_services_submenuhrv_color',
	   'section'   => 'dry_cleaning_services_header_section',
	   'label' => __('SubMenu Hover Color', 'dry-cleaning-services'),
	   'type'      => 'color'
	));

    // Menu Text Transform
    $wp_customize->add_setting( 'dry_cleaning_services_menu_text_transform', array(
        'default'           => 'Uppercase',
		'transport' => 'refresh',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_choices'
    ));

    $wp_customize->add_control( 'dry_cleaning_services_menu_text_transform', array(
        'label'    => __( 'Menu Text Transform', 'dry-cleaning-services' ),
        'section'  => 'dry_cleaning_services_header_section',
        'type'     => 'select',
        'choices'  => array(
			'None'       => __( 'None', 'dry-cleaning-services' ),
            'Capitalize' => __( 'Capitalize', 'dry-cleaning-services' ),
            'Uppercase'  => __( 'Uppercase', 'dry-cleaning-services' ),
            'Lowercase'  => __( 'Lowercase', 'dry-cleaning-services' ),
        ),
    ));

    $wp_customize->add_setting( 'dry_cleaning_services_submenuhrv_color_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_submenuhrv_color_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_header_section'
	));

	// Social media Section
	$wp_customize->add_section('dry_cleaning_services_social_media_section', array(
        'title' => __('Manage Social media Section', 'dry-cleaning-services'),
		'description' => __('<p class="sec-title">Manage Social media Section</p>','dry-cleaning-services'),
        'priority' => null,
		'panel' => 'dry_cleaning_services_panel_area',
 	));

	$wp_customize->add_setting('dry_cleaning_services_fb_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_fb_link', array(
	   'settings' => 'dry_cleaning_services_fb_link',
	   'section'   => 'dry_cleaning_services_social_media_section',
	   'label' => __('Facebook Link', 'dry-cleaning-services'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('dry_cleaning_services_twitt_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_twitt_link', array(
	   'settings' => 'dry_cleaning_services_twitt_link',
	   'section'   => 'dry_cleaning_services_social_media_section',
	   'label' => __('Twitter Link', 'dry-cleaning-services'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('dry_cleaning_services_linkedin_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_linkedin_link', array(
	   'settings' => 'dry_cleaning_services_linkedin_link',
	   'section'   => 'dry_cleaning_services_social_media_section',
	   'label' => __('Linkedin Link', 'dry-cleaning-services'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('dry_cleaning_services_google_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_google_link', array(
	   'settings' => 'dry_cleaning_services_google_link',
	   'section'   => 'dry_cleaning_services_social_media_section',
	   'label' => __('Google Link', 'dry-cleaning-services'),
	   'type'      => 'url'
	));

    $wp_customize->add_setting( 'dry_cleaning_services_social_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_social_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_social_media_section'
	));

	// Slider Section
	$wp_customize->add_section('dry_cleaning_services_slider_section',array(
	    'title' => __('Manage Slider Section','dry-cleaning-services'),
	    'priority'  => null,
	    'description'	=> __('<p class="sec-title">Manage Slider Section</p> Select Category from the Dropdowns for slider, Also use the given image dimension (580 x 550).','dry-cleaning-services'),
	    'panel' => 'dry_cleaning_services_panel_area',
	));	

	$wp_customize->add_setting('dry_cleaning_services_slider',array(
		'default' => true,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_slider', array(
	   'settings' => 'dry_cleaning_services_slider',
	   'section'   => 'dry_cleaning_services_slider_section',
	   'label'     => __('Check To Enable This Section','dry-cleaning-services'),
	   'type'      => 'checkbox'
	));

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

    $wp_customize->add_setting('dry_cleaning_services_slider_cat',array(
	    'default' => '0',
	    'sanitize_callback' => 'dry_cleaning_services_sanitize_choices',
  	));
  	$wp_customize->add_control('dry_cleaning_services_slider_cat',array(
	    'type'    => 'select',
	    'choices' => $cat_post,
	    'label' => __('Select Category to display Latest Post','dry-cleaning-services'),
	    'section' => 'dry_cleaning_services_slider_section',
	));

	$wp_customize->add_setting('dry_cleaning_services_slider_subhead',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_slider_subhead', array(
	   'settings' => 'dry_cleaning_services_slider_subhead',
	   'section'   => 'dry_cleaning_services_slider_section',
	   'label' => __('Add Slider Subheading', 'dry-cleaning-services'),
	   'type'      => 'text'
	));

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

    $wp_customize->add_setting('dry_cleaning_services_slider_cat',array(
	    'default' => '0',
	    'sanitize_callback' => 'dry_cleaning_services_sanitize_choices',
  	));
  	$wp_customize->add_control('dry_cleaning_services_slider_cat',array(
	    'type'    => 'select',
	    'choices' => $cat_post,
	    'label' => __('Select Category to display Latest Post','dry-cleaning-services'),
	    'section' => 'dry_cleaning_services_slider_section',
	));

	$wp_customize->add_setting('dry_cleaning_services_button_text',array(
		'default' => 'Discover More',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_button_text', array(
	   'settings' => 'dry_cleaning_services_button_text',
	   'section'   => 'dry_cleaning_services_slider_section',
	   'label' => __('Add Button Text', 'dry-cleaning-services'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('dry_cleaning_services_button_link_slider',array(
        'default'=> '',
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('dry_cleaning_services_button_link_slider',array(
        'label' => esc_html__('Add Button Link','dry-cleaning-services'),
        'section'=> 'dry_cleaning_services_slider_section',
        'type'=> 'url'
    ));

	$wp_customize->add_setting('dry_cleaning_services_discount_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_discount_text', array(
	   'settings' => 'dry_cleaning_services_discount_text',
	   'section'   => 'dry_cleaning_services_slider_section',
	   'label' => __('Add Discount', 'dry-cleaning-services'),
	   'type'      => 'text'
	));

    $wp_customize->add_setting( 'dry_cleaning_services_slider_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_slider_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_slider_section'
	));

	// Services Section
	$wp_customize->add_section('dry_cleaning_services_service_section', array(
	    'title'       => __('Manage Service Section', 'dry-cleaning-services'),
	    'description' => __('<p class="sec-title">Manage Service Section</p>', 'dry-cleaning-services'),
	    'priority'    => null,
	    'panel'       => 'dry_cleaning_services_panel_area',
	));

	$wp_customize->add_setting('dry_cleaning_services_disabled_trending_section', array(
	    'default'           => true,
	    'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('dry_cleaning_services_disabled_trending_section', array(
	    'settings' => 'dry_cleaning_services_disabled_trending_section',
	    'section'  => 'dry_cleaning_services_service_section',
	    'label'    => __('Check To Enable Section', 'dry-cleaning-services'),
	    'type'     => 'checkbox',
	));

	$wp_customize->add_setting('dry_cleaning_services_service_text', array(
	    'default'           => ' ',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('dry_cleaning_services_service_text', array(
	    'settings' => 'dry_cleaning_services_service_text',
	    'section'  => 'dry_cleaning_services_service_section',
	    'label'    => __('Add Service Text', 'dry-cleaning-services'),
	    'type'     => 'text',
	));

	$wp_customize->add_setting('dry_cleaning_services_service_title', array(
	    'default'           => ' ',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('dry_cleaning_services_service_title', array(
	    'settings' => 'dry_cleaning_services_service_title',
	    'section'  => 'dry_cleaning_services_service_section',
	    'label'    => __('Add Service Title', 'dry-cleaning-services'),
	    'type'     => 'text',
	));


	$wp_customize->add_setting('dry_cleaning_services_claases_number',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field',
	));
	$wp_customize->add_control('dry_cleaning_services_claases_number',array(
		'label'	=> __('Number of post to show','dry-cleaning-services'),
		'description' => __('Add number and refresh tab','dry-cleaning-services'),
		'section'	=> 'dry_cleaning_services_service_section',
		'type'		=> 'number',
		'input_attrs' => array(
			'step'             => 1,
			'min'              => 0,
			'max'              => 6,
		),
	));
	$dry_cleaning_services_featured_post = get_theme_mod('dry_cleaning_services_claases_number');

	$args = array('numberposts' => -1);
	$post_list = get_posts($args);
	$i = 0;
	$pst[]='Select';
	foreach($post_list as $post){
		$pst[$post->ID] = $post->post_title;
	}

	for ( $dry_cleaning_services_i = 1; $dry_cleaning_services_i <= $dry_cleaning_services_featured_post; $dry_cleaning_services_i++ ) {
		$wp_customize->add_setting('dry_cleaning_services_select_post'.$dry_cleaning_services_i,array(
			'sanitize_callback' => 'dry_cleaning_services_sanitize_choices',
		));
		$wp_customize->add_control('dry_cleaning_services_select_post'.$dry_cleaning_services_i,array(
			'type'    => 'select',
			'choices' => $pst,
			'label' => __('Select Post','dry-cleaning-services'),
			'section' => 'dry_cleaning_services_service_section',
		));

		$wp_customize->add_setting('dry_cleaning_services_services_icon'.$dry_cleaning_services_i,array(
            'default'=> '',
            'sanitize_callback' => 'sanitize_text_field'
        ));
            $wp_customize->add_control('dry_cleaning_services_services_icon'.$dry_cleaning_services_i,array(
            'label' => __('Icon ','dry-cleaning-services').$dry_cleaning_services_i,
            'description' => __('Fontawesome Icon (e.g., fa-solid fa-shirt)','dry-cleaning-services'),
            'section'=> 'dry_cleaning_services_service_section',
            'type'=> 'text'
        ));
	}

    $wp_customize->add_setting( 'dry_cleaning_services_service_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_service_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_service_section'
	));	

	//Blog post
	$wp_customize->add_section('dry_cleaning_services_blog_post_settings',array(
        'title' => __('Manage Post Section', 'dry-cleaning-services'),
        'priority' => null,
        'panel' => 'dry_cleaning_services_panel_area'
    ) );

	// Layouts Post
	$wp_customize->add_setting(
		'dry_cleaning_services_blog_layout_option_setting',
		array(
			'default'           => 'Left',
			'sanitize_callback' => 'dry_cleaning_services_sanitize_choices',
		)
	);

	$wp_customize->add_control(
		new Dry_Cleaning_Services_Image_Radio_Control(
			$wp_customize,
			'dry_cleaning_services_blog_layout_option_setting',
			array(
				'label'   => __( 'Post Layouts', 'dry-cleaning-services' ),
				'section' => 'dry_cleaning_services_blog_post_settings',
				'choices' => array(
					'Left' => get_template_directory_uri() . '/images/layout-1.png',
					'Center'    => get_template_directory_uri() . '/images/layout-2.png',
					'Right'   => get_template_directory_uri() . '/images/layout-3.png',
				),
			)
		)
	);

	$wp_customize->add_setting('dry_cleaning_services_metafields_date', array(
	    'default' => true,
	    'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	));
	$wp_customize->add_control('dry_cleaning_services_metafields_date', array(
	    'settings' => 'dry_cleaning_services_metafields_date', 
	    'section'   => 'dry_cleaning_services_blog_post_settings',
	    'label'     => __('Check to Enable Date', 'dry-cleaning-services'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('dry_cleaning_services_metafields_comments', array(
		'default' => true,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	));	
	$wp_customize->add_control('dry_cleaning_services_metafields_comments', array(
		'settings' => 'dry_cleaning_services_metafields_comments',
		'section'  => 'dry_cleaning_services_blog_post_settings',
		'label'    => __('Check to Enable Comments', 'dry-cleaning-services'),
		'type'     => 'checkbox',
	));

	$wp_customize->add_setting('dry_cleaning_services_metafields_author', array(
		'default' => true,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	));
	$wp_customize->add_control('dry_cleaning_services_metafields_author', array(
		'settings' => 'dry_cleaning_services_metafields_author',
		'section'  => 'dry_cleaning_services_blog_post_settings',
		'label'    => __('Check to Enable Author', 'dry-cleaning-services'),
		'type'     => 'checkbox',
	));		

	$wp_customize->add_setting('dry_cleaning_services_metafields_time', array(
		'default' => true,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	));
	$wp_customize->add_control('dry_cleaning_services_metafields_time', array(
		'settings' => 'dry_cleaning_services_metafields_time',
		'section'  => 'dry_cleaning_services_blog_post_settings',
		'label'    => __('Check to Enable Time', 'dry-cleaning-services'),
		'type'     => 'checkbox',
	));	

	$wp_customize->add_setting('dry_cleaning_services_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','dry-cleaning-services'),
		'description' => __('Ex: "/", "|", "-", ...','dry-cleaning-services'),
		'section' => 'dry_cleaning_services_blog_post_settings'
	)); 

    // Add Settings and Controls for Post Layout
	$wp_customize->add_setting('dry_cleaning_services_sidebar_post_layout',array(
		'default' => 'right',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_choices'
	));
	$wp_customize->add_control('dry_cleaning_services_sidebar_post_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Post Sidebar Position', 'dry-cleaning-services'),
		'description'   => __('This option work for blog page, archive page and search page.', 'dry-cleaning-services'),
		'section' => 'dry_cleaning_services_blog_post_settings',
		'choices' => array(
			'left' => __('Left','dry-cleaning-services'),
			'right' => __('Right','dry-cleaning-services'),
			'three-column' => __('Three Columns','dry-cleaning-services'),
			'four-column' => __('Four Columns','dry-cleaning-services'),
			'grid' => __('Grid Layout','dry-cleaning-services'),
			'full' => __('No Sidebar','dry-cleaning-services')
     ),
	) );

	$wp_customize->add_setting('dry_cleaning_services_blog_post_description_option',array(
    	'default'   => 'Excerpt Content', 
        'sanitize_callback' => 'dry_cleaning_services_sanitize_choices'
	));
	$wp_customize->add_control('dry_cleaning_services_blog_post_description_option',array(
        'type' => 'radio',
        'label' => __('Post Description Length','dry-cleaning-services'),
        'section' => 'dry_cleaning_services_blog_post_settings',
        'choices' => array(
            'No Content' => __('No Content','dry-cleaning-services'),
            'Excerpt Content' => __('Excerpt Content','dry-cleaning-services'),
            'Full Content' => __('Full Content','dry-cleaning-services'),
        ),
	) );

	$wp_customize->add_setting('dry_cleaning_services_blog_post_thumb',array(
        'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
        'default'           => 1,
    ));
    $wp_customize->add_control('dry_cleaning_services_blog_post_thumb',array(
        'type'        => 'checkbox',
        'label'       => esc_html__('Show / Hide Blog Post Thumbnail', 'dry-cleaning-services'),
        'section'     => 'dry_cleaning_services_blog_post_settings',
    ));

    $wp_customize->add_setting( 'dry_cleaning_services_post_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_post_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_blog_post_settings'
	));	

	//Single Post Settings
	$wp_customize->add_section('dry_cleaning_services_single_post_settings',array(
		'title' => __('Manage Single Post Section', 'dry-cleaning-services'),
		'priority' => null,
		'panel' => 'dry_cleaning_services_panel_area'
	));

	$wp_customize->add_setting('dry_cleaning_services_single_post_date',array(
		'default' => true,
		'sanitize_callback'	=> 'dry_cleaning_services_sanitize_checkbox'
	));
	$wp_customize->add_control('dry_cleaning_services_single_post_date',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Date ','dry-cleaning-services'),
		'section' => 'dry_cleaning_services_single_post_settings'
	));	

	$wp_customize->add_setting('dry_cleaning_services_single_post_author',array(
		'default' => true,
		'sanitize_callback'	=> 'dry_cleaning_services_sanitize_checkbox'
	));
	$wp_customize->add_control('dry_cleaning_services_single_post_author',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Author','dry-cleaning-services'),
		'section' => 'dry_cleaning_services_single_post_settings'
	));

	$wp_customize->add_setting('dry_cleaning_services_single_post_comment',array(
		'default' => true,
		'sanitize_callback'	=> 'dry_cleaning_services_sanitize_checkbox'
	));
	$wp_customize->add_control('dry_cleaning_services_single_post_comment',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Comments','dry-cleaning-services'),
		'section' => 'dry_cleaning_services_single_post_settings'
	));	

	$wp_customize->add_setting('dry_cleaning_services_single_post_time',array(
		'default' => true,
		'sanitize_callback'	=> 'dry_cleaning_services_sanitize_checkbox'
	));
	$wp_customize->add_control('dry_cleaning_services_single_post_time',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Time','dry-cleaning-services'),
		'section' => 'dry_cleaning_services_single_post_settings'
	));	

	$wp_customize->add_setting('dry_cleaning_services_single_post_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_single_post_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','dry-cleaning-services'),
		'description' => __('Ex: "/", "|", "-", ...','dry-cleaning-services'),
		'section' => 'dry_cleaning_services_single_post_settings'
	)); 

	$wp_customize->add_setting('dry_cleaning_services_sidebar_single_post_layout',array(
    	'default' => 'right',
    	 'sanitize_callback' => 'dry_cleaning_services_sanitize_choices'
	));
	$wp_customize->add_control('dry_cleaning_services_sidebar_single_post_layout',array(
   		'type' => 'radio',
    	'label'     => __('Single post sidebar layout', 'dry-cleaning-services'),
     	'section' => 'dry_cleaning_services_single_post_settings',
     	'choices' => array(
			'full' => __('Full','dry-cleaning-services'),
			'left' => __('Left','dry-cleaning-services'),
			'right' => __('Right','dry-cleaning-services'),
     ),
	));

	$wp_customize->add_setting( 'dry_cleaning_services_single_post_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_single_post_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_single_post_settings'
	)); 

	//Page Settings
	$wp_customize->add_section('dry_cleaning_services_page_settings',array(
		'title' => __('Manage Page Section', 'dry-cleaning-services'),
		'priority' => null,
		'panel' => 'dry_cleaning_services_panel_area'
	));

	// Add Settings and Controls for Page Layout
	$wp_customize->add_setting('dry_cleaning_services_sidebar_page_layout',array(
		'default' => 'full',
			'sanitize_callback' => 'dry_cleaning_services_sanitize_choices'
	));
	$wp_customize->add_control('dry_cleaning_services_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'dry-cleaning-services'),
		'section' => 'dry_cleaning_services_page_settings',
		'choices' => array(
			'left' => __('Left','dry-cleaning-services'),
			'right' => __('Right','dry-cleaning-services'),
			'full' => __('No Sidebar','dry-cleaning-services')
		),
	));	

	// 404 Page Settings
	$wp_customize->add_section('dry_cleaning_services_page_not_found', array(
		'title'	=> __('Manage 404 Page Section','dry-cleaning-services'),
		'priority'	=> null,
		'panel' => 'dry_cleaning_services_panel_area',
	));
	
	$wp_customize->add_setting('dry_cleaning_services_page_not_found_heading',array(
		'default'=> __('404 Not Found','dry-cleaning-services'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_page_not_found_heading',array(
		'label'	=> __('404 Heading','dry-cleaning-services'),
		'section'=> 'dry_cleaning_services_page_not_found',
		'type'=> 'text'
	));

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

	$wp_customize->add_control('dry_cleaning_services_page_not_found_content',array(
		'label'	=> __('404 Text','dry-cleaning-services'),
		'input_attrs' => array(
			'placeholder' => __( 'Looks like you have taken a wrong turn.....Don\'t worry... it happens to the best of us.', 'dry-cleaning-services' ),
		),
		'section'=> 'dry_cleaning_services_page_not_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('dry_cleaning_services_page_not_found_btn',array(
		'default' => 'Homepage',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_page_not_found_btn', array(
	   'settings' => 'dry_cleaning_services_page_not_found_btn',
	   'section'   => 'dry_cleaning_services_page_not_found',
	   'label' => __('404 Button', 'dry-cleaning-services'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting( 'dry_cleaning_services_page_not_found_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_page_not_found_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
			<a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_page_not_found'
	));

	// No Results Page Settings
	$wp_customize->add_section('dry_cleaning_services_no_results_found', array(
		'title'	=> __('Manage No Results Page Section','dry-cleaning-services'),
		'priority'	=> null,
		'panel' => 'dry_cleaning_services_panel_area',
	));
	
	$wp_customize->add_setting('dry_cleaning_services_page_nothing_found_heading',array(
		'default'=> __('Nothing Found','dry-cleaning-services'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_page_nothing_found_heading',array(
		'label'	=> __('Add Title','dry-cleaning-services'),
		'section'=> 'dry_cleaning_services_no_results_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('dry_cleaning_services_nothing_found_content',array(
		'default'=> 'Sorry, but nothing matched your search terms. Please try again with some different keywords.',
		'sanitize_callback'	=> 'sanitize_text_field'
	));

	$wp_customize->add_control('dry_cleaning_services_nothing_found_content',array(
		'label'	=> __('Add Text','dry-cleaning-services'),
		'section'=> 'dry_cleaning_services_no_results_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('dry_cleaning_services_nothing_found_search',array(
		'default' => true,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_nothing_found_search', array(
	   'settings' => 'dry_cleaning_services_nothing_found_search',
	   'section'   => 'dry_cleaning_services_no_results_found',
	   'label'     => __('Check To Enable Search','dry-cleaning-services'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting( 'dry_cleaning_services_no_results_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_no_results_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		<a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_no_results_found'
	));

	// Animation Section
	$wp_customize->add_section('dry_cleaning_services_animation', array(
		'title'	=> __('Manage Animation Section','dry-cleaning-services'),
		'description'	=> __('<p class="sec-title">Manage Animation Section</p>','dry-cleaning-services'),
		'priority'	=> null,
		'panel' => 'dry_cleaning_services_panel_area',
	));

	$wp_customize->add_setting('dry_cleaning_services_animation_enabled',array(
		'default' => true,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_animation_enabled', array(
	   'settings' => 'dry_cleaning_services_animation_enabled',
	   'section'   => 'dry_cleaning_services_animation',
	   'label'     => __('Check To Enable Animation','dry-cleaning-services'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting( 'dry_cleaning_services_animation_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_animation_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		<a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_animation'
	));

	// Footer Section
	$wp_customize->add_section('dry_cleaning_services_footer', array(
		'title'	=> __('Manage Footer Section','dry-cleaning-services'),
		'description'	=> __('<p class="sec-title">Manage Footer Section</p>','dry-cleaning-services'),
		'priority'	=> null,
		'panel' => 'dry_cleaning_services_panel_area',
	));

	$wp_customize->add_setting('dry_cleaning_services_footer_widget', array(
	    'default' => true,
	    'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox',
	));
	$wp_customize->add_control('dry_cleaning_services_footer_widget', array(
	    'settings' => 'dry_cleaning_services_footer_widget', // Corrected setting name
	    'section'   => 'dry_cleaning_services_footer',
	    'label'     => __('Check to Enable Footer Widget', 'dry-cleaning-services'),
	    'type'      => 'checkbox',
	));

	//  footer bg color
	$wp_customize->add_setting('dry_cleaning_services_footerbg_color',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_footerbg_color', array(
		'settings' => 'dry_cleaning_services_footerbg_color',
		'section'   => 'dry_cleaning_services_footer',
		'label' => __('Footer Background Color', 'dry-cleaning-services'),
		'type'      => 'color'
	));

	$wp_customize->add_setting('dry_cleaning_services_footer_bg_image',array(
        'default'   => '',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'dry_cleaning_services_footer_bg_image',array(
        'label' => __('Footer Background Image','dry-cleaning-services'),
        'section' => 'dry_cleaning_services_footer',
    )));

	$wp_customize->add_setting('dry_cleaning_services_footer_img_position',array(
		'default' => 'center center',
		'transport' => 'refresh',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_choices'
	));
	$wp_customize->add_control('dry_cleaning_services_footer_img_position',array(
		'type' => 'select',
		'label' => __('Footer Image Position','dry-cleaning-services'),
		'section' => 'dry_cleaning_services_footer',
		'choices' 	=> array(
			'center center'   => esc_html__( 'Center', 'dry-cleaning-services' ),
			'center top'   => esc_html__( 'Top', 'dry-cleaning-services' ),
			'left center'   => esc_html__( 'Left', 'dry-cleaning-services' ),
			'right center'   => esc_html__( 'Right', 'dry-cleaning-services' ),
			'center bottom'   => esc_html__( 'Bottom', 'dry-cleaning-services' ),
		),
	));	

	$wp_customize->add_setting('dry_cleaning_services_copyright_line',array(
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'dry_cleaning_services_copyright_line', array(
	   'section' 	=> 'dry_cleaning_services_footer',
	   'label'	 	=> __('Copyright Line','dry-cleaning-services'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	$wp_customize->add_setting('dry_cleaning_services_copyright_link',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
	));	
	$wp_customize->add_control( 'dry_cleaning_services_copyright_link', array(
	   'section' 	=> 'dry_cleaning_services_footer',
	   'label'	 	=> __('Copyright Link','dry-cleaning-services'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	//  footer title color
	$wp_customize->add_setting('dry_cleaning_services_footertitle_color',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_footertitle_color', array(
	   'settings' => 'dry_cleaning_services_footertitle_color',
	   'section'   => 'dry_cleaning_services_footer',
	   'label' => __('Title Color', 'dry-cleaning-services'),
	   'type'      => 'color'
	));

	//  footer list color
	$wp_customize->add_setting('dry_cleaning_services_footerlist_color',array(
		'default' => '',
		'sanitize_callback' => 'dry_cleaning_services_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_footerlist_color', array(
	   'settings' => 'dry_cleaning_services_footerlist_color',
	   'section'   => 'dry_cleaning_services_footer',
	   'label' => __('List Color', 'dry-cleaning-services'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('dry_cleaning_services_scroll_hide', array(
        'default' => true,
        'sanitize_callback' => 'dry_cleaning_services_sanitize_checkbox'
    ));
    $wp_customize->add_control( new WP_Customize_Control($wp_customize,'dry_cleaning_services_scroll_hide',array(
        'label'          => __( 'Check To Show Scroll To Top', 'dry-cleaning-services' ),
        'section'        => 'dry_cleaning_services_footer',
        'settings'       => 'dry_cleaning_services_scroll_hide',
        'type'           => 'checkbox',
    )));

	$wp_customize->add_setting('dry_cleaning_services_scroll_position',array(
        'default' => 'Right',
        'sanitize_callback' => 'dry_cleaning_services_sanitize_choices'
    ));
    $wp_customize->add_control('dry_cleaning_services_scroll_position',array(
        'type' => 'radio',
        'section' => 'dry_cleaning_services_footer',
        'label'	 	=> __('Scroll To Top Positions','dry-cleaning-services'),
        'choices' => array(
            'Right' => __('Right','dry-cleaning-services'),
            'Left' => __('Left','dry-cleaning-services'),
            'Center' => __('Center','dry-cleaning-services')
        ),
    ) );

	$wp_customize->add_setting('dry_cleaning_services_scroll_text',array(
		'default'	=> __('TOP','dry-cleaning-services'),
		'sanitize_callback'	=> 'sanitize_text_field',
	));	
	$wp_customize->add_control('dry_cleaning_services_scroll_text',array(
		'label'	=> __('Scroll To Top Button Text','dry-cleaning-services'),
		'section'	=> 'dry_cleaning_services_footer',
		'type'		=> 'text'
	));

	$wp_customize->add_setting( 'dry_cleaning_services_scroll_top_shape', array(
		'default'           => 'circle',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'dry_cleaning_services_scroll_top_shape', array(
		'label'    => __( 'Scroll to Top Button Shape', 'dry-cleaning-services' ),
		'section'  => 'dry_cleaning_services_footer',
		'settings' => 'dry_cleaning_services_scroll_top_shape',
		'type'     => 'radio',
		'choices'  => array(
			'box'        => __( 'Box', 'dry-cleaning-services' ),
			'curved' => __( 'Curved', 'dry-cleaning-services'),
			'circle'     => __( 'Circle', 'dry-cleaning-services' ),
		),
	));

	$wp_customize->add_setting('dry_cleaning_services_footer_widget_areas',array(
		'default'           => 4,
		'sanitize_callback' => 'dry_cleaning_services_sanitize_choices',
	));
	$wp_customize->add_control('dry_cleaning_services_footer_widget_areas',array(
		'type'        => 'radio',
		'section' => 'dry_cleaning_services_footer',
		'label'       => __('Footer widget area', 'dry-cleaning-services'),
		'choices' => array(
		   '1'     => __('One', 'dry-cleaning-services'),
		   '2'     => __('Two', 'dry-cleaning-services'),
		   '3'     => __('Three', 'dry-cleaning-services'),
		   '4'     => __('Four', 'dry-cleaning-services')
		),
	));
	
    $wp_customize->add_setting( 'dry_cleaning_services_footer_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_footer_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_footer'
	));

	// Footer Social Section
	$wp_customize->add_section('dry_cleaning_services_footer_social_icons', array(
		'title'	=> __('Manage Footer Social Section','dry-cleaning-services'),
		'description'	=> __('<p class="sec-title">Manage Footer Social Section</p>','dry-cleaning-services'),
		'priority'	=> null,
		'panel' => 'dry_cleaning_services_panel_area',
	));

	$wp_customize->add_setting('dry_cleaning_services_footer_facebook_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_footer_facebook_link', array(
	   'settings' => 'dry_cleaning_services_footer_facebook_link',
	   'section'   => 'dry_cleaning_services_footer_social_icons',
	   'label' => __('Facebook Link', 'dry-cleaning-services'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('dry_cleaning_services_footer_twitter_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_footer_twitter_link', array(
	   'settings' => 'dry_cleaning_services_footer_twitter_link',
	   'section'   => 'dry_cleaning_services_footer_social_icons',
	   'label' => __('Twitter Link', 'dry-cleaning-services'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('dry_cleaning_services_footer_linkedin_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_footer_linkedin_link', array(
	   'settings' => 'dry_cleaning_services_footer_linkedin_link',
	   'section'   => 'dry_cleaning_services_footer_social_icons',
	   'label' => __('Linkedin Link', 'dry-cleaning-services'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('dry_cleaning_services_footer_google_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'dry_cleaning_services_footer_google_link', array(
	   'settings' => 'dry_cleaning_services_footer_google_link',
	   'section'   => 'dry_cleaning_services_footer_social_icons',
	   'label' => __('Google Link', 'dry-cleaning-services'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting( 'dry_cleaning_services_footer_social_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('dry_cleaning_services_footer_social_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url(DRY_CLEANING_SERVICES_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'dry_cleaning_services_footer_social_icons'
	));
	
	// Google Fonts
	$wp_customize->add_section( 'dry_cleaning_services_google_fonts_section', array(
		'title'       => __( 'Google Fonts', 'dry-cleaning-services' ),
		'priority'    => 24,
	) );

	$font_choices = array(
		'' => 'No Fonts',
		'Kaushan Script:' => 'Kaushan Script',
		'Emilys Candy:' => 'Emilys Candy',
		'Poppins:0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900' => 'Poppins',
		'Source Sans Pro:400,700,400italic,700italic' => 'Source Sans Pro',
		'Open Sans:400italic,700italic,400,700' => 'Open Sans',
		'Oswald:400,700' => 'Oswald',
		'Playfair Display:400,700,400italic' => 'Playfair Display',
		'Montserrat:400,700' => 'Montserrat',
		'Raleway:400,700' => 'Raleway',
		'Droid Sans:400,700' => 'Droid Sans',
		'Lato:400,700,400italic,700italic' => 'Lato',
		'Arvo:400,700,400italic,700italic' => 'Arvo',
		'Lora:400,700,400italic,700italic' => 'Lora',
		'Merriweather:400,300italic,300,400italic,700,700italic' => 'Merriweather',
		'Oxygen:400,300,700' => 'Oxygen',
		'PT Serif:400,700' => 'PT Serif',
		'PT Sans:400,700,400italic,700italic' => 'PT Sans',
		'PT Sans Narrow:400,700' => 'PT Sans Narrow',
		'Cabin:400,700,400italic' => 'Cabin',
		'Fjalla One:400' => 'Fjalla One',
		'Francois One:400' => 'Francois One',
		'Josefin Sans:400,300,600,700' => 'Josefin Sans',
		'Libre Baskerville:400,400italic,700' => 'Libre Baskerville',
		'Arimo:400,700,400italic,700italic' => 'Arimo',
		'Ubuntu:400,700,400italic,700italic' => 'Ubuntu',
		'Bitter:400,700,400italic' => 'Bitter',
		'Droid Serif:400,700,400italic,700italic' => 'Droid Serif',
		'Roboto:400,400italic,700,700italic' => 'Roboto',
		'Open Sans Condensed:700,300italic,300' => 'Open Sans Condensed',
		'Roboto Condensed:400italic,700italic,400,700' => 'Roboto Condensed',
		'Roboto Slab:400,700' => 'Roboto Slab',
		'Yanone Kaffeesatz:400,700' => 'Yanone Kaffeesatz',
		'Rokkitt:400' => 'Rokkitt',
	);

	$wp_customize->add_setting( 'dry_cleaning_services_headings_fonts', array(
		'sanitize_callback' => 'dry_cleaning_services_sanitize_fonts',
	));
	$wp_customize->add_control( 'dry_cleaning_services_headings_fonts', array(
		'type' => 'select',
		'description' => __('Select your desired font for the headings.', 'dry-cleaning-services'),
		'section' => 'dry_cleaning_services_google_fonts_section',
		'choices' => $font_choices
	));

	$wp_customize->add_setting( 'dry_cleaning_services_body_fonts', array(
		'sanitize_callback' => 'dry_cleaning_services_sanitize_fonts'
	));
	$wp_customize->add_control( 'dry_cleaning_services_body_fonts', array(
		'type' => 'select',
		'description' => __( 'Select your desired font for the body.', 'dry-cleaning-services' ),
		'section' => 'dry_cleaning_services_google_fonts_section',
		'choices' => $font_choices
	));

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

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function dry_cleaning_services_customize_preview_js() {
	wp_enqueue_script( 'dry_cleaning_services_customizer', esc_url(get_template_directory_uri()) . '/js/customize-preview.js', array( 'customize-preview' ), '20161510', true );
}
add_action( 'customize_preview_init', 'dry_cleaning_services_customize_preview_js' );
