<?php
/**
 * Chiropractor Therapy: Customizer-home-page
 *
 * @subpackage Chiropractor Therapy
 * @since 1.0
 */

//  Home Page Panel
	$wp_customize->add_panel( 'chiropractor_therapy_custompage_panel', array(
		'title' => esc_html__( 'Custom Page Settings', 'chiropractor-therapy' ),
		'priority' => 2,
	));

	// Header
    $wp_customize->add_section('chiropractor_therapy_header',array(
        'title' => __('Header Settings', 'chiropractor-therapy'),
        'panel' => 'chiropractor_therapy_custompage_panel',
    ) );
    $wp_customize->add_setting( 'chiropractor_therapy_section_contact_heading', array(
			'default'           => '',
			'transport'         => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Chiropractor_Therapy_Customizer_Customcontrol_Section_Heading( $wp_customize, 'chiropractor_therapy_section_contact_heading', array(
		'label'       => esc_html__( 'Contact Settings', 'chiropractor-therapy' ),	
		'description' => __( 'Add contact info in the below feilds', 'chiropractor-therapy' ),		
		'section'     => 'chiropractor_therapy_header',
		'settings'    => 'chiropractor_therapy_section_contact_heading',
	) ) );
    $wp_customize->add_setting('chiropractor_therapy_phone_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_phone_text',array(
		'label' => esc_html__('Phone Text','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_header',
		'setting' => 'chiropractor_therapy_phone_text',
		'type'    => 'text'
	));
    $wp_customize->add_setting('chiropractor_therapy_phone_number',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_phone_number',array(
		'label' => esc_html__('Phone Number','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_header',
		'setting' => 'chiropractor_therapy_phone_number',
		'type'    => 'text'
	));
	$wp_customize->add_setting('chiropractor_therapy_phone_icon',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Chiropractor_Therapy_Fontawesome_Icon_Chooser(
        $wp_customize,'chiropractor_therapy_phone_icon',array(
		'label'	=> __('Add Phone Icon','chiropractor-therapy'),
		'transport' => 'refresh',
		'section'	=> 'chiropractor_therapy_header',
		'setting'	=> 'chiropractor_therapy_phone_icon',
		'type'		=> 'icon'
	)));
    $wp_customize->add_setting('chiropractor_therapy_email_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_email_text',array(
		'label' => esc_html__('Email Text','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_header',
		'setting' => 'chiropractor_therapy_email_text',
		'type'    => 'text'
	));
    $wp_customize->add_setting('chiropractor_therapy_email_number',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_email_number',array(
		'label' => esc_html__('Email Id','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_header',
		'setting' => 'chiropractor_therapy_email_number',
		'type'    => 'text'
	));
	$wp_customize->add_setting('chiropractor_therapy_email_icon',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Chiropractor_Therapy_Fontawesome_Icon_Chooser(
        $wp_customize,'chiropractor_therapy_email_icon',array(
		'label'	=> __('Add Email Icon','chiropractor-therapy'),
		'transport' => 'refresh',
		'section'	=> 'chiropractor_therapy_header',
		'setting'	=> 'chiropractor_therapy_email_icon',
		'type'		=> 'icon'
	)));
    $wp_customize->add_setting('chiropractor_therapy_header_quote_button',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_header_quote_button',array(
		'label' => esc_html__('Button Text','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_header',
		'setting' => 'chiropractor_therapy_header_quote_button',
		'type'    => 'text'
	));
    $wp_customize->add_setting('chiropractor_therapy_header_quote_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('chiropractor_therapy_header_quote_link',array(
		'label' => esc_html__('Button Link','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_header',
		'setting' => 'chiropractor_therapy_header_quote_link',
		'type'    => 'url'
	));

	// Social Media
    $wp_customize->add_section('chiropractor_therapy_urls',array(
        'title' => __('Social Media', 'chiropractor-therapy'),
        'panel' => 'chiropractor_therapy_custompage_panel',
    ) );
    $wp_customize->add_setting( 'chiropractor_therapy_section_social_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Chiropractor_Therapy_Customizer_Customcontrol_Section_Heading( $wp_customize, 'chiropractor_therapy_section_social_heading', array(
		'label'       => esc_html__( 'Social Media Settings', 'chiropractor-therapy' ),
		'description' => __( 'Add social media links in the below feilds', 'chiropractor-therapy' ),			
		'section'     => 'chiropractor_therapy_urls',
		'settings'    => 'chiropractor_therapy_section_social_heading',
	) ) );
	$wp_customize->add_setting(
		'header_social_icon_enable',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'chiropractor_therapy_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Chiropractor_Therapy_Customizer_Customcontrol_Switch(
			$wp_customize,
			'header_social_icon_enable',
			array(
				'settings'        => 'header_social_icon_enable',
				'section'         => 'chiropractor_therapy_urls',
				'label'           => __( 'Check to show social fields', 'chiropractor-therapy' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'chiropractor-therapy' ),
					'off'    => __( 'Off', 'chiropractor-therapy' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'chiropractor_therapy_fb_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Chiropractor_Therapy_Customizer_Customcontrol_Section_Heading( $wp_customize, 'chiropractor_therapy_fb_heading', array(
		'label'       => esc_html__( 'Favebook Settings', 'chiropractor-therapy' ),
		'section'     => 'chiropractor_therapy_urls',
		'settings'    => 'chiropractor_therapy_fb_heading',
	) ) );
    $wp_customize->add_setting('chiropractor_therapy_fb_icon',array(
		'default'	=> 'fab fa-facebook-f',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Chiropractor_Therapy_Fontawesome_Icon_Chooser(
        $wp_customize,'chiropractor_therapy_fb_icon',array(
		'label'	=> __('Add Icon','chiropractor-therapy'),
		'transport' => 'refresh',
		'section'	=> 'chiropractor_therapy_urls',
		'setting'	=> 'chiropractor_therapy_fb_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->selective_refresh->add_partial( 'chiropractor_therapy_fb', array(
		'selector' => '.social-icon a i',
		'render_callback' => 'chiropractor_therapy_customize_partial_chiropractor_therapy_fb',
	) );
	$wp_customize->add_setting('chiropractor_therapy_fb',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('chiropractor_therapy_fb',array(
		'label' => esc_html__('Add URL','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_urls',
		'setting' => 'chiropractor_therapy_fb',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'chiropractor_therapy_header_fb_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'chiropractor_therapy_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Chiropractor_Therapy_Customizer_Customcontrol_Switch(
			$wp_customize,
			'chiropractor_therapy_header_fb_target',
			array(
				'settings'        => 'chiropractor_therapy_header_fb_target',
				'section'         => 'chiropractor_therapy_urls',
				'label'           => __( 'Open link in a new tab', 'chiropractor-therapy' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'chiropractor-therapy' ),
					'off'    => __( 'Off', 'chiropractor-therapy' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'chiropractor_therapy_twitter_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Chiropractor_Therapy_Customizer_Customcontrol_Section_Heading( $wp_customize, 'chiropractor_therapy_twitter_heading', array(
			'label'       => esc_html__( 'Twitter Settings', 'chiropractor-therapy' ),
			'section'     => 'chiropractor_therapy_urls',
			'settings'    => 'chiropractor_therapy_twitter_heading',
	) ) );
	$wp_customize->add_setting('chiropractor_therapy_twitter_icon',array(
		'default'	=> 'fab fa-x-twitter',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Chiropractor_Therapy_Fontawesome_Icon_Chooser(
        $wp_customize,'chiropractor_therapy_twitter_icon',array(
		'label'	=> __('Add Icon','chiropractor-therapy'),
		'transport' => 'refresh',
		'section'	=> 'chiropractor_therapy_urls',
		'setting'	=> 'chiropractor_therapy_twitter_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('chiropractor_therapy_twitter',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('chiropractor_therapy_twitter',array(
		'label' => esc_html__('Add URL','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_urls',
		'setting' => 'chiropractor_therapy_twitter',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'chiropractor_therapy_header_twitter_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'chiropractor_therapy_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Chiropractor_Therapy_Customizer_Customcontrol_Switch(
			$wp_customize,
			'chiropractor_therapy_header_twitter_target',
			array(
				'settings'        => 'chiropractor_therapy_header_twitter_target',
				'section'         => 'chiropractor_therapy_urls',
				'label'           => __( 'Open link in a new tab', 'chiropractor-therapy' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'chiropractor-therapy' ),
					'off'    => __( 'Off', 'chiropractor-therapy' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'chiropractor_therapy_youtube_heading', array(
			'default'           => '',
			'transport'         => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Chiropractor_Therapy_Customizer_Customcontrol_Section_Heading( $wp_customize, 'chiropractor_therapy_youtube_heading', array(
			'label'       => esc_html__( 'Youtube Settings', 'chiropractor-therapy' ),
			'section'     => 'chiropractor_therapy_urls',
			'settings'    => 'chiropractor_therapy_youtube_heading',
	) ) );
	$wp_customize->add_setting('chiropractor_therapy_youtube_icon',array(
		'default'	=> 'fab fa-youtube',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Chiropractor_Therapy_Fontawesome_Icon_Chooser(
        $wp_customize,'chiropractor_therapy_youtube_icon',array(
		'label'	=> __('Add Icon','chiropractor-therapy'),
		'transport' => 'refresh',
		'section'	=> 'chiropractor_therapy_urls',
		'setting'	=> 'chiropractor_therapy_youtube_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('chiropractor_therapy_youtube',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('chiropractor_therapy_youtube',array(
		'label' => esc_html__('Add URL','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_urls',
		'setting' => 'chiropractor_therapy_youtube',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'chiropractor_therapy_header_youtube_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'chiropractor_therapy_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Chiropractor_Therapy_Customizer_Customcontrol_Switch(
			$wp_customize,
			'chiropractor_therapy_header_youtube_target',
			array(
				'settings'        => 'chiropractor_therapy_header_youtube_target',
				'section'         => 'chiropractor_therapy_urls',
				'label'           => __( 'Open link in a new tab', 'chiropractor-therapy' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'chiropractor-therapy' ),
					'off'    => __( 'Off', 'chiropractor-therapy' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'chiropractor_therapy_instagram_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Chiropractor_Therapy_Customizer_Customcontrol_Section_Heading( $wp_customize, 'chiropractor_therapy_instagram_heading', array(
		'label'       => esc_html__( 'Instagram Settings', 'chiropractor-therapy' ),
		'section'     => 'chiropractor_therapy_urls',
		'settings'    => 'chiropractor_therapy_instagram_heading',
	) ) );
	$wp_customize->add_setting('chiropractor_therapy_instagram_icon',array(
		'default'	=> 'fab fa-instagram',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Chiropractor_Therapy_Fontawesome_Icon_Chooser(
        $wp_customize,'chiropractor_therapy_instagram_icon',array(
		'label'	=> __('Add Icon','chiropractor-therapy'),
		'transport' => 'refresh',
		'section'	=> 'chiropractor_therapy_urls',
		'setting'	=> 'chiropractor_therapy_instagram_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('chiropractor_therapy_instagram',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('chiropractor_therapy_instagram',array(
		'label' => esc_html__('Add URL','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_urls',
		'setting' => 'chiropractor_therapy_instagram',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'chiropractor_therapy_header_instagram_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'chiropractor_therapy_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Chiropractor_Therapy_Customizer_Customcontrol_Switch(
			$wp_customize,
			'chiropractor_therapy_header_instagram_target',
			array(
				'settings'        => 'chiropractor_therapy_header_instagram_target',
				'section'         => 'chiropractor_therapy_urls',
				'label'           => __( 'Open link in a new tab', 'chiropractor-therapy' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'chiropractor-therapy' ),
					'off'    => __( 'Off', 'chiropractor-therapy' ),
				),
				'active_callback' => '',
			)
		)
	);

    //Slider
	$wp_customize->add_section( 'chiropractor_therapy_slider_section' , array(
    	'title'      => __( 'Slider Settings', 'chiropractor-therapy' ),
    	'panel' => 'chiropractor_therapy_custompage_panel',
	) );
	$wp_customize->add_setting( 'chiropractor_therapy_section_slide_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Chiropractor_Therapy_Customizer_Customcontrol_Section_Heading( $wp_customize, 'chiropractor_therapy_section_slide_heading', array(
		'label'       => esc_html__( 'Slider Settings', 'chiropractor-therapy' ),
		'description' => __( 'Slider Image Dimension ( 1600px x 650px )', 'chiropractor-therapy' ),		
		'section'     => 'chiropractor_therapy_slider_section',
		'settings'    => 'chiropractor_therapy_section_slide_heading',
	) ) );
	$wp_customize->add_setting(
		'chiropractor_therapy_slider_arrows',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'chiropractor_therapy_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Chiropractor_Therapy_Customizer_Customcontrol_Switch(
			$wp_customize,
			'chiropractor_therapy_slider_arrows',
			array(
				'settings'        => 'chiropractor_therapy_slider_arrows',
				'section'         => 'chiropractor_therapy_slider_section',
				'label'           => __( 'Check To Show slider', 'chiropractor-therapy' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'chiropractor-therapy' ),
					'off'    => __( 'Off', 'chiropractor-therapy' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting('chiropractor_therapy_slide_heading',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_slide_heading',array(
		'label' => esc_html__('Slider Sub Heading','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_slider_section',
		'setting' => 'chiropractor_therapy_slide_heading',
		'type'    => 'text',
	));

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

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'chiropractor_therapy_slider_sub_heading_color', array(
	    'section' => 'chiropractor_therapy_slider_section',
	    'label' => esc_html__('Slider Sub Heading', 'chiropractor-therapy'),
	)));

	$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('chiropractor_therapy_post_setting',array(
		'default' => 'select',
		'sanitize_callback' => 'chiropractor_therapy_sanitize_select',
	));
	$wp_customize->add_control('chiropractor_therapy_post_setting',array(
		'type'    => 'select',
		'choices' => $cat_post,
		'label' => esc_html__('Select Category to display slider images','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_slider_section',
	));

	$wp_customize->add_setting('chiropractor_therapy_slider_count',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_slider_count',array(
		'label'	=> esc_html__('Slider Count','chiropractor-therapy'),
		'section'	=> 'chiropractor_therapy_slider_section',
		'type'		=> 'number',
	));

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

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'chiropractor_therapy_slider_heading_color', array(
	    'section' => 'chiropractor_therapy_slider_section',
	    'label' => esc_html__('Slider Title Color', 'chiropractor-therapy'),
	)));

	$wp_customize->add_setting(
		'chiropractor_therapy_slider_excerpt_show_hide',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => 'off',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'chiropractor_therapy_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Chiropractor_Therapy_Customizer_Customcontrol_Switch(
			$wp_customize,
			'chiropractor_therapy_slider_excerpt_show_hide',
			array(
				'settings'        => 'chiropractor_therapy_slider_excerpt_show_hide',
				'section'         => 'chiropractor_therapy_slider_section',
				'label'           => __( 'Show Hide excerpt', 'chiropractor-therapy' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'chiropractor-therapy' ),
					'off'    => __( 'Off', 'chiropractor-therapy' ),
				),
			)
		)
	);
	$wp_customize->add_setting('chiropractor_therapy_slider_excerpt_count',array(
		'default'=> 30,
		'transport' => 'refresh',
		'sanitize_callback' => 'chiropractor_therapy_sanitize_integer'
	));
	$wp_customize->add_control(new Chiropractor_Therapy_Slider_Custom_Control( $wp_customize, 'chiropractor_therapy_slider_excerpt_count',array(
		'label' => esc_html__( 'Excerpt Limit','chiropractor-therapy' ),
		'section'=> 'chiropractor_therapy_slider_section',
		'settings'=>'chiropractor_therapy_slider_excerpt_count',
		'input_attrs' => array(
			'reset'			   => 30,
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
	)));
	$wp_customize->add_setting('chiropractor_therapy_slider_excerpt_color', array(
	    'default' => '#ffffff',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'chiropractor_therapy_slider_excerpt_color', array(
	    'section' => 'chiropractor_therapy_slider_section',
	    'label' => esc_html__('Slider Excerpt Color', 'chiropractor-therapy'),
	)));

	$wp_customize->add_setting('chiropractor_therapy_slider_content_alignment',array(
        'default' => 'LEFT-ALIGN',
        'sanitize_callback' => 'chiropractor_therapy_sanitize_choices'
	));
	$wp_customize->add_control('chiropractor_therapy_slider_content_alignment',array(
		'type' => 'radio',
		'label'     => __('Slider Content Alignment', 'chiropractor-therapy'),
		'section' => 'chiropractor_therapy_slider_section',
		'type' => 'select',
		'choices' => array(
			'LEFT-ALIGN' => __('LEFT','chiropractor-therapy'),
            'CENTER-ALIGN' => __('CENTER','chiropractor-therapy'),
            'RIGHT-ALIGN' => __('RIGHT','chiropractor-therapy'),
		),
	) );
	$wp_customize->add_setting('chiropractor_therapy_slider_overlay', array(
	    'default' => '#222222',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'chiropractor_therapy_slider_overlay', array(
	    'section' => 'chiropractor_therapy_slider_section',
	    'label' => esc_html__('Slider Overlay Color', 'chiropractor-therapy'),
	)));
	$wp_customize->add_setting('chiropractor_therapy_slider_opacity',array(
        'default' => '0.5',
        'sanitize_callback' => 'chiropractor_therapy_sanitize_choices'
	));
	$wp_customize->add_control('chiropractor_therapy_slider_opacity',array(
		'type' => 'radio',
		'label'     => __('Slider Opacity', 'chiropractor-therapy'),
		'section' => 'chiropractor_therapy_slider_section',
		'type' => 'select',
		'choices' => array(
			'0' => __('0','chiropractor-therapy'),
			'0.1' => __('0.1','chiropractor-therapy'),
			'0.2' => __('0.2','chiropractor-therapy'),
			'0.3' => __('0.3','chiropractor-therapy'),
			'0.4' => __('0.4','chiropractor-therapy'),
			'0.5' => __('0.5','chiropractor-therapy'),
			'0.6' => __('0.6','chiropractor-therapy'),
			'0.7' => __('0.7','chiropractor-therapy'),
			'0.8' => __('0.8','chiropractor-therapy'),
			'0.9' => __('0.9','chiropractor-therapy'),
			'1' => __('1','chiropractor-therapy')
		),
	) );

	//Courses
	$wp_customize->add_section( 'chiropractor_therapy_courses_section' , array(
    	'title'      => __( 'Courses Settings', 'chiropractor-therapy' ),
    	'panel' => 'chiropractor_therapy_custompage_panel',
	) );
	$wp_customize->add_setting( 'chiropractor_therapy_section_course_heading', array(
			'default'           => '',
			'transport'         => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Chiropractor_Therapy_Customizer_Customcontrol_Section_Heading( $wp_customize, 'chiropractor_therapy_section_course_heading', array(
		'label'       => esc_html__( 'Courses Settings', 'chiropractor-therapy' ),
		'section'     => 'chiropractor_therapy_courses_section',
		'settings'    => 'chiropractor_therapy_section_course_heading',
	) ) );
	$wp_customize->add_setting(
		'chiropractor_therapy_course_enable',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'chiropractor_therapy_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Chiropractor_Therapy_Customizer_Customcontrol_Switch(
			$wp_customize,
			'chiropractor_therapy_course_enable',
			array(
				'settings'        => 'chiropractor_therapy_course_enable',
				'section'         => 'chiropractor_therapy_courses_section',
				'label'           => __( 'Check To Show section', 'chiropractor-therapy' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'chiropractor-therapy' ),
					'off'    => __( 'Off', 'chiropractor-therapy' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting('chiropractor_therapy_course_heading_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_course_heading_text',array(
		'label' => esc_html__('Heading Text','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_courses_section',
		'setting' => 'chiropractor_therapy_course_heading_text',
		'type'    => 'text',
	));
	$wp_customize->add_setting('chiropractor_therapy_course_heading',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_course_heading',array(
		'label' => esc_html__('Heading','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_courses_section',
		'setting' => 'chiropractor_therapy_course_heading',
		'type'    => 'text',
	));

	$categories = get_categories();
	$cats = array();
	$i = 0;
	$cat_post[]= 'select';
	foreach($categories as $category){
		if($i==0){
		  $default = $category->slug;
		  $i++;
		}
		$cat_post[$category->slug] = $category->name;
	}
	$wp_customize->add_setting('chiropractor_therapy_courses_setting',array(
		'default' => 'select',
		'sanitize_callback' => 'chiropractor_therapy_sanitize_select',
	));
	$wp_customize->add_control('chiropractor_therapy_courses_setting',array(
		'type'    => 'select',
		'choices' => $cat_post,
		'label' => esc_html__('Select category to display courses','chiropractor-therapy'),
		'section' => 'chiropractor_therapy_courses_section',
	));

	$wp_customize->add_setting('chiropractor_therapy_course_order_type',array(
        'default' => 'ascending',
        'sanitize_callback' => 'chiropractor_therapy_sanitize_choices'
	));
	$wp_customize->add_control('chiropractor_therapy_course_order_type',array(
        'type' => 'select',
        'label' => __('Post Order','chiropractor-therapy'),
        'section' => 'chiropractor_therapy_courses_section',
        'choices' => array(
            'ascending' => __('Oldest to Newest','chiropractor-therapy'),
            'descending' => __('Newest to Oldest','chiropractor-therapy'),
            'a-to-z' => __('A&rarr;Z','chiropractor-therapy'),
            'z-to-a' => __('Z&rarr;A','chiropractor-therapy'),
        ),
	) );

	$wp_customize->add_setting('chiropractor_therapy_service_count',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_service_count',array(
		'label'	=> esc_html__('Course Count','chiropractor-therapy'),
		'section'	=> 'chiropractor_therapy_courses_section',
		'type'		=> 'number',
	));

	//Footer
    $wp_customize->add_section( 'chiropractor_therapy_footer_copyright', array(
    	'title' => esc_html__( 'Footer Text', 'chiropractor-therapy' ),
    	'panel' => 'chiropractor_therapy_custompage_panel',
	) );
	$wp_customize->add_setting( 'chiropractor_therapy_section_footer_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Chiropractor_Therapy_Customizer_Customcontrol_Section_Heading( $wp_customize, 'chiropractor_therapy_section_footer_heading', array(
		'label'       => esc_html__( 'Footer Settings', 'chiropractor-therapy' ),		
		'section'     => 'chiropractor_therapy_footer_copyright',
		'settings'    => 'chiropractor_therapy_section_footer_heading',
	) ) );
    $wp_customize->add_setting('chiropractor_therapy_footer_text',array(
		'default'	=> 'Therapy WordPress Theme',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('chiropractor_therapy_footer_text',array(
		'label'	=> esc_html__('Copyright Text','chiropractor-therapy'),
		'section'	=> 'chiropractor_therapy_footer_copyright',
		'type'		=> 'textarea'
	));
	$wp_customize->add_setting('chiropractor_therapy_footer_content_alignment',array(
        'default' => 'CENTER-ALIGN',
        'sanitize_callback' => 'chiropractor_therapy_sanitize_choices'
	));
	$wp_customize->add_control('chiropractor_therapy_footer_content_alignment',array(
		'type' => 'radio',
		'label'     => __('Footer Content Alignment', 'chiropractor-therapy'),
		'section' => 'chiropractor_therapy_footer_copyright',
		'type' => 'select',
		'choices' => array(
			'LEFT-ALIGN' => __('LEFT','chiropractor-therapy'),
            'CENTER-ALIGN' => __('CENTER','chiropractor-therapy'),
            'RIGHT-ALIGN' => __('RIGHT','chiropractor-therapy'),
		),
	) );

	$wp_customize->add_setting(
		'chiropractor_therapy_footer_widgets_show_hide',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'chiropractor_therapy_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Chiropractor_Therapy_Customizer_Customcontrol_Switch(
			$wp_customize,
			'chiropractor_therapy_footer_widgets_show_hide',
			array(
				'settings'        => 'chiropractor_therapy_footer_widgets_show_hide',
				'section'         => 'chiropractor_therapy_footer_copyright',
				'label'           => __( 'Check To show Footer Widgets', 'chiropractor-therapy' ),
				'choices'		  => array(
					'1'      => __( 'On', 'chiropractor-therapy' ),
					'off'    => __( 'Off', 'chiropractor-therapy' ),
				),
				'active_callback' => '',
			)
		)
	);

	$wp_customize->add_setting('chiropractor_therapy_footer_widget',array(
        'default' => '4',
        'sanitize_callback' => 'chiropractor_therapy_sanitize_choices'
	));
	$wp_customize->add_control('chiropractor_therapy_footer_widget',array(
		'type' => 'radio',
		'label'     => __('Footer Per Column', 'chiropractor-therapy'),
		'section' => 'chiropractor_therapy_footer_copyright',
		'type' => 'select',
		'choices' => array(
			'1' => __('1','chiropractor-therapy'),
            '2' => __('2','chiropractor-therapy'),
            '3' => __('3','chiropractor-therapy'),
            '4' => __('4','chiropractor-therapy'),
		)
	) );