<?php
/**
 * TS Photography Theme Customizer
 *
 * @package ts-photography
 */

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

function ts_photography_customize_register( $wp_customize ) {	

	load_template( trailingslashit( get_template_directory() ) . '/inc/icon-changer.php' );

	//Selective Refresh
	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.ts-photography-logo .site-title a',
	 	'render_callback' => 'ts_photography_customize_partial_blogname',
	));

	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => 'p.site-description',
		'render_callback' => 'ts_photography_customize_partial_blogdescription',
	));

	//add home page setting pannel
	$wp_customize->add_panel( 'ts_photography_panel_id', array(
	    'priority' => 12,
	    'capability' => 'edit_theme_options',
	    'theme_supports' => '',
	    'title' => __( 'Theme Settings', 'ts-photography' ),
	    'description' => __( 'Description of what this panel does.', 'ts-photography' ),
	) );

	$ts_photography_font_array = array(
        '' => 'No Fonts',
        'Abril Fatface' => 'Abril Fatface',
        'Acme' => 'Acme',
        'Anton' => 'Anton',
        'Architects Daughter' => 'Architects Daughter',
        'Arimo' => 'Arimo',
        'Arsenal' => 'Arsenal', 
        'Arvo' => 'Arvo',
        'Alegreya' => 'Alegreya',
        'Alfa Slab One' => 'Alfa Slab One',
        'Averia Serif Libre' => 'Averia Serif Libre',
        'Bangers' => 'Bangers', 
        'Boogaloo' => 'Boogaloo',
        'Bad Script' => 'Bad Script',
        'Bitter' => 'Bitter',
        'Bree Serif' => 'Bree Serif',
        'BenchNine' => 'BenchNine', 
        'Cabin' => 'Cabin', 
        'Cardo' => 'Cardo',
        'Courgette' => 'Courgette',
        'Coming Soon' => 'Coming Soon',
        'Cherry Swash' => 'Cherry Swash',
        'Cormorant Garamond' => 'Cormorant Garamond',
        'Crimson Text' => 'Crimson Text',
        'Cuprum' => 'Cuprum', 
        'Cookie' => 'Cookie', 
        'Chewy' => 'Chewy', 
        'Days One' => 'Days One', 
        'Dosis' => 'Dosis',
        'Droid Sans' => 'Droid Sans',
        'Economica' => 'Economica',
        'Fredoka One' => 'Fredoka One',
        'Fjalla One' => 'Fjalla One',
        'Francois One' => 'Francois One',
        'Frank Ruhl Libre' => 'Frank Ruhl Libre',
        'Gloria Hallelujah' => 'Gloria Hallelujah',
        'Great Vibes' => 'Great Vibes',
        'Handlee' => 'Handlee', 
        'Hammersmith One' => 'Hammersmith One',
        'Inconsolata' => 'Inconsolata', 
        'Indie Flower' => 'Indie Flower', 
        'IM Fell English SC' => 'IM Fell English SC', 
        'Julius Sans One' => 'Julius Sans One',
        'Josefin Slab' => 'Josefin Slab', 
        'Josefin Sans' => 'Josefin Sans', 
        'Kanit' => 'Kanit', 
        'Lobster' => 'Lobster', 
        'Lato' => 'Lato',
        'Lora' => 'Lora', 
        'Libre Baskerville' =>'Libre Baskerville',
        'Lobster Two' => 'Lobster Two',
        'Merriweather' =>'Merriweather', 
        'Monda' => 'Monda',
        'Montserrat' => 'Montserrat',
        'Muli' => 'Muli', 
        'Marck Script' => 'Marck Script',
        'Noto Serif' => 'Noto Serif',
        'Noto Sans' => 'Noto Sans',
        'Open Sans' => 'Open Sans', 
        'Overpass' => 'Overpass',
        'Overpass Mono' => 'Overpass Mono',
        'Oxygen' => 'Oxygen', 
        'Orbitron' => 'Orbitron', 
        'Patua One' => 'Patua One', 
        'Pacifico' => 'Pacifico',
        'Padauk' => 'Padauk', 
        'Playball' => 'Playball',
        'Playfair Display' => 'Playfair Display', 
        'PT Sans' => 'PT Sans',
        'Philosopher' => 'Philosopher',
        'Permanent Marker' => 'Permanent Marker',
        'Poiret One' => 'Poiret One', 
        'Poppins' => 'Poppins',
        'Quicksand' => 'Quicksand', 
        'Quattrocento Sans' => 'Quattrocento Sans', 
        'Raleway' => 'Raleway', 
        'Rubik' => 'Rubik', 
        'Rokkitt' => 'Rokkitt', 
        'Roboto' => 'Roboto',
        'Roboto Condensed' => 'Roboto Condensed',
        'Russo One' => 'Russo One', 
        'Righteous' => 'Righteous', 
        'Slabo' => 'Slabo', 
        'Satisfy' => 'Satisfy',
        'Source Sans Pro' => 'Source Sans Pro', 
        'Shadows Into Light Two' =>'Shadows Into Light Two', 
        'Shadows Into Light' => 'Shadows Into Light', 
        'Sacramento' => 'Sacramento', 
        'Shrikhand' => 'Shrikhand', 
        'Tangerine' => 'Tangerine',
        'Unica One' => 'Unica One',
        'Ubuntu' => 'Ubuntu', 
        'VT323' => 'VT323', 
        'Varela Round' => 'Varela Round', 
        'Vampiro One' => 'Vampiro One',
        'Vollkorn' => 'Vollkorn',
        'Volkhov' => 'Volkhov', 
        'Yanone Kaffeesatz' => 'Yanone Kaffeesatz'
    );

	//Typography
	$wp_customize->add_section( 'ts_photography_typography', array(
    	'title'      => __( 'Typography', 'ts-photography' ),
		'priority'   => 30,
		'panel' => 'ts_photography_panel_id'
	) );

	$wp_customize->add_setting('ts_photography_typography_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_typography_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_typography'
	));
	
	// This is Paragraph Color picker setting
	$wp_customize->add_setting( 'ts_photography_paragraph_color', array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_paragraph_color', array(
		'label' => __('Paragraph Color', 'ts-photography'),
		'section' => 'ts_photography_typography',
		'settings' => 'ts_photography_paragraph_color',
	)));

	//This is Paragraph FontFamily picker setting
	$wp_customize->add_setting('ts_photography_paragraph_font_family',array(
	  'default' => '',
	  'capability' => 'edit_theme_options',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_paragraph_font_family', array(
	    'section'  => 'ts_photography_typography',
	    'label'    => __( 'Paragraph Fonts','ts-photography'),
	    'type'     => 'select',
	    'choices'  => $ts_photography_font_array,
	));

	$wp_customize->add_setting('ts_photography_paragraph_font_size',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('ts_photography_paragraph_font_size',array(
		'label'	=> __('Paragraph Font Size','ts-photography'),
		'section'	=> 'ts_photography_typography',
		'setting'	=> 'ts_photography_paragraph_font_size',
		'type'	=> 'text'
	));

	// This is "a" Tag Color picker setting
	$wp_customize->add_setting( 'ts_photography_atag_color', array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_atag_color', array(
		'label' => __('"a" Tag Color', 'ts-photography'),
		'section' => 'ts_photography_typography',
		'settings' => 'ts_photography_atag_color',
	)));

	//This is "a" Tag FontFamily picker setting
	$wp_customize->add_setting('ts_photography_atag_font_family',array(
	  'default' => '',
	  'capability' => 'edit_theme_options',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_atag_font_family', array(
	    'section'  => 'ts_photography_typography',
	    'label'    => __( '"a" Tag Fonts','ts-photography'),
	    'type'     => 'select',
	    'choices'  => $ts_photography_font_array,
	));

	// This is "a" Tag Color picker setting
	$wp_customize->add_setting( 'ts_photography_li_color', array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_li_color', array(
		'label' => __('"li" Tag Color', 'ts-photography'),
		'section' => 'ts_photography_typography',
		'settings' => 'ts_photography_li_color',
	)));

	//This is "li" Tag FontFamily picker setting
	$wp_customize->add_setting('ts_photography_li_font_family',array(
	  'default' => '',
	  'capability' => 'edit_theme_options',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control(
	    'ts_photography_li_font_family', array(
	    'section'  => 'ts_photography_typography',
	    'label'    => __( '"li" Tag Fonts','ts-photography'),
	    'type'     => 'select',
	    'choices'  => $ts_photography_font_array,
	));

	// This is H1 Color picker setting
	$wp_customize->add_setting( 'ts_photography_h1_color', array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_h1_color', array(
		'label' => __('H1 Color', 'ts-photography'),
		'section' => 'ts_photography_typography',
		'settings' => 'ts_photography_h1_color',
	)));

	//This is H1 FontFamily picker setting
	$wp_customize->add_setting('ts_photography_h1_font_family',array(
	  'default' => '',
	  'capability' => 'edit_theme_options',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_h1_font_family', array(
	    'section'  => 'ts_photography_typography',
	    'label'    => __( 'H1 Fonts','ts-photography'),
	    'type'     => 'select',
	    'choices'  => $ts_photography_font_array,
	));

	//This is H1 FontSize setting
	$wp_customize->add_setting('ts_photography_h1_font_size',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_h1_font_size',array(
		'label'	=> __('H1 Font Size','ts-photography'),
		'section'	=> 'ts_photography_typography',
		'setting'	=> 'ts_photography_h1_font_size',
		'type'	=> 'text'
	));

	// This is H2 Color picker setting
	$wp_customize->add_setting( 'ts_photography_h2_color', array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_h2_color', array(
		'label' => __('h2 Color', 'ts-photography'),
		'section' => 'ts_photography_typography',
		'settings' => 'ts_photography_h2_color',
	)));

	//This is H2 FontFamily picker setting
	$wp_customize->add_setting('ts_photography_h2_font_family',array(
	  'default' => '',
	  'capability' => 'edit_theme_options',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_h2_font_family', array(
	    'section'  => 'ts_photography_typography',
	    'label'    => __( 'h2 Fonts','ts-photography'),
	    'type'     => 'select',
	    'choices'  => $ts_photography_font_array,
	));

	//This is H2 FontSize setting
	$wp_customize->add_setting('ts_photography_h2_font_size',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('ts_photography_h2_font_size',array(
		'label'	=> __('h2 Font Size','ts-photography'),
		'section'	=> 'ts_photography_typography',
		'setting'	=> 'ts_photography_h2_font_size',
		'type'	=> 'text'
	));

	// This is H3 Color picker setting
	$wp_customize->add_setting( 'ts_photography_h3_color', array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_h3_color', array(
		'label' => __('h3 Color', 'ts-photography'),
		'section' => 'ts_photography_typography',
		'settings' => 'ts_photography_h3_color',
	)));

	//This is H3 FontFamily picker setting
	$wp_customize->add_setting('ts_photography_h3_font_family',array(
	  'default' => '',
	  'capability' => 'edit_theme_options',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_h3_font_family', array(
	    'section'  => 'ts_photography_typography',
	    'label'    => __( 'h3 Fonts','ts-photography'),
	    'type'     => 'select',
	    'choices'  => $ts_photography_font_array,
	));

	//This is H3 FontSize setting
	$wp_customize->add_setting('ts_photography_h3_font_size',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('ts_photography_h3_font_size',array(
		'label'	=> __('h3 Font Size','ts-photography'),
		'section'	=> 'ts_photography_typography',
		'setting'	=> 'ts_photography_h3_font_size',
		'type'	=> 'text'
	));

	// This is H4 Color picker setting
	$wp_customize->add_setting( 'ts_photography_h4_color', array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_h4_color', array(
		'label' => __('h4 Color', 'ts-photography'),
		'section' => 'ts_photography_typography',
		'settings' => 'ts_photography_h4_color',
	)));

	//This is H4 FontFamily picker setting
	$wp_customize->add_setting('ts_photography_h4_font_family',array(
	  'default' => '',
	  'capability' => 'edit_theme_options',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_h4_font_family', array(
	    'section'  => 'ts_photography_typography',
	    'label'    => __( 'h4 Fonts','ts-photography'),
	    'type'     => 'select',
	    'choices'  => $ts_photography_font_array,
	));

	//This is H4 FontSize setting
	$wp_customize->add_setting('ts_photography_h4_font_size',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('ts_photography_h4_font_size',array(
		'label'	=> __('h4 Font Size','ts-photography'),
		'section'	=> 'ts_photography_typography',
		'setting'	=> 'ts_photography_h4_font_size',
		'type'	=> 'text'
	));

	// This is H5 Color picker setting
	$wp_customize->add_setting( 'ts_photography_h5_color', array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_h5_color', array(
		'label' => __('h5 Color', 'ts-photography'),
		'section' => 'ts_photography_typography',
		'settings' => 'ts_photography_h5_color',
	)));

	//This is H5 FontFamily picker setting
	$wp_customize->add_setting('ts_photography_h5_font_family',array(
	  'default' => '',
	  'capability' => 'edit_theme_options',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_h5_font_family', array(
	    'section'  => 'ts_photography_typography',
	    'label'    => __( 'h5 Fonts','ts-photography'),
	    'type'     => 'select',
	    'choices'  => $ts_photography_font_array,
	));

	//This is H5 FontSize setting
	$wp_customize->add_setting('ts_photography_h5_font_size',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('ts_photography_h5_font_size',array(
		'label'	=> __('h5 Font Size','ts-photography'),
		'section'	=> 'ts_photography_typography',
		'setting'	=> 'ts_photography_h5_font_size',
		'type'	=> 'text'
	));

	// This is H6 Color picker setting
	$wp_customize->add_setting( 'ts_photography_h6_color', array(
		'default' => '',
		'sanitize_callback'	=> 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_h6_color', array(
		'label' => __('h6 Color', 'ts-photography'),
		'section' => 'ts_photography_typography',
		'settings' => 'ts_photography_h6_color',
	)));

	//This is H6 FontFamily picker setting
	$wp_customize->add_setting('ts_photography_h6_font_family',array(
	  'default' => '',
	  'capability' => 'edit_theme_options',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_h6_font_family', array(
	    'section'  => 'ts_photography_typography',
	    'label'    => __( 'h6 Fonts','ts-photography'),
	    'type'     => 'select',
	    'choices'  => $ts_photography_font_array,
	));

	//This is H6 FontSize setting
	$wp_customize->add_setting('ts_photography_h6_font_size',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('ts_photography_h6_font_size',array(
		'label'	=> __('h6 Font Size','ts-photography'),
		'section'	=> 'ts_photography_typography',
		'setting'	=> 'ts_photography_h6_font_size',
		'type'	=> 'text'
	));

  	$wp_customize->add_setting('ts_photography_background_skin_mode',array(
        'default' => 'Transparent Background',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_background_skin_mode',array(
        'type' => 'select',
        'label' => __('Background Type','ts-photography'),
        'section' => 'background_image',
        'choices' => array(
            'With Background' => __('With Background','ts-photography'),
            'Transparent Background' => __('Transparent Background','ts-photography'),
        ),
	) );

	// woocommerce section
	$wp_customize->add_section('ts_photography_woocommerce_settings', array(
		'title'    => __('WooCommerce Settings', 'ts-photography'),
		'priority' => null,
		'panel'    => 'woocommerce',
	));

    $wp_customize->add_setting( 'ts_photography_shop_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ) );
    $wp_customize->add_control('ts_photography_shop_page_sidebar',array(
    	'type' => 'checkbox',
       	'label' => __('Show / Hide Woocommerce Page Sidebar','ts-photography'),
		'section' => 'ts_photography_woocommerce_settings'
    ));

    // shop page sidebar alignment
    $wp_customize->add_setting('ts_photography_shop_page_layout', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_shop_page_layout',array(
		'type'           => 'radio',
		'label'          => __('Shop Page layout', 'ts-photography'),
		'section'        => 'ts_photography_woocommerce_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'ts-photography'),
			'Right Sidebar' => __('Right Sidebar', 'ts-photography'),
		),
	));

	$wp_customize->add_setting( 'ts_photography_wocommerce_single_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ) );
    $wp_customize->add_control('ts_photography_wocommerce_single_page_sidebar',array(
    	'type' => 'checkbox',
       	'label' => __('Show / Hide Single Product Page Sidebar','ts-photography'),
		'section' => 'ts_photography_woocommerce_settings'
    ));

    // single product page sidebar alignment
    $wp_customize->add_setting('ts_photography_single_product_page_layout', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_single_product_page_layout',array(
		'type'           => 'radio',
		'label'          => __('Single product Page layout', 'ts-photography'),
		'section'        => 'ts_photography_woocommerce_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'ts-photography'),
			'Right Sidebar' => __('Right Sidebar', 'ts-photography'),
		),
	));

	$wp_customize->add_setting('ts_photography_show_related_products',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_show_related_products',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Related Product','ts-photography'),
       'section' => 'ts_photography_woocommerce_settings',
    ));

	$wp_customize->add_setting('ts_photography_show_wooproducts_border',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_show_wooproducts_border',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Product Border','ts-photography'),
       'section' => 'ts_photography_woocommerce_settings',
    ));

    $wp_customize->add_setting( 'ts_photography_wooproducts_per_columns' , array(
		'default'           => 4,
		'transport'         => 'refresh',
  		'sanitize_callback' => 'ts_photography_sanitize_choices',
	) );
	$wp_customize->add_control( 'ts_photography_wooproducts_per_columns', array(
		'label'    => __( 'Display Product Per Columns', 'ts-photography' ),
		'section'  => 'ts_photography_woocommerce_settings',
		'type'     => 'select',
		'choices'  => array(
			'2' => '2',
			'3' => '3',
			'4' => '4',
			'5' => '5',
		),
	)  );

	$wp_customize->add_setting('ts_photography_wooproducts_per_page',array(
		'default'	=> 9,
		'sanitize_callback'	=> 'ts_photography_sanitize_float'
	));	
	$wp_customize->add_control('ts_photography_wooproducts_per_page',array(
		'label'	=> __('Display Product Per Page','ts-photography'),
		'section'	=> 'ts_photography_woocommerce_settings',
		'type'		=> 'number'
	));

	$wp_customize->add_setting( 'ts_photography_top_bottom_wooproducts_padding',array(
		'default' => 10,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control( 'ts_photography_top_bottom_wooproducts_padding',	array(
		'label' => esc_html__( 'Top Bottom Product Padding','ts-photography' ),
		'section' => 'ts_photography_woocommerce_settings',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1,
		),
		'type'		=> 'number'
	));

	$wp_customize->add_setting( 'ts_photography_left_right_wooproducts_padding',array(
		'default' => 10,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control( 'ts_photography_left_right_wooproducts_padding',	array(
		'label' => esc_html__( 'Right Left Product Padding','ts-photography' ),
		'section' => 'ts_photography_woocommerce_settings',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1,
		),
		'type'		=> 'number'
	));

	$wp_customize->add_setting( 'ts_photography_wooproducts_border_radius',array(
		'default' => 0,
		'sanitize_callback'    => 'ts_photography_sanitize_number_range',
	));
	$wp_customize->add_control('ts_photography_wooproducts_border_radius',array(
		'label' => esc_html__( 'Product Border Radius','ts-photography' ),
		'section' => 'ts_photography_woocommerce_settings',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1,
		),
		'type' => 'range'
	));

	$wp_customize->add_setting( 'ts_photography_wooproducts_box_shadow',array(
		'default' => 0,
		'sanitize_callback'    => 'ts_photography_sanitize_number_range',
	));
	$wp_customize->add_control('ts_photography_wooproducts_box_shadow',array(
		'label' => esc_html__( 'Product Box Shadow','ts-photography' ),
		'section' => 'ts_photography_woocommerce_settings',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1,
		),
		'type'		=> 'range'
	));

	$wp_customize->add_setting('ts_photography_products_navigation',array(
       'default' => 'Yes',
       'sanitize_callback'	=> 'ts_photography_sanitize_choices'
    ));
    $wp_customize->add_control('ts_photography_products_navigation',array(
       'type' => 'radio',
       'label' => __('Woocommerce Products Navigation','ts-photography'),
       'choices' => array(
            'Yes' => __('Yes','ts-photography'),
            'No' => __('No','ts-photography'),
        ),
       'section' => 'ts_photography_woocommerce_settings',
    ));

	$wp_customize->add_setting( 'ts_photography_top_bottom_product_button_padding',array(
		'default' => 11,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_top_bottom_product_button_padding',	array(
		'label' => esc_html__( 'Product Button Top Bottom Padding','ts-photography' ),
		'section' => 'ts_photography_woocommerce_settings',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1,
		),
		'type'		=> 'number',

	));

	$wp_customize->add_setting( 'ts_photography_left_right_product_button_padding',array(
		'default' => 11,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_left_right_product_button_padding',array(
		'label' => esc_html__( 'Product Button Right Left Padding','ts-photography' ),
		'section' => 'ts_photography_woocommerce_settings',
		'type'		=> 'number',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1,
		),
	));

	$wp_customize->add_setting( 'ts_photography_product_button_border_radius',array(
		'default' => 50,
		'sanitize_callback'    => 'ts_photography_sanitize_number_range',
	));
	$wp_customize->add_control('ts_photography_product_button_border_radius',array(
		'label' => esc_html__( 'Product Button Border Radius','ts-photography' ),
		'section' => 'ts_photography_woocommerce_settings',
		'type'		=> 'range',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1,
		),
	));

	$wp_customize->add_setting('ts_photography_align_product_sale',array(
        'default' => 'Right',
        'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_align_product_sale',array(
        'type' => 'radio',
        'label' => __('Product Sale Button Alignment','ts-photography'),
        'section' => 'ts_photography_woocommerce_settings',
        'choices' => array(
            'Right' => __('Right','ts-photography'),
            'Left' => __('Left','ts-photography'),
        ),
	) );

	$wp_customize->add_setting( 'ts_photography_border_radius_product_sale',array(
		'default' => 0,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_border_radius_product_sale', array(
        'label'  => __('Product Sale Button Border Radius','ts-photography'),
        'section'  => 'ts_photography_woocommerce_settings',
        'type'        => 'number',
        'input_attrs' => array(
        	'step'=> 1,
            'min' => 0,
            'max' => 50,
        )
    ) );

	$wp_customize->add_setting('ts_photography_product_sale_font_size',array(
		'default'=> 14,
		'sanitize_callback'	=> 'ts_photography_sanitize_float'
	));
	$wp_customize->add_control('ts_photography_product_sale_font_size',array(
		'label'	=> __('Product Sale Button Font Size','ts-photography'),
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'section'=> 'ts_photography_woocommerce_settings',
		'type'=> 'number'
	));

	// sale button padding
	$wp_customize->add_setting( 'ts_photography_sale_padding_top',array(
		'default' => 0,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control( 'ts_photography_sale_padding_top',	array(
		'label' => esc_html__( ' Product Sale Top Bottom Padding','ts-photography' ),
		'section' => 'ts_photography_woocommerce_settings',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1,
		),
		'type'		=> 'number'
	));

	$wp_customize->add_setting( 'ts_photography_sale_padding_left',array(
		'default' => 0,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control( 'ts_photography_sale_padding_left',	array(
		'label' => esc_html__( ' Product Sale Left Right Padding','ts-photography' ),
		'section' => 'ts_photography_woocommerce_settings',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1,
		),
		'type'		=> 'number'
	));

	// Add the Theme Color Option section.
	$wp_customize->add_section( 'ts_photography_theme_color_option', array( 
		'panel' => 'ts_photography_panel_id',
		'priority'   => 30, 
		'title' => esc_html__( 'Theme Color Option', 'ts-photography' ) )
	);

	$wp_customize->add_setting('ts_photography_theme_color_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_theme_color_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_theme_color_option'
	));
	
  	$wp_customize->add_setting( 'ts_photography_theme_color_first', array(
	    'default' => '#ffcb08',
	    'sanitize_callback' => 'sanitize_hex_color'
  	));
  	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_theme_color_first', array(
  		'label' => __( 'First Color Option', 'ts-photography' ),
  		'description' => __('One can change complete theme color on just one click.', 'ts-photography'),
	    'section' => 'ts_photography_theme_color_option',
	    'settings' => 'ts_photography_theme_color_first',
  	)));
  	
  	$wp_customize->add_setting( 'ts_photography_theme_color_second', array(
	    'default' => '#ec195c',
	    'sanitize_callback' => 'sanitize_hex_color'
  	));
  	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_theme_color_second', array(
  		'label' => __('Second Color Option', 'ts-photography' ),
  		'description' => __('One can change complete theme color on just one click.', 'ts-photography'),
	    'section' => 'ts_photography_theme_color_option',
	    'settings' => 'ts_photography_theme_color_second',
  	)));

	// Menu settings
	$wp_customize->add_section('ts_photography_menu_settings',array(
		'title'	=> __('Menu Settings','ts-photography'),
		'priority'	=> 30,
		'panel' => 'ts_photography_panel_id',
	));

	$wp_customize->add_setting('ts_photography_menu_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_menu_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_menu_settings'
	));

	$wp_customize->add_setting('ts_photography_text_tranform_menu',array(
		'default' => 'Uppercase',
		'sanitize_callback' => 'ts_photography_sanitize_choices'
 	));
 	$wp_customize->add_control('ts_photography_text_tranform_menu',array(
		'type' => 'radio',
		'label' => __('Menu Text Transform','ts-photography'),
		'section' => 'ts_photography_menu_settings',
		'choices' => array(
		   'Uppercase' => __('Uppercase','ts-photography'),
		   'Lowercase' => __('Lowercase','ts-photography'),
		   'Capitalize' => __('Capitalize','ts-photography'),
		),
	) );

	$wp_customize->add_setting('ts_photography_menus_font_size',array(
		'default'=> 12,
		'sanitize_callback'	=> 'ts_photography_sanitize_float'
	));
	$wp_customize->add_control('ts_photography_menus_font_size',array(
		'label'	=> __('Menus Font Size','ts-photography'),
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'section'=> 'ts_photography_menu_settings',
		'type'=> 'number'
	));

	$wp_customize->add_setting('ts_photography_menu_weight',array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_menu_weight',array(
		'label'	=> __('Menus Font Weight','ts-photography'),
		'section'=> 'ts_photography_menu_settings',
		'type' => 'select',
		'choices' => array(
            '100' => __('100','ts-photography'),
            '200' => __('200','ts-photography'),
            '300' => __('300','ts-photography'),
            '400' => __('400','ts-photography'),
            '500' => __('500','ts-photography'),
            '600' => __('600','ts-photography'),
            '700' => __('700','ts-photography'),
            '800' => __('800','ts-photography'),
            '900' => __('900','ts-photography'),
        ),
	));

	$wp_customize->add_setting('ts_photography_menus_padding',array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_float'
	));
	$wp_customize->add_control('ts_photography_menus_padding',array(
		'label'	=> __('Menus Padding','ts-photography'),
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'section'=> 'ts_photography_menu_settings',
		'type'=> 'number'
	));

	$wp_customize->add_setting('ts_photography_menus_item_style',array(
		'default' => '',
		'transport' => 'refresh',
		'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_menus_item_style',array(
		'type' => 'select',
		'section' => 'ts_photography_menu_settings',
		'label' => __('Menu Hover Effect','ts-photography'),
		'choices' => array(
			'None' => __('None','ts-photography'),
			'Zoom In' => __('Zoom In','ts-photography'),
		),
	) );

	$wp_customize->add_setting( 'ts_photography_menu_color_settings', array(
	    'default' => '',
	    'sanitize_callback' => 'sanitize_hex_color'
  	));
  	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_menu_color_settings', array(
  		'label' => __('Menu Color', 'ts-photography'),
	    'section' => 'ts_photography_menu_settings',
	    'settings' => 'ts_photography_menu_color_settings',
  	)));

  	$wp_customize->add_setting( 'ts_photography_menu_hover_color_settings', array(
	    'default' => '',
	    'sanitize_callback' => 'sanitize_hex_color'
  	));
  	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_menu_hover_color_settings', array(
  		'label' => __('Menu Hover Color', 'ts-photography'),
	    'section' => 'ts_photography_menu_settings',
	    'settings' => 'ts_photography_menu_hover_color_settings',
  	)));
 
  	$wp_customize->add_setting( 'ts_photography_submenu_color_settings', array(
	    'default' => '',
	    'sanitize_callback' => 'sanitize_hex_color'
  	));
  	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_submenu_color_settings', array(
  		'label' => __('Sub-menu Color', 'ts-photography'),
	    'section' => 'ts_photography_menu_settings',
	    'settings' => 'ts_photography_submenu_color_settings',
  	)));

  	$wp_customize->add_setting( 'ts_photography_submenu_hover_color_settings', array(
	    'default' => '',
	    'sanitize_callback' => 'sanitize_hex_color'
  	));
  	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_submenu_hover_color_settings', array(
  		'label' => __('Sub-menu Hover Color', 'ts-photography'),
	    'section' => 'ts_photography_menu_settings',
	    'settings' => 'ts_photography_submenu_hover_color_settings',
  	)));

	//Social Icons(topbar)
	$wp_customize->add_section('ts_photography_topbar_header',array(
		'title'	=> __('Social Icon Section','ts-photography'),
		'description'	=> __('Add Header Content here','ts-photography'),
		'priority'	=> 30,
		'panel' => 'ts_photography_panel_id',
	) );

	$wp_customize->add_setting('ts_photography_topbar_header_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_topbar_header_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_topbar_header'
	));

	$wp_customize->add_setting('ts_photography_show_hide_footer_social_icon',array(
		'default' => false,
		'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
	));
	$wp_customize->add_control('ts_photography_show_hide_footer_social_icon',array(
     	'type' => 'checkbox',
      	'label' => __('Show / Hide Footer Social Icon','ts-photography'),
      	'section' => 'ts_photography_topbar_header',
	));

	$wp_customize->add_setting('ts_photography_facebook_icon',array(
		'default'	=> 'fab fa-facebook-square',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_facebook_icon',array(
		'label'	=> __('Facebook Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_topbar_header',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_facebook_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	) );	
	$wp_customize->add_control('ts_photography_facebook_url',array(
		'label'	=> __('Add Facebook link','ts-photography'),
		'section'	=> 'ts_photography_topbar_header',
		'setting'	=> 'ts_photography_facebook_url',
		'type'	=> 'url'
	) );

	$wp_customize->add_setting('ts_photography_twitter_icon',array(
		'default'	=> 'fab fa-twitter-square',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_twitter_icon',array(
		'label'	=> __('Twitter Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_topbar_header',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_twitter_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	) );	
	$wp_customize->add_control('ts_photography_twitter_url',array(
		'label'	=> __('Add Twitter link','ts-photography'),
		'section'	=> 'ts_photography_topbar_header',
		'setting'	=> 'ts_photography_twitter_url',
		'type'	=> 'url'
	) );

	$wp_customize->add_setting('ts_photography_youtube_icon',array(
		'default'	=> 'fab fa-youtube-square',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_youtube_icon',array(
		'label'	=> __('Youtube Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_topbar_header',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_youtube_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	) );	
	$wp_customize->add_control('ts_photography_youtube_url',array(
		'label'	=> __('Add Youtube link','ts-photography'),
		'section'	=> 'ts_photography_topbar_header',
		'setting'	=> 'ts_photography_youtube_url',
		'type'		=> 'url'
	) );

	$wp_customize->add_setting('ts_photography_rss_icon',array(
		'default'	=> 'fas fa-rss-square',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_rss_icon',array(
		'label'	=> __('RSS Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_topbar_header',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_rss_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	) );	
	$wp_customize->add_control('ts_photography_rss_url',array(
		'label'	=> __('Add RSS link','ts-photography'),
		'section'	=> 'ts_photography_topbar_header',
		'setting'	=> 'ts_photography_rss_url',
		'type'	=> 'url'
	) );

	$wp_customize->add_setting('ts_photography_insta_icon',array(
		'default'	=> 'fab fa-instagram',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_insta_icon',array(
		'label'	=> __('Instagram Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_topbar_header',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_insta_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	) );	
	$wp_customize->add_control('ts_photography_insta_url',array(
		'label'	=> __('Add Instagram link','ts-photography'),
		'section'	=> 'ts_photography_topbar_header',
		'setting'	=> 'ts_photography_insta_url',
		'type'	=> 'url'
	) );

	$wp_customize->add_setting('ts_photography_pint_icon',array(
		'default'	=> 'fab fa-pinterest-square',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_pint_icon',array(
		'label'	=> __('Pintrest Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_topbar_header',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_pint_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	) );	
	$wp_customize->add_control('ts_photography_pint_url',array(
		'label'	=> __('Add Pintrest link','ts-photography'),
		'section'	=> 'ts_photography_topbar_header',
		'setting'	=> 'ts_photography_pint_url',
		'type'	=> 'url'
	) );

	$wp_customize->add_setting('ts_photography_align_footer_social_icon',array(
        'default' => 'right',
        'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_align_footer_social_icon',array(
        'type' => 'select',
        'label' => __('Social Icon Alignment ','ts-photography'),
        'section' => 'ts_photography_topbar_header',
        'choices' => array(
            'left' => __('Left','ts-photography'),
            'right' => __('Right','ts-photography'),
            'center' => __('Center','ts-photography'),
        ),
	) );

	$wp_customize->add_setting('ts_photography_footer_icon_font_size',array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_float'
	));
	$wp_customize->add_control('ts_photography_footer_icon_font_size',array(
		'label'	=> __('Social Icon Font Size','ts-photography'),
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'section'=> 'ts_photography_topbar_header',
		'type'=> 'number'
	));

	$wp_customize->add_setting('ts_photography_footer_icon_color', array(
		'default'           => '#fff',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'ts_photography_footer_icon_color', array(
		'label'    => __('Icon Color', 'ts-photography'),
		'section'  => 'ts_photography_topbar_header',
	)));

	//home page slider
	$wp_customize->add_section( 'ts_photography_slidersettings' , array(
    	'title'      => __( 'Slider Settings', 'ts-photography' ),
		'priority'   => 30,
		'panel' => 'ts_photography_panel_id'
	) );

	$wp_customize->add_setting('ts_photography_slider_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_slider_premium_info',array(
		'type'=> 'hidden',
		'label'	=> __('Premium Features','ts-photography'),
		'description' => "<ul><li>". esc_html__('You can change how many slides there are.','ts-photography') ."</li><li>". esc_html__('You can change the font family and the colours of headings and subheadings.','ts-photography') ."</li><li>". esc_html__('And so on...','ts-photography') ."</li></ul><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_slidersettings'
	));
	
	$wp_customize->add_setting('ts_photography_slider_hide_show',array(
      'default' => true,
      'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
	));
	$wp_customize->add_control('ts_photography_slider_hide_show',array(
	  'type' => 'checkbox',
	  'label' => __('Show / Hide slider','ts-photography'),
	  'section' => 'ts_photography_slidersettings',
	));

	$wp_customize->add_setting('ts_photography_slider_title_Show_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_slider_title_Show_hide',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Slider Title','ts-photography'),
       'section' => 'ts_photography_slidersettings'
    ));

    $wp_customize->add_setting('ts_photography_slider_content_Show_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_slider_content_Show_hide',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Slider Content','ts-photography'),
       'section' => 'ts_photography_slidersettings'
    ));

    $wp_customize->add_setting('ts_photography_slider_button_show_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_slider_button_show_hide',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Slider Button','ts-photography'),
       'section' => 'ts_photography_slidersettings'
    ));

	for ( $count = 1; $count <= 4; $count++ ) {

		// Add color scheme setting and control.
		$wp_customize->add_setting( 'ts_photography_slidersettings-page-' . $count, array(
			'default'           => '',
			'sanitize_callback' => 'ts_photography_sanitize_dropdown_pages'
		) );
		$wp_customize->add_control( 'ts_photography_slidersettings-page-' . $count, array(
			'label'    => __( 'Select Slide Image Page', 'ts-photography' ),
			'section'  => 'ts_photography_slidersettings',
			'type'     => 'dropdown-pages'
		) );
	}

	$wp_customize->add_setting('ts_photography_slider_overlay',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_slider_overlay',array(
       'type' => 'checkbox',
       'label' => __('Home Page Slider Overlay','ts-photography'),
		'description'    => __('This option will add colors over the slider.','ts-photography'),
       'section' => 'ts_photography_slidersettings'
    ));

    $wp_customize->add_setting('ts_photography_slider_image_overlay_color', array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'ts_photography_slider_image_overlay_color', array(
		'label'    => __('Home Page Slider Overlay Color', 'ts-photography'),
		'section'  => 'ts_photography_slidersettings',
		'description'    => __('It will add the color overlay of the slider. To make it transparent, use the below option.','ts-photography'),
		'settings' => 'ts_photography_slider_image_overlay_color',
	)));

	//content layout
    $wp_customize->add_setting('ts_photography_slider_content_alignment',array(
    'default' => 'Center',
        'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_slider_content_alignment',array(
        'type' => 'radio',
        'label' => __('Slider Content Alignment','ts-photography'),
        'section' => 'ts_photography_slidersettings',
        'choices' => array(
            'Center' => __('Center','ts-photography'),
            'Left' => __('Left','ts-photography'),
            'Right' => __('Right','ts-photography'),
        ),
	) );

    //Slider excerpt
	$wp_customize->add_setting( 'ts_photography_slider_excerpt_length', array(
		'default'              => 10,
		'sanitize_callback'	=> 'absint',
	) );
	$wp_customize->add_control( 'ts_photography_slider_excerpt_length', array(
		'label'       => esc_html__( 'Slider Excerpt length','ts-photography' ),
		'section'     => 'ts_photography_slidersettings',
		'type'        => 'number',
		'settings'    => 'ts_photography_slider_excerpt_length',
		'input_attrs' => array(
			'step'             => 2,
			'min'              => 0,
			'max'              => 50,
		),
	) );

	//Opacity
	$wp_customize->add_setting('ts_photography_slider_image_opacity',array(
      'default'              => 0.7,
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control( 'ts_photography_slider_image_opacity', array(
	'label'       => esc_html__( 'Slider Image Opacity','ts-photography' ),
	'section'     => 'ts_photography_slidersettings',
	'type'        => 'select',
	'settings'    => 'ts_photography_slider_image_opacity',
	'choices' => array(
		'0' =>  esc_attr__('0','ts-photography'),
		'0.1' =>  esc_attr__('0.1','ts-photography'),
		'0.2' =>  esc_attr__('0.2','ts-photography'),
		'0.3' =>  esc_attr__('0.3','ts-photography'),
		'0.4' =>  esc_attr__('0.4','ts-photography'),
		'0.5' =>  esc_attr__('0.5','ts-photography'),
		'0.6' =>  esc_attr__('0.6','ts-photography'),
		'0.7' =>  esc_attr__('0.7','ts-photography'),
		'0.8' =>  esc_attr__('0.8','ts-photography'),
		'0.9' =>  esc_attr__('0.9','ts-photography')
	),
	));

	$wp_customize->add_setting( 'ts_photography_slider_speed_option',array(
		'default' => 3000,
		'sanitize_callback'    => 'ts_photography_sanitize_number_range',
	));
	$wp_customize->add_control( 'ts_photography_slider_speed_option',array(
		'label' => esc_html__( 'Slider Speed Option','ts-photography' ),
		'section' => 'ts_photography_slidersettings',
		'type'        => 'range',
		'input_attrs' => array(
			'min' => 1000,
			'max' => 5000,
			'step' => 500,
		),
	));

	$wp_customize->add_setting('ts_photography_slider_image_height',array(
		'default'=> __('550','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_slider_image_height',array(
		'label'	=> __('Slider Image Height','ts-photography'),
		'section'=> 'ts_photography_slidersettings',
		'type'=> 'text'
	));

	$wp_customize->add_setting('ts_photography_slider_button',array(
		'default'=> __('DISCOVER MORE','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_slider_button',array(
		'label'	=> __('Slider Button Text','ts-photography'),
		'section'=> 'ts_photography_slidersettings',
		'type'=> 'text'
	));

	$wp_customize->add_setting('ts_photography_slider_button_url',array(
		'default'=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));
	$wp_customize->add_control('ts_photography_slider_button_url',array(
		'label'	=> esc_html__('Add Button Link','ts-photography'),
		'section'=> 'ts_photography_slidersettings',
		'type'=> 'url'
	));

	$wp_customize->add_setting('ts_photography_top_bottom_slider_content_space',array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_top_bottom_slider_content_space',array(
		'label'	=> __('Top Bottom Slider Content Space','ts-photography'),
		'section'=> 'ts_photography_slidersettings',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'type'=> 'number'
	));

	$wp_customize->add_setting('ts_photography_left_right_slider_content_space',array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_left_right_slider_content_space',array(
		'label'	=> __('Left Right Slider Content Space','ts-photography'),
		'section'=> 'ts_photography_slidersettings',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'type'=> 'number'
	));

	//Photography section
  	$wp_customize->add_section('ts_photography_photo_section',array(
	    'title' => __('Photography Section','ts-photography'),
	    'description' => '',
	    'priority'  => null,
	    'panel' => 'ts_photography_panel_id',
	));  

	$wp_customize->add_setting('ts_photography_product_sec_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_product_sec_premium_info',array(
		'type'=> 'hidden',
		'label'	=> __('Premium Features','ts-photography'),
		'description' => "<ul><li>". esc_html__('Includes settings to set section title.','ts-photography') ."</li><li>". esc_html__('Contains settings for the background colour.','ts-photography') ."</li><li>". esc_html__('Contains options for background images.','ts-photography') ."</li><li>". esc_html__('You can change the font family and colours of heading.','ts-photography') ."</li><li>". esc_html__('And so on...','ts-photography') ."</li></ul><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_photo_section'
	));
 
	$categories = get_categories();
	$cats = array();
	$i = 0;
	$cat_post[]= 'select';
	foreach($categories as $category){
		if($i==0){
			$default = $category->slug;
			$i++;
		}
		$cat_post[$category->slug] = $category->name;
	}

	$wp_customize->add_setting('ts_photography_category',array(
	    'default' => 'select',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
  	));
  	$wp_customize->add_control('ts_photography_category',array(
	    'type'    => 'select',
	    'choices' => $cat_post,
	    'label' => __('Select Category to display Latest Post','ts-photography'),
	    'section' => 'ts_photography_photo_section',
	));

	//Blog Post
	$wp_customize->add_section('ts_photography_blog_post',array(
		'title'	=> __('Blog Post Settings','ts-photography'),
		'panel' => 'ts_photography_panel_id',
	));	

	$wp_customize->add_setting('ts_photography_blog_post_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_blog_post_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_blog_post'
	));

	$wp_customize->selective_refresh->add_partial( 'ts_photography_date_hide', array(
		'selector' => '.our-services .page-box',
		'render_callback' => 'ts_photography_customize_partial_ts_photography_date_hide',
	));

	$wp_customize->add_setting('ts_photography_date_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_date_hide',array(
       'type' => 'checkbox',
       'label' => __('Post Date','ts-photography'),
       'section' => 'ts_photography_blog_post'
    ));

	$wp_customize->add_setting('ts_photography_date_icon',array(
		'default'	=> 'fas fa-calendar-alt',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_date_icon',array(
		'label'	=> __('Post Date Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_blog_post',
		'type'		=> 'icon'
	)));

    $wp_customize->add_setting('ts_photography_author_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_author_hide',array(
       'type' => 'checkbox',
       'label' => __('Author','ts-photography'),
       'section' => 'ts_photography_blog_post'
    ));

	$wp_customize->add_setting('ts_photography_author_icon',array(
		'default'	=> 'fas fa-user',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_author_icon',array(
		'label'	=> __('Author Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_blog_post',
		'type'		=> 'icon'
	)));

    $wp_customize->add_setting('ts_photography_comment_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_comment_hide',array(
       'type' => 'checkbox',
       'label' => __('Comments','ts-photography'),
       'section' => 'ts_photography_blog_post'
    ));

	$wp_customize->add_setting('ts_photography_comment_icon',array(
		'default'	=> 'fas fa-comments',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_comment_icon',array(
		'label'	=> __('Comments Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_blog_post',
		'type'		=> 'icon'
	)));

    $wp_customize->add_setting('ts_photography_time_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_time_hide',array(
       'type' => 'checkbox',
       'label' => __('Time','ts-photography'),
       'section' => 'ts_photography_blog_post'
    ));

	$wp_customize->add_setting('ts_photography_time_icon',array(
		'default'	=> 'fas fa-clock',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_time_icon',array(
		'label'	=> __('Time Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_blog_post',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_show_post_category',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_show_post_category',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Category','ts-photography'),
       'section' => 'ts_photography_blog_post'
    ));

    $wp_customize->add_setting('ts_photography_show_featured_image_post',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_show_featured_image_post',array(
       'type' => 'checkbox',
       'label' => __('Blog Post Image','ts-photography'),
       'section' => 'ts_photography_blog_post'
    ));

    $wp_customize->add_setting( 'ts_photography_featured_img_border_radius', array(
		'default'=> 0,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	) );
	$wp_customize->add_control( 'ts_photography_featured_img_border_radius', array(
		'label'       => esc_html__( 'Blog Post Image Border Radius','ts-photography' ),
		'section'     => 'ts_photography_blog_post',
		'type'        => 'number',
		'input_attrs' => array(
			'step'             => 1,
			'min'              => 0,
			'max'              => 100,
		),
	) );

	$wp_customize->add_setting( 'ts_photography_featured_img_box_shadow',array(
		'default' => 0,
		'sanitize_callback'    => 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_featured_img_box_shadow',array(
		'label' => esc_html__( 'Blog Post Image Shadow','ts-photography' ),
		'section' => 'ts_photography_blog_post',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1,
		),
		'type' => 'number'
	));

	// Image Dimension Option
	$wp_customize->add_setting('ts_photography_blog_image_dimension', array(
		'default'           => 'default',
		'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_blog_image_dimension', array(
		'type'    => 'radio',
		'label'   => __('Blog Post Featured Image Dimension', 'ts-photography'),
		'section' => 'ts_photography_blog_post',
		'choices' => array(
			'default' => __('Default', 'ts-photography'),
			'custom'  => __('Custom Image Size', 'ts-photography'),
		),
	));

	// Custom Width 
	$wp_customize->add_setting('ts_photography_feature_image_custom_width', array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_feature_image_custom_width', array(
		'label'       => __('Featured Image Custom Width', 'ts-photography'),
		'section'     => 'ts_photography_blog_post',
		'description' => __('Measurement is in pixel.', 'ts-photography'),
		'input_attrs' => array(
			'min'  => 0,
			'max'  => 800,
			'step' => 1,
		),
		'type'             => 'number',
		'active_callback'  => 'ts_photography_blog_image_dimension'
	));

	// Custom Height 
	$wp_customize->add_setting('ts_photography_feature_image_custom_height', array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_feature_image_custom_height', array(
		'label'       => __('Featured Image Custom Height', 'ts-photography'),
		'section'     => 'ts_photography_blog_post',
		'description' => __('Measurement is in pixel.', 'ts-photography'),
		'input_attrs' => array(
			'min'  => 0,
			'max'  => 500,
			'step' => 1,
		),
		'type'             => 'number',
		'active_callback'  => 'ts_photography_blog_image_dimension'
	));

	$wp_customize->add_setting('ts_photography_show_first_caps',array(
        'default' => false,
        'sanitize_callback' => 'ts_photography_sanitize_checkbox',
    ));
	$wp_customize->add_control( 'ts_photography_show_first_caps',array(
		'label' => esc_html__('First Cap (First Capital Letter)', 'ts-photography'),
		'type' => 'checkbox',
		'section' => 'ts_photography_blog_post',
	));

    $wp_customize->add_setting('ts_photography_blog_post_description_option',array(
    	'default'   => 'Excerpt Content', 
        'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_blog_post_description_option',array(
        'type' => 'radio',
        'label' => __('Post Description Length','ts-photography'),
        'section' => 'ts_photography_blog_post',
        'choices' => array(
            'No Content' => __('No Content','ts-photography'),
            'Excerpt Content' => __('Excerpt Content','ts-photography'),
            'Full Content' => __('Full Content','ts-photography'),
        ),
	) );

    $wp_customize->add_setting( 'ts_photography_excerpt_number', array(
		'default'              => 20,
		'sanitize_callback'	=> 'absint',
	) );
	$wp_customize->add_control( 'ts_photography_excerpt_number', array(
		'label'       => esc_html__( 'Excerpt length','ts-photography' ),
		'section'     => 'ts_photography_blog_post',
		'type'        => 'number',
		'settings'    => 'ts_photography_excerpt_number',
		'input_attrs' => array(
			'step'             => 2,
			'min'              => 0,
			'max'              => 50,
		),
	) );

	$wp_customize->add_setting( 'ts_photography_post_suffix_option', array(
		'default'   => __('...','ts-photography'), 
		'sanitize_callback'	=> 'sanitize_text_field'
	) );
	$wp_customize->add_control( 'ts_photography_post_suffix_option', array(
		'label'       => esc_html__( 'Post Excerpt Indicator Option','ts-photography' ),
		'section'     => 'ts_photography_blog_post',
		'type'        => 'text',
		'settings'    => 'ts_photography_post_suffix_option',
	) );

	$wp_customize->add_setting( 'ts_photography_metabox_separator_blog_post', array(
		'default'   => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	) );
	$wp_customize->add_control( 'ts_photography_metabox_separator_blog_post', array(
		'label'       => esc_html__( 'Meta Box Separator','ts-photography' ),
		'input_attrs' => array(
            'placeholder' => __( 'Add Meta Separator. e.g.: "|", "/", etc.', 'ts-photography' ),
        ),
		'section'     => 'ts_photography_blog_post',
		'type'        => 'text',
		'settings'    => 'ts_photography_metabox_separator_blog_post',
	) );

	$wp_customize->add_setting('ts_photography_display_blog_page_post',array(
        'default' => 'In Box',
        'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_display_blog_page_post',array(
        'type' => 'radio',
        'label' => __('Display Blog Page Post :','ts-photography'),
        'section' => 'ts_photography_blog_post',
        'choices' => array(
            'In Box' => __('In Box','ts-photography'),
            'Without Box' => __('Without Box','ts-photography'),
        ),
	) );

	$wp_customize->add_setting('ts_photography_blog_post_alignment',array(
	    'default' => 'Center',
	    'transport' => 'refresh',
	    'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_blog_post_alignment',array(
	    'type' => 'select',
	    'label' => __('Blog Post Alignment','ts-photography'),
	    'section' => 'ts_photography_blog_post',
	    'choices' => array(
	    	'Left' => __('Left','ts-photography'),
	        'Center' => __('Center','ts-photography'),
	        'Right' => __('Right','ts-photography')
	    ),
	) );

	$wp_customize->add_setting('ts_photography_blog_post_pagination',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_blog_post_pagination',array(
       'type' => 'checkbox',
       'label' => __('Pagination in Blog Page','ts-photography'),
       'section' => 'ts_photography_blog_post'
    ));

	$wp_customize->add_setting( 'ts_photography_pagination_settings', array(
        'default'			=> 'Numeric Pagination',
        'sanitize_callback'	=> 'ts_photography_sanitize_choices'
    ));
    $wp_customize->add_control( 'ts_photography_pagination_settings', array(
        'section' => 'ts_photography_blog_post',
        'type' => 'radio',
        'label' => __( 'Post Pagination', 'ts-photography' ),
        'choices'		=> array(
            'Numeric Pagination'  => __( 'Numeric Pagination', 'ts-photography' ),
            'next-prev' => __( 'Next / Previous', 'ts-photography' ),
    )));

	$wp_customize->add_setting('ts_photography_pagination_alignment',array(
	    'default' => 'Left',
	    'transport' => 'refresh',
	    'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_pagination_alignment',array(
	    'type' => 'select',
	    'label' => __('Pagination Alignment','ts-photography'),
	    'section' => 'ts_photography_blog_post',
	    'choices' => array(
	    	'Left' => __('Left','ts-photography'),
	        'Center' => __('Center','ts-photography'),
	        'Right' => __('Right','ts-photography')
	    ),
	) );

	// Button
	$wp_customize->add_section( 'ts_photography_theme_button', array(
		'title' => __('Button Option','ts-photography'),
		'priority'   => null,
		'panel' => 'ts_photography_panel_id',
	));

	$wp_customize->add_setting('ts_photography_theme_button_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_theme_button_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_theme_button'
	));

	$wp_customize->selective_refresh->add_partial( 'ts_photography_button_text', array(
		'selector' => '.page-box .content-bttn a',
		'render_callback' => 'ts_photography_customize_partial_ts_photography_button_text',
	));

	$wp_customize->add_setting('ts_photography_button_text',array(
		'default'=> __('Read More','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_button_text',array(
		'label'	=> __('Add Button Text','ts-photography'),
		'section'=> 'ts_photography_theme_button',
		'type'=> 'text'
	));

	$wp_customize->add_setting('ts_photography_button_font_size',array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_float'
	));
	$wp_customize->add_control('ts_photography_button_font_size',array(
		'label'	=> __('Button Font Size','ts-photography'),
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'section'=> 'ts_photography_theme_button',
		'type'=> 'number'
	));

	$wp_customize->add_setting('ts_photography_btn_font_weight',array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_btn_font_weight',array(
		'label'	=> __('Button Font Weight','ts-photography'),
		'section'=> 'ts_photography_theme_button',
		'type' => 'select',
		'choices' => array(
            '100' => __('100','ts-photography'),
            '200' => __('200','ts-photography'),
            '300' => __('300','ts-photography'),
            '400' => __('400','ts-photography'),
            '500' => __('500','ts-photography'),
            '600' => __('600','ts-photography'),
            '700' => __('700','ts-photography'),
            '800' => __('800','ts-photography'),
            '900' => __('900','ts-photography'),
        ),
	));

	// button letter spacing
	$wp_customize->add_setting( 'ts_photography_button_letter_spacing',array(
		'default' => '',
		'sanitize_callback' => 'ts_photography_sanitize_float'
	));
	$wp_customize->add_control('ts_photography_button_letter_spacing', array(
		'label'  =>  esc_html__('Button Letter Spacing','ts-photography'),
		'type'=> 'number',
		'section'  => 'ts_photography_theme_button',
		'input_attrs' => array(
			'step' => 1,
			'min' => 0,
			'max' => 50,
		)
	));

	$wp_customize->add_setting('ts_photography_button_text_transform',array(
		'default' => 'Uppercase',
		'sanitize_callback' => 'ts_photography_sanitize_choices'
 	));
 	$wp_customize->add_control('ts_photography_button_text_transform',array(
		'type' => 'radio',
		'label' => __('Button Text Transform','ts-photography'),
		'section' => 'ts_photography_theme_button',
		'choices' => array(
		   'Uppercase' => __('Uppercase','ts-photography'),
		   'Lowercase' => __('Lowercase','ts-photography'),
		   'Capitalize' => __('Capitalize','ts-photography'),
		),
	) );

	$wp_customize->add_setting( 'ts_photography_button_border',array(
		'default' => '',
      	'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ) );
    $wp_customize->add_control('ts_photography_button_border',array(
    	'type' => 'checkbox',
        'label' => __( 'Show / Hide Border for Slider button','ts-photography' ),
        'section' => 'ts_photography_theme_button'
    ));

	$wp_customize->add_setting('ts_photography_button_padding_top_bottom',array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_button_padding_top_bottom',array(
		'label'	=> __('Top and Bottom Padding','ts-photography'),
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'section'=> 'ts_photography_theme_button',
		'type'=> 'number'
	));

	$wp_customize->add_setting('ts_photography_button_padding_left_right',array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_button_padding_left_right',array(
		'label'	=> __('Left and Right Padding','ts-photography'),
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'section'=> 'ts_photography_theme_button',
		'type'=> 'number'
	));

	$wp_customize->add_setting( 'ts_photography_button_border_radius', array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	) );
	$wp_customize->add_control( 'ts_photography_button_border_radius', array(
		'label'       => esc_html__( 'Button Border Radius','ts-photography' ),
		'section'     => 'ts_photography_theme_button',
		'type'        => 'number',
		'input_attrs' => array(
			'step'             => 1,
			'min'              => 0,
			'max'              => 50,
		),
	) );

	//Single Post Settings
	$wp_customize->add_section('ts_photography_single_post',array(
		'title'	=> __('Single Post Settings','ts-photography'),
		'panel' => 'ts_photography_panel_id',
	));

	$wp_customize->add_setting('ts_photography_single_post_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_single_post_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_single_post'
	));

	$wp_customize->selective_refresh->add_partial( 'ts_photography_single_post_date_hide', array(
		'selector' => '.single-post .page-box-single',
		'render_callback' => 'ts_photography_customize_partial_ts_photography_single_post_date_hide',
	));

	$wp_customize->add_setting('ts_photography_single_post_date_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_single_post_date_hide',array(
       'type' => 'checkbox',
       'label' => __('Single Post Date','ts-photography'),
       'section' => 'ts_photography_single_post'
    ));

	$wp_customize->add_setting('ts_photography_single_post_date_icon',array(
		'default'	=> 'fas fa-calendar-alt',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_single_post_date_icon',array(
		'label'	=> __('Single Post Date Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_single_post',
		'type'		=> 'icon'
	)));

    $wp_customize->add_setting('ts_photography_single_post_author_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_single_post_author_hide',array(
       'type' => 'checkbox',
       'label' => __('Single Post Author','ts-photography'),
       'section' => 'ts_photography_single_post'
    ));

	$wp_customize->add_setting('ts_photography_single_post_author_icon',array(
		'default'	=> 'fas fa-user',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_single_post_author_icon',array(
		'label'	=> __('Single Post Author Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_single_post',
		'type'		=> 'icon'
	)));

    $wp_customize->add_setting('ts_photography_single_post_comment_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_single_post_comment_hide',array(
       'type' => 'checkbox',
       'label' => __('Single Post Comments','ts-photography'),
       'section' => 'ts_photography_single_post'
    ));

	$wp_customize->add_setting('ts_photography_single_post_comment_icon',array(
		'default'	=> 'fas fa-comments',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_single_post_comment_icon',array(
		'label'	=> __('Single Post Comments Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_single_post',
		'type'		=> 'icon'
	)));

    $wp_customize->add_setting('ts_photography_single_post_time_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_single_post_time_hide',array(
       'type' => 'checkbox',
       'label' => __('Single Post Time','ts-photography'),
       'section' => 'ts_photography_single_post'
    ));

	$wp_customize->add_setting('ts_photography_single_post_time_icon',array(
		'default'	=> 'fas fa-clock',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_single_post_time_icon',array(
		'label'	=> __('Single Post Time Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_single_post',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_single_post_first_caps',array(
        'default' => false,
        'sanitize_callback' => 'ts_photography_sanitize_checkbox',
    ));
	$wp_customize->add_control( 'ts_photography_single_post_first_caps',array(
		'label' => esc_html__('First Cap (First Capital Letter)', 'ts-photography'),
		'type' => 'checkbox',
		'section' => 'ts_photography_single_post',
	));

	$wp_customize->add_setting('ts_photography_tags_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
   $wp_customize->add_control('ts_photography_tags_hide',array(
       'type' => 'checkbox',
       'label' => __('Single Post Tags','ts-photography'),
       'section' => 'ts_photography_single_post'
   ));

   $wp_customize->add_setting('ts_photography_show_featured_image_single_post',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
   ));
   $wp_customize->add_control('ts_photography_show_featured_image_single_post',array(
       'type' => 'checkbox',
       'label' => __('Single Post Image','ts-photography'),
       'section' => 'ts_photography_single_post'
   ));

    $wp_customize->add_setting( 'ts_photography_post_comment',array(
		'default' => true,
		'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
		) );
	$wp_customize->add_control('ts_photography_post_comment',array(
		'type' => 'checkbox',
		'label' => __('Single Post Comment Box','ts-photography'),
		'section' => 'ts_photography_single_post'
		));

	$wp_customize->add_setting( 'ts_photography_single_post_breadcrumb',array(
		'default' => false,
		'transport' => 'refresh',
      	'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ) );
   $wp_customize->add_control('ts_photography_single_post_breadcrumb',array(
    	'type' => 'checkbox',
        'label' => __( 'Show / Hide Single Post Breadcrumb','ts-photography' ),
        'section' => 'ts_photography_single_post'
    ));

    // show/hide single post pagination
    $wp_customize->add_setting('ts_photography_show_single_post_pagination',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_show_single_post_pagination',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Single Post Pagination','ts-photography'),
       'section' => 'ts_photography_single_post'
    ));

    $wp_customize->add_setting('ts_photography_category_show_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_category_show_hide',array(
       'type' => 'checkbox',
       'label' => __('Single Post Category','ts-photography'),
       'section' => 'ts_photography_single_post'
    ));

    $wp_customize->add_setting('ts_photography_title_comment_form',array(
       'default' => __('Leave a Reply','ts-photography'),
       'sanitize_callback'	=> 'sanitize_text_field'
    ));
    $wp_customize->add_control('ts_photography_title_comment_form',array(
       'type' => 'text',
       'label' => __('Comment Form Heading Text','ts-photography'),
       'section' => 'ts_photography_single_post'
    ));

    $wp_customize->add_setting('ts_photography_comment_form_button_content',array(
       'default' => __('Post Comment','ts-photography'),
       'sanitize_callback'	=> 'sanitize_text_field'
    ));
    $wp_customize->add_control('ts_photography_comment_form_button_content',array(
       'type' => 'text',
       'label' => __('Comment Form Button Text','ts-photography'),
       'section' => 'ts_photography_single_post'
    ));

    //Comment Textarea Width
    $wp_customize->add_setting( 'ts_photography_comment_width', array(
		'default'=> '100',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(
	    'ts_photography_comment_width', array(
		'label'  => __('Comment Textarea Width','ts-photography'),
		'section'  => 'ts_photography_single_post',
		'description' => __('Measurement is in %.','ts-photography'),
		'input_attrs' => array(
		   'step'=> 1,
		   'min' => 0,
		   'max' => 100,
		),
		'type'		=> 'number'
    ));

    $wp_customize->add_setting( 'ts_photography_single_post_meta_seperator', array(
		'default'   => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	) );
	$wp_customize->add_control( 'ts_photography_single_post_meta_seperator', array(
		'label'       => esc_html__( 'Single Post Meta Box Seperator','ts-photography' ),
		'section'     => 'ts_photography_single_post',
		'description' => __('Here you can add the seperator for meta box. e.g. "|",  ",", "/", etc. ','ts-photography'),
		'type'        => 'text',
		'settings'    => 'ts_photography_single_post_meta_seperator',
	) );

	//Grid Post Settings
	$wp_customize->add_section('ts_photography_grid_post',array(
		'title'	=> __('Grid Post Settings','ts-photography'),
		'panel' => 'ts_photography_panel_id',
	));

	$wp_customize->add_setting('ts_photography_grid_post_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_grid_post_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_grid_post'
	));

	$wp_customize->add_setting('ts_photography_grid_post_date',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_grid_post_date',array(
       'type' => 'checkbox',
       'label' => __('Post Date','ts-photography'),
       'section' => 'ts_photography_grid_post'
    ));

	$wp_customize->add_setting('ts_photography_grid_post_date_icon',array(
		'default'	=> 'fas fa-calendar-alt',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_grid_post_date_icon',array(
		'label'	=> __('Date Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_grid_post',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_grid_post_author',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_grid_post_author',array(
       'type' => 'checkbox',
       'label' => __('Post Author','ts-photography'),
       'section' => 'ts_photography_grid_post'
    ));

	$wp_customize->add_setting('ts_photography_grid_post_author_icon',array(
		'default'	=> 'fas fa-user',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_grid_post_author_icon',array(
		'label'	=> __('Author Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_grid_post',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_grid_post_comment',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_grid_post_comment',array(
       'type' => 'checkbox',
       'label' => __('Post Comment','ts-photography'),
       'section' => 'ts_photography_grid_post'
    ));

	$wp_customize->add_setting('ts_photography_grid_post_comment_icon',array(
		'default'	=> 'fas fa-comments',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_grid_post_comment_icon',array(
		'label'	=> __('Comment Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_grid_post',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_grid_post_time',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_grid_post_time',array(
       'type' => 'checkbox',
       'label' => __('Post Time','ts-photography'),
       'section' => 'ts_photography_grid_post'
    ));

	$wp_customize->add_setting('ts_photography_grid_post_time_icon',array(
		'default'	=> 'fas fa-clock',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_grid_post_time_icon',array(
		'label'	=> __('Time Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_grid_post',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_grid_post_alignment',array(
	    'default' => 'Center',
	    'transport' => 'refresh',
	    'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_grid_post_alignment',array(
	    'type' => 'select',
	    'label' => __('Grid Post Alignment','ts-photography'),
	    'section' => 'ts_photography_grid_post',
	    'choices' => array(
	    	'Left' => __('Left','ts-photography'),
	        'Center' => __('Center','ts-photography'),
	        'Right' => __('Right','ts-photography')
	    ),
	) );

	$wp_customize->add_setting('ts_photography_grid_post_description_option',array(
    	'default'   => 'Excerpt Content',
        'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_grid_post_description_option',array(
        'type' => 'radio',
        'label' => __('Post Description Length','ts-photography'),
        'section' => 'ts_photography_grid_post',
        'choices' => array(
            'No Content' => __('No Content','ts-photography'),
            'Excerpt Content' => __('Excerpt Content','ts-photography'),
            'Full Content' => __('Full Content','ts-photography'),
        ),
	) );

    $wp_customize->add_setting( 'ts_photography_grid_excerpt_number', array(
		'default'              => 20,
		'sanitize_callback'	=> 'absint',
	) );
	$wp_customize->add_control( 'ts_photography_grid_excerpt_number', array(
		'label'       => esc_html__( 'Excerpt length','ts-photography' ),
		'section'     => 'ts_photography_grid_post',
		'type'        => 'number',
		'settings'    => 'ts_photography_grid_excerpt_number',
		'input_attrs' => array(
			'step'             => 2,
			'min'              => 0,
			'max'              => 50,
		),
	) );

	$wp_customize->add_setting( 'ts_photography_grid_post_suffix_option', array(
		'default'   => __('...','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	) );
	$wp_customize->add_control( 'ts_photography_grid_post_suffix_option', array(
		'label'       => esc_html__( 'Excerpt Indicator Option','ts-photography' ),
		'section'     => 'ts_photography_grid_post',
		'type'        => 'text',
		'settings'    => 'ts_photography_grid_post_suffix_option',
	) );

	$wp_customize->add_setting( 'ts_photography_metabox_separator_grid_post', array(
		'default'   => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	) );
	$wp_customize->add_control( 'ts_photography_metabox_separator_grid_post', array(
		'label'       => esc_html__( 'Meta Box Separator','ts-photography' ),
		'input_attrs' => array(
            'placeholder' => __( 'Add Meta Separator. e.g.: "|", "/", etc.', 'ts-photography' ),
        ),
		'section'     => 'ts_photography_grid_post',
		'type'        => 'text',
		'settings'    => 'ts_photography_metabox_separator_grid_post',
	) );

    $wp_customize->add_setting('ts_photography_show_image_grid_post',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_show_image_grid_post',array(
       'type' => 'checkbox',
       'label' => __('Grid Post Image','ts-photography'),
       'section' => 'ts_photography_grid_post'
    ));

    $wp_customize->add_setting( 'ts_photography_img_border_radius_grid_post', array(
		'default'=> 0,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	) );
	$wp_customize->add_control( 'ts_photography_img_border_radius_grid_post', array(
		'label'       => esc_html__( 'Grid Post Image Border Radius','ts-photography' ),
		'section'     => 'ts_photography_grid_post',
		'type'        => 'number',
		'input_attrs' => array(
			'step'             => 1,
			'min'              => 0,
			'max'              => 100,
		),
	) );

	$wp_customize->add_setting('ts_photography_display_grid_page_post',array(
        'default' => 'In Box',
        'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_display_grid_page_post',array(
        'type' => 'radio',
        'label' => __('Display Grid Post Box :','ts-photography'),
        'section' => 'ts_photography_grid_post',
        'choices' => array(
            'In Box' => __('In Box','ts-photography'),
            'Without Box' => __('Without Box','ts-photography'),
        ),
	) );

	//Related Post Settings
	$wp_customize->add_section('ts_photography_related_post',array(
		'title'	=> __('Related Post Settings','ts-photography'),
		'panel' => 'ts_photography_panel_id',
	));

	$wp_customize->add_setting('ts_photography_related_post_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_related_post_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_related_post'
	));

	$wp_customize->selective_refresh->add_partial( 'ts_photography_show_related_post', array(
		'selector' => '.related-posts',
		'render_callback' => 'ts_photography_customize_partial_ts_photography_show_related_post',
	));

	$wp_customize->add_setting( 'ts_photography_show_related_post',array(
		'default' => true,
      	'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ) );
    $wp_customize->add_control('ts_photography_show_related_post',array(
    	'type' => 'checkbox',
        'label' => __( 'Related Post','ts-photography' ),
        'section' => 'ts_photography_related_post'
    ));

    $wp_customize->add_setting('ts_photography_related_posts_taxanomies_options',array(
        'default' => 'categories',
        'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_related_posts_taxanomies_options',array(
        'type' => 'radio',
        'label' => __('Related Post Taxonomies','ts-photography'),
        'section' => 'ts_photography_related_post',
        'choices' => array(
            'categories' => __('Categories','ts-photography'),
            'tags' => __('Tags','ts-photography'),
        ),
	) );

	$wp_customize->add_setting('ts_photography_related_post_title',array(
		'default'=> __('Related Posts','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_related_post_title',array(
		'label'	=> __('Related Post Title','ts-photography'),
		'section'=> 'ts_photography_related_post',
		'type'=> 'text'
	));

	$wp_customize->add_setting('ts_photography_related_posts_number',array(
		'default'=> 3,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_related_posts_number',array(
		'label'	=> __('Related Post Number','ts-photography'),
		'section'=> 'ts_photography_related_post',
		'type'=> 'number',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
	));	

    $wp_customize->add_setting('ts_photography_show_featured_image_related_post',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_show_featured_image_related_post',array(
       'type' => 'checkbox',
       'label' => __('Related Post Image','ts-photography'),
       'section' => 'ts_photography_related_post'
    ));

	$wp_customize->add_setting('ts_photography_related_post_excerpt_number',array(
		'default'=> 20,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_related_post_excerpt_number',array(
		'label'	=> __('Related Post Content Limit','ts-photography'),
		'section'=> 'ts_photography_related_post',
		'type'=> 'number',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
	));

	$wp_customize->add_setting('ts_photography_related_post_date_hide',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_related_post_date_hide',array(
       'type' => 'checkbox',
       'label' => __('Post Date','ts-photography'),
       'section' => 'ts_photography_related_post'
    ));

	$wp_customize->add_setting('ts_photography_related_post_date_icon',array(
		'default'	=> 'fas fa-calendar-alt',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_related_post_date_icon',array(
		'label'	=> __('Post Date Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_related_post',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_related_button_text',array(
		'default'=> esc_html__('Read More','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_related_button_text',array(
		'label'	=> esc_html__('Add Button Text','ts-photography'),
		'input_attrs' => array(
        'placeholder' => esc_html__( 'Read More', 'ts-photography' ),
        ),
		'section'=> 'ts_photography_related_post',
		'type'=> 'text'
	));

	//Layouts
	$wp_customize->add_section( 'ts_photography_left_right', array(
    	'title'      => __( 'Layout Settings', 'ts-photography' ),
		'priority'   => null,
		'panel' => 'ts_photography_panel_id'
	) );

	$wp_customize->add_setting('ts_photography_left_right_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_left_right_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_left_right'
	));

	$wp_customize->add_setting('ts_photography_theme_options',array(
        'default' => 'Default',
        'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_theme_options',array(
        'type' => 'radio',
        'label' => __('Container Box','ts-photography'),
        'description' => __('Here you can change the Width layout. ','ts-photography'),
        'section' => 'ts_photography_left_right',
        'choices' => array(
            'Default' => __('Default','ts-photography'),
            'Container' => __('Container','ts-photography'),
            'Box Container' => __('Box Container','ts-photography'),
        ),
	) );

	$wp_customize->add_setting('ts_photography_preloader_option',array(
       'default' => false,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_preloader_option',array(
       'type' => 'checkbox',
       'label' => __('Show / Hide Preloader','ts-photography'),
       'section' => 'ts_photography_left_right'
    ));

   $wp_customize->add_setting('ts_photography_preloader_type_options', array(
		'default'           => 'Preloader 1',
		'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_preloader_type_options',array(
		'type'           => 'radio',
		'label'          => __('Preloader Type', 'ts-photography'),
		'section'        => 'ts_photography_left_right',
		'choices'        => array(
			'Preloader 1'  => __('Preloader 1', 'ts-photography'),
			'Preloader 2' => __('Preloader 2', 'ts-photography'),
		),
	));

	$wp_customize->add_setting('ts_photography_preloader_bg_image',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw',
	));
	$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'ts_photography_preloader_bg_image',array(
        'label' => __('Preloader Background Image','ts-photography'),
        'section' => 'ts_photography_left_right'
	)));
 
    $wp_customize->add_setting( 'ts_photography_loader_background_color_first', array(
	    'default' => '',
	    'sanitize_callback' => 'sanitize_hex_color'
  	));
  	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_loader_background_color_first', array(
  		'label' => __('Background Color for Preloader', 'ts-photography'),
	    'section' => 'ts_photography_left_right',
	    'settings' => 'ts_photography_loader_background_color_first',
  	)));

  	$wp_customize->add_setting( 'ts_photography_breadcrumb_color', array(
	    'default' => '#333',
	    'sanitize_callback' => 'sanitize_hex_color'
  	));
  	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_breadcrumb_color', array(
  		'label' => __('Breadcrumb Color', 'ts-photography'),
	    'section' => 'ts_photography_left_right',
	    'settings' => 'ts_photography_breadcrumb_color',
  	)));

  	$wp_customize->add_setting( 'ts_photography_breadcrumb_bg_color', array(
	    'default' => '',
	    'sanitize_callback' => 'sanitize_hex_color'
  	));
  	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_breadcrumb_bg_color', array(
  		'label' => __('Breadcrumb Background Color', 'ts-photography'),
	    'section' => 'ts_photography_left_right',
	    'settings' => 'ts_photography_breadcrumb_bg_color',
  	)));

  	$wp_customize->add_setting('ts_photography_search_option',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_search_option',array(
       'type' => 'checkbox',
       'label' => __('Search','ts-photography'),
       'section' => 'ts_photography_left_right'
    ));
  	
	$wp_customize->add_setting( 'ts_photography_sticky_header',array(
		'default' => false,
      	'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ) );
    $wp_customize->add_control('ts_photography_sticky_header',array(
    	'type' => 'checkbox',
        'label' => __( 'Sticky Header','ts-photography' ),
        'section' => 'ts_photography_left_right'
    ));

    $wp_customize->add_setting( 'ts_photography_sticky_header_padding_settings', array(
		'default'=> '',
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	) );
	$wp_customize->add_control( 'ts_photography_sticky_header_padding_settings', array(
		'label'       => esc_html__( 'Sticky Header Padding','ts-photography' ),
		'section'     => 'ts_photography_left_right',
		'type'        => 'number',
		'input_attrs' => array(
			'step'             => 1,
			'min'              => 0,
			'max'              => 50,
		),
	) );

    $wp_customize->add_setting( 'ts_photography_single_page_breadcrumb',array(
		'default' => false,
      	'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ) );
    $wp_customize->add_control('ts_photography_single_page_breadcrumb',array(
    	'type' => 'checkbox',
        'label' => __( 'Show / Hide Single Page Breadcrumb','ts-photography' ),
        'section' => 'ts_photography_left_right'
    ));

	$wp_customize->add_setting('ts_photography_layout_options',array(
        'default' => 'Right Sidebar',
        'sanitize_callback' => 'ts_photography_sanitize_choices'	        
	) );
	$wp_customize->add_control('ts_photography_layout_options',array(
        'type' => 'radio',
        'label' => __('Blog Post Layouts','ts-photography'),
        'section' => 'ts_photography_left_right',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','ts-photography'),
            'Right Sidebar' => __('Right Sidebar','ts-photography'),
            'One Column' => __('One Column','ts-photography'),
            'Three Columns' => __('Three Columns','ts-photography'),
            'Four Columns' => __('Four Columns','ts-photography'),
            'Grid Layout' => __('Grid Layout','ts-photography')
        ),
	) );

	$wp_customize->add_setting('ts_photography_single_post_sidebar_layout', array(
		'default'           => 'Right Sidebar', 
		'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_single_post_sidebar_layout',array(
		'type'           => 'radio',
		'label'          => __('Single Post Layouts', 'ts-photography'),
		'section'        => 'ts_photography_left_right',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'ts-photography'),
			'Right Sidebar' => __('Right Sidebar', 'ts-photography'),
			'One Column'    => __('One Column', 'ts-photography'),
		),
	));

	$wp_customize->add_setting('ts_photography_single_page_sidebar_layout', array(
		'default'           => 'One Column',
		'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_single_page_sidebar_layout',array(
		'type'           => 'radio',
		'label'          => __('Single Page Layouts', 'ts-photography'),
		'section'        => 'ts_photography_left_right',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'ts-photography'),
			'Right Sidebar' => __('Right Sidebar', 'ts-photography'),
			'One Column'    => __('One Column', 'ts-photography'),
		),
	));

	// animation 
	$wp_customize->add_setting( 'ts_photography_sidebar_animation',array(
		'default' => true,
    	'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
  	) );

	$wp_customize->add_control('ts_photography_sidebar_animation',array(
	    'type' => 'checkbox',
	    'label' => __( 'Show / Hide Animations','ts-photography' ),
	    'section' => 'ts_photography_left_right'
	));

	//no Result Found
	$wp_customize->add_section('ts_photography_noresult_found',array(
		'title'	=> __('No Result Found','ts-photography'),
		'panel' => 'ts_photography_panel_id',
	));	

	$wp_customize->add_setting('ts_photography_noresult_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_noresult_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_noresult_found'
	));

	$wp_customize->add_setting('ts_photography_nosearch_found_title',array(
		'default'=> __('Nothing Found','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_nosearch_found_title',array(
		'label'	=> __('No Result Found Title','ts-photography'),
		'section'=> 'ts_photography_noresult_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('ts_photography_nosearch_found_content',array(
		'default'=> __('Sorry, but nothing matched your search terms. Please try again with some different keywords.','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_nosearch_found_content',array(
		'label'	=> __('No Result Found Content','ts-photography'),
		'section'=> 'ts_photography_noresult_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('ts_photography_show_noresult_search',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_show_noresult_search',array(
       'type' => 'checkbox',
       'label' => __('No Result search','ts-photography'),
       'section' => 'ts_photography_noresult_found'
    ));

	//404 Page Setting
	$wp_customize->add_section('ts_photography_404_page_setting',array(
		'title'	=> __('404 Page','ts-photography'),
		'panel' => 'ts_photography_panel_id',
	));	

	$wp_customize->add_setting('ts_photography_404_page_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_404_page_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_404_page_setting'
	));

	$wp_customize->add_setting('ts_photography_title_404_page',array(
		'default'=> __('404 Not Found','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_title_404_page',array(
		'label'	=> __('404 Page Title','ts-photography'),
		'section'=> 'ts_photography_404_page_setting',
		'type'=> 'text'
	));

	$wp_customize->add_setting('ts_photography_content_404_page',array(
		'default'=> __('Looks like you have taken a wrong turn&hellip. Dont worry&hellip it happens to the best of us.','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_content_404_page',array(
		'label'	=> __('404 Page Content','ts-photography'),
		'section'=> 'ts_photography_404_page_setting',
		'type'=> 'text'
	));

	$wp_customize->add_setting('ts_photography_button_404_page',array(
		'default'=> __('Back to Home Page','ts-photography'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_button_404_page',array(
		'label'	=> __('404 Page Button','ts-photography'),
		'section'=> 'ts_photography_404_page_setting',
		'type'=> 'text'
	));

	//Responsive Media Settings
	$wp_customize->add_section('ts_photography_responsive_setting',array(
		'title'	=> __('Responsive Settings','ts-photography'),
		'panel' => 'ts_photography_panel_id',
	));

	$wp_customize->add_setting('ts_photography_responsive_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_responsive_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_responsive_setting'
	));

	// taggle button color
  	$wp_customize->add_setting( 'ts_photography_taggle_menu_bg_color_settings', array(
	    'default' => '#222',
	    'sanitize_callback' => 'sanitize_hex_color'
  	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'ts_photography_taggle_menu_bg_color_settings', array(
  		'label' => __('Toggle Menu Bg Color', 'ts-photography'),
	    'section' => 'ts_photography_responsive_setting',
	    'settings' => 'ts_photography_taggle_menu_bg_color_settings',
  	)));

	$wp_customize->add_setting('ts_photography_open_menu_icon',array(
		'default'	=> 'fas fa-bars',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_open_menu_icon',array(
		'label'	=> __('Open Menu Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_responsive_setting',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_close_menu_icon',array(
		'default'	=> 'far fa-times-circle',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_close_menu_icon',array(
		'label'	=> __('Close Menu Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_responsive_setting',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('ts_photography_mobile_search_option',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_mobile_search_option',array(
       'type' => 'checkbox',
       'label' => __('Search','ts-photography'),
       'section' => 'ts_photography_responsive_setting'
    ));

    $wp_customize->add_setting('ts_photography_responsive_sticky_header',array(
       'default' => false,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_responsive_sticky_header',array(
       'type' => 'checkbox',
       'label' => __('Sticky Header','ts-photography'),
       'section' => 'ts_photography_responsive_setting'
    ));

    $wp_customize->add_setting('ts_photography_responsive_slider',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_responsive_slider',array(
       'type' => 'checkbox',
       'label' => __('Slider','ts-photography'),
       'section' => 'ts_photography_responsive_setting'
    ));

    $wp_customize->add_setting('ts_photography_responsive_scroll',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_responsive_scroll',array(
       'type' => 'checkbox',
       'label' => __('Scroll To Top','ts-photography'),
       'section' => 'ts_photography_responsive_setting'
    ));

    $wp_customize->add_setting('ts_photography_responsive_sidebar',array(
       'default' => true,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_responsive_sidebar',array(
       'type' => 'checkbox',
       'label' => __('Sidebar','ts-photography'),
       'section' => 'ts_photography_responsive_setting'
    ));

    $wp_customize->add_setting('ts_photography_responsive_preloader',array(
       'default' => false,
       'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
    ));
    $wp_customize->add_control('ts_photography_responsive_preloader',array(
       'type' => 'checkbox',
       'label' => __('Preloader','ts-photography'),
       'section' => 'ts_photography_responsive_setting'
    ));

	//footer
	$wp_customize->add_section('ts_photography_footer_section',array(
		'title'	=> __('Footer Text','ts-photography'),
		'priority'	=> null,
		'panel' => 'ts_photography_panel_id',
	));

	$wp_customize->add_setting('ts_photography_footer_premium_info',array(
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('ts_photography_footer_premium_info',array(
		'type'=> 'hidden',
		'description' => "<p>". esc_html__('Upgrade to premium for more features.','ts-photography') ."</p><a target='_blank' href='". esc_url(TS_PHOTOGRAPHY_BUY_NOW) ." '>". esc_html__('Upgrade to Pro','ts-photography') ."</a>",
		'section'=> 'ts_photography_footer_section'
	));

	$wp_customize->selective_refresh->add_partial( 'ts_photography_show_hide_footer', array(
		'selector' => '#footer',
		'render_callback' => 'ts_photography_customize_partial_ts_photography_show_hide_footer',
	));

	$wp_customize->add_setting('ts_photography_show_hide_footer',array(
		'default' => true,
		'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
	));
	$wp_customize->add_control('ts_photography_show_hide_footer',array(
     	'type' => 'checkbox',
        'label' => __('Show / Hide Footer','ts-photography'),
        'section' => 'ts_photography_footer_section',
	));

	$wp_customize->add_setting('ts_photography_footer_widget_areas',array(
        'default'           => 4,
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
    ));
    $wp_customize->add_control('ts_photography_footer_widget_areas',array(
        'type'        => 'select',
        'label'       => __('Footer widget area', 'ts-photography'),
        'section'     => 'ts_photography_footer_section',
        'description' => __('Select the number of widget areas you want in the footer. After that, go to Appearance > Widgets and add your widgets.', 'ts-photography'),
        'choices' => array(
            '1'     => __('One', 'ts-photography'),
            '2'     => __('Two', 'ts-photography'),
            '3'     => __('Three', 'ts-photography'),
            '4'     => __('Four', 'ts-photography')
        ),
    ));

    $wp_customize->add_setting('ts_photography_footer_widget_bg_color', array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'ts_photography_footer_widget_bg_color', array(
		'label'    => __('Footer Widget Background Color', 'ts-photography'),
		'section'  => 'ts_photography_footer_section',
	)));

	$wp_customize->add_setting('ts_photography_footer_widget_bg_image',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw',
	));
	$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'ts_photography_footer_widget_bg_image',array(
        'label' => __('Footer Widget Background Image','ts-photography'),
        'section' => 'ts_photography_footer_section'
	)));

	$wp_customize->add_setting('ts_photography_footer_heading',array(
	    'default' => 'Left',
	    'transport' => 'refresh',
	    'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_footer_heading',array(
	    'type' => 'select',
	    'label' => __('Footer Heading Alignment','ts-photography'),
	    'section' => 'ts_photography_footer_section',
	    'choices' => array(
	    	'Left' => __('Left','ts-photography'),
	        'Center' => __('Center','ts-photography'),
	        'Right' => __('Right','ts-photography')
	    ),
	) );

	$wp_customize->add_setting('ts_photography_footer_content',array(
	    'default' => 'Left',
	    'transport' => 'refresh',
	    'sanitize_callback' => 'ts_photography_sanitize_choices'
	));
	$wp_customize->add_control('ts_photography_footer_content',array(
	    'type' => 'select',
	    'label' => __('Footer Content Alignment','ts-photography'),
	    'section' => 'ts_photography_footer_section',
	    'choices' => array(
	    	'Left' => __('Left','ts-photography'),
	        'Center' => __('Center','ts-photography'),
	        'Right' => __('Right','ts-photography')
	    ),
	) );

	$wp_customize->add_setting('ts_photography_footer_font_size',array(
		'default'=> 24,
		'sanitize_callback'	=> 'ts_photography_sanitize_float'
	));
	$wp_customize->add_control('ts_photography_footer_font_size',array(
		'label'	=> __('Footer Heading Font Size','ts-photography'),
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'section'=> 'ts_photography_footer_section',
		'type'=> 'number'
	));

	$wp_customize->add_setting('ts_photography_footer_heading_font_weight',array(
        'default' => '600',
        'sanitize_callback' => 'ts_photography_sanitize_choices'
    ));
    $wp_customize->add_control('ts_photography_footer_heading_font_weight',array(
        'type' => 'select',
        'label' => __('Footer Heading Font Weight','ts-photography'),
        'section' => 'ts_photography_footer_section',
        'choices' => array(
            '100' => __('100','ts-photography'),
            '200' => __('200','ts-photography'),
            '300' => __('300','ts-photography'),
            '400' => __('400','ts-photography'),
            '500' => __('500','ts-photography'),
            '600' => __('600','ts-photography'),
            '700' => __('700','ts-photography'),
            '800' => __('800','ts-photography'),
            '900' => __('900','ts-photography'),
        ),
	) );

	$wp_customize->add_setting('ts_photography_footer_text_tranform',array(
		'default' => 'Uppercase',
		'sanitize_callback' => 'ts_photography_sanitize_choices'
 	));
 	$wp_customize->add_control('ts_photography_footer_text_tranform',array(
		'type' => 'radio',
		'label' => __('Footer Heading Text Transform','ts-photography'),
		'section' => 'ts_photography_footer_section',
		'choices' => array(
		   'Uppercase' => __('Uppercase','ts-photography'),
		   'Lowercase' => __('Lowercase','ts-photography'),
		   'Capitalize' => __('Capitalize','ts-photography'),
		),
	) );

	$wp_customize->selective_refresh->add_partial('ts_photography_show_hide_copyright', array(
		'selector' => '.copyright p',
		'render_callback' => 'ts_photography_customize_partial_ts_photography_show_hide_copyright',
	));

	$wp_customize->add_setting('ts_photography_show_hide_copyright',array(
		'default' => true,
		'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
	));
	$wp_customize->add_control('ts_photography_show_hide_copyright',array(
     	'type' => 'checkbox',
        'label' => __('Show / Hide Copyright','ts-photography'),
        'section' => 'ts_photography_footer_section',
	));

	$wp_customize->add_setting('ts_photography_copyright_bg_color_settings', array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'ts_photography_copyright_bg_color_settings', array(
		'label'    => __('Copyright Background Color', 'ts-photography'),
		'section'  => 'ts_photography_footer_section',
	)));
	
	$wp_customize->add_setting('ts_photography_footer_copy',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field',
	));	
	$wp_customize->add_control('ts_photography_footer_copy',array(
		'label'	=> __('Copyright Text','ts-photography'),
		'section'	=> 'ts_photography_footer_section',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('ts_photography_footer_content_font_size',array(
		'default'=> 16,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_footer_content_font_size',array(
		'label' => esc_html__( 'Copyright Font Size','ts-photography' ),
		'section'=> 'ts_photography_footer_section',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
        'type' => 'number',
	));

	$wp_customize->add_setting('ts_photography_copyright_padding',array(
		'default'=> 20,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_copyright_padding',array(
		'label'	=> __('Copyright Padding','ts-photography'),
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
		'section'=> 'ts_photography_footer_section',
		'type'=> 'number'
	));

	$wp_customize->add_setting('ts_photography_footer_text_color', array(
		'default'           => '#fff',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'ts_photography_footer_text_color', array(
		'label'    => __('Copyright Text Color', 'ts-photography'),
		'section'  => 'ts_photography_footer_section',
	)));

	$wp_customize->add_setting('ts_photography_footer_text_bg_color', array(
		'default'           => '#000',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'ts_photography_footer_text_bg_color', array(
		'label'    => __('Copyright Background Color', 'ts-photography'),
		'section'  => 'ts_photography_footer_section',
	)));

	$wp_customize->selective_refresh->add_partial( 'ts_photography_enable_disable_scroll', array(
		'selector' => '#scroll-top i',
		'render_callback' => 'ts_photography_customize_partial_ts_photography_enable_disable_scroll',
	));

	$wp_customize->add_setting('ts_photography_enable_disable_scroll',array(
        'default' => true,
        'sanitize_callback'	=> 'ts_photography_sanitize_checkbox'
	));
	$wp_customize->add_control('ts_photography_enable_disable_scroll',array(
     	'type' => 'checkbox',
      	'label' => __('Show / Hide Scroll Top Button','ts-photography'),
      	'section' => 'ts_photography_footer_section',
	));

	$wp_customize->add_setting('ts_photography_back_to_top_icon',array(
		'default'	=> 'fas fa-chevron-up',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Ts_Photography_Icon_Changer(
        $wp_customize,'ts_photography_back_to_top_icon',array(
		'label'	=> __('Scroll Back to Top Icon','ts-photography'),
		'transport' => 'refresh',
		'section'	=> 'ts_photography_footer_section',
		'type'		=> 'icon'
	)));

    $wp_customize->add_setting('ts_photography_back_to_top_bg_color', array(
		'default'           => 'var(--primary-color)',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'ts_photography_back_to_top_bg_color', array(
		'label'    => __('Back to Top Background Color', 'ts-photography'),
		'section'  => 'ts_photography_footer_section',
	)));

    $wp_customize->add_setting('ts_photography_back_to_top_bg_hover_color', array(
		'default'           => 'var(--primary-color)',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'ts_photography_back_to_top_bg_hover_color', array(
		'label'    => __('Back to Top Background Hover Color', 'ts-photography'),
		'section'  => 'ts_photography_footer_section',
	)));

	$wp_customize->add_setting('ts_photography_scroll_setting',array(
        'default' => 'Right',
	  'sanitize_callback' => 'ts_photography_sanitize_choices',
	));
	$wp_customize->add_control('ts_photography_scroll_setting',array(
        'type' => 'select',
        'label' => __('Scroll Back to Top Position','ts-photography'),
        'section' => 'ts_photography_footer_section',
        'choices' => array(
            'Left' => __('Left','ts-photography'),
            'Right' => __('Right','ts-photography'),
            'Center' => __('Center','ts-photography'),
        ),
	) );

	$wp_customize->add_setting('ts_photography_scroll_font_size_icon',array(
		'default'=> 20,
		'sanitize_callback'	=> 'ts_photography_sanitize_float',
	));
	$wp_customize->add_control('ts_photography_scroll_font_size_icon',array(
		'label'	=> __('Scroll Icon Font Size','ts-photography'),
		'section'=> 'ts_photography_footer_section',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
        'type' => 'number',
	)	);

	// Copyright Sticky //
	$wp_customize->add_setting( 'ts_photography_copyright_sticky',array(
      'default' => 0,
      'transport' => 'refresh',
      'sanitize_callback' => 'ts_photography_sanitize_checkbox'
    ) );
    $wp_customize->add_control('ts_photography_copyright_sticky',array(
		'type' => 'checkbox',
      'label' => __('Show / Hide Sticky Copyright','ts-photography'),
      'section' => 'ts_photography_footer_section',
    ));
	
}
add_action( 'customize_register', 'ts_photography_customize_register' );	

// logo resize
load_template( trailingslashit( get_template_directory() ) . '/inc/logo/logo-resizer.php' );

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

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

		static $instance = null;

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

		return $instance;
	}

	/**
	 * Constructor method.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function __construct() {}

	/**
	 * Sets up initial actions.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function setup_actions() {

		// Register panels, sections, settings, controls, and partials.
		add_action( 'customize_register', array( $this, 'sections' ) );

		// Register scripts and styles for the controls.
		add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
	}

	/**
	 * Sets up the customizer sections.
	 *
	 * @since  1.0.0
	 * @access public
	 * @param  object  $manager
	 * @return void
	 */
	public function sections( $manager ) {

		// Load custom sections.
		load_template( trailingslashit( get_template_directory() ) . '/inc/section-pro.php' );

		// Register custom section types.
		$manager->register_section_type( 'TS_Photography_Customize_Section_Pro' );

		// Register sections.
		$manager->add_section(
			new TS_Photography_Customize_Section_Pro(
				$manager,
				'ts_photography_example_1',
				array(
					'priority'	=> 9,
					'title'    => esc_html__( 'Photography Pro', 'ts-photography' ),
					'pro_text' => esc_html__( 'Get Pro','ts-photography' ),
					'pro_url'  => esc_url('https://www.themescaliber.com/products/premium-photography-wordpress-theme')
				)
			)
		);

		$manager->add_section(
			new TS_Photography_Customize_Section_Pro(
				$manager,
				'ts_photography_doc_link',
				array(
					'priority'	=> 10,
					'title'    => esc_html__( 'Guide', 'ts-photography' ),
					'pro_text' => esc_html__( 'Documentation','ts-photography' ),
					'pro_url'  => esc_url('https://preview.themescaliber.com/doc/free-ts-photography/')
				)
			)
		);

		$manager->add_section(
			new TS_Photography_Customize_Section_Pro(
				$manager,
				'ts_photography_demo_link',
				array(
					'priority'	=> 11,
					'title'    => esc_html__( 'Live Demo', 'ts-photography' ),
					'pro_text' => esc_html__( 'Preview','ts-photography' ),
					'pro_url'  => esc_url('https://preview.themescaliber.com/ts-photography/')
				)
			)
		);
	}

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

		wp_enqueue_script( 'ts-photography-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/js/customize-controls.js', array( 'customize-controls' ) );

		wp_enqueue_style( 'ts-photography-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/css/customize-controls.css' );
	}
}

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