<?php
/**
 * Classic Marketing Agency Theme Customizer
 *
 * @package Classic Marketing Agency
 */

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

	function classic_marketing_agency_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('classic-marketing-agency-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';
	}

	//Logo
    $wp_customize->add_setting('classic_marketing_agency_logo_width',array(
		'default'=> 100,
		'transport' => 'refresh',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_integer'
	));
	$wp_customize->add_control(new Classic_Marketing_Agency_Slider_Custom_Control( $wp_customize, 'classic_marketing_agency_logo_width',array(
		'label'	=> esc_html__('Logo Width','classic-marketing-agency'),
		'section'=> 'title_tagline',
		'settings'=>'classic_marketing_agency_logo_width',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 100,
        ),
	)));

	// color site title
	$wp_customize->add_setting('classic_marketing_agency_sitetitle_color',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_sitetitle_color', array(
	   'settings' => 'classic_marketing_agency_sitetitle_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Title Color', 'classic-marketing-agency'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('classic_marketing_agency_title_enable',array(
		'default' => false,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	));
	$wp_customize->add_control( 'classic_marketing_agency_title_enable', array(
	   'settings' => 'classic_marketing_agency_title_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Title','classic-marketing-agency'),
	   'type'      => 'checkbox'
	));

	// color site tagline
	$wp_customize->add_setting('classic_marketing_agency_sitetagline_color',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_sitetagline_color', array(
	   'settings' => 'classic_marketing_agency_sitetagline_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Tagline Color', 'classic-marketing-agency'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('classic_marketing_agency_tagline_enable',array(
		'default' => false,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	));
	$wp_customize->add_control( 'classic_marketing_agency_tagline_enable', array(
	   'settings' => 'classic_marketing_agency_tagline_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Tagline','classic-marketing-agency'),
	   'type'      => 'checkbox'
	));

	// woocommerce section
	$wp_customize->add_section('classic_marketing_agency_woocommerce_page_settings', array(
		'title'    => __('WooCommerce Page Settings', 'classic-marketing-agency'),
		'priority' => null,
		'panel'    => 'woocommerce',
	));

	$wp_customize->add_setting('classic_marketing_agency_shop_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'classic_marketing_agency_sanitize_checkbox'
	));
	$wp_customize->add_control('classic_marketing_agency_shop_page_sidebar',array(
		'type' => 'checkbox',
		'label' => __(' Check To Enable Shop page sidebar','classic-marketing-agency'),
		'section' => 'classic_marketing_agency_woocommerce_page_settings',
	));
	
	// shop page sidebar alignment
	$wp_customize->add_setting('classic_marketing_agency_shop_page_sidebar_position', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_choices',
	));
	$wp_customize->add_control('classic_marketing_agency_shop_page_sidebar_position',array(
		'type'           => 'radio',
		'label'          => __('Shop Page Sidebar', 'classic-marketing-agency'),
		'section'        => 'classic_marketing_agency_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'classic-marketing-agency'),
			'Right Sidebar' => __('Right Sidebar', 'classic-marketing-agency'),
		),
	));
	
	$wp_customize->add_setting('classic_marketing_agency_wooproducts_nav',array(
		'default' => 'Yes',
		'sanitize_callback'	=> 'classic_marketing_agency_sanitize_choices'
	));
	$wp_customize->add_control('classic_marketing_agency_wooproducts_nav',array(
		'type' => 'select',
		'label' => __('Shop Page Products Navigation','classic-marketing-agency'),
		'choices' => array(
				'Yes' => __('Yes','classic-marketing-agency'),
				'No' => __('No','classic-marketing-agency'),
			),
		'section' => 'classic_marketing_agency_woocommerce_page_settings',
	));	

	$wp_customize->add_setting( 'classic_marketing_agency_single_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'classic_marketing_agency_sanitize_checkbox'
	) );
	$wp_customize->add_control('classic_marketing_agency_single_page_sidebar',array(
		'type' => 'checkbox',
			'label' => __('Check To Enable Single Product Page Sidebar','classic-marketing-agency'),
		'section' => 'classic_marketing_agency_woocommerce_page_settings'
	));

	// single product page sidebar alignment
	$wp_customize->add_setting('classic_marketing_agency_single_product_page_layout', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_choices',
	));
	$wp_customize->add_control('classic_marketing_agency_single_product_page_layout',array(
		'type'           => 'radio',
		'label'          => __('Single product Page Sidebar', 'classic-marketing-agency'),
		'section'        => 'classic_marketing_agency_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'classic-marketing-agency'),
			'Right Sidebar' => __('Right Sidebar', 'classic-marketing-agency'),
		),
	));	

	$wp_customize->add_setting('classic_marketing_agency_related_product_enable',array(
		'default' => true,
		'sanitize_callback'	=> 'classic_marketing_agency_sanitize_checkbox'
	));
	$wp_customize->add_control('classic_marketing_agency_related_product_enable',array(
		'type' => 'checkbox',
		'label' => __('Check To Enable Related product','classic-marketing-agency'),
		'section' => 'classic_marketing_agency_woocommerce_page_settings',
	));		

	$wp_customize->add_setting( 'classic_marketing_agency_woo_product_img_border_radius', array(
		'default'              => '0',
		'transport'            => 'refresh',
		'sanitize_callback'    => 'classic_marketing_agency_sanitize_integer'
	));
	$wp_customize->add_control(new Classic_Marketing_Agency_Slider_Custom_Control( $wp_customize, 'classic_marketing_agency_woo_product_img_border_radius',array(
		'label'	=> esc_html__('Product Img Border Radius','classic-marketing-agency'),
		'section'=> 'classic_marketing_agency_woocommerce_page_settings',
		'settings'=>'classic_marketing_agency_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('classic_marketing_agency_products_per_row', array(
		'default'   => '4',
		'transport' => 'refresh',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_integer'
	));
	$wp_customize->add_control('classic_marketing_agency_products_per_row', array(
		'label'    => __('Products Per Row', 'classic-marketing-agency'),
		'section'  => 'classic_marketing_agency_woocommerce_page_settings',
		'settings' => 'classic_marketing_agency_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('classic_marketing_agency_products_per_page', array(
		'default'   => '9',
		'transport' => 'refresh',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_integer'
	));
	$wp_customize->add_control('classic_marketing_agency_products_per_page', array(
		'label'    => __('Products Per Page', 'classic-marketing-agency'),
		'section'  => 'classic_marketing_agency_woocommerce_page_settings',
		'settings' => 'classic_marketing_agency_products_per_page',
		'type'     => 'number',
		'input_attrs' => array(
			'min'  => 1,
			'step' => 1,
		),
	));
	
   $wp_customize->add_setting('classic_marketing_agency_product_sale_position',array(
		'default' => 'Left',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_choices'
	));
	$wp_customize->add_control('classic_marketing_agency_product_sale_position',array(
		'type' => 'radio',
		'label' => __('Product Sale Position','classic-marketing-agency'),
		'section' => 'classic_marketing_agency_woocommerce_page_settings',
		'choices' => array(
			'Left' => __('Left','classic-marketing-agency'),
			'Right' => __('Right','classic-marketing-agency'),
		),
	));    

	//Theme Options
	$wp_customize->add_panel( 'classic_marketing_agency_panel_area', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'title' => __( 'Theme Options Panel', 'classic-marketing-agency' ),
	) );

	//Site Layout Section
	$wp_customize->add_section('classic_marketing_agency_site_layoutsec',array(
		'title'	=> __('Manage Site Layout Section ','classic-marketing-agency'),
		'description' => __('<p class="sec-title">Manage Site Layout Section</p>','classic-marketing-agency'),
		'priority'	=> 1,
		'panel' => 'classic_marketing_agency_panel_area',
	));

	$wp_customize->add_setting('classic_marketing_agency_preloader',array(
		'default' => false,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	));
	$wp_customize->add_control( 'classic_marketing_agency_preloader', array(
	   'section'   => 'classic_marketing_agency_site_layoutsec',
	   'label'	=> __('Check to Show preloader','classic-marketing-agency'),
	   'type'      => 'checkbox'
 	));

	$wp_customize->add_setting('classic_marketing_agency_box_layout',array(
		'default' => false,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	));
	$wp_customize->add_control( 'classic_marketing_agency_box_layout', array(
	   'section'   => 'classic_marketing_agency_site_layoutsec',
	   'label'	=> __('Check to Show Box Layout','classic-marketing-agency'),
	   'type'      => 'checkbox'
 	));

    // Add Settings and Controls for Page Layout
    $wp_customize->add_setting('classic_marketing_agency_sidebar_page_layout',array(
		'default' => 'full',
	 	'sanitize_callback' => 'classic_marketing_agency_sanitize_choices'
	));
	$wp_customize->add_control('classic_marketing_agency_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'classic-marketing-agency'),
		'section' => 'classic_marketing_agency_site_layoutsec',
		'choices' => array(
			'left' => __('Left','classic-marketing-agency'),
			'right' => __('Right','classic-marketing-agency'),
			'full' => __('No Sidebar','classic-marketing-agency')
	),
	) );		

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

    //Global Color
    $wp_customize->add_section('classic_marketing_agency_global_color', array(
	    'title'    => __('Manage Global Color Section', 'classic-marketing-agency'),
	    'panel'    => 'classic_marketing_agency_panel_area',
    ));

    $wp_customize->add_setting('classic_marketing_agency_first_color', array(
        'default'           => '#505cfe',
        'sanitize_callback' => 'sanitize_hex_color',
    ));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'classic_marketing_agency_first_color', array(
	  'label'    => __('Theme Color', 'classic-marketing-agency'),
	  'section'  => 'classic_marketing_agency_global_color',
	  'settings' => 'classic_marketing_agency_first_color',
    )));	

    $wp_customize->add_setting('classic_marketing_agency_second_color', array(
        'default'           => '#fd214f',
        'sanitize_callback' => 'sanitize_hex_color',
    ));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'classic_marketing_agency_second_color', array(
	  'label'    => __('Theme Color', 'classic-marketing-agency'),
	  'section'  => 'classic_marketing_agency_global_color',
	  'settings' => 'classic_marketing_agency_second_color',
    )));		

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

 	// Header Section
	$wp_customize->add_section('classic_marketing_agency_header_section', array(
        'title' => __('Manage Header Section', 'classic-marketing-agency'),
		'description' => __('<p class="sec-title">Manage Header Section</p>','classic-marketing-agency'),
        'priority' => null,
		'panel' => 'classic_marketing_agency_panel_area',
 	));	

	// Sticky Header
	$wp_customize->add_setting( 'classic_marketing_agency_sticky_header',array(
		'default' => false,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_sticky_header',array(
		'settings' => 'classic_marketing_agency_sticky_header',
		'section'   => 'classic_marketing_agency_header_section',
		'label' => esc_html__( 'Check To Enable Sticky Header','classic-marketing-agency' ),
		'type'      => 'checkbox'
	));

 	$wp_customize->add_setting('classic_marketing_agency_topbar',array(
		'default' => false,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	));
	$wp_customize->add_control( 'classic_marketing_agency_topbar', array(
	   'settings' => 'classic_marketing_agency_topbar',
	   'section'   => 'classic_marketing_agency_header_section',
	   'label'     => __('Check To Show Topbar','classic-marketing-agency'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting('classic_marketing_agency_phone_number',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_phone_number',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_phone_number', array(
	   'settings' => 'classic_marketing_agency_phone_number',
	   'section'   => 'classic_marketing_agency_header_section',
	   'label' => __('Add Phone Number', 'classic-marketing-agency'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('classic_marketing_agency_email_address',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_email',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_email_address', array(
	   'settings' => 'classic_marketing_agency_email_address',
	   'section'   => 'classic_marketing_agency_header_section',
	   'label' => __('Add Email Address', 'classic-marketing-agency'),
	   'type'      => 'text'
	));

	// header menu
	$wp_customize->add_setting('classic_marketing_agency_menu_color',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_menu_color', array(
	   'settings' => 'classic_marketing_agency_menu_color',
	   'section'   => 'classic_marketing_agency_header_section',
	   'label' => __('Menu Color', 'classic-marketing-agency'),
	   'type'      => 'color'
	));

	// header menu hover color
	$wp_customize->add_setting('classic_marketing_agency_menuhrv_color',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_menuhrv_color', array(
	   'settings' => 'classic_marketing_agency_menuhrv_color',
	   'section'   => 'classic_marketing_agency_header_section',
	   'label' => __('Menu Hover Color', 'classic-marketing-agency'),
	   'type'      => 'color'
	));

	// header sub menu color
	$wp_customize->add_setting('classic_marketing_agency_submenu_color',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_submenu_color', array(
	   'settings' => 'classic_marketing_agency_submenu_color',
	   'section'   => 'classic_marketing_agency_header_section',
	   'label' => __('SubMenu Color', 'classic-marketing-agency'),
	   'type'      => 'color'
	));

	// header sub menu hover color
	$wp_customize->add_setting('classic_marketing_agency_submenuhrv_color',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_submenuhrv_color', array(
	   'settings' => 'classic_marketing_agency_submenuhrv_color',
	   'section'   => 'classic_marketing_agency_header_section',
	   'label' => __('SubMenu Hover Color', 'classic-marketing-agency'),
	   'type'      => 'color'
	));

    // Menu Text Transform
    $wp_customize->add_setting( 'classic_marketing_agency_menu_text_transform', array(
        'default'           => 'Capitalize',
		'transport' => 'refresh',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_choices'
    ));

    $wp_customize->add_control( 'classic_marketing_agency_menu_text_transform', array(
        'label'    => __( 'Menu Text Transform', 'classic-marketing-agency' ),
        'section'  => 'classic_marketing_agency_header_section',
        'type'     => 'select',
        'choices'  => array(
			'None'       => __( 'None', 'classic-marketing-agency' ),
            'Capitalize' => __( 'Capitalize', 'classic-marketing-agency' ),
            'Uppercase'  => __( 'Uppercase', 'classic-marketing-agency' ),
            'Lowercase'  => __( 'Lowercase', 'classic-marketing-agency' ),
        ),
    ));

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

	// Social media Section
	$wp_customize->add_section('classic_marketing_agency_social_media_section', array(
        'title' => __('Manage Social media Section', 'classic-marketing-agency'),
		'description' => __('<p class="sec-title">Manage Social media Section</p>','classic-marketing-agency'),
        'priority' => null,
		'panel' => 'classic_marketing_agency_panel_area',
 	));

	$wp_customize->add_setting('classic_marketing_agency_fb_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_fb_link', array(
	   'settings' => 'classic_marketing_agency_fb_link',
	   'section'   => 'classic_marketing_agency_social_media_section',
	   'label' => __('Facebook Link', 'classic-marketing-agency'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('classic_marketing_agency_twitt_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_twitt_link', array(
	   'settings' => 'classic_marketing_agency_twitt_link',
	   'section'   => 'classic_marketing_agency_social_media_section',
	   'label' => __('Twitter Link', 'classic-marketing-agency'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('classic_marketing_agency_linkedin_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_linkedin_link', array(
	   'settings' => 'classic_marketing_agency_linkedin_link',
	   'section'   => 'classic_marketing_agency_social_media_section',
	   'label' => __('Linkedin Link', 'classic-marketing-agency'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('classic_marketing_agency_insta_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_insta_link', array(
	   'settings' => 'classic_marketing_agency_insta_link',
	   'section'   => 'classic_marketing_agency_social_media_section',
	   'label' => __('Instagram Link', 'classic-marketing-agency'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('classic_marketing_agency_behance_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_behance_link', array(
	   'settings' => 'classic_marketing_agency_behance_link',
	   'section'   => 'classic_marketing_agency_social_media_section',
	   'label' => __('Behance Link', 'classic-marketing-agency'),
	   'type'      => 'url'
	));

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

	//Slider
  	$wp_customize->add_section('classic_marketing_agency_slider_section',array(
	    'title' => __('Manage Slider Section','classic-marketing-agency'),
	    'priority'  => null,
	    'description'	=> __('<p class="sec-title">Manage Slider Section</p> Select Category from the Dropdowns for slider.','classic-marketing-agency'),
	    'panel' => 'classic_marketing_agency_panel_area',
	));		

	$wp_customize->add_setting('classic_marketing_agency_slider',array(
		'default' => false,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_slider', array(
	   'settings' => 'classic_marketing_agency_slider',
	   'section'   => 'classic_marketing_agency_slider_section',
	   'label'     => __('Check To Enable This Section','classic-marketing-agency'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting('classic_marketing_agency_slider_small_title',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_slider_small_title', array(
	   'settings' => 'classic_marketing_agency_slider_small_title',
	   'section'   => 'classic_marketing_agency_slider_section',
	   'label' => __('Add Slider Small Title', 'classic-marketing-agency'),
	   'type'      => 'text'
	));

	$categories = get_categories();
	$cat_post = array();
	$i = 0;
	$cat_post['select'] = 'Select'; // Adding a default 'Select' option

	foreach ($categories as $category) {
	    if ($i == 0) {
	        $default = $category->slug; // Set the first category slug as default
	        $i++;
	    }
	    $cat_post[$category->slug] = $category->name; // Store category slug and name in the array
	}

	// Add Customizer setting for selecting category
	$wp_customize->add_setting('classic_marketing_agency_slider_catData', array(
	    'default' => '', // Set default value to the first category slug
	    'sanitize_callback' => 'classic_marketing_agency_sanitize_choices', // Sanitization function
	));
	$wp_customize->add_control('classic_marketing_agency_slider_catData', array(
	    'type'    => 'select',
	    'choices' => $cat_post,
	    'label' => __('Select Slider Category', 'classic-marketing-agency'),
	    'section' => 'classic_marketing_agency_slider_section', // Assign to a customizer section
	));

	$wp_customize->add_setting('classic_marketing_agency_num_service_categories', array(
        'default' => 5, 
        'sanitize_callback' => 'absint', 
    ));
    $wp_customize->add_control('classic_marketing_agency_num_service_categories', array(
        'label' => __('Number of Popular Search Category to Display', 'classic-marketing-agency'),
        'section' => 'classic_marketing_agency_slider_section', 
        'type' => 'number',
        'input_attrs' => array(
            'min' => 1,
            'step' => 1,
        ),
    ));

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

	// Add service section to the customizer
	$wp_customize->add_section('classic_marketing_agency_below_slider_section', array(
	    'title'       => __('Manage Our Services Section', 'classic-marketing-agency'),
	    'description' => __('<p class="sec-title">Manage Our Services Section</p>', 'classic-marketing-agency'),
	    'priority'    => null,
	    'panel'       => 'classic_marketing_agency_panel_area',
	));

	// Add setting and control to enable or disable the section
	$wp_customize->add_setting('classic_marketing_agency_disabled_pgboxes', array(
	    'default'           => false,
	    'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('classic_marketing_agency_disabled_pgboxes', array(
	    'settings' => 'classic_marketing_agency_disabled_pgboxes',
	    'section'  => 'classic_marketing_agency_below_slider_section',
	    'label'    => __('Check To Enable This Section', 'classic-marketing-agency'),
	    'type'     => 'checkbox',
	));

	// Add settings and controls for the heading and subheading
	$wp_customize->add_setting('classic_marketing_agency_headingtext1', array(
	    'default'           => ' ',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('classic_marketing_agency_headingtext1', array(
	    'settings' => 'classic_marketing_agency_headingtext1',
	    'section'  => 'classic_marketing_agency_below_slider_section',
	    'label'    => __('Add Small Title', 'classic-marketing-agency'),
	    'type'     => 'text',
	));

	$wp_customize->add_setting('classic_marketing_agency_headingtext_para', array(
	    'default'           => ' ',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('classic_marketing_agency_headingtext_para', array(
	    'settings' => 'classic_marketing_agency_headingtext_para',
	    'section'  => 'classic_marketing_agency_below_slider_section',
	    'label'    => __('Add Heading', 'classic-marketing-agency'),
	    'type'     => 'text',
	));

	// Add a category dropdown for the blog section
	$wp_customize->add_setting('classic_marketing_agency_blog_cat', array(
	    'default'           => '0',
	    'sanitize_callback' => 'absint',
	));
	$wp_customize->add_control(new Classic_Marketing_Agency_Category_Dropdown_Custom_Control($wp_customize, 'classic_marketing_agency_blog_cat', array(
	    'section'   => 'classic_marketing_agency_below_slider_section',
	    'label'     => __('Select Category', 'classic-marketing-agency'),
	    'settings'  => 'classic_marketing_agency_blog_cat',
	)));

	// Add setting and control for number of services to show
	$wp_customize->add_setting('classic_marketing_agency_num_services', array(
	    'default'           => 3,
	    'sanitize_callback' => 'absint',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('classic_marketing_agency_num_services', array(
	    'label'       => __('Number of Services to Show', 'classic-marketing-agency'),
	    'section'     => 'classic_marketing_agency_below_slider_section',
	    'settings'    => 'classic_marketing_agency_num_services',
	    'type'        => 'number',
	    'input_attrs' => array(
	        'min' => 1,
	        'max' => 30,
	    ),
	));

	//Get the number of posts to show
    $classic_marketing_agency_num_services = get_theme_mod('classic_marketing_agency_num_services', 3);
	// Loop to create settings and controls for each post's reviewer name, price, and star rating
	for ($classic_marketing_agency_i = 1; $classic_marketing_agency_i <= $classic_marketing_agency_num_services; $classic_marketing_agency_i++) {
	    $wp_customize->add_setting('classic_marketing_agency_reviewer_image' . $classic_marketing_agency_i, array(
	        'default'           => '',
	        'sanitize_callback' => 'esc_url_raw',
	    ));
	    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'classic_marketing_agency_reviewer_image' . $classic_marketing_agency_i, array(
	        'label'    => __('Add Reviewer Image for Post ', 'classic-marketing-agency') . $classic_marketing_agency_i,
	        'section'  => 'classic_marketing_agency_below_slider_section',
	        'settings' => 'classic_marketing_agency_reviewer_image' . $classic_marketing_agency_i,
	    )));

	    $wp_customize->add_setting('classic_marketing_agency_reviwer_name' . $classic_marketing_agency_i, array(
	        'default'           => '',
	        'sanitize_callback' => 'sanitize_text_field',
	    ));
	    $wp_customize->add_control('classic_marketing_agency_reviwer_name' . $classic_marketing_agency_i, array(
	        'label'    => __('Add Reviewer Name ', 'classic-marketing-agency') . $classic_marketing_agency_i,
	        'section'  => 'classic_marketing_agency_below_slider_section',
	        'type'     => 'text',
	    ));

	    $wp_customize->add_setting('classic_marketing_agency_courses_prices' . $classic_marketing_agency_i, array(
	        'default'           => '',
	        'sanitize_callback' => 'sanitize_text_field',
	    ));
	    $wp_customize->add_control('classic_marketing_agency_courses_prices' . $classic_marketing_agency_i, array(
	        'label'    => __('Add Price ', 'classic-marketing-agency') . $classic_marketing_agency_i,
	        'section'  => 'classic_marketing_agency_below_slider_section',
	        'type'     => 'text',
	    ));

	    $wp_customize->add_setting('classic_marketing_agency_star_rating' . $classic_marketing_agency_i, array(
	        'default'           => '',
	        'sanitize_callback' => 'absint',
	    ));
	    $wp_customize->add_control('classic_marketing_agency_star_rating' . $classic_marketing_agency_i, array(
	        'label'       => __('Add Rating for Post ', 'classic-marketing-agency') . $classic_marketing_agency_i,
	        'section'     => 'classic_marketing_agency_below_slider_section',
	        'type'        => 'number',
	        'input_attrs' => array(
	            'step' => 1,
	            'min'  => 0,
	            'max'  => 5,
	        ),
	    ));
	}

	$wp_customize->add_setting('classic_marketing_agency_contact_us_text',array(
		'default' => 'View All',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_contact_us_text', array(
	   'settings' => 'classic_marketing_agency_contact_us_text',
	   'section'   => 'classic_marketing_agency_below_slider_section',
	   'label' => __('Add Button Text', 'classic-marketing-agency'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('classic_marketing_agency_contact_us_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_contact_us_url', array(
	   'settings' => 'classic_marketing_agency_contact_us_url',
	   'section'   => 'classic_marketing_agency_below_slider_section',
	   'label' => __('Add Button URL', 'classic-marketing-agency'),
	   'type'      => 'url'
	));

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

	//Blog post
	$wp_customize->add_section('classic_marketing_agency_blog_post_settings',array(
        'title' => __('Manage Post Section', 'classic-marketing-agency'),
        'priority' => null,
        'panel' => 'classic_marketing_agency_panel_area'
    ));

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

	$wp_customize->add_control(
		new Classic_Marketing_Agency_Image_Radio_Control(
			$wp_customize,
			'classic_marketing_agency_blog_layout_option_setting',
			array(
				'label'   => __( 'Post Layouts', 'classic-marketing-agency' ),
				'section' => 'classic_marketing_agency_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('classic_marketing_agency_metafields_date', array(
	    'default' => true,
	    'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	));
	$wp_customize->add_control('classic_marketing_agency_metafields_date', array(
	    'settings' => 'classic_marketing_agency_metafields_date', 
	    'section'   => 'classic_marketing_agency_blog_post_settings',
	    'label'     => __('Check to Enable Date', 'classic-marketing-agency'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('classic_marketing_agency_metafields_comments', array(
		'default' => true,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	));
	$wp_customize->add_control('classic_marketing_agency_metafields_comments', array(
		'settings' => 'classic_marketing_agency_metafields_comments',
		'section'  => 'classic_marketing_agency_blog_post_settings',
		'label'    => __('Check to Enable Comments', 'classic-marketing-agency'),
		'type'     => 'checkbox',
	));

	$wp_customize->add_setting('classic_marketing_agency_metafields_author', array(
		'default' => true,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	));
	$wp_customize->add_control('classic_marketing_agency_metafields_author', array(
		'settings' => 'classic_marketing_agency_metafields_author',
		'section'  => 'classic_marketing_agency_blog_post_settings',
		'label'    => __('Check to Enable Author', 'classic-marketing-agency'),
		'type'     => 'checkbox',
	));		

	$wp_customize->add_setting('classic_marketing_agency_metafields_time', array(
		'default' => true,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	));
	$wp_customize->add_control('classic_marketing_agency_metafields_time', array(
		'settings' => 'classic_marketing_agency_metafields_time',
		'section'  => 'classic_marketing_agency_blog_post_settings',
		'label'    => __('Check to Enable Time', 'classic-marketing-agency'),
		'type'     => 'checkbox',
	));	

	$wp_customize->add_setting('classic_marketing_agency_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('classic_marketing_agency_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','classic-marketing-agency'),
		'description' => __('Ex: "/", "|", "-", ...','classic-marketing-agency'),
		'section' => 'classic_marketing_agency_blog_post_settings'
	)); 

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

	$wp_customize->add_setting('classic_marketing_agency_blog_post_description_option',array(
    	'default'   => 'Excerpt Content', 
        'sanitize_callback' => 'classic_marketing_agency_sanitize_choices'
	));
	$wp_customize->add_control('classic_marketing_agency_blog_post_description_option',array(
        'type' => 'radio',
        'label' => __('Post Description Length','classic-marketing-agency'),
        'section' => 'classic_marketing_agency_blog_post_settings',
        'choices' => array(
            'No Content' => __('No Content','classic-marketing-agency'),
            'Excerpt Content' => __('Excerpt Content','classic-marketing-agency'),
            'Full Content' => __('Full Content','classic-marketing-agency'),
        ),
	) );

	$wp_customize->add_setting('classic_marketing_agency_blog_post_thumb',array(
        'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
        'default'           => 1,
    ));
    $wp_customize->add_control('classic_marketing_agency_blog_post_thumb',array(
        'type'        => 'checkbox',
        'label'       => esc_html__('Show / Hide Blog Post Thumbnail', 'classic-marketing-agency'),
        'section'     => 'classic_marketing_agency_blog_post_settings',
    ));

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

	//Single Post Settings
	$wp_customize->add_section('classic_marketing_agency_single_post_settings',array(
		'title' => __('Manage Single Post Section', 'classic-marketing-agency'),
		'priority' => null,
		'panel' => 'classic_marketing_agency_panel_area'
	));

	$wp_customize->add_setting('classic_marketing_agency_single_post_date',array(
		'default' => true,
		'sanitize_callback'	=> 'classic_marketing_agency_sanitize_checkbox'
	));
	$wp_customize->add_control('classic_marketing_agency_single_post_date',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Date ','classic-marketing-agency'),
		'section' => 'classic_marketing_agency_single_post_settings'
	));	

	$wp_customize->add_setting('classic_marketing_agency_single_post_author',array(
		'default' => true,
		'sanitize_callback'	=> 'classic_marketing_agency_sanitize_checkbox'
	));
	$wp_customize->add_control('classic_marketing_agency_single_post_author',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Author','classic-marketing-agency'),
		'section' => 'classic_marketing_agency_single_post_settings'
	));

	$wp_customize->add_setting('classic_marketing_agency_single_post_comment',array(
		'default' => true,
		'sanitize_callback'	=> 'classic_marketing_agency_sanitize_checkbox'
	));
	$wp_customize->add_control('classic_marketing_agency_single_post_comment',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Comments','classic-marketing-agency'),
		'section' => 'classic_marketing_agency_single_post_settings'
	));	

	$wp_customize->add_setting('classic_marketing_agency_single_post_time',array(
		'default' => true,
		'sanitize_callback'	=> 'classic_marketing_agency_sanitize_checkbox'
	));
	$wp_customize->add_control('classic_marketing_agency_single_post_time',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Time','classic-marketing-agency'),
		'section' => 'classic_marketing_agency_single_post_settings'
	));	

	$wp_customize->add_setting('classic_marketing_agency_single_post_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('classic_marketing_agency_single_post_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','classic-marketing-agency'),
		'description' => __('Ex: "/", "|", "-", ...','classic-marketing-agency'),
		'section' => 'classic_marketing_agency_single_post_settings'
	)); 

	$wp_customize->add_setting('classic_marketing_agency_sidebar_single_post_layout',array(
    	'default' => 'right',
    	 'sanitize_callback' => 'classic_marketing_agency_sanitize_choices'
	));
	$wp_customize->add_control('classic_marketing_agency_sidebar_single_post_layout',array(
   		'type' => 'radio',
    	'label'     => __('Single post sidebar layout', 'classic-marketing-agency'),
     	'section' => 'classic_marketing_agency_single_post_settings',
     	'choices' => array(
			'full' => __('Full','classic-marketing-agency'),
			'left' => __('Left','classic-marketing-agency'),
			'right' => __('Right','classic-marketing-agency'),
     ),
	));

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

	//Page Settings
	$wp_customize->add_section('classic_marketing_agency_page_settings',array(
		'title' => __('Manage Page Section', 'classic-marketing-agency'),
		'priority' => null,
		'panel' => 'classic_marketing_agency_panel_area'
	));

	// Add Settings and Controls for Page Layout
	$wp_customize->add_setting('classic_marketing_agency_sidebar_page_layout',array(
		'default' => 'full',
			'sanitize_callback' => 'classic_marketing_agency_sanitize_choices'
	));
	$wp_customize->add_control('classic_marketing_agency_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'classic-marketing-agency'),
		'section' => 'classic_marketing_agency_page_settings',
		'choices' => array(
			'left' => __('Left','classic-marketing-agency'),
			'right' => __('Right','classic-marketing-agency'),
			'full' => __('No Sidebar','classic-marketing-agency')
		),
	));	

	// 404 Page Settings
	$wp_customize->add_section('classic_marketing_agency_page_not_found', array(
		'title'	=> __('Manage 404 Page Section','classic-marketing-agency'),
		'priority'	=> null,
		'panel' => 'classic_marketing_agency_panel_area',
	));
	
	$wp_customize->add_setting('classic_marketing_agency_page_not_found_heading',array(
		'default'=> __('404 Not Found','classic-marketing-agency'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('classic_marketing_agency_page_not_found_heading',array(
		'label'	=> __('404 Heading','classic-marketing-agency'),
		'section'=> 'classic_marketing_agency_page_not_found',
		'type'=> 'text'
	));

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

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

	$wp_customize->add_setting('classic_marketing_agency_page_not_found_btn',array(
		'default' => 'Homepage',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_page_not_found_btn', array(
	   'settings' => 'classic_marketing_agency_page_not_found_btn',
	   'section'   => 'classic_marketing_agency_page_not_found',
	   'label' => __('404 Button', 'classic-marketing-agency'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting( 'classic_marketing_agency_page_not_found_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('classic_marketing_agency_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(CLASSIC_MARKETING_AGENCY_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'classic_marketing_agency_page_not_found'
	));

	// No Results Page Settings
	$wp_customize->add_section('classic_marketing_agency_no_results_found', array(
		'title'	=> __('Manage No Results Page Section','classic-marketing-agency'),
		'priority'	=> null,
		'panel' => 'classic_marketing_agency_panel_area',
	));
	
	$wp_customize->add_setting('classic_marketing_agency_page_nothing_found_heading',array(
		'default'=> __('Nothing Found','classic-marketing-agency'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('classic_marketing_agency_page_nothing_found_heading',array(
		'label'	=> __('Add Title','classic-marketing-agency'),
		'section'=> 'classic_marketing_agency_no_results_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('classic_marketing_agency_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('classic_marketing_agency_nothing_found_content',array(
		'label'	=> __('Add Text','classic-marketing-agency'),
		'section'=> 'classic_marketing_agency_no_results_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('classic_marketing_agency_nothing_found_search',array(
		'default' => true,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_nothing_found_search', array(
	   'settings' => 'classic_marketing_agency_nothing_found_search',
	   'section'   => 'classic_marketing_agency_no_results_found',
	   'label'     => __('Check To Enable Search','classic-marketing-agency'),
	   'type'      => 'checkbox'
	));

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

	// Animation Section
	$wp_customize->add_section('classic_marketing_agency_animation', array(
		'title'	=> __('Manage Animation Section','classic-marketing-agency'),
		'description'	=> __('<p class="sec-title">Manage Animation Section</p>','classic-marketing-agency'),
		'priority'	=> null,
		'panel' => 'classic_marketing_agency_panel_area',
	));

	$wp_customize->add_setting('classic_marketing_agency_animation_enabled',array(
		'default' => true,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_animation_enabled', array(
	   'settings' => 'classic_marketing_agency_animation_enabled',
	   'section'   => 'classic_marketing_agency_animation',
	   'label'     => __('Check To Enable Animation','classic-marketing-agency'),
	   'type'      => 'checkbox'
	));

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

	// Footer Section
	$wp_customize->add_section('classic_marketing_agency_footer', array(
		'title'	=> __('Manage Footer Section','classic-marketing-agency'),
		'description'	=> __('<p class="sec-title">Manage Footer Section</p>','classic-marketing-agency'),
		'priority'	=> null,
		'panel' => 'classic_marketing_agency_panel_area',
	));

	$wp_customize->add_setting('classic_marketing_agency_footer_widget', array(
	    'default' => true,
	    'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox',
	));
	$wp_customize->add_control('classic_marketing_agency_footer_widget', array(
	    'settings' => 'classic_marketing_agency_footer_widget', 
	    'section'   => 'classic_marketing_agency_footer',
	    'label'     => __('Check to Enable Footer Widget', 'classic-marketing-agency'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('classic_marketing_agency_copyright_line',array(
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'classic_marketing_agency_copyright_line', array(
	   'section' 	=> 'classic_marketing_agency_footer',
	   'label'	 	=> __('Copyright Line','classic-marketing-agency'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	$wp_customize->add_setting('classic_marketing_agency_copyright_link',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
	));	
	$wp_customize->add_control( 'classic_marketing_agency_copyright_link', array(
	   'section' 	=> 'classic_marketing_agency_footer',
	   'label'	 	=> __('Copyright Link','classic-marketing-agency'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	//  footer bg color
	$wp_customize->add_setting('classic_marketing_agency_footerbg_color',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_footerbg_color', array(
	   'settings' => 'classic_marketing_agency_footerbg_color',
	   'section'   => 'classic_marketing_agency_footer',
	   'label' => __('BG Color', 'classic-marketing-agency'),
	   'type'      => 'color'
	));

	//  footer title color
	$wp_customize->add_setting('classic_marketing_agency_footertitle_color',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_footertitle_color', array(
	   'settings' => 'classic_marketing_agency_footertitle_color',
	   'section'   => 'classic_marketing_agency_footer',
	   'label' => __('Title Color', 'classic-marketing-agency'),
	   'type'      => 'color'
	));

	//  footer list color
	$wp_customize->add_setting('classic_marketing_agency_footerlist_color',array(
		'default' => '',
		'sanitize_callback' => 'classic_marketing_agency_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'classic_marketing_agency_footerlist_color', array(
	   'settings' => 'classic_marketing_agency_footerlist_color',
	   'section'   => 'classic_marketing_agency_footer',
	   'label' => __('List Color', 'classic-marketing-agency'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('classic_marketing_agency_scroll_hide', array(
        'default' => true,
        'sanitize_callback' => 'classic_marketing_agency_sanitize_checkbox'
    ));
    $wp_customize->add_control( new WP_Customize_Control($wp_customize,'classic_marketing_agency_scroll_hide',array(
        'label'          => __( 'Check To Show Scroll To Top', 'classic-marketing-agency' ),
        'section'        => 'classic_marketing_agency_footer',
        'settings'       => 'classic_marketing_agency_scroll_hide',
        'type'           => 'checkbox',
    )));

    $wp_customize->add_setting('classic_marketing_agency_scroll_position',array(
        'default' => 'Right',
        'sanitize_callback' => 'classic_marketing_agency_sanitize_choices'
    ));
    $wp_customize->add_control('classic_marketing_agency_scroll_position',array(
        'type' => 'radio',
        'section' => 'classic_marketing_agency_footer',
        'label'	 	=> __('Scroll To Top Positions','classic-marketing-agency'),
        'choices' => array(
            'Right' => __('Right','classic-marketing-agency'),
            'Left' => __('Left','classic-marketing-agency'),
            'Center' => __('Center','classic-marketing-agency')
        ),
    ));		

	$wp_customize->add_setting('classic_marketing_agency_scroll_text',array(
		'default'	=> __('TOP','classic-marketing-agency'),
		'sanitize_callback'	=> 'sanitize_text_field',
	));	
	$wp_customize->add_control('classic_marketing_agency_scroll_text',array(
		'label'	=> __('Scroll To Top Button Text','classic-marketing-agency'),
		'section'	=> 'classic_marketing_agency_footer',
		'type'		=> 'text'
	));

	$wp_customize->add_setting( 'classic_marketing_agency_scroll_top_shape', array(
		'default'           => 'circle',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'classic_marketing_agency_scroll_top_shape', array(
		'label'    => __( 'Scroll to Top Button Shape', 'classic-marketing-agency' ),
		'section'  => 'classic_marketing_agency_footer',
		'settings' => 'classic_marketing_agency_scroll_top_shape',
		'type'     => 'radio',
		'choices'  => array(
			'box'        => __( 'Box', 'classic-marketing-agency' ),
			'curved' => __( 'Curved', 'classic-marketing-agency'),
			'circle'     => __( 'Circle', 'classic-marketing-agency' ),
		),
	));

	$wp_customize->add_setting('classic_marketing_agency_footer_widget_areas',array(
		'default'           => 4,
		'sanitize_callback' => 'classic_marketing_agency_sanitize_choices',
	));
	$wp_customize->add_control('classic_marketing_agency_footer_widget_areas',array(
		'type'        => 'radio',
		'section' => 'classic_marketing_agency_footer',
		'label'       => __('Footer widget area', 'classic-marketing-agency'),
		'choices' => array(
		   '1'     => __('One', 'classic-marketing-agency'),
		   '2'     => __('Two', 'classic-marketing-agency'),
		   '3'     => __('Three', 'classic-marketing-agency'),
		   '4'     => __('Four', 'classic-marketing-agency')
		),
	));

	$wp_customize->add_setting( 'classic_marketing_agency_footer_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('classic_marketing_agency_footer_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
			<a target='_blank' href='". esc_url(CLASSIC_MARKETING_AGENCY_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'classic_marketing_agency_footer'
	));	
	  
	// Google Fonts
	$wp_customize->add_section( 'classic_marketing_agency_google_fonts_section', array(
		'title'       => __( 'Google Fonts', 'classic-marketing-agency' ),
		'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( 'classic_marketing_agency_headings_fonts', array(
		'sanitize_callback' => 'classic_marketing_agency_sanitize_fonts',
	));
	$wp_customize->add_control( 'classic_marketing_agency_headings_fonts', array(
		'type' => 'select',
		'description' => __('Select your desired font for the headings.', 'classic-marketing-agency'),
		'section' => 'classic_marketing_agency_google_fonts_section',
		'choices' => $font_choices
	));

	$wp_customize->add_setting( 'classic_marketing_agency_body_fonts', array(
		'sanitize_callback' => 'classic_marketing_agency_sanitize_fonts'
	));
	$wp_customize->add_control( 'classic_marketing_agency_body_fonts', array(
		'type' => 'select',
		'description' => __( 'Select your desired font for the body.', 'classic-marketing-agency' ),
		'section' => 'classic_marketing_agency_google_fonts_section',
		'choices' => $font_choices
	));	  

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

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