<?php
/**
 * Motivational Speaker: Customizer
 *
 * @subpackage Motivational Speaker
 * @since 1.0
 */

function motivational_speaker_customize_register( $wp_customize ) {

	wp_enqueue_style('customizercustom_css', esc_url( get_template_directory_uri() ). '/assets/css/customizer.css');

	// fontawesome icon-picker

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

	// Add custom control.
  	require get_parent_theme_file_path( 'inc/switch/control_switch.php' );

  	require get_parent_theme_file_path( 'inc/custom-control.php' );

  	//Register the sortable control type.
	$wp_customize->register_control_type( 'Motivational_Speaker_Control_Sortable' );

	// Add homepage customizer file
  	require get_template_directory() . '/inc/customizer-home-page.php';

  	add_action( 'customize_controls_enqueue_scripts', function() {
    	wp_enqueue_script(
	        'motivational-speaker-customizer-reset',
	        get_theme_file_uri() . '/assets/js/color-reset.js', // Ensure the JS file exists in your theme
	        array( 'customize-controls', 'jquery' ),
	        '1.0',
	        true
    	);
	} );

	// pro section
 	$wp_customize->add_section('motivational_speaker_pro', array(
        'title'    => __('UPGRADE MOTIVATIONAL PREMIUM', 'motivational-speaker'),
        'priority' => 1,
    ));
    $wp_customize->add_setting('motivational_speaker_pro', array(
        'default'           => null,
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control(new Motivational_Speaker_Pro_Control($wp_customize, 'motivational_speaker_pro', array(
        'label'    => __('MOTIVATIONAL SPEAKER PREMIUM', 'motivational-speaker'),
        'section'  => 'motivational_speaker_pro',
        'settings' => 'motivational_speaker_pro',
        'priority' => 1,
    )));

	//Logo
	$wp_customize->add_setting('motivational_speaker_logo_max_height',array(
		'default'=> '100',
		'transport' => 'refresh',
		'sanitize_callback' => 'motivational_speaker_sanitize_integer'
	));
	$wp_customize->add_control(new Motivational_Speaker_Slider_Custom_Control( $wp_customize, 'motivational_speaker_logo_max_height',array(
		'label'	=> esc_html__('Logo Width','motivational-speaker'),
		'section'=> 'title_tagline',
		'settings'=>'motivational_speaker_logo_max_height',
		'input_attrs' => array(
			'reset' 		   => 100,
            'step'             => 1,
			'min'              => 0,
			'max'              => 250,
        ),
        'priority' => 9,
	)));
	$wp_customize->add_setting('motivational_speaker_logo_title',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_logo_title',
			array(
				'settings'        => 'motivational_speaker_logo_title',
				'section'         => 'title_tagline',
				'label'           => __( 'Show Site Title', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting('motivational_speaker_site_title_fontsize',array(
		'default'=> 25,
		'transport' => 'refresh',
		'sanitize_callback' => 'motivational_speaker_sanitize_integer'
	));
	$wp_customize->add_control(new Motivational_Speaker_Slider_Custom_Control( $wp_customize, 'motivational_speaker_site_title_fontsize',array(
		'label' => esc_html__( 'Site Title font size','motivational-speaker' ),
		'section'=> 'title_tagline',
		'settings'=>'motivational_speaker_site_title_fontsize',
		'input_attrs' => array(
			'reset'			   => 25,
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
	)));

	$wp_customize->add_setting('motivational_speaker_logo_text',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => 'off',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_logo_text',
			array(
				'settings'        => 'motivational_speaker_logo_text',
				'section'         => 'title_tagline',
				'label'           => __( 'Show Site Tagline', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	
	$wp_customize->add_setting('motivational_speaker_site_tagline_fontsize',array(
		'default'=> 15,
		'transport' => 'refresh',
		'sanitize_callback' => 'motivational_speaker_sanitize_integer'
	));
	$wp_customize->add_control(new Motivational_Speaker_Slider_Custom_Control( $wp_customize, 'motivational_speaker_site_tagline_fontsize',array(
		'label' => esc_html__( 'Site Tagline font size','motivational-speaker' ),
		'section'=> 'title_tagline',
		'settings'=>'motivational_speaker_site_tagline_fontsize',
		'input_attrs' => array(
			'reset'			   => 15,
            'step'             => 1,
			'min'              => 0,
			'max'              => 30,
        ),
	)));

	//colors
	if ( $wp_customize->get_section( 'colors' ) ) {
        $wp_customize->get_section( 'colors' )->title = __( 'Global Colors', 'motivational-speaker' );
        $wp_customize->get_section( 'colors' )->priority = 2;
    }

    $wp_customize->add_setting( 'motivational_speaker_global_color_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_global_color_heading', array(
			'label'       => esc_html__( 'Global Colors', 'motivational-speaker' ),
			'section'     => 'colors',
			'settings'    => 'motivational_speaker_global_color_heading',
			'priority'       => 1,

	) ) );

	$wp_customize->add_setting( 'motivational_speaker_reset_colors', array(
	    'default'           => '',
	    'sanitize_callback' => 'sanitize_text_field',
	    'transport'         => 'postMessage', 
	) );

	$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'motivational_speaker_reset_colors', array(
	    'label'       => esc_html__( 'Reset Colors', 'motivational-speaker' ),
	    'section'     => 'colors',
	    'settings'    => 'motivational_speaker_reset_colors',
	    'type'        => 'button',
	    'input_attrs' => array(
	        'class' => 'button color-reset-btn',
	        'onclick' => 'resetColorsToDefault();', // Attach custom JS function
	    ),
	    'priority' => '2'
	) ) );

    $wp_customize->add_setting('motivational_speaker_primary_color', array(
	    'default' => '#eb5151',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'motivational_speaker_primary_color', array(
	    'section' => 'colors',
	    'label' => esc_html__('Theme Color', 'motivational-speaker'),
	 
	)));

	$wp_customize->add_setting('motivational_speaker_heading_color', array(
	    'default' => '#222222',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'motivational_speaker_heading_color', array(
	    'section' => 'colors',
	    'label' => esc_html__('Theme Heading Color', 'motivational-speaker'),
	 
	)));

	$wp_customize->add_setting('motivational_speaker_text_color', array(
	    'default' => '#757575',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'motivational_speaker_text_color', array(
	    'section' => 'colors',
	    'label' => esc_html__('Theme Text Color', 'motivational-speaker'),
	 
	)));

	$wp_customize->add_setting('motivational_speaker_primary_fade', array(
	    'default' => '#fff5f3',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'motivational_speaker_primary_fade', array(
	    'section' => 'colors',
	    'label' => esc_html__('theme Color Light', 'motivational-speaker'),
	 
	)));

	$wp_customize->add_setting('motivational_speaker_footer_bg', array(
	    'default' => '#222222',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'motivational_speaker_footer_bg', array(
	    'section' => 'colors',
	    'label' => esc_html__('Footer Bg color', 'motivational-speaker'),
	)));

	$wp_customize->add_setting('motivational_speaker_post_bg', array(
	    'default' => '#ffffff',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'motivational_speaker_post_bg', array(
	    'section' => 'colors',
	    'label' => esc_html__('sidebar/Blog Post Bg color', 'motivational-speaker'),
	)));

	//typography
	$wp_customize->add_section( 'motivational_speaker_typography_settings', array(
		'title'       => __( 'Typography Settings', 'motivational-speaker' ),
		'priority'       => 2,
	) );
	$font_choices = array(
			'' => 'Select',
			'Source Sans Pro:400,700,400italic,700italic' => 'Source Sans Pro',
			'Open Sans:400italic,700italic,400,700' => 'Open Sans',
			'Oswald:400,700' => 'Oswald',
			'Playfair Display:400,700,400italic' => 'Playfair Display',
			'Montserrat:400,700' => 'Montserrat',
			'Raleway:400,700' => 'Raleway',
			'Droid Sans:400,700' => 'Droid Sans',
			'Lato:400,700,400italic,700italic' => 'Lato',
			'Arvo:400,700,400italic,700italic' => 'Arvo',
			'Lora:400,700,400italic,700italic' => 'Lora',
			'Merriweather:400,300italic,300,400italic,700,700italic' => 'Merriweather',
			'Oxygen:400,300,700' => 'Oxygen',
			'PT Serif:400,700' => 'PT Serif',
			'PT Sans:400,700,400italic,700italic' => 'PT Sans',
			'PT Sans Narrow:400,700' => 'PT Sans Narrow',
			'Cabin:400,700,400italic' => 'Cabin',
			'Fjalla One:400' => 'Fjalla One',
			'Francois One:400' => 'Francois One',
			'Josefin Sans:400,300,600,700' => 'Josefin Sans',
			'Libre Baskerville:400,400italic,700' => 'Libre Baskerville',
			'Arimo:400,700,400italic,700italic' => 'Arimo',
			'Ubuntu:400,700,400italic,700italic' => 'Ubuntu',
			'Bitter:400,700,400italic' => 'Bitter',
			'Droid Serif:400,700,400italic,700italic' => 'Droid Serif',
			'Roboto:400,400italic,700,700italic' => 'Roboto',
			'Open Sans Condensed:700,300italic,300' => 'Open Sans Condensed',
			'Roboto Condensed:400italic,700italic,400,700' => 'Roboto Condensed',
			'Roboto Slab:400,700' => 'Roboto Slab',
			'Yanone Kaffeesatz:400,700' => 'Yanone Kaffeesatz',
			'Rokkitt:400' => 'Rokkitt',
	);
	$wp_customize->add_setting( 'motivational_speaker_section_typo_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_typo_heading', array(
		'label'       => esc_html__( 'Typography Settings', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_typography_settings',
		'settings'    => 'motivational_speaker_section_typo_heading',
	) ) );
	$wp_customize->add_setting( 'motivational_speaker_headings_text', array(
		'sanitize_callback' => 'motivational_speaker_sanitize_fonts',
	));
	$wp_customize->add_control( 'motivational_speaker_headings_text', array(
		'type' => 'select',
		'description' => __('Select your suitable font for the headings.', 'motivational-speaker'),
		'section' => 'motivational_speaker_typography_settings',
		'choices' => $font_choices
	));
	$wp_customize->add_setting( 'motivational_speaker_body_text', array(
		'sanitize_callback' => 'motivational_speaker_sanitize_fonts'
	));
	$wp_customize->add_control( 'motivational_speaker_body_text', array(
		'type' => 'select',
		'description' => __( 'Select your suitable font for the body.', 'motivational-speaker' ),
		'section' => 'motivational_speaker_typography_settings',
		'choices' => $font_choices
	) );

    // Theme General Settings
    $wp_customize->add_section('motivational_speaker_theme_settings',array(
        'title' => __('Theme General Settings', 'motivational-speaker'),
        'priority'   => 2,
    ) );
    $wp_customize->add_setting( 'motivational_speaker_sticky_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_sticky_heading', array(
		'label'       => esc_html__( 'Sticky Header Settings', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_theme_settings',
		'settings'    => 'motivational_speaker_sticky_heading',
	) ) );
    $wp_customize->add_setting(
		'motivational_speaker_sticky_header',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => 'off',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_sticky_header',
			array(
				'settings'        => 'motivational_speaker_sticky_header',
				'section'         => 'motivational_speaker_theme_settings',
				'label'           => __( 'Show Sticky Header', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'motivational_speaker_loader_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_loader_heading', array(
		'label'       => esc_html__( 'Loader Settings', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_theme_settings',
		'settings'    => 'motivational_speaker_loader_heading',
	) ) );
	$wp_customize->add_setting(
		'motivational_speaker_theme_loader',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => 'off',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_theme_loader',
			array(
				'settings'        => 'motivational_speaker_theme_loader',
				'section'         => 'motivational_speaker_theme_settings',
				'label'           => __( 'Show Site Loader', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);

	$wp_customize->add_setting('motivational_speaker_loader_style',array(
        'default' => 'style_one',
        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
	));
	$wp_customize->add_control('motivational_speaker_loader_style',array(
        'type' => 'select',
        'label' => __('Select Loader Design','motivational-speaker'),
        'section' => 'motivational_speaker_theme_settings',
        'choices' => array(
            'style_one' => __('Circle','motivational-speaker'),
            'style_two' => __('Bar','motivational-speaker'),
        ),
	) );
	
	$wp_customize->add_setting( 'motivational_speaker_theme_width_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_theme_width_heading', array(
			'label'       => esc_html__( 'Theme Width Settings', 'motivational-speaker' ),
			'section'     => 'motivational_speaker_theme_settings',
			'settings'    => 'motivational_speaker_theme_width_heading',
	) ) );
	$wp_customize->add_setting('motivational_speaker_width_options',array(
        'default' => 'full_width',
        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
	));
	$wp_customize->add_control('motivational_speaker_width_options',array(
        'type' => 'select',
        'label' => __('Theme Width Option','motivational-speaker'),
        'section' => 'motivational_speaker_theme_settings',
        'choices' => array(
            'full_width' => __('Fullwidth','motivational-speaker'),
            'container' => __('Container','motivational-speaker'),
            'container_fluid' => __('Container Fluid','motivational-speaker'),
        ),
	) );
	$wp_customize->add_setting( 'motivational_speaker_menu_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_menu_heading', array(
			'label'       => esc_html__( 'Menu Settings', 'motivational-speaker' ),
			'section'     => 'motivational_speaker_theme_settings',
			'settings'    => 'motivational_speaker_menu_heading',
	) ) );
	$wp_customize->add_setting('motivational_speaker_menu_text_transform',array(
        'default' => 'CAPITALISE',
        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
	));
	$wp_customize->add_control('motivational_speaker_menu_text_transform',array(
        'type' => 'select',
        'label' => __('Menus Text Transform','motivational-speaker'),
        'section' => 'motivational_speaker_theme_settings',
        'choices' => array(
            'CAPITALISE' => __('CAPITALISE','motivational-speaker'),
            'UPPERCASE' => __('UPPERCASE','motivational-speaker'),
            'LOWERCASE' => __('LOWERCASE','motivational-speaker'),
        ),
	) );
	$wp_customize->add_setting('motivational_speaker_menu_fontsize',array(
		'default'=> 14,
		'transport' => 'refresh',
		'sanitize_callback' => 'motivational_speaker_sanitize_integer'
	));
	$wp_customize->add_control(new Motivational_Speaker_Slider_Custom_Control( $wp_customize, 'motivational_speaker_menu_fontsize',array(
		'label' => esc_html__( 'menu font size','motivational-speaker' ),
		'section'=> 'motivational_speaker_theme_settings',
		'settings'=>'motivational_speaker_menu_fontsize',
		'input_attrs' => array(
			'reset'			   => 14,
            'step'             => 1,
			'min'              => 0,
			'max'              => 20,
        ),
	)));
	$wp_customize->add_setting( 'motivational_speaker_section_scroll_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_scroll_heading', array(
		'label'       => esc_html__( 'Scroll Top Settings', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_theme_settings',
		'settings'    => 'motivational_speaker_section_scroll_heading',
	) ) );

	$wp_customize->add_setting(
		'motivational_speaker_scroll_enable',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_scroll_enable',
			array(
				'settings'        => 'motivational_speaker_scroll_enable',
				'section'         => 'motivational_speaker_theme_settings',
				'label'           => __( 'show Scroll Top', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);


	$wp_customize->add_setting('motivational_speaker_scroll_options',array(
        'default' => 'right_align',
        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
	));
	$wp_customize->add_control('motivational_speaker_scroll_options',array(
		'type' => 'radio',
		'label'     => __('Scroll Top Alignment', 'motivational-speaker'),
		'section' => 'motivational_speaker_theme_settings',
		'type' => 'select',
		'choices' => array(
			'left_align' => __('LEFT','motivational-speaker'),
			'center_align' => __('CENTER','motivational-speaker'),
			'right_align' => __('RIGHT','motivational-speaker'),
		)
	) );

	$wp_customize->add_setting('motivational_speaker_scroll_top_icon',array(
		'default'	=> 'fas fa-chevron-up',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Motivational_Speaker_Fontawesome_Icon_Chooser(
        $wp_customize,'motivational_speaker_scroll_top_icon',array(
		'label'	=> __('Add Scroll Top Icon','motivational-speaker'),
		'transport' => 'refresh',
		'section'	=> 'motivational_speaker_theme_settings',
		'setting'	=> 'motivational_speaker_scroll_top_icon',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting( 'motivational_speaker_section_cursor_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_cursor_heading', array(
		'label'       => esc_html__( 'Cursor Setting', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_theme_settings',
		'settings'    => 'motivational_speaker_section_cursor_heading',
	) ) );

	$wp_customize->add_setting(
		'motivational_speaker_enable_custom_cursor',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_enable_custom_cursor',
			array(
				'settings'        => 'motivational_speaker_enable_custom_cursor',
				'section'         => 'motivational_speaker_theme_settings',
				'label'           => __( 'show custom cursor', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);

	$wp_customize->add_setting( 'motivational_speaker_section_animation_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_animation_heading', array(
		'label'       => esc_html__( 'Animation Setting', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_theme_settings',
		'settings'    => 'motivational_speaker_section_animation_heading',
	) ) );

	$wp_customize->add_setting(
		'motivational_speaker_animation_enable',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_animation_enable',
			array(
				'settings'        => 'motivational_speaker_animation_enable',
				'section'         => 'motivational_speaker_theme_settings',
				'label'           => __( 'show/Hide Animation', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);

	$wp_customize->add_setting( 'motivational_speaker_section_description_first_letter', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_description_first_letter', array(
		'label'       => esc_html__( 'First Letter Capital Settings', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_theme_settings',
		'settings'    => 'motivational_speaker_section_description_first_letter',
	) ) );
	$wp_customize->add_setting(
		'motivational_speaker_first_letter_capital_enable',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_first_letter_capital_enable',
			array(
				'settings'        => 'motivational_speaker_first_letter_capital_enable',
				'section'         => 'motivational_speaker_theme_settings',
				'label'           => __( 'Show/Hide First Letter Capital', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);

	// Post Layouts
	$wp_customize->add_panel( 'motivational_speaker_post_panel', array(
		'title' => esc_html__( 'Post Layout', 'motivational-speaker' ),
		'priority' => 3,
	));
	$wp_customize->add_section('motivational_speaker_blog_meta',array(
        'title' => __('Blog Meta', 'motivational-speaker'), 
        'panel' => 'motivational_speaker_post_panel',       
    ) );

    $wp_customize->add_setting( 'motivational_speaker_section_blog_meta_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_blog_meta_heading', array(
		'label'       => esc_html__( 'Blog Meta Settings', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_blog_meta',
		'settings'    => 'motivational_speaker_section_blog_meta_heading',
	) ) );

	$wp_customize->add_setting('motivational_speaker_date',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_date',
			array(
				'settings'        => 'motivational_speaker_date',
				'section'         => 'motivational_speaker_blog_meta',
				'label'           => __( 'Show Date', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->selective_refresh->add_partial( 'motivational_speaker_date', array(
		'selector' => '.date-box',
		'render_callback' => 'motivational_speaker_customize_partial_motivational_speaker_date',
	) );
	$wp_customize->add_setting('motivational_speaker_date_icon',array(
		'default'	=> 'far fa-calendar-alt',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Motivational_Speaker_Fontawesome_Icon_Chooser(
        $wp_customize,'motivational_speaker_date_icon',array(
		'label'	=> __('date Icon','motivational-speaker'),
		'transport' => 'refresh',
		'section'	=> 'motivational_speaker_blog_meta',
		'setting'	=> 'motivational_speaker_date_icon',
		'type'		=> 'icon'
	)));

	$wp_customize->add_setting('motivational_speaker_date_type',array(
        'default' => 'published',
        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
	));
	$wp_customize->add_control('motivational_speaker_date_type',array(
		'type' => 'radio',
		'label'     => __('Date Format', 'motivational-speaker'),
		'section' => 'motivational_speaker_blog_meta',
		'type' => 'select',
		'choices' => array(
			'published' => __('published date','motivational-speaker'),
            'modified' => __('modified date','motivational-speaker'),
		),
	) );



	$wp_customize->add_setting('motivational_speaker_sticky_icon',array(
		'default'	=> 'fas fa-thumb-tack',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Motivational_Speaker_Fontawesome_Icon_Chooser(
        $wp_customize,'motivational_speaker_sticky_icon',array(
		'label'	=> __('Sticky Post Icon','motivational-speaker'),
		'transport' => 'refresh',
		'section'	=> 'motivational_speaker_blog_meta',
		'setting'	=> 'motivational_speaker_sticky_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('motivational_speaker_admin',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_admin',
			array(
				'settings'        => 'motivational_speaker_admin',
				'section'         => 'motivational_speaker_blog_meta',
				'label'           => __( 'Show Author/Admin', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->selective_refresh->add_partial( 'motivational_speaker_admin', array(
		'selector' => '.entry-author',
		'render_callback' => 'motivational_speaker_customize_partial_motivational_speaker_admin',
	) );
	$wp_customize->add_setting('motivational_speaker_author_icon',array(
		'default'	=> 'fas fa-user',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Motivational_Speaker_Fontawesome_Icon_Chooser(
        $wp_customize,'motivational_speaker_author_icon',array(
		'label'	=> __('Author Icon','motivational-speaker'),
		'transport' => 'refresh',
		'section'	=> 'motivational_speaker_blog_meta',
		'setting'	=> 'motivational_speaker_author_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('motivational_speaker_comment',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_comment',
			array(
				'settings'        => 'motivational_speaker_comment',
				'section'         => 'motivational_speaker_blog_meta',
				'label'           => __( 'Show Comment', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->selective_refresh->add_partial( 'motivational_speaker_comment', array(
		'selector' => '.entry-comments',
		'render_callback' => 'motivational_speaker_customize_partial_motivational_speaker_comment',
	) );
	$wp_customize->add_setting('motivational_speaker_comment_icon',array(
		'default'	=> 'fas fa-comments',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Motivational_Speaker_Fontawesome_Icon_Chooser(
        $wp_customize,'motivational_speaker_comment_icon',array(
		'label'	=> __('comment Icon','motivational-speaker'),
		'transport' => 'refresh',
		'section'	=> 'motivational_speaker_blog_meta',
		'setting'	=> 'motivational_speaker_comment_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('motivational_speaker_tag',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_tag',
			array(
				'settings'        => 'motivational_speaker_tag',
				'section'         => 'motivational_speaker_blog_meta',
				'label'           => __( 'Show tag count', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->selective_refresh->add_partial( 'motivational_speaker_tag', array(
		'selector' => '.tags',
		'render_callback' => 'motivational_speaker_customize_partial_motivational_speaker_tag',
	) );
	$wp_customize->add_setting('motivational_speaker_tag_icon',array(
		'default'	=> 'fas fa-tags',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Motivational_Speaker_Fontawesome_Icon_Chooser(
        $wp_customize,'motivational_speaker_tag_icon',array(
		'label'	=> __('tag Icon','motivational-speaker'),
		'transport' => 'refresh',
		'section'	=> 'motivational_speaker_blog_meta',
		'setting'	=> 'motivational_speaker_tag_icon',
		'type'		=> 'icon'
	)));
	// FUll Content // 
	$wp_customize->add_setting('motivational_speaker_blog_meta_content',array(
    	'default' => 'Excerpt Content',
        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
	));
	$wp_customize->add_control('motivational_speaker_blog_meta_content',array(
        'type' => 'radio',
        'label' => __('Blog Post Content Type','motivational-speaker'),
        'section' => 'motivational_speaker_blog_meta',
		'type' => 'select',
        'choices' => array(
            'No Content' => __('No Content','motivational-speaker'),
            'Full Content' => __('Full Content','motivational-speaker'),
            'Excerpt Content' => __('Excerpt Content','motivational-speaker'),
        ),
	) );
    $wp_customize->add_setting( 'motivational_speaker_post_excerpt_number', array(
		'default'              => 20,
		'sanitize_callback'	=> 'absint'
	) );
	$wp_customize->add_control( 'motivational_speaker_post_excerpt_number', array(
		'label'       => esc_html__( 'Blog Post Excerpt Number (Max 50)','motivational-speaker' ),
		'section'     => 'motivational_speaker_blog_meta',
		'type'        => 'number',
		'settings'    => 'motivational_speaker_post_excerpt_number',
		'input_attrs' => array(
			'step'             => 1,
			'min'              => 0,
			'max'              => 50,
		),
		'active_callback' => 'motivational_speaker_excerpt_enabled'
	) );
	$wp_customize->add_setting( 'motivational_speaker_button_excerpt_suffix', array(
		'default'   => '...',
		'sanitize_callback'	=> 'sanitize_text_field'
	) );
	$wp_customize->add_control( 'motivational_speaker_button_excerpt_suffix', array(
		'label'       => esc_html__( 'Post Excerpt Suffix','motivational-speaker' ),
		'section'     => 'motivational_speaker_blog_meta',
		'type'        => 'text',
		'settings'    => 'motivational_speaker_button_excerpt_suffix',
		'active_callback' => 'motivational_speaker_excerpt_enabled'
	) );
    $wp_customize->add_section('motivational_speaker_layout',array(
        'title' => __('Single-Post Layout', 'motivational-speaker'),
        'panel' => 'motivational_speaker_post_panel',
    ) );
    $wp_customize->add_setting( 'motivational_speaker_section_post_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_post_heading', array(
		'label'       => esc_html__( 'single Post Structure', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_layout',
		'settings'    => 'motivational_speaker_section_post_heading',
	) ) );
	$wp_customize->add_setting( 'motivational_speaker_single_post_option',
		array(
			'default' => 'single_right_sidebar',
			'transport' => 'refresh',
			'sanitize_callback' => 'sanitize_text_field'
		)
	);
	$wp_customize->add_control( new Motivational_Speaker_Radio_Image_Control( $wp_customize, 'motivational_speaker_single_post_option',
		array(
			'type'=>'select',
			'label' => __( 'select Single Post Page Layout', 'motivational-speaker' ),
			'section' => 'motivational_speaker_layout',
			'choices' => array(

				'single_right_sidebar' => array(
					'image' => get_template_directory_uri().'/assets/images/2column.jpg',
					'name' => __( 'Right Sidebar', 'motivational-speaker' )
				),
				'single_left_sidebar' => array(
					'image' => get_template_directory_uri().'/assets/images/left.png',
					'name' => __( 'Left Sidebar', 'motivational-speaker' )
				),
				'single_full_width' => array(
					'image' => get_template_directory_uri().'/assets/images/1column.jpg',
					'name' => __( 'One Column', 'motivational-speaker' )
				),
			)
		)
	) );
	$wp_customize->add_control(new Motivational_Speaker_Fontawesome_Icon_Chooser(
        $wp_customize,'motivational_speaker_single_tag_icon',array(
		'label'	=> __('tag Icon','motivational-speaker'),
		'transport' => 'refresh',
		'section'	=> 'motivational_speaker_layout',
		'setting'	=> 'motivational_speaker_single_tag_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('motivational_speaker_single_post_tag',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_single_post_tag',
			array(
				'settings'        => 'motivational_speaker_single_post_tag',
				'section'         => 'motivational_speaker_layout',
				'label'           => __( 'Show Tags', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->selective_refresh->add_partial( 'motivational_speaker_single_post_tag', array(
		'selector' => '.single-tags',
		'render_callback' => 'motivational_speaker_customize_partial_motivational_speaker_single_post_tag',
	) );
	$wp_customize->add_setting('motivational_speaker_similar_post',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_similar_post',
			array(
				'settings'        => 'motivational_speaker_similar_post',
				'section'         => 'motivational_speaker_layout',
				'label'           => __( 'Show Similar post', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting('motivational_speaker_similar_text',array(
		'default' => 'Explore More',
		'sanitize_callback' => 'sanitize_text_field'
	)); 
	$wp_customize->add_control('motivational_speaker_similar_text',array(
		'label' => esc_html__('Similar Post Heading','motivational-speaker'),
		'section' => 'motivational_speaker_layout',
		'setting' => 'motivational_speaker_similar_text',
		'type'    => 'text'
	));
	$wp_customize->add_section('motivational_speaker_archieve_post_layot',array(
        'title' => __('Archieve-Post Layout', 'motivational-speaker'),
        'panel' => 'motivational_speaker_post_panel',
    ) );
	$wp_customize->add_setting( 'motivational_speaker_section_archive_post_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_archive_post_heading', array(
		'label'       => esc_html__( 'Archieve Post Structure', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_archieve_post_layot',
		'settings'    => 'motivational_speaker_section_archive_post_heading',
	) ) );
    $wp_customize->add_setting( 'motivational_speaker_post_option',
		array(
			'default' => 'right_sidebar',
			'transport' => 'refresh',
			'sanitize_callback' => 'sanitize_text_field'
		)
	);
	$wp_customize->add_control( new Motivational_Speaker_Radio_Image_Control( $wp_customize, 'motivational_speaker_post_option',
		array(
			'type'=>'select',
			'label' => __( 'select Post Page Layout', 'motivational-speaker' ),
			'section' => 'motivational_speaker_archieve_post_layot',
			'choices' => array(
				'right_sidebar' => array(
					'image' => get_template_directory_uri().'/assets/images/2column.jpg',
					'name' => __( 'Right Sidebar', 'motivational-speaker' )
				),
				'left_sidebar' => array(
					'image' => get_template_directory_uri().'/assets/images/left.png',
					'name' => __( 'Left Sidebar', 'motivational-speaker' )
				),
				'one_column' => array(
					'image' => get_template_directory_uri().'/assets/images/1column.jpg',
					'name' => __( 'One Column', 'motivational-speaker' )
				),
				'three_column' => array(
					'image' => get_template_directory_uri().'/assets/images/3column.jpg',
					'name' => __( 'Three Column', 'motivational-speaker' )
				),
				'four_column' => array(
					'image' => get_template_directory_uri().'/assets/images/4column.jpg',
					'name' => __( 'Four Column', 'motivational-speaker' )
				),
				'grid_sidebar' => array(
					'image' => get_template_directory_uri().'/assets/images/grid-sidebar.jpg',
					'name' => __( 'Grid-Sidebar Layout', 'motivational-speaker' )
				),
				'grid_left_sidebar' => array(
					'image' => get_template_directory_uri().'/assets/images/grid-left.png',
					'name' => __( 'Grid-Left-Sidebar Layout', 'motivational-speaker' )
				),
				'grid_post' => array(
					'image' => get_template_directory_uri().'/assets/images/grid.jpg',
					'name' => __( 'Grid Layout', 'motivational-speaker' )
				)
			)
		)
	) );
	$wp_customize->add_setting('motivational_speaker_grid_column',array(
        'default' => '3_column',
        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
	));
	$wp_customize->add_control('motivational_speaker_grid_column',array(
		'type' => 'radio',
		'label'     => __('Grid Post Per Row', 'motivational-speaker'),
		'section' => 'motivational_speaker_archieve_post_layot',
		'type' => 'select',
		'choices' => array(
			'1_column' => __('1','motivational-speaker'),
            '2_column' => __('2','motivational-speaker'),
            '3_column' => __('3','motivational-speaker'),
            '4_column' => __('4','motivational-speaker'),
		)
	) );
	$wp_customize->add_setting('archieve_post_order', array(
        'default' => array('title', 'image', 'meta','excerpt','btn'),
        'sanitize_callback' => 'motivational_speaker_sanitize_sortable',
    ));
    $wp_customize->add_control(new Motivational_Speaker_Control_Sortable($wp_customize, 'archieve_post_order', array(
    	'label' => esc_html__('Post Order', 'motivational-speaker'),
        'description' => __('Drag & Drop post items to re-arrange the order and also hide and show items as per the need by clicking on the eye icon.', 'motivational-speaker') ,
        'section' => 'motivational_speaker_archieve_post_layot',
        'choices' => array(
            'title' => __('title', 'motivational-speaker') ,
            'image' => __('media', 'motivational-speaker') ,
            'meta' => __('meta', 'motivational-speaker') ,
            'excerpt' => __('excerpt', 'motivational-speaker') ,
            'btn' => __('Read more', 'motivational-speaker') ,
        ) ,
    )));
	$wp_customize->add_setting('motivational_speaker_post_excerpt',array(
		'default'=> 30,
		'transport' => 'refresh',
		'sanitize_callback' => 'motivational_speaker_sanitize_integer'
	));
	$wp_customize->add_control(new Motivational_Speaker_Slider_Custom_Control( $wp_customize, 'motivational_speaker_post_excerpt',array(
		'label' => esc_html__( 'Excerpt Limit','motivational-speaker' ),
		'section'=> 'motivational_speaker_archieve_post_layot',
		'settings'=>'motivational_speaker_post_excerpt',
		'input_attrs' => array(
			'reset'			   => 30,
            'step'             => 1,
			'min'              => 0,
			'max'              => 100,
        ),
	)));
	$wp_customize->add_setting('motivational_speaker_read_more_text',array(
		'default' => 'Read More',
		'sanitize_callback' => 'sanitize_text_field'
	)); 
	$wp_customize->add_control('motivational_speaker_read_more_text',array(
		'label' => esc_html__('Read More Text','motivational-speaker'),
		'section' => 'motivational_speaker_archieve_post_layot',
		'setting' => 'motivational_speaker_read_more_text',
		'type'    => 'text'
	));

	$wp_customize->add_section('motivational_speaker_blog_pagination',array(
        'title' => __('Pagination', 'motivational-speaker'), 
        'panel' => 'motivational_speaker_post_panel',       
    ) );

	$wp_customize->add_setting('motivational_speaker_pagination_type',array(
        'default' => 'numbered',
        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
	));
	$wp_customize->add_control('motivational_speaker_pagination_type',array(
		'type' => 'radio',
		'label'     => __('Blog Pagination', 'motivational-speaker'),
		'section' => 'motivational_speaker_blog_pagination',
		'type' => 'select',
		'choices' => array(
			'default' => __('Previous/Next','motivational-speaker'),
            'numbered' => __('Numbered','motivational-speaker'),
		),
	) );

	$wp_customize->add_setting('motivational_speaker_single_post_pagination_type',array(
        'default' => 'default',
        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
	));
	$wp_customize->add_control('motivational_speaker_single_post_pagination_type',array(
		'type' => 'radio',
		'label'     => __('Post Pagination', 'motivational-speaker'),
		'section' => 'motivational_speaker_blog_pagination',
		'type' => 'select',
		'choices' => array(
			'default' => __('Previous/Next','motivational-speaker'),
            'post-name' => __('Post Title','motivational-speaker'),
		),
	) );

	// header-image
	$wp_customize->add_setting( 'motivational_speaker_section_header_image_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_header_image_heading', array(
		'label'       => esc_html__( 'Header Image Settings', 'motivational-speaker' ),
		'section'     => 'header_image',
		'settings'    => 'motivational_speaker_section_header_image_heading',
		'priority'    =>'1',
	) ) );

	$wp_customize->add_setting('motivational_speaker_show_header_image',array(
        'default' => 'on',
        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
	));
	$wp_customize->add_control('motivational_speaker_show_header_image',array(
        'type' => 'select',
        'label' => __('Select Option','motivational-speaker'),
        'section' => 'header_image',
        'choices' => array(
            'on' => __('With Header Image','motivational-speaker'),
            'off' => __('Without Header Image','motivational-speaker'),
        ),
	) );

	// breacrumb setting
	$wp_customize->add_section('motivational_speaker_breadcrumb_settings',array(
        'title' => __('Breadcrumb Settings', 'motivational-speaker'),
        'priority' => 4
    ) );
	$wp_customize->add_setting( 'motivational_speaker_section_breadcrumb_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_breadcrumb_heading', array(
		'label'       => esc_html__( 'Theme Breadcrumb Settings', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_breadcrumb_settings',
		'settings'    => 'motivational_speaker_section_breadcrumb_heading',
	) ) );
	$wp_customize->add_setting(
		'motivational_speaker_enable_breadcrumb',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_enable_breadcrumb',
			array(
				'settings'        => 'motivational_speaker_enable_breadcrumb',
				'section'         => 'motivational_speaker_breadcrumb_settings',
				'label'           => __( 'Show Breadcrumb', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting('motivational_speaker_breadcrumb_separator', array(
        'default' => ' / ',
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control('motivational_speaker_breadcrumb_separator', array(
        'label' => __('Breadcrumb Separator', 'motivational-speaker'),
        'section' => 'motivational_speaker_breadcrumb_settings',
        'type' => 'text',
    ));
	$wp_customize->add_setting( 'motivational_speaker_single_breadcrumb_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_single_breadcrumb_heading', array(
		'label'       => esc_html__( 'Single post & Page', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_breadcrumb_settings',
		'settings'    => 'motivational_speaker_single_breadcrumb_heading',
	) ) );
	$wp_customize->add_setting(
		'motivational_speaker_single_enable_breadcrumb',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_single_enable_breadcrumb',
			array(
				'settings'        => 'motivational_speaker_single_enable_breadcrumb',
				'section'         => 'motivational_speaker_breadcrumb_settings',
				'label'           => __( 'Show Breadcrumb', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	if ( class_exists( 'WooCommerce' ) ) { 
		$wp_customize->add_setting( 'motivational_speaker_woocommerce_breadcrumb_heading', array(
			'default'           => '',
			'transport'         => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
		) );
		$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_woocommerce_breadcrumb_heading', array(
			'label'       => esc_html__( 'Woocommerce Breadcrumb', 'motivational-speaker' ),
			'section'     => 'motivational_speaker_breadcrumb_settings',
			'settings'    => 'motivational_speaker_woocommerce_breadcrumb_heading',
		) ) );
		$wp_customize->add_setting(
			'motivational_speaker_woocommerce_enable_breadcrumb',
			array(
				'type'                 => 'option',
				'capability'           => 'edit_theme_options',
				'theme_supports'       => '',
				'default'              => '1',
				'transport'            => 'refresh',
				'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
			)
		);
		$wp_customize->add_control(
			new Motivational_Speaker_Customizer_Customcontrol_Switch(
				$wp_customize,
				'motivational_speaker_woocommerce_enable_breadcrumb',
				array(
					'settings'        => 'motivational_speaker_woocommerce_enable_breadcrumb',
					'section'         => 'motivational_speaker_breadcrumb_settings',
					'label'           => __( 'Show Breadcrumb', 'motivational-speaker' ),				
					'choices'		  => array(
						'1'      => __( 'On', 'motivational-speaker' ),
						'off'    => __( 'Off', 'motivational-speaker' ),
					),
					'active_callback' => '',
				)
			)
		);
		$wp_customize->add_setting('woocommerce_breadcrumb_separator', array(
	        'default' => ' / ',
	        'sanitize_callback' => 'sanitize_text_field',
	    ));
	    $wp_customize->add_control('woocommerce_breadcrumb_separator', array(
	        'label' => __('Breadcrumb Separator', 'motivational-speaker'),
	        'section' => 'motivational_speaker_breadcrumb_settings',
	        'type' => 'text',
	    ));
	}

	// woocommerce 
	if ( class_exists( 'WooCommerce' ) ) { 
		$wp_customize->add_section('motivational_speaker_woocoomerce_section',array(
	        'title' => __('Custom Woocommerce Settings', 'motivational-speaker'),
	        'panel' => 'woocommerce',
	        'priority' => 4,
	    ) );
		$wp_customize->add_setting( 'motivational_speaker_section_shoppage_heading', array(
			'default'           => '',
			'transport'         => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
		) );
		$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_shoppage_heading', array(
			'label'       => esc_html__( 'Sidebar Settings', 'motivational-speaker' ),
			'section'     => 'motivational_speaker_woocoomerce_section',
			'settings'    => 'motivational_speaker_section_shoppage_heading',
		) ) );
		$wp_customize->add_setting( 'motivational_speaker_shop_page_sidebar',
			array(
				'default' => 'right_sidebar',
				'transport' => 'refresh',
				'sanitize_callback' => 'sanitize_text_field'
			)
		);
		$wp_customize->add_control( new Motivational_Speaker_Radio_Image_Control( $wp_customize, 'motivational_speaker_shop_page_sidebar',
			array(
				'type'=>'select',
				'label' => __( 'Show Shop Page Sidebar', 'motivational-speaker' ),
				'section'     => 'motivational_speaker_woocoomerce_section',
				'choices' => array(

					'right_sidebar' => array(
						'image' => get_template_directory_uri().'/assets/images/2column.jpg',
						'name' => __( 'Right Sidebar', 'motivational-speaker' )
					),
					'left_sidebar' => array(
						'image' => get_template_directory_uri().'/assets/images/left.png',
						'name' => __( 'Left Sidebar', 'motivational-speaker' )
					),
					'full_width' => array(
						'image' => get_template_directory_uri().'/assets/images/1column.jpg',
						'name' => __( 'Full Width', 'motivational-speaker' )
					),
				)
			)
		) );
		$wp_customize->add_setting( 'motivational_speaker_wocommerce_single_page_sidebar',
			array(
				'default' => 'right_sidebar',
				'transport' => 'refresh',
				'sanitize_callback' => 'sanitize_text_field'
			)
		);
		$wp_customize->add_control( new Motivational_Speaker_Radio_Image_Control( $wp_customize, 'motivational_speaker_wocommerce_single_page_sidebar',
			array(
				'type'=>'select',
				'label'           => __( 'Show Single Product Page Sidebar', 'motivational-speaker' ),
				'section'     => 'motivational_speaker_woocoomerce_section',
				'choices' => array(

					'right_sidebar' => array(
						'image' => get_template_directory_uri().'/assets/images/2column.jpg',
						'name' => __( 'Right Sidebar', 'motivational-speaker' )
					),
					'left_sidebar' => array(
						'image' => get_template_directory_uri().'/assets/images/left.png',
						'name' => __( 'Left Sidebar', 'motivational-speaker' )
					),
					'full_width' => array(
						'image' => get_template_directory_uri().'/assets/images/1column.jpg',
						'name' => __( 'Full Width', 'motivational-speaker' )
					),
				)
			)
		) );
		$wp_customize->add_setting( 'motivational_speaker_section_archieve_product_heading', array(
			'default'           => '',
			'transport'         => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
		) );
		$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_archieve_product_heading', array(
			'label'       => esc_html__( 'Archieve Product Settings', 'motivational-speaker' ),
			'section'     => 'motivational_speaker_woocoomerce_section',
			'settings'    => 'motivational_speaker_section_archieve_product_heading',
		) ) );
		$wp_customize->add_setting('motivational_speaker_archieve_item_columns',array(
	        'default' => '3',
	        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
		));
		$wp_customize->add_control('motivational_speaker_archieve_item_columns',array(
	        'type' => 'select',
	        'label' => __('Select No of Columns','motivational-speaker'),
	        'section' => 'motivational_speaker_woocoomerce_section',
	        'choices' => array(
	            '1' => __('One Column','motivational-speaker'),
	            '2' => __('Two Column','motivational-speaker'),
	            '3' => __('Three Column','motivational-speaker'),
	            '4' => __('four Column','motivational-speaker'),
	            '5' => __('Five Column','motivational-speaker'),
	            '6' => __('Six Column','motivational-speaker'),
	        ),
		) );
		$wp_customize->add_setting( 'motivational_speaker_archieve_shop_perpage', array(
			'default'              => 6,
			'type'                 => 'theme_mod',
			'transport' 		   => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_sanitize_number_absint',
			'sanitize_js_callback' => 'absint',
		) );
		$wp_customize->add_control( 'motivational_speaker_archieve_shop_perpage', array(
			'label'       => esc_html__( 'Display Products','motivational-speaker' ),
			'section'     => 'motivational_speaker_woocoomerce_section',
			'type'        => 'number',
			'input_attrs' => array(
				'step'             => 1,
				'min'              => 0,
				'max'              => 30,
			),
		) );
		$wp_customize->add_setting( 'motivational_speaker_section_related_heading', array(
			'default'           => '',
			'transport'         => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
		) );
		$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_related_heading', array(
			'label'       => esc_html__( 'Related Product Settings', 'motivational-speaker' ),
			'section'     => 'motivational_speaker_woocoomerce_section',
			'settings'    => 'motivational_speaker_section_related_heading',
		) ) );
		$wp_customize->add_setting('motivational_speaker_related_item_columns',array(
	        'default' => '3',
	        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
		));
		$wp_customize->add_control('motivational_speaker_related_item_columns',array(
	        'type' => 'select',
	        'label' => __('Select No of Columns','motivational-speaker'),
	        'section' => 'motivational_speaker_woocoomerce_section',
	        'choices' => array(
	            '1' => __('One Column','motivational-speaker'),
	            '2' => __('Two Column','motivational-speaker'),
	            '3' => __('Three Column','motivational-speaker'),
	            '4' => __('four Column','motivational-speaker'),
	            '5' => __('Five Column','motivational-speaker'),
	            '6' => __('Six Column','motivational-speaker'),
	        ),
		) );
		$wp_customize->add_setting( 'motivational_speaker_related_shop_perpage', array(
			'default'              => 3,
			'type'                 => 'theme_mod',
			'transport' 		   => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_sanitize_number_absint',
			'sanitize_js_callback' => 'absint',
		) );
		$wp_customize->add_control( 'motivational_speaker_related_shop_perpage', array(
			'label'       => esc_html__( 'Display Products','motivational-speaker' ),
			'section'     => 'motivational_speaker_woocoomerce_section',
			'type'        => 'number',
			'input_attrs' => array(
				'step'             => 1,
				'min'              => 0,
				'max'              => 10,
			),
		) );
		$wp_customize->add_setting(
			'motivational_speaker_related_product',
			array(
				'type'                 => 'option',
				'capability'           => 'edit_theme_options',
				'theme_supports'       => '',
				'default'              => '1',
				'transport'            => 'refresh',
				'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
			)
		);
		$wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch($wp_customize,'motivational_speaker_related_product',
			array(
				'settings'        => 'motivational_speaker_related_product',
				'section'         => 'motivational_speaker_woocoomerce_section',
				'label'           => __( 'Show Related Products', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		));
	}
	// mobile width
	$wp_customize->add_section('motivational_speaker_mobile_options',array(
        'title' => __('Mobile Media settings', 'motivational-speaker'),
        'priority' => 4,
    ) );
    $wp_customize->add_setting( 'motivational_speaker_section_mobile_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_mobile_heading', array(
		'label'       => esc_html__( 'Mobile Media settings', 'motivational-speaker' ),
		'section'     => 'motivational_speaker_mobile_options',
		'settings'    => 'motivational_speaker_section_mobile_heading',
		'priority' => 1,
	) ) );
	$wp_customize->add_setting('motivational_speaker_menu_icon',array(
		'default'	=> 'fas fa-bars',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Motivational_Speaker_Fontawesome_Icon_Chooser(
        $wp_customize,'motivational_speaker_menu_icon',array(
		'label'	=> __('Menu Icon','motivational-speaker'),
		'transport' => 'refresh',
		'section'	=> 'motivational_speaker_mobile_options',
		'setting'	=> 'motivational_speaker_menu_icon',
		'type'		=> 'icon'
	))); 
	$wp_customize->add_setting(
		'motivational_speaker_slider_button_mobile_show_hide',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_slider_button_mobile_show_hide',
			array(
				'settings'        => 'motivational_speaker_slider_button_mobile_show_hide',
				'section'         => 'motivational_speaker_mobile_options',
				'label'           => __( 'Show Slider Button', 'motivational-speaker' ),
				'description' => __('Control wont function if the button is off in the main slider settings.', 'motivational-speaker') ,			
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting(
		'motivational_speaker_scroll_enable_mobile',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_scroll_enable_mobile',
			array(
				'settings'        => 'motivational_speaker_scroll_enable_mobile',
				'section'         => 'motivational_speaker_mobile_options',
				'label'           => __( 'Show Scroll Top', 'motivational-speaker' ),
				'description' => __('Control wont function if scroll-top is off in the main settings.', 'motivational-speaker') ,					
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'motivational_speaker_section_mobile_breadcrumb_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_mobile_breadcrumb_heading', array(
		'label'       => esc_html__( 'Mobile Breadcrumb settings', 'motivational-speaker' ),
		'description' => __('Controls wont function if the breadcrumb is off in the main breadcrumb settings.', 'motivational-speaker') ,
		'section'     => 'motivational_speaker_mobile_options',
		'settings'    => 'motivational_speaker_section_mobile_breadcrumb_heading',
	) ) );
	$wp_customize->add_setting(
		'motivational_speaker_enable_breadcrumb_mobile',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_enable_breadcrumb_mobile',
			array(
				'settings'        => 'motivational_speaker_enable_breadcrumb_mobile',
				'section'         => 'motivational_speaker_mobile_options',
				'label'           => __( 'Theme Breadcrumb', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting(
		'motivational_speaker_single_enable_breadcrumb_mobile',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Motivational_Speaker_Customizer_Customcontrol_Switch(
			$wp_customize,
			'motivational_speaker_single_enable_breadcrumb_mobile',
			array(
				'settings'        => 'motivational_speaker_single_enable_breadcrumb_mobile',
				'section'         => 'motivational_speaker_mobile_options',
				'label'           => __( 'Single Post & Page', 'motivational-speaker' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'motivational-speaker' ),
					'off'    => __( 'Off', 'motivational-speaker' ),
				),
				'active_callback' => '',
			)
		)
	);
	if ( class_exists( 'WooCommerce' ) ) {
		$wp_customize->add_setting(
			'motivational_speaker_woocommerce_enable_breadcrumb_mobile',
			array(
				'type'                 => 'option',
				'capability'           => 'edit_theme_options',
				'theme_supports'       => '',
				'default'              => '1',
				'transport'            => 'refresh',
				'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
			)
		);
		$wp_customize->add_control(
			new Motivational_Speaker_Customizer_Customcontrol_Switch(
				$wp_customize,
				'motivational_speaker_woocommerce_enable_breadcrumb_mobile',
				array(
					'settings'        => 'motivational_speaker_woocommerce_enable_breadcrumb_mobile',
					'section'         => 'motivational_speaker_mobile_options',
					'label'           => __( 'wooCommerce Breadcrumb', 'motivational-speaker' ),				
					'choices'		  => array(
						'1'      => __( 'On', 'motivational-speaker' ),
						'off'    => __( 'Off', 'motivational-speaker' ),
					),
					'active_callback' => '',
				)
			)
		);
	}

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

	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.site-title a',
		'render_callback' => 'motivational_speaker_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'motivational_speaker_customize_partial_blogdescription',
	) );

	//front page
	$num_sections = apply_filters( 'motivational_speaker_front_page_sections', 4 );

	// Create a setting and control for each of the sections available in the theme.
	for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
		$wp_customize->add_setting( 'panel_' . $i, array(
			'default'           => false,
			'sanitize_callback' => 'motivational_speaker_sanitize_dropdown_pages',
			'transport'         => 'postMessage',
		) );

		$wp_customize->add_control( 'panel_' . $i, array(
			/* translators: %d is the front page section number */
			'label'          => sprintf( __( 'Front Page Section %d Content', 'motivational-speaker' ), $i ),
			'description'    => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'motivational-speaker' ) ),
			'section'        => 'theme_options',
			'type'           => 'dropdown-pages',
			'allow_addition' => true,
			'active_callback' => 'motivational_speaker_is_static_front_page',
		) );

		$wp_customize->selective_refresh->add_partial( 'panel_' . $i, array(
			'selector'            => '#panel' . $i,
			'render_callback'     => 'motivational_speaker_front_page_section',
			'container_inclusive' => true,
		) );
	}
}
add_action( 'customize_register', 'motivational_speaker_customize_register' );

function motivational_speaker_customize_partial_blogname() {
	bloginfo( 'name' );
}
function motivational_speaker_customize_partial_blogdescription() {
	bloginfo( 'description' );
}
function motivational_speaker_is_static_front_page() {
	return ( is_front_page() && ! is_home() );
}
function motivational_speaker_is_view_with_layout_option() {
	return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
}

/* Pro control */
if (class_exists('WP_Customize_Control') && !class_exists('Motivational_Speaker_Pro_Control')):
    class Motivational_Speaker_Pro_Control extends WP_Customize_Control{

    public function render_content(){?>
        <label style="overflow: hidden; zoom: 1;">
	        <div class="col-md upsell-btn">
                <a href="<?php echo esc_url( MOTIVATIONAL_SPEAKER_BUY_PRO ); ?>" target="blank" class="btn btn-success btn"><?php esc_html_e('UPGRADE MOTIVATIONAL PREMIUM','motivational-speaker');?> </a>
	        </div>
            <div class="col-md">
                <img class="motivational_speaker_img_responsive " src="<?php echo esc_url(get_template_directory_uri()); ?>/screenshot.png">
            </div>
	        <div class="col-md">
	            <h3 style="margin-top:10px; margin-left: 20px; font-size:12px; text-decoration:underline; color:#333;"><?php esc_html_e('Motivational Speaker PREMIUM - Features', 'motivational-speaker'); ?></h3>
                <ul style="padding-top:10px">
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Responsive Design', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Boxed or fullwidth layout', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Shortcode Support', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Demo Importer', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Section Reordering', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Contact Page Template', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Multiple Blog Layouts', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Unlimited Color Options', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Designed with HTML5 and CSS3', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Customizable Design & Code', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Cross Browser Support', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Detailed Documentation Included', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Stylish Custom Widgets', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Patterns Background', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('WPML Compatible (Translation Ready)', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Woo-commerce Compatible', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Full Support', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('10+ Sections', 'motivational-speaker');?> </li>
                    <li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Live Customizer', 'motivational-speaker');?> </li>
                   	<li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('AMP Ready', 'motivational-speaker');?> </li>
                   	<li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Clean Code', 'motivational-speaker');?> </li>
                   	<li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('SEO Friendly', 'motivational-speaker');?> </li>
                   	<li class="upsell-motivational_speaker"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Supper Fast', 'motivational-speaker');?> </li>
                </ul>
        	</div>
		    <div class="col-md upsell-btn upsell-btn-bottom">
	            <a href="<?php echo esc_url( MOTIVATIONAL_SPEAKER_BUNDLE_LINK ); ?>" target="blank" class="btn btn-success btn"><?php esc_html_e('WP Theme Bundle (120+ Themes)','motivational-speaker');?> </a>
		    </div>
        </label>
    <?php } }
endif;
