<?php
/**
 * Mobile Accessories Shop Theme Customizer
 *
 * @package Mobile Accessories Shop
 */

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

	function mobile_accessories_shop_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('mobile-accessories-shop-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('mobile_accessories_shop_logo_enable',array(
		'default' => true,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_logo_enable', array(
		'settings' => 'mobile_accessories_shop_logo_enable',
		'section'   => 'title_tagline',
		'label'     => __('Enable Logo','mobile-accessories-shop'),
		'type'      => 'checkbox'
	));

	//Logo
    $wp_customize->add_setting('mobile_accessories_shop_logo_width', array(
        'default' => 200,
        'transport' => 'refresh',
        'sanitize_callback' => 'mobile_accessories_shop_sanitize_integer'
    ));
    $wp_customize->add_control(new Mobile_Accessories_Shop_Slider_Custom_Control($wp_customize, 'mobile_accessories_shop_logo_width', array(
    	'label'          => __( 'Logo Width', 'mobile-accessories-shop'),
        'section' => 'title_tagline',
        'settings' => 'mobile_accessories_shop_logo_width',
        'input_attrs' => array(
            'step' => 1,
            'min' => 0,
            'max' => 300,
        ),
    )));

	// color site title
	$wp_customize->add_setting('mobile_accessories_shop_sitetitle_color',array(
		'default' => '',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));

	$wp_customize->add_control( 'mobile_accessories_shop_sitetitle_color', array(
	   'settings' => 'mobile_accessories_shop_sitetitle_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Title Color', 'mobile-accessories-shop'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('mobile_accessories_shop_title_enable',array(
		'default' => false,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_title_enable', array(
	   'settings' => 'mobile_accessories_shop_title_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Title','mobile-accessories-shop'),
	   'type'      => 'checkbox'
	));

	// color site tagline
	$wp_customize->add_setting('mobile_accessories_shop_sitetagline_color',array(
		'default' => '',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_sitetagline_color', array(
	   'settings' => 'mobile_accessories_shop_sitetagline_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Tagline Color', 'mobile-accessories-shop'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('mobile_accessories_shop_tagline_enable',array(
		'default' => false,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_tagline_enable', array(
	   'settings' => 'mobile_accessories_shop_tagline_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Tagline','mobile-accessories-shop'),
	   'type'      => 'checkbox'
	));

	// woocommerce section
	$wp_customize->add_section('mobile_accessories_shop_woocommerce_page_settings', array(
		'title'    => __('WooCommerce Page Settings', 'mobile-accessories-shop'),
		'priority' => null,
		'panel'    => 'woocommerce',
	));

	$wp_customize->add_setting('mobile_accessories_shop_shop_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'mobile_accessories_shop_sanitize_checkbox'
	 ));
	 $wp_customize->add_control('mobile_accessories_shop_shop_page_sidebar',array(
		'type' => 'checkbox',
		'label' => __(' Check To Enable Shop page sidebar','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_woocommerce_page_settings',
	 ));

    // shop page sidebar alignment
    $wp_customize->add_setting('mobile_accessories_shop_shop_page_sidebar_position', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices',
	));
	$wp_customize->add_control('mobile_accessories_shop_shop_page_sidebar_position',array(
		'type'           => 'radio',
		'label'          => __('Shop Page Sidebar', 'mobile-accessories-shop'),
		'section'        => 'mobile_accessories_shop_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'mobile-accessories-shop'),
			'Right Sidebar' => __('Right Sidebar', 'mobile-accessories-shop'),
		),
	));	 

	$wp_customize->add_setting('mobile_accessories_shop_wooproducts_nav',array(
		'default' => 'Yes',
		'sanitize_callback'	=> 'mobile_accessories_shop_sanitize_choices'
	 ));
	 $wp_customize->add_control('mobile_accessories_shop_wooproducts_nav',array(
		'type' => 'select',
		'label' => __('Shop Page Products Navigation','mobile-accessories-shop'),
		'choices' => array(
			 'Yes' => __('Yes','mobile-accessories-shop'),
			 'No' => __('No','mobile-accessories-shop'),
		 ),
		'section' => 'mobile_accessories_shop_woocommerce_page_settings',
	 ));

	 $wp_customize->add_setting( 'mobile_accessories_shop_single_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'mobile_accessories_shop_sanitize_checkbox'
    ) );
    $wp_customize->add_control('mobile_accessories_shop_single_page_sidebar',array(
    	'type' => 'checkbox',
       	'label' => __('Check To Enable Single Product Page Sidebar','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_woocommerce_page_settings'
    ));

	// single product page sidebar alignment
    $wp_customize->add_setting('mobile_accessories_shop_single_product_page_layout', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices',
	));
	$wp_customize->add_control('mobile_accessories_shop_single_product_page_layout',array(
		'type'           => 'radio',
		'label'          => __('Single product Page Sidebar', 'mobile-accessories-shop'),
		'section'        => 'mobile_accessories_shop_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'mobile-accessories-shop'),
			'Right Sidebar' => __('Right Sidebar', 'mobile-accessories-shop'),
		),
	));

	$wp_customize->add_setting('mobile_accessories_shop_related_product_enable',array(
		'default' => true,
		'sanitize_callback'	=> 'mobile_accessories_shop_sanitize_checkbox'
	));
	$wp_customize->add_control('mobile_accessories_shop_related_product_enable',array(
		'type' => 'checkbox',
		'label' => __('Check To Enable Related product','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_woocommerce_page_settings',
	));

	$wp_customize->add_setting( 'mobile_accessories_shop_woo_product_img_border_radius', array(
        'default'              => '0',
        'transport'            => 'refresh',
        'sanitize_callback'    => 'mobile_accessories_shop_sanitize_integer'
    ) );
    $wp_customize->add_control(new Mobile_Accessories_Shop_Slider_Custom_Control( $wp_customize, 'mobile_accessories_shop_woo_product_img_border_radius',array(
		'label'	=> esc_html__('Woo Product Img Border Radius','mobile-accessories-shop'),
		'section'=> 'mobile_accessories_shop_woocommerce_page_settings',
		'settings'=>'mobile_accessories_shop_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('mobile_accessories_shop_products_per_row', array(
	    'default'   => '4',
	    'transport' => 'refresh',
	    'sanitize_callback' => 'mobile_accessories_shop_sanitize_integer'  
    ));

   	$wp_customize->add_control('mobile_accessories_shop_products_per_row', array(
	   'label'    => __('Products Per Row', 'mobile-accessories-shop'),
	   'section'  => 'mobile_accessories_shop_woocommerce_page_settings',
	   'settings' => 'mobile_accessories_shop_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('mobile_accessories_shop_products_per_page', array(
		'default'   => '8',
		'transport' => 'refresh',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_integer'
	));

	$wp_customize->add_control('mobile_accessories_shop_products_per_page', array(
		'label'    => __('Products Per Page', 'mobile-accessories-shop'),
		'section'  => 'mobile_accessories_shop_woocommerce_page_settings',
		'settings' => 'mobile_accessories_shop_products_per_page',
		'type'     => 'number',
		'input_attrs' => array(
			'min'  => 1,
			'step' => 1,
		),
	));

	//Theme Options
	$wp_customize->add_panel( 'mobile_accessories_shop_panel_area', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'title' => __( 'Theme Options Panel', 'mobile-accessories-shop' ),
	) );

	//Site Layout Section
	$wp_customize->add_section('mobile_accessories_shop_site_layoutsec',array(
		'title'	=> __('Manage Site Layout Section ','mobile-accessories-shop'),
		'description' => __('<p class="sec-title">Manage Site Layout Section</p>','mobile-accessories-shop'),
		'priority'	=> 1,
		'panel' => 'mobile_accessories_shop_panel_area',
	));

	$wp_customize->add_setting('mobile_accessories_shop_preloader',array(
		'default' => false,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_preloader', array(
	   'section'   => 'mobile_accessories_shop_site_layoutsec',
	   'label'	=> __('Check to Show preloader','mobile-accessories-shop'),
	   'type'      => 'checkbox'
 	));	
    $wp_customize->add_setting('mobile_accessories_shop_cursor_outline',array(
		'default' => false,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_cursor_outline', array(
	   'section'   => 'mobile_accessories_shop_site_layoutsec',
	   'label'	=> __('Check to Show Dot Cursor','mobile-accessories-shop'),
	   'type'      => 'checkbox'
 	));	
	$wp_customize->add_setting('mobile_accessories_shop_box_layout',array(
		'default' => false,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_box_layout', array(
	   'section'   => 'mobile_accessories_shop_site_layoutsec',
	   'label'	=> __('Check to Show Box Layout','mobile-accessories-shop'),
	   'type'      => 'checkbox'
 	));

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

	//Global Color
	$wp_customize->add_section('mobile_accessories_shop_global_color', array(
		'title'    => __('Manage Global Color Section', 'mobile-accessories-shop'),
		'panel'    => 'mobile_accessories_shop_panel_area',
	));

	$wp_customize->add_setting('mobile_accessories_shop_first_color', array(
		'default'           => '#7632A2',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'mobile_accessories_shop_first_color', array(
		'label'    => __('Theme Color One', 'mobile-accessories-shop'),
		'section'  => 'mobile_accessories_shop_global_color',
		'settings' => 'mobile_accessories_shop_first_color',
	)));

	$wp_customize->add_setting('mobile_accessories_shop_second_color', array(
		'default'           => '#486BEF',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'mobile_accessories_shop_second_color', array(
		'label'    => __('Theme Color Two', 'mobile-accessories-shop'),
		'section'  => 'mobile_accessories_shop_global_color',
		'settings' => 'mobile_accessories_shop_second_color',
	)));

	$wp_customize->add_setting('mobile_accessories_shop_third_color', array(
		'default'           => '#5C4CC8',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'mobile_accessories_shop_third_color', array(
		'label'    => __('Theme Color Three', 'mobile-accessories-shop'),
		'section'  => 'mobile_accessories_shop_global_color',
		'settings' => 'mobile_accessories_shop_third_color',
	)));

	$wp_customize->add_setting('mobile_accessories_shop_fourth_color', array(
		'default'           => '#683DB4',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'mobile_accessories_shop_fourth_color', array(
		'label'    => __('Theme Color Four', 'mobile-accessories-shop'),
		'section'  => 'mobile_accessories_shop_global_color',
		'settings' => 'mobile_accessories_shop_fourth_color',
	)));

	$wp_customize->add_setting('mobile_accessories_shop_fifth_color', array(
		'default'           => '#7231A3',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'mobile_accessories_shop_fifth_color', array(
		'label'    => __('Theme Color Five', 'mobile-accessories-shop'),
		'section'  => 'mobile_accessories_shop_global_color',
		'settings' => 'mobile_accessories_shop_fifth_color',
	)));

	$wp_customize->add_setting( 'mobile_accessories_shop_global_color_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mobile_accessories_shop_global_color_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		<a target='_blank' href='". esc_url(MOBILE_ACCESSORIES_SHOP_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'mobile_accessories_shop_global_color'
	));
	
	// Header Section
	$wp_customize->add_section('mobile_accessories_shop_topbar_section',array(
	    'title' => __('Manage Header Section','mobile-accessories-shop'),
	    'description' => __('<p class="sec-title">Manage Header Section</p>', 'mobile-accessories-shop'),
	    'priority'  => null,
	    'panel' => 'mobile_accessories_shop_panel_area',
	));	

	$wp_customize->add_setting('mobile_accessories_shop_enable_topbar',array(
		'default' => false,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_enable_topbar', array(
	   'settings' => 'mobile_accessories_shop_enable_topbar',
	   'section'   => 'mobile_accessories_shop_topbar_section',
	   'label'     => __('Check To Enable This Section','mobile-accessories-shop'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting('mobile_accessories_shop_topbar_text', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('mobile_accessories_shop_topbar_text', array(
	    'settings' => 'mobile_accessories_shop_topbar_text',
	    'section'  => 'mobile_accessories_shop_topbar_section',
	    'label'    => __('Add Topbar Text', 'mobile-accessories-shop'),
	    'type'     => 'text',
	));

 	$wp_customize->add_setting('mobile_accessories_shop_email_address',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_email',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_email_address', array(
	   'settings' => 'mobile_accessories_shop_email_address',
	   'section'   => 'mobile_accessories_shop_topbar_section',
	   'label' => __('Add Email Address', 'mobile-accessories-shop'),
	   'type'      => 'text'
	));

 	$wp_customize->add_setting('mobile_accessories_shop_phone_number',array(
		'default' => '',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_phone_number',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_phone_number', array(
	   'settings' => 'mobile_accessories_shop_phone_number',
	   'section'   => 'mobile_accessories_shop_topbar_section',
	   'label' => __('Add Phone Number', 'mobile-accessories-shop'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('mobile_accessories_shop_stickyheader',array(
		'default' => false,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_stickyheader', array(
	   'section'   => 'mobile_accessories_shop_topbar_section',
	   'label'	=> __('Check To Show Sticky Header','mobile-accessories-shop'),
	   'type'      => 'checkbox'
 	));

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

    $wp_customize->add_control( 'mobile_accessories_shop_menu_text_transform', array(
        'label'    => __( 'Menu Text Transform', 'mobile-accessories-shop' ),
        'section'  => 'mobile_accessories_shop_topbar_section',
        'type'     => 'select',
        'choices'  => array(
			'None'       => __( 'None', 'mobile-accessories-shop' ),
            'Capitalize' => __( 'Capitalize', 'mobile-accessories-shop' ),
            'Uppercase'  => __( 'Uppercase', 'mobile-accessories-shop' ),
            'Lowercase'  => __( 'Lowercase', 'mobile-accessories-shop' ),
        ),
    ));

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

	// Banner Section
	$wp_customize->add_section('mobile_accessories_shop_banner_section',array(
	    'title' => __('Manage Banner Section','mobile-accessories-shop'),
	    'priority'  => null,
	    'description'	=> __('<p class="sec-title">Manage Banner Section</p> Select Page from the Dropdowns for banner, Also use the given image dimension (300 x 300).','mobile-accessories-shop'),
	    'panel' => 'mobile_accessories_shop_panel_area',
	));	

	$wp_customize->add_setting('mobile_accessories_shop_banner',array(
		'default' => false,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_banner', array(
	   'settings' => 'mobile_accessories_shop_banner',
	   'section'   => 'mobile_accessories_shop_banner_section',
	   'label'     => __('Check To Enable This Section','mobile-accessories-shop'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting('mobile_accessories_shop_banner_title', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('mobile_accessories_shop_banner_title', array(
	    'settings' => 'mobile_accessories_shop_banner_title',
	    'section'  => 'mobile_accessories_shop_banner_section',
	    'label'    => __('Add Banner Title', 'mobile-accessories-shop'),
	    'type'     => 'text',
	));
	
	$wp_customize->add_setting('mobile_accessories_shop_banner_description', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('mobile_accessories_shop_banner_description', array(
	    'settings' => 'mobile_accessories_shop_banner_description',
	    'section'  => 'mobile_accessories_shop_banner_section',
	    'label'    => __('Add Banner Text', 'mobile-accessories-shop'),
	    'type'     => 'text',
	));

	$wp_customize->add_setting('mobile_accessories_shop_banner_btn_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_banner_btn_text', array(
	   'settings' => 'mobile_accessories_shop_banner_btn_text',
	   'section'   => 'mobile_accessories_shop_banner_section',
	   'label' => __('Add Button Text', 'mobile-accessories-shop'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('mobile_accessories_shop_banner_btn_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_banner_btn_url', array(
	   'settings' => 'mobile_accessories_shop_banner_btn_url',
	   'section'   => 'mobile_accessories_shop_banner_section',
	   'label' => __('Add Button URL', 'mobile-accessories-shop'),
	   'type'      => 'url'
	));

	$mobile_accessories_shop_args = array(
	    'post_type'      => 'product',
	    'posts_per_page' => -1,
	    'order'          => 'ASC',
	    'orderby'        => 'title',
	);
	$mobile_accessories_shop_products = get_posts($mobile_accessories_shop_args);

	$mobile_accessories_shop_product_posts = array();
	$mobile_accessories_shop_product_posts[''] = 'Select';

	foreach ($mobile_accessories_shop_products as $mobile_accessories_shop_product) {
	    $mobile_accessories_shop_product_posts[$mobile_accessories_shop_product->ID] = $mobile_accessories_shop_product->post_title;
	}

	$wp_customize->add_setting('mobile_accessories_shop_slider_product', array(
	    'default'           => '',
	    'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices',
	));
	$wp_customize->add_control('mobile_accessories_shop_slider_product', array(
	    'type'     => 'select',
	    'choices'  => $mobile_accessories_shop_product_posts,
	    'label'    => __('Select Product', 'mobile-accessories-shop'),
	    'section'  => 'mobile_accessories_shop_banner_section',
	));

	$wp_customize->add_setting('mobile_accessories_shop_banner_side_img',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw',
	));
	$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'mobile_accessories_shop_banner_side_img',array(
	    'label' => __('Select Image','mobile-accessories-shop'),
	    'description'	=> __('Use the given image dimension (500px × 500px).','mobile-accessories-shop'),
	    'section' => 'mobile_accessories_shop_banner_section'
	)));

	$wp_customize->add_setting('mobile_accessories_shop_facebook_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_facebook_url', array(
	   'settings' => 'mobile_accessories_shop_facebook_url',
	   'section'   => 'mobile_accessories_shop_banner_section',
	   'label' => __('Add Facebook URL', 'mobile-accessories-shop'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('mobile_accessories_shop_instagram_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_instagram_url', array(
	   'settings' => 'mobile_accessories_shop_instagram_url',
	   'section'   => 'mobile_accessories_shop_banner_section',
	   'label' => __('Add Instagram URL', 'mobile-accessories-shop'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('mobile_accessories_shop_twitter_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_twitter_url', array(
	   'settings' => 'mobile_accessories_shop_twitter_url',
	   'section'   => 'mobile_accessories_shop_banner_section',
	   'label' => __('Add Twitter URL', 'mobile-accessories-shop'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('mobile_accessories_shop_youtube_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_youtube_url', array(
	   'settings' => 'mobile_accessories_shop_youtube_url',
	   'section'   => 'mobile_accessories_shop_banner_section',
	   'label' => __('Add Youtube URL', 'mobile-accessories-shop'),
	   'type'      => 'url'
	));

	$wp_customize->add_setting('mobile_accessories_shop_pinterest_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_pinterest_url', array(
	   'settings' => 'mobile_accessories_shop_pinterest_url',
	   'section'   => 'mobile_accessories_shop_banner_section',
	   'label' => __('Add Pinterest URL', 'mobile-accessories-shop'),
	   'type'      => 'url'
	));

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

	// Best Seller Section
	$wp_customize->add_section('mobile_accessories_shop_best_seller_section', array(
	    'title'       => __('Manage Best Seller Section', 'mobile-accessories-shop'),
	    'description' => __('<p class="sec-title">Manage Best Seller Section</p>', 'mobile-accessories-shop'),
	    'priority'    => null,
	    'panel'       => 'mobile_accessories_shop_panel_area',
	));

	$wp_customize->add_setting('mobile_accessories_shop_disabled_best_seller_section', array(
	    'default'           => false,
	    'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('mobile_accessories_shop_disabled_best_seller_section', array(
	    'settings' => 'mobile_accessories_shop_disabled_best_seller_section',
	    'section'  => 'mobile_accessories_shop_best_seller_section',
	    'label'    => __('Check To Enable Section', 'mobile-accessories-shop'),
	    'type'     => 'checkbox',
	));

	$wp_customize->add_setting('mobile_accessories_shop_best_seller_title', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('mobile_accessories_shop_best_seller_title', array(
	    'settings' => 'mobile_accessories_shop_best_seller_title',
	    'section'  => 'mobile_accessories_shop_best_seller_section',
	    'label'    => __('Add Section Title', 'mobile-accessories-shop'),
	    'type'     => 'text',
	));

	$wp_customize->add_setting('mobile_accessories_shop_best_seller_text', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field',
	    'capability'        => 'edit_theme_options',
	));
	$wp_customize->add_control('mobile_accessories_shop_best_seller_text', array(
	    'settings' => 'mobile_accessories_shop_best_seller_text',
	    'section'  => 'mobile_accessories_shop_best_seller_section',
	    'label'    => __('Add Section Text', 'mobile-accessories-shop'),
	    'type'     => 'text',
	));

	$mobile_accessories_shop_args = array(
       	'type'                     => 'product',
        'child_of'                 => 0,
        'parent'                   => '',
        'orderby'                  => 'term_group',
        'order'                    => 'ASC',
        'hide_empty'               => false,
        'hierarchical'             => 1,
        'number'                   => '',
        'taxonomy'                 => 'product_cat',
        'pad_counts'               => false
    );
	$mobile_accessories_shop_categories = get_categories($mobile_accessories_shop_args);
	$mobile_accessories_shop_cat_posts = array();
	$mobile_accessories_shop_m = 0;
	$mobile_accessories_shop_cat_posts[]='Select';
	foreach($mobile_accessories_shop_categories as $mobile_accessories_shop_category){
		if($mobile_accessories_shop_m==0){
			$mobile_accessories_shop_default = $mobile_accessories_shop_category->slug;
			$mobile_accessories_shop_m++;
		}
		$mobile_accessories_shop_cat_posts[$mobile_accessories_shop_category->slug] = $mobile_accessories_shop_category->name;
	}

	$wp_customize->add_setting('mobile_accessories_shop_products_cat',array(
		'default'	=> 'select',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices',
	));
	$wp_customize->add_control('mobile_accessories_shop_products_cat',array(
		'type'    => 'select',
		'choices' => $mobile_accessories_shop_cat_posts,
		'label' => __('Select category to display products ','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_best_seller_section',
	));

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

	//Blog post
	$wp_customize->add_section('mobile_accessories_shop_blog_post_settings',array(
        'title' => __('Manage Post Section', 'mobile-accessories-shop'),
        'priority' => null,
        'panel' => 'mobile_accessories_shop_panel_area'
    ) );

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

	$wp_customize->add_control(
		new Mobile_Accessories_Shop_Image_Radio_Control(
			$wp_customize,
			'mobile_accessories_shop_blog_layout_option_setting',
			array(
				'label'   => __( 'Post Layouts', 'mobile-accessories-shop' ),
				'section' => 'mobile_accessories_shop_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('mobile_accessories_shop_metafields_date', array(
	    'default' => true,
	    'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control('mobile_accessories_shop_metafields_date', array(
	    'settings' => 'mobile_accessories_shop_metafields_date', 
	    'section'   => 'mobile_accessories_shop_blog_post_settings',
	    'label'     => __('Check to Enable Date', 'mobile-accessories-shop'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('mobile_accessories_shop_metafields_comments', array(
		'default' => true,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));	
	$wp_customize->add_control('mobile_accessories_shop_metafields_comments', array(
		'settings' => 'mobile_accessories_shop_metafields_comments',
		'section'  => 'mobile_accessories_shop_blog_post_settings',
		'label'    => __('Check to Enable Comments', 'mobile-accessories-shop'),
		'type'     => 'checkbox',
	));

	$wp_customize->add_setting('mobile_accessories_shop_metafields_author', array(
		'default' => true,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control('mobile_accessories_shop_metafields_author', array(
		'settings' => 'mobile_accessories_shop_metafields_author',
		'section'  => 'mobile_accessories_shop_blog_post_settings',
		'label'    => __('Check to Enable Author', 'mobile-accessories-shop'),
		'type'     => 'checkbox',
	));		

	$wp_customize->add_setting('mobile_accessories_shop_metafields_time', array(
		'default' => true,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control('mobile_accessories_shop_metafields_time', array(
		'settings' => 'mobile_accessories_shop_metafields_time',
		'section'  => 'mobile_accessories_shop_blog_post_settings',
		'label'    => __('Check to Enable Time', 'mobile-accessories-shop'),
		'type'     => 'checkbox',
	));	

	$wp_customize->add_setting('mobile_accessories_shop_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('mobile_accessories_shop_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','mobile-accessories-shop'),
		'description' => __('Ex: "/", "|", "-", ...','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_blog_post_settings'
	)); 

    // Add Settings and Controls for Post Layout
	$wp_customize->add_setting('mobile_accessories_shop_sidebar_post_layout',array(
		'default' => 'right',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices'
	));
	$wp_customize->add_control('mobile_accessories_shop_sidebar_post_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Post Sidebar Position', 'mobile-accessories-shop'),
		'description'   => __('This option work for blog page, archive page and search page.', 'mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_blog_post_settings',
		'choices' => array(
			'full' => __('Full','mobile-accessories-shop'),
			'left' => __('Left','mobile-accessories-shop'),
			'right' => __('Right','mobile-accessories-shop'),
			'three-column' => __('Three Columns','mobile-accessories-shop'),
			'four-column' => __('Four Columns','mobile-accessories-shop'),
			'grid' => __('Grid Layout','mobile-accessories-shop')
     ),
	) );

	$wp_customize->add_setting('mobile_accessories_shop_blog_post_description_option',array(
    	'default'   => 'Excerpt Content', 
        'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices'
	));
	$wp_customize->add_control('mobile_accessories_shop_blog_post_description_option',array(
        'type' => 'radio',
        'label' => __('Post Description Length','mobile-accessories-shop'),
        'section' => 'mobile_accessories_shop_blog_post_settings',
        'choices' => array(
            'No Content' => __('No Content','mobile-accessories-shop'),
            'Excerpt Content' => __('Excerpt Content','mobile-accessories-shop'),
            'Full Content' => __('Full Content','mobile-accessories-shop'),
        ),
	) );

	$wp_customize->add_setting('mobile_accessories_shop_blog_post_thumb',array(
        'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
        'default'           => 1,
    ));
    $wp_customize->add_control('mobile_accessories_shop_blog_post_thumb',array(
        'type'        => 'checkbox',
        'label'       => esc_html__('Show / Hide Blog Post Thumbnail', 'mobile-accessories-shop'),
        'section'     => 'mobile_accessories_shop_blog_post_settings',
    ));

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

	//Single Post Settings
	$wp_customize->add_section('mobile_accessories_shop_single_post_settings',array(
		'title' => __('Manage Single Post Section', 'mobile-accessories-shop'),
		'priority' => null,
		'panel' => 'mobile_accessories_shop_panel_area'
	));

	$wp_customize->add_setting('mobile_accessories_shop_single_post_date',array(
		'default' => true,
		'sanitize_callback'	=> 'mobile_accessories_shop_sanitize_checkbox'
	));
	$wp_customize->add_control('mobile_accessories_shop_single_post_date',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Date ','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_single_post_settings'
	));	

	$wp_customize->add_setting('mobile_accessories_shop_single_post_author',array(
		'default' => true,
		'sanitize_callback'	=> 'mobile_accessories_shop_sanitize_checkbox'
	));
	$wp_customize->add_control('mobile_accessories_shop_single_post_author',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Author','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_single_post_settings'
	));

	$wp_customize->add_setting('mobile_accessories_shop_single_post_comment',array(
		'default' => true,
		'sanitize_callback'	=> 'mobile_accessories_shop_sanitize_checkbox'
	));
	$wp_customize->add_control('mobile_accessories_shop_single_post_comment',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Comments','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_single_post_settings'
	));	

	$wp_customize->add_setting('mobile_accessories_shop_single_post_time',array(
		'default' => true,
		'sanitize_callback'	=> 'mobile_accessories_shop_sanitize_checkbox'
	));
	$wp_customize->add_control('mobile_accessories_shop_single_post_time',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Time','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_single_post_settings'
	));	

	$wp_customize->add_setting('mobile_accessories_shop_single_post_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('mobile_accessories_shop_single_post_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','mobile-accessories-shop'),
		'description' => __('Ex: "/", "|", "-", ...','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_single_post_settings'
	)); 

	$wp_customize->add_setting('mobile_accessories_shop_sidebar_single_post_layout',array(
    	'default' => 'right',
    	 'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices'
	));
	$wp_customize->add_control('mobile_accessories_shop_sidebar_single_post_layout',array(
   		'type' => 'radio',
    	'label'     => __('Single post sidebar layout', 'mobile-accessories-shop'),
     	'section' => 'mobile_accessories_shop_single_post_settings',
     	'choices' => array(
			'full' => __('Full','mobile-accessories-shop'),
			'left' => __('Left','mobile-accessories-shop'),
			'right' => __('Right','mobile-accessories-shop'),
     ),
	));

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

	//Page Settings
	$wp_customize->add_section('mobile_accessories_shop_page_settings',array(
		'title' => __('Manage Page Section', 'mobile-accessories-shop'),
		'priority' => null,
		'panel' => 'mobile_accessories_shop_panel_area'
	));

	// Add Settings and Controls for Page Layout
	$wp_customize->add_setting('mobile_accessories_shop_sidebar_page_layout',array(
		'default' => 'full',
			'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices'
	));
	$wp_customize->add_control('mobile_accessories_shop_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_page_settings',
		'choices' => array(
			'left' => __('Left','mobile-accessories-shop'),
			'right' => __('Right','mobile-accessories-shop'),
			'full' => __('No Sidebar','mobile-accessories-shop')
		),
	));	

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

	// 404 Page Settings
	$wp_customize->add_section('mobile_accessories_shop_page_not_found', array(
		'title'	=> __('Manage 404 Page Section','mobile-accessories-shop'),
		'priority'	=> null,
		'panel' => 'mobile_accessories_shop_panel_area',
	));
	
	$wp_customize->add_setting('mobile_accessories_shop_page_not_found_heading',array(
		'default'=> __('404 Not Found','mobile-accessories-shop'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('mobile_accessories_shop_page_not_found_heading',array(
		'label'	=> __('404 Heading','mobile-accessories-shop'),
		'section'=> 'mobile_accessories_shop_page_not_found',
		'type'=> 'text'
	));

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

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

	$wp_customize->add_setting('mobile_accessories_shop_page_not_found_btn',array(
		'default' => 'Homepage',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_page_not_found_btn', array(
	   'settings' => 'mobile_accessories_shop_page_not_found_btn',
	   'section'   => 'mobile_accessories_shop_page_not_found',
	   'label' => __('404 Button', 'mobile-accessories-shop'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting( 'mobile_accessories_shop_page_not_found_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mobile_accessories_shop_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(MOBILE_ACCESSORIES_SHOP_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'mobile_accessories_shop_page_not_found'
	));

	// No Results Page Settings
	$wp_customize->add_section('mobile_accessories_shop_no_results_found', array(
		'title'	=> __('Manage No Results Page Section','mobile-accessories-shop'),
		'priority'	=> null,
		'panel' => 'mobile_accessories_shop_panel_area',
	));
	
	$wp_customize->add_setting('mobile_accessories_shop_page_nothing_found_heading',array(
		'default'=> __('Nothing Found','mobile-accessories-shop'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('mobile_accessories_shop_page_nothing_found_heading',array(
		'label'	=> __('Add Title','mobile-accessories-shop'),
		'section'=> 'mobile_accessories_shop_no_results_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('mobile_accessories_shop_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('mobile_accessories_shop_nothing_found_content',array(
		'label'	=> __('Add Text','mobile-accessories-shop'),
		'section'=> 'mobile_accessories_shop_no_results_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('mobile_accessories_shop_nothing_found_search',array(
		'default' => true,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_nothing_found_search', array(
	   'settings' => 'mobile_accessories_shop_nothing_found_search',
	   'section'   => 'mobile_accessories_shop_no_results_found',
	   'label'     => __('Check To Enable Search','mobile-accessories-shop'),
	   'type'      => 'checkbox'
	));

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

	// Animation Section
	$wp_customize->add_section('mobile_accessories_shop_animation', array(
		'title'	=> __('Manage Animation Section','mobile-accessories-shop'),
		'description'	=> __('<p class="sec-title">Manage Animation Section</p>','mobile-accessories-shop'),
		'priority'	=> null,
		'panel' => 'mobile_accessories_shop_panel_area',
	));

	$wp_customize->add_setting('mobile_accessories_shop_animation_enabled',array(
		'default' => true,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_animation_enabled', array(
	   'settings' => 'mobile_accessories_shop_animation_enabled',
	   'section'   => 'mobile_accessories_shop_animation',
	   'label'     => __('Check To Enable Animation','mobile-accessories-shop'),
	   'type'      => 'checkbox'
	));

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

	// Footer Section
	$wp_customize->add_section('mobile_accessories_shop_footer', array(
		'title'	=> __('Manage Footer Section','mobile-accessories-shop'),
		'description'	=> __('<p class="sec-title">Manage Footer Section</p>','mobile-accessories-shop'),
		'priority'	=> null,
		'panel' => 'mobile_accessories_shop_panel_area',
	));

	$wp_customize->add_setting('mobile_accessories_shop_footer_widget', array(
	    'default' => true,
	    'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control('mobile_accessories_shop_footer_widget', array(
	    'settings' => 'mobile_accessories_shop_footer_widget',
	    'section'   => 'mobile_accessories_shop_footer',
	    'label'     => __('Check to Enable Footer Widget', 'mobile-accessories-shop'),
	    'type'      => 'checkbox',
	));

	//  footer bg color
	$wp_customize->add_setting('mobile_accessories_shop_footerbg_color',array(
		'default' => '',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_footerbg_color', array(
		'settings' => 'mobile_accessories_shop_footerbg_color',
		'section'   => 'mobile_accessories_shop_footer',
		'label' => __('Footer Background Color', 'mobile-accessories-shop'),
		'type'      => 'color'
	));

	$wp_customize->add_setting('mobile_accessories_shop_footer_bg_image',array(
        'default'   => '',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'mobile_accessories_shop_footer_bg_image',array(
        'label' => __('Footer Background Image','mobile-accessories-shop'),
        'section' => 'mobile_accessories_shop_footer',
    )));

	$wp_customize->add_setting('mobile_accessories_shop_footer_img_position',array(
		'default' => 'center center',
		'transport' => 'refresh',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices'
	));
	$wp_customize->add_control('mobile_accessories_shop_footer_img_position',array(
		'type' => 'select',
		'label' => __('Footer Image Position','mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_footer',
		'choices' 	=> array(
			'center center'   => esc_html__( 'Center', 'mobile-accessories-shop' ),
			'center top'   => esc_html__( 'Top', 'mobile-accessories-shop' ),
			'left center'   => esc_html__( 'Left', 'mobile-accessories-shop' ),
			'right center'   => esc_html__( 'Right', 'mobile-accessories-shop' ),
			'center bottom'   => esc_html__( 'Bottom', 'mobile-accessories-shop' ),
		),
	));	

	$wp_customize->add_setting('mobile_accessories_shop_footer_widget_areas',array(
		'default'           => 4,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices',
	));
	$wp_customize->add_control('mobile_accessories_shop_footer_widget_areas',array(
		'type'        => 'radio',
		'section' => 'mobile_accessories_shop_footer',
		'label'       => __('Footer widget area', 'mobile-accessories-shop'),
		'choices' => array(
		   '1'     => __('One', 'mobile-accessories-shop'),
		   '2'     => __('Two', 'mobile-accessories-shop'),
		   '3'     => __('Three', 'mobile-accessories-shop'),
		   '4'     => __('Four', 'mobile-accessories-shop')
		),
	));

	$wp_customize->add_setting('mobile_accessories_shop_copyright_line',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_copyright_line', array(
	   'section' 	=> 'mobile_accessories_shop_footer',
	   'label'	 	=> __('Copyright Line','mobile-accessories-shop'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	$wp_customize->add_setting('mobile_accessories_shop_copyright_link',array(
    	'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_copyright_link', array(
	   'section' 	=> 'mobile_accessories_shop_footer',
	   'label'	 	=> __('Copyright Link','mobile-accessories-shop'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	//  footer coypright color
	$wp_customize->add_setting('mobile_accessories_shop_footercoypright_color',array(
		'default' => '',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_footercoypright_color', array(
	   'settings' => 'mobile_accessories_shop_footercoypright_color',
	   'section'   => 'mobile_accessories_shop_footer',
	   'label' => __('Coypright Color', 'mobile-accessories-shop'),
	   'type'      => 'color'
	));

	//  footer title color
	$wp_customize->add_setting('mobile_accessories_shop_footertitle_color',array(
		'default' => '',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_footertitle_color', array(
	   'settings' => 'mobile_accessories_shop_footertitle_color',
	   'section'   => 'mobile_accessories_shop_footer',
	   'label' => __('Title Color', 'mobile-accessories-shop'),
	   'type'      => 'color'
	));

	//  footer description color
	$wp_customize->add_setting('mobile_accessories_shop_footerdescription_color',array(
		'default' => '',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_footerdescription_color', array(
	   'settings' => 'mobile_accessories_shop_footerdescription_color',
	   'section'   => 'mobile_accessories_shop_footer',
	   'label' => __('Description Color', 'mobile-accessories-shop'),
	   'type'      => 'color'
	));

	//  footer list color
	$wp_customize->add_setting('mobile_accessories_shop_footerlist_color',array(
		'default' => '',
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_footerlist_color', array(
	   'settings' => 'mobile_accessories_shop_footerlist_color',
	   'section'   => 'mobile_accessories_shop_footer',
	   'label' => __('List Color', 'mobile-accessories-shop'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('mobile_accessories_shop_scroll_hide', array(
        'default' => true,
        'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox'
    ));
    $wp_customize->add_control( new WP_Customize_Control($wp_customize,'mobile_accessories_shop_scroll_hide',array(
        'label'          => __( 'Check To Show Scroll To Top', 'mobile-accessories-shop' ),
        'section'        => 'mobile_accessories_shop_footer',
        'settings'       => 'mobile_accessories_shop_scroll_hide',
        'type'           => 'checkbox',
    )));

	$wp_customize->add_setting('mobile_accessories_shop_scroll_position',array(
        'default' => 'Right',
        'sanitize_callback' => 'mobile_accessories_shop_sanitize_choices'
    ));
    $wp_customize->add_control('mobile_accessories_shop_scroll_position',array(
        'type' => 'radio',
        'section' => 'mobile_accessories_shop_footer',
        'label'	 	=> __('Scroll To Top Positions','mobile-accessories-shop'),
        'choices' => array(
            'Right' => __('Right','mobile-accessories-shop'),
            'Left' => __('Left','mobile-accessories-shop'),
            'Center' => __('Center','mobile-accessories-shop')
        ),
    ) );

	$wp_customize->add_setting('mobile_accessories_shop_scroll_text',array(
		'default'	=> __('TOP','mobile-accessories-shop'),
		'sanitize_callback'	=> 'sanitize_text_field',
	));	
	$wp_customize->add_control('mobile_accessories_shop_scroll_text',array(
		'label'	=> __('Scroll To Top Button Text','mobile-accessories-shop'),
		'section'	=> 'mobile_accessories_shop_footer',
		'type'		=> 'text'
	));

	$wp_customize->add_setting( 'mobile_accessories_shop_scroll_top_shape', array(
		'default'           => 'circle',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	
	$wp_customize->add_control( 'mobile_accessories_shop_scroll_top_shape', array(
		'label'    => __( 'Scroll to Top Button Shape', 'mobile-accessories-shop' ),
		'section'  => 'mobile_accessories_shop_footer',
		'settings' => 'mobile_accessories_shop_scroll_top_shape',
		'type'     => 'radio',
		'choices'  => array(
			'box'        => __( 'Box', 'mobile-accessories-shop' ),
			'curved' => __( 'Curved', 'mobile-accessories-shop'),
			'circle'     => __( 'Circle', 'mobile-accessories-shop' ),
		),
	) );

	// Progress Bar
	$wp_customize->add_setting('mobile_accessories_shop_progress_bar', array(
		'default' => false,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));

	$wp_customize->add_control(
		new WP_Customize_Control(
			$wp_customize,
			'mobile_accessories_shop_progress_bar',
			array(
				'label' => __('Check To Show Progress Bar', 'mobile-accessories-shop'),
				'section' => 'mobile_accessories_shop_footer',
				'settings' => 'mobile_accessories_shop_progress_bar',
				'type' => 'checkbox',
			)
		)
	);
    
	// Sticky Copyright Enable / Disable
	$wp_customize->add_setting('mobile_accessories_shop_sticky_copyright_enable',array(
		'default' => false,
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_checkbox',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_sticky_copyright_enable', array(
	   'section'   => 'mobile_accessories_shop_footer',
	   'label'	=> __('Check To Show Sticky Copyright','mobile-accessories-shop'),
	   'type'      => 'checkbox'
 	));

	$wp_customize->add_setting( 'mobile_accessories_shop_footer_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('mobile_accessories_shop_footer_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		<a target='_blank' href='". esc_url(MOBILE_ACCESSORIES_SHOP_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'mobile_accessories_shop_footer'
	));
    
	// Footer Social Section
	$wp_customize->add_section('mobile_accessories_shop_footer_social_icons', array(
		'title'	=> __('Manage Footer Social Section','mobile-accessories-shop'),
		'description'	=> __('<p class="sec-title">Manage Footer Social Section</p>','mobile-accessories-shop'),
		'priority'	=> null,
		'panel' => 'mobile_accessories_shop_panel_area',
	));

	$wp_customize->add_setting('mobile_accessories_shop_footer_facebook_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_footer_facebook_link', array(
		'settings' => 'mobile_accessories_shop_footer_facebook_link',
		'section'   => 'mobile_accessories_shop_footer_social_icons',
		'label' => __('Facebook Link', 'mobile-accessories-shop'),
		'type'      => 'url'
	));

	$wp_customize->add_setting('mobile_accessories_shop_footer_instagram_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_footer_instagram_link', array(
		'settings' => 'mobile_accessories_shop_footer_instagram_link',
		'section'   => 'mobile_accessories_shop_footer_social_icons',
		'label' => __('Instagram Link', 'mobile-accessories-shop'),
		'type'      => 'url'
	));

	$wp_customize->add_setting('mobile_accessories_shop_footer_twitter_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_footer_twitter_link', array(
		'settings' => 'mobile_accessories_shop_footer_twitter_link',
		'section'   => 'mobile_accessories_shop_footer_social_icons',
		'label' => __('Twitter Link', 'mobile-accessories-shop'),
		'type'      => 'url'
	));

	$wp_customize->add_setting('mobile_accessories_shop_footer_youtube_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_footer_youtube_link', array(
		'settings' => 'mobile_accessories_shop_footer_youtube_link',
		'section'   => 'mobile_accessories_shop_footer_social_icons',
		'label' => __('Youtube Link', 'mobile-accessories-shop'),
		'type'      => 'url'
	));

	$wp_customize->add_setting('mobile_accessories_shop_footer_pinterest_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_footer_pinterest_link', array(
		'settings' => 'mobile_accessories_shop_footer_pinterest_link',
		'section'   => 'mobile_accessories_shop_footer_social_icons',
		'label' => __('Pinterest Link', 'mobile-accessories-shop'),
		'type'      => 'url'
	));

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

	// Google Fonts
	$wp_customize->add_section( 'mobile_accessories_shop_google_fonts_section', array(
		'title'       => __( 'Google Fonts', 'mobile-accessories-shop' ),
		'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( 'mobile_accessories_shop_headings_fonts', array(
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_fonts',
	));
	$wp_customize->add_control( 'mobile_accessories_shop_headings_fonts', array(
		'type' => 'select',
		'description' => __('Select your desired font for the headings.', 'mobile-accessories-shop'),
		'section' => 'mobile_accessories_shop_google_fonts_section',
		'choices' => $font_choices
	));

	$wp_customize->add_setting( 'mobile_accessories_shop_body_fonts', array(
		'sanitize_callback' => 'mobile_accessories_shop_sanitize_fonts'
	));
	$wp_customize->add_control( 'mobile_accessories_shop_body_fonts', array(
		'type' => 'select',
		'description' => __( 'Select your desired font for the body.', 'mobile-accessories-shop' ),
		'section' => 'mobile_accessories_shop_google_fonts_section',
		'choices' => $font_choices
	));
  
}
add_action( 'customize_register', 'mobile_accessories_shop_customize_register' );

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