<?php
/**
 * Life Coaches Theme Customizer
 *
 * @package Life Coaches
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function life_coaches_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	$life_coaches_options = life_coaches_theme_options();

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'        => '.site-title a',
				'render_callback' => 'life_coaches_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'life_coaches_customize_partial_blogdescription',
			)
		);
	}

	$wp_customize->add_panel(
        'theme_options',
        array(
            'title' => esc_html__('Home Page Options', 'life-coaches'),
            'priority' => 2,
        )
    );

//Social Links
    $wp_customize->add_section(
    'social_section',
	    array(
	        'title' => esc_html__( 'Social Links','life-coaches' ),
	        'description' => esc_html__( 'More Link options are available in Premium Version','life-coaches' ),
	        'panel'=>'theme_options',
	        'capability'=>'edit_theme_options',
	    )
	);
	$wp_customize->add_setting('life_coaches_theme_options[fb_url]',
	    array(
	        'type' => 'option',
	        'default' => $life_coaches_options['fb_url'],
	        'sanitize_callback' => 'life_coaches_sanitize_url',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[fb_url]',
	    array(
	        'label' => esc_html__('Facebook Link', 'life-coaches'),
	        'type' => 'text',
	        'section' => 'social_section',
	        'settings' => 'life_coaches_theme_options[fb_url]',
	    )
	);
		$wp_customize->add_setting('life_coaches_theme_options[twitter_url]',
	    array(
	        'type' => 'option',
	        'default' => $life_coaches_options['twitter_url'],
	        'sanitize_callback' => 'life_coaches_sanitize_url',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[twitter_url]',
	    array(
	        'label' => esc_html__('Twitter (X) Link', 'life-coaches'),
	        'type' => 'text',
	        'section' => 'social_section',
	        'settings' => 'life_coaches_theme_options[twitter_url]',
	    )
	);
		$wp_customize->add_setting('life_coaches_theme_options[youtube_url]',
	    array(
	        'type' => 'option',
	        'default' => $life_coaches_options['youtube_url'],
	        'sanitize_callback' => 'life_coaches_sanitize_url',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[youtube_url]',
	    array(
	        'label' => esc_html__('Youtube Link', 'life-coaches'),
	        'type' => 'text',
	        'section' => 'social_section',
	        'settings' => 'life_coaches_theme_options[youtube_url]',
	    )
	);




//Banner section
    $wp_customize->add_section(
    'banner_section',
	    array(
	        'title' => esc_html__( 'Banner Section','life-coaches' ),
	        'panel'=>'theme_options',
	        'capability'=>'edit_theme_options',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[banner_title]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['banner_title'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[banner_title]',
	    array(
	        'label' => esc_html__('Banner Title', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'banner_section',
	        'type' => 'text',
	    )
	);



	

	$wp_customize->add_setting('life_coaches_theme_options[banner_cursive_title]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['banner_cursive_title'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[banner_cursive_title]',
	    array(
	        'label' => esc_html__('Section Cursive Title', 'life-coaches'),
	        'section' => 'banner_section',
	        'type' => 'text',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[banner_subtext]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['banner_subtext'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[banner_subtext]',
	    array(
	        'label' => esc_html__('Banner Subtitle', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'banner_section',
	        'type' => 'text',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[banner_image]',
	array(
	    'type' => 'option',
	    'sanitize_callback' => 'esc_url_raw',
	)
	);

	
	$wp_customize->add_control(
	new WP_Customize_Image_Control(
	    $wp_customize,
	    'life_coaches_theme_options[banner_image]',
	    array(
	        'label' => esc_html__('Add Right Column Background Image', 'life-coaches'),
	        'section' => 'banner_section',
	        'settings' => 'life_coaches_theme_options[banner_image]',
	    ))
	);

	$wp_customize->add_setting('life_coaches_theme_options[banner_front_image]',
	array(
	    'type' => 'option',
	    'sanitize_callback' => 'esc_url_raw',
	)
	);

	
	$wp_customize->add_control(
	new WP_Customize_Image_Control(
	    $wp_customize,
	    'life_coaches_theme_options[banner_front_image]',
	    array(
	        'label' => esc_html__('Add Banner Front Image', 'life-coaches'),
	        'description' => esc_html__('Make sure to add Square size image', 'life-coaches'),
	        'section' => 'banner_section',
	        'settings' => 'life_coaches_theme_options[banner_front_image]',
	    ))
	);






	$wp_customize->add_setting('life_coaches_theme_options[banner_btn_text]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['banner_btn_text'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[banner_btn_text]',
	    array(
	        'label' => esc_html__('Banner Button Text', 'life-coaches'),
	        'section' => 'banner_section',
	        'type' => 'text',
	    )
	);
	$wp_customize->add_setting('life_coaches_theme_options[banner_button_url]',
	    array(
	        'type' => 'option',
	        'default' => $life_coaches_options['banner_button_url'],
	        'sanitize_callback' => 'life_coaches_sanitize_url',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[banner_button_url]',
	    array(
	        'label' => esc_html__('Banner Button Link', 'life-coaches'),
	        'type' => 'text',
	        'section' => 'banner_section',
	        'settings' => 'life_coaches_theme_options[banner_button_url]',
	    )
	);



	$wp_customize->add_section(
	    'life_coaches_callout_option',
	    array(
	        'title' => esc_html__( 'Callout Section','life-coaches' ),
	        'panel' => 'theme_options',
	        'capability' => 'edit_theme_options',
	    )
	);
	$wp_customize->add_setting('life_coaches_theme_options[callout_checkbox]',
	    array(
	        'type' => 'option',
	        'default'        => 0,
	        'default' => $life_coaches_options['callout_checkbox'],
	        'sanitize_callback' => 'life_coaches_sanitize_checkbox',
	    )
	);

	$wp_customize->add_control('life_coaches_theme_options[callout_checkbox]',
	    array(
	        'label' => esc_html__('Show Callout Section', 'life-coaches'),
	        'type' => 'Checkbox',
	        'priority' => 1,
	        'section' => 'life_coaches_callout_option',

	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[callout_cursive_title]',
	    array(
	        'type' => 'option',
	        'default' => $life_coaches_options['callout_cursive_title'],
	        'sanitize_callback' => 'esc_html',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[callout_cursive_title]',
	    array(
	        'label'           => esc_html__( 'Section Cursive Title', 'life-coaches' ),
	        'type'            => 'text',
	        'section'         => 'life_coaches_callout_option',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[callout_sec_title]',
	    array(
	        'type' => 'option',
	        'default' => $life_coaches_options['callout_sec_title'],
	        'sanitize_callback' => 'esc_html',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[callout_sec_title]',
	    array(
	        'label'           => esc_html__( 'Section Title', 'life-coaches' ),
	        'type'            => 'text',
	        'section'         => 'life_coaches_callout_option',
	    )
	);




    $wp_customize->add_section(
    'callout1_section',
        array(
            'title' => esc_html__( 'Callout 1','life-coaches' ),
            'panel'=>'theme_options',
            'capability'=>'edit_theme_options',
        )
    );

    $wp_customize->add_setting('life_coaches_theme_options[callout1_image]',
    array(
        'type' => 'option',
        'sanitize_callback' => 'esc_url_raw',
    )
    );
    $wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'life_coaches_theme_options[callout1_image]',
        array(
            'label' => esc_html__('Add Image', 'life-coaches'),
            'section' => 'callout1_section',
            'settings' => 'life_coaches_theme_options[callout1_image]',
        ))
    );

    $wp_customize->add_setting('life_coaches_theme_options[callout1_title]',
        array(
            'capability' => 'edit_theme_options',
            'default' => $life_coaches_options['callout1_title'],
            'sanitize_callback' => 'sanitize_text_field',
            'type' => 'option',
        )
    );
    $wp_customize->add_control('life_coaches_theme_options[callout1_title]',
        array(
            'label' => esc_html__('Callout Title', 'life-coaches'),
            'section' => 'callout1_section',
            'type' => 'text',
        )
    );

    $wp_customize->add_setting('life_coaches_theme_options[callout1_url]',
        array(
            'type' => 'option',
            'default' => $life_coaches_options['callout1_url'],
            'sanitize_callback' => 'life_coaches_sanitize_url',
        )
    );
    $wp_customize->add_control('life_coaches_theme_options[callout1_url]',
        array(
            'label' => esc_html__('Callout link if needed', 'life-coaches'),
            'type' => 'text',
            'section' => 'callout1_section',
            'settings' => 'life_coaches_theme_options[callout1_url]',
        )
    );




    $wp_customize->add_section(
    'callout2_section',
        array(
            'title' => esc_html__( 'Callout 2','life-coaches' ),
            'panel'=>'theme_options',
            'capability'=>'edit_theme_options',
        )
    );

    $wp_customize->add_setting('life_coaches_theme_options[callout2_image]',
    array(
        'type' => 'option',
        'sanitize_callback' => 'esc_url_raw',
    )
    );
    $wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'life_coaches_theme_options[callout2_image]',
        array(
            'label' => esc_html__('Add Image', 'life-coaches'),
            'section' => 'callout2_section',
            'settings' => 'life_coaches_theme_options[callout2_image]',
        ))
    );

    $wp_customize->add_setting('life_coaches_theme_options[callout2_title]',
        array(
            'capability' => 'edit_theme_options',
            'default' => $life_coaches_options['callout2_title'],
            'sanitize_callback' => 'sanitize_text_field',
            'type' => 'option',
        )
    );
    $wp_customize->add_control('life_coaches_theme_options[callout2_title]',
        array(
            'label' => esc_html__('Callout Title', 'life-coaches'),
            'section' => 'callout2_section',
            'type' => 'text',
        )
    );

    $wp_customize->add_setting('life_coaches_theme_options[callout2_url]',
        array(
            'type' => 'option',
            'default' => $life_coaches_options['callout2_url'],
            'sanitize_callback' => 'life_coaches_sanitize_url',
        )
    );
    $wp_customize->add_control('life_coaches_theme_options[callout2_url]',
        array(
            'label' => esc_html__('Callout link if needed', 'life-coaches'),
            'type' => 'text',
            'section' => 'callout2_section',
            'settings' => 'life_coaches_theme_options[callout2_url]',
        )
    );


    $wp_customize->add_section(
    'callout3_section',
        array(
            'title' => esc_html__( 'Callout 3','life-coaches' ),
            'panel'=>'theme_options',
            'capability'=>'edit_theme_options',
        )
    );

    $wp_customize->add_setting('life_coaches_theme_options[callout3_image]',
    array(
        'type' => 'option',
        'sanitize_callback' => 'esc_url_raw',
    )
    );
    $wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'life_coaches_theme_options[callout3_image]',
        array(
            'label' => esc_html__('Add Image', 'life-coaches'),
            'section' => 'callout3_section',
            'settings' => 'life_coaches_theme_options[callout3_image]',
        ))
    );

    $wp_customize->add_setting('life_coaches_theme_options[callout3_title]',
        array(
            'capability' => 'edit_theme_options',
            'default' => $life_coaches_options['callout3_title'],
            'sanitize_callback' => 'sanitize_text_field',
            'type' => 'option',
        )
    );
    $wp_customize->add_control('life_coaches_theme_options[callout3_title]',
        array(
            'label' => esc_html__('Callout Title', 'life-coaches'),
            'section' => 'callout3_section',
            'type' => 'text',
        )
    );

    $wp_customize->add_setting('life_coaches_theme_options[callout3_url]',
        array(
            'type' => 'option',
            'default' => $life_coaches_options['callout3_url'],
            'sanitize_callback' => 'life_coaches_sanitize_url',
        )
    );
    $wp_customize->add_control('life_coaches_theme_options[callout3_url]',
        array(
            'label' => esc_html__('Callout link if needed', 'life-coaches'),
            'type' => 'text',
            'section' => 'callout3_section',
            'settings' => 'life_coaches_theme_options[callout3_url]',
        )
    );


    

    //About section
	$wp_customize->add_section(
    'about_section',
	    array(
	        'title' => esc_html__( 'About Section','life-coaches' ),
	        'panel'=>'theme_options',
	        'capability'=>'edit_theme_options',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[about_sec_show]',
	    array(
	        'type' => 'option',
	        'default'        => true,
	        'default' => $life_coaches_options['about_sec_show'],
	        'sanitize_callback' => 'life_coaches_sanitize_checkbox',
	    )
	);

	$wp_customize->add_control('life_coaches_theme_options[about_sec_show]',
	    array(
	        'label' => esc_html__('Show About Section', 'life-coaches'),
	        'type' => 'Checkbox',
	        'priority' => 1,
	        'section' => 'about_section',

	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[about_cursive_title]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['about_cursive_title'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[about_cursive_title]',
	    array(
	        'label' => esc_html__('Section Cursive Title', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'about_section',
	        'type' => 'text',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[about_sec_title]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['about_sec_title'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[about_sec_title]',
	    array(
	        'label' => esc_html__('About Title', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'about_section',
	        'type' => 'text',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[about_sec_sub_title]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['about_sec_sub_title'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[about_sec_sub_title]',
	    array(
	        'label' => esc_html__('About Sub Title', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'about_section',
	        'type' => 'text',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[about_btn_text]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['about_btn_text'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[about_btn_text]',
	    array(
	        'label' => esc_html__('About Button Text', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'about_section',
	        'type' => 'text',
	    )
	);
	$wp_customize->add_setting('life_coaches_theme_options[about_button_url]',
	    array(
	        'type' => 'option',
	        'default' => $life_coaches_options['about_button_url'],
	        'sanitize_callback' => 'life_coaches_sanitize_url',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[about_button_url]',
	    array(
	        'label' => esc_html__('About Button Link', 'life-coaches'),
	        'type' => 'text',
	        'section' => 'about_section',
	        'settings' => 'life_coaches_theme_options[about_button_url]',
	    )
	);


	$wp_customize->add_setting('life_coaches_theme_options[about_front_image]',
	array(
	    'type' => 'option',
	    'sanitize_callback' => 'esc_url_raw',
	)
	);
	$wp_customize->add_control(
	new WP_Customize_Image_Control(
	    $wp_customize,
	    'life_coaches_theme_options[about_front_image]',
	    array(
	        'label' => esc_html__('Add About Image', 'life-coaches'),
	        'description' => esc_html__('Make sure to add Square size image', 'life-coaches'),
	        'section' => 'about_section',
	        'settings' => 'life_coaches_theme_options[about_front_image]',
	    ))
	);





    //Blog section
	$wp_customize->add_section(
    'blog_section',
	    array(
	        'title' => esc_html__( 'Blog Section','life-coaches' ),
	        'panel'=>'theme_options',
	        'capability'=>'edit_theme_options',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[blog_sec_show]',
	    array(
	        'type' => 'option',
	        'default'        => true,
	        'default' => $life_coaches_options['blog_sec_show'],
	        'sanitize_callback' => 'life_coaches_sanitize_checkbox',
	    )
	);

	$wp_customize->add_control('life_coaches_theme_options[blog_sec_show]',
	    array(
	        'label' => esc_html__('Show Blog Section', 'life-coaches'),
	        'type' => 'Checkbox',
	        'priority' => 1,
	        'section' => 'blog_section',

	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[blog_cursive_title]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['blog_cursive_title'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[blog_cursive_title]',
	    array(
	        'label' => esc_html__('Section Cursive Title', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'blog_section',
	        'type' => 'text',
	    )
	);
	$wp_customize->add_setting('life_coaches_theme_options[blog_sec_title]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['blog_sec_title'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[blog_sec_title]',
	    array(
	        'label' => esc_html__('Section Title', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'blog_section',
	        'type' => 'text',
	    )
	);



	$wp_customize->add_setting('life_coaches_theme_options[blog_post_no]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['blog_post_no'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[blog_post_no]',
	    array(
	        'label' => esc_html__('No Of Blog Posts to show?', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'blog_section',
	        'type' => 'text',
	    )
	);



	
    $wp_customize->add_section(
        'newsletter_section',
        array(
            'title' => esc_html__( 'Newsletter Section','life-coaches' ),
            'panel'=>'theme_options',
            'capability'=>'edit_theme_options',
        )
    );

    $wp_customize->add_setting('life_coaches_theme_options[newsletter_sec_show]',
        array(
            'type' => 'option',
            'default'        => true,
            'default' => $life_coaches_options['newsletter_sec_show'],
            'sanitize_callback' => 'life_coaches_sanitize_checkbox',
        )
    );

    $wp_customize->add_control('life_coaches_theme_options[newsletter_sec_show]',
        array(
            'label' => esc_html__('Show Newsletter Section', 'life-coaches'),
            'type' => 'Checkbox',
            'priority' => 1,
            'section' => 'newsletter_section',

        )
    );
   	$wp_customize->add_setting('life_coaches_theme_options[newsletter_cursive_title]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['newsletter_cursive_title'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[newsletter_cursive_title]',
	    array(
	        'label' => esc_html__('Section Cursive Title', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'newsletter_section',
	        'type' => 'text',
	    )
	);
	$wp_customize->add_setting('life_coaches_theme_options[newsletter_title]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['newsletter_title'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[newsletter_title]',
	    array(
	        'label' => esc_html__('Section Title', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'newsletter_section',
	        'type' => 'text',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[newsletter_shortcode]',
	    array(
	        'type' => 'option',
	        'default' => $life_coaches_options['newsletter_shortcode'],
	        'sanitize_callback' => 'sanitize_text_field',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[newsletter_shortcode]',
	    array(
	        'label' => esc_html__('Newsletter Shortcode', 'life-coaches'),
	        'type' => 'text',
	        'section' => 'newsletter_section',
	        'settings' => 'life_coaches_theme_options[newsletter_shortcode]',
	    )
	);




    $wp_customize->add_section(
        'contact_section',
        array(
            'title' => esc_html__( 'Contact Section','life-coaches' ),
            'panel'=>'theme_options',
            'capability'=>'edit_theme_options',
        )
    );

    $wp_customize->add_setting('life_coaches_theme_options[contact_sec_show]',
        array(
            'type' => 'option',
            'default'        => true,
            'default' => $life_coaches_options['contact_sec_show'],
            'sanitize_callback' => 'life_coaches_sanitize_checkbox',
        )
    );

    $wp_customize->add_control('life_coaches_theme_options[contact_sec_show]',
        array(
            'label' => esc_html__('Show Contact Section', 'life-coaches'),
            'type' => 'Checkbox',
            'priority' => 1,
            'section' => 'contact_section',

        )
    );

	$wp_customize->add_setting('life_coaches_theme_options[contact_title]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['contact_title'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[contact_title]',
	    array(
	        'label' => esc_html__('Section Title', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'contact_section',
	        'type' => 'text',
	    )
	);
   	$wp_customize->add_setting('life_coaches_theme_options[contact_subtext]',
	    array(
	        'capability' => 'edit_theme_options',
	        'default' => $life_coaches_options['contact_subtext'],
	        'sanitize_callback' => 'sanitize_text_field',
	        'type' => 'option',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[contact_subtext]',
	    array(
	        'label' => esc_html__('Section Sub text', 'life-coaches'),
	        'priority' => 1,
	        'section' => 'contact_section',
	        'type' => 'text',
	    )
	);
	$wp_customize->add_setting('life_coaches_theme_options[contact_shortcode]',
	    array(
	        'type' => 'option',
	        'default' => $life_coaches_options['contact_shortcode'],
	        'sanitize_callback' => 'sanitize_text_field',
	    )
	);
	$wp_customize->add_control('life_coaches_theme_options[contact_shortcode]',
	    array(
	        'label' => esc_html__('Contact Form Shortcode', 'life-coaches'),
	        'type' => 'text',
	        'section' => 'contact_section',
	        'settings' => 'life_coaches_theme_options[contact_shortcode]',
	    )
	);
	$wp_customize->add_setting('life_coaches_theme_options[contact_tel]',
    array(
        'capability' => 'edit_theme_options',
        'default' => $life_coaches_options['contact_tel'],
        'sanitize_callback' => 'sanitize_text_field',
        'type' => 'option',
    )
);
$wp_customize->add_control('life_coaches_theme_options[contact_tel]',
    array(
        'label' => esc_html__('Phone No', 'life-coaches'),
        'priority' => 1,
        'section' => 'contact_section',
        'type' => 'text',
    )
);

	$wp_customize->add_setting('life_coaches_theme_options[contact_mail]',
    array(
        'capability' => 'edit_theme_options',
        'default' => $life_coaches_options['contact_mail'],
        'sanitize_callback' => 'sanitize_text_field',
        'type' => 'option',
    )
);
$wp_customize->add_control('life_coaches_theme_options[contact_mail]',
    array(
        'label' => esc_html__('Email Address', 'life-coaches'),
        'priority' => 1,
        'section' => 'contact_section',
        'type' => 'text',
    )
);

$wp_customize->add_setting('life_coaches_theme_options[contact_address]',
    array(
        'capability' => 'edit_theme_options',
        'default' => $life_coaches_options['contact_address'],
        'sanitize_callback' => 'sanitize_text_field',
        'type' => 'option',
    )
);
$wp_customize->add_control('life_coaches_theme_options[contact_address]',
    array(
        'label' => esc_html__('Address', 'life-coaches'),
        'priority' => 1,
        'section' => 'contact_section',
        'type' => 'text',
    )
);


	    //Footer
	$wp_customize->add_section(
    'footer_section',
	    array(
	        'title' => esc_html__( 'Footer Option','life-coaches' ),
	       	'description' => esc_html__( 'Copyright text can be changed in Premium Version','life-coaches' ),
	        'panel'=>'theme_options',
	        'capability'=>'edit_theme_options',
	    )
	);

	$wp_customize->add_setting('life_coaches_theme_options[show_widgets]',
	    array(
	        'type' => 'option',
	        'default'        => true,
	        'default' => $life_coaches_options['show_widgets'],
	        'sanitize_callback' => 'life_coaches_sanitize_checkbox',
	    )
	);

	$wp_customize->add_control('life_coaches_theme_options[show_widgets]',
	    array(
	        'label' => esc_html__('Show Widgets', 'life-coaches'),
	        'type' => 'Checkbox',
	        'priority' => 1,
	        'section' => 'footer_section',

	    )
	);

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

/**
 * Render the site title for the selective refresh partial.
 *
 * @return void
 */
function life_coaches_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @return void
 */
function life_coaches_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function life_coaches_customize_preview_js() {
	wp_enqueue_script( 'life-coaches-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), _S_VERSION, true );
}
add_action( 'customize_preview_init', 'life_coaches_customize_preview_js' );
