<?php
function expert_author_social_media_header_settings( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';

	/*=========================================
	Social Media
	=========================================*/
	$wp_customize->add_section(
        'expert_author_social_media_header',
        array(
        	'priority'      => 3,
            'title' 		=> __('Social Media','expert-author'),
			'panel'  		=> 'expert_author_frontpage_sections',
		)
    );

   	$wp_customize->add_setting(
    	'expert_author_social_media_facebook',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_author_social_media_facebook',
		array(
		    'label'   		=> __('Facebook URL','expert-author'),
		    'section'		=> 'expert_author_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'expert_author_social_media_twitter',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_author_social_media_twitter',
		array(
		    'label'   		=> __('Twitter URL','expert-author'),
		    'section'		=> 'expert_author_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);	

	$wp_customize->add_setting(
    	'expert_author_social_media_instagram',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_author_social_media_instagram',
		array(
		    'label'   		=> __('Instagram URL','expert-author'),
		    'section'		=> 'expert_author_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'expert_author_social_media_linkedin',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_author_social_media_linkedin',
		array(
		    'label'   		=> __('Linkedin URL','expert-author'),
		    'section'		=> 'expert_author_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'expert_author_social_media_youtube',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_author_social_media_youtube',
		array(
		    'label'   		=> __('Youtube URL','expert-author'),
		    'section'		=> 'expert_author_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting( 'expert_author_upgrade_page_settings_155',
    array(
        'sanitize_callback' => 'sanitize_text_field'
    )
    );
    $wp_customize->add_control( new Expert_Author_Control_Upgrade(
        $wp_customize, 'expert_author_upgrade_page_settings_155',
            array(
                'priority'      => 200,
                'section'       => 'expert_author_social_media_header',
                'settings'      => 'expert_author_upgrade_page_settings_155',
                'label'         => __( 'Expert Author Pro comes with additional features.', 'expert-author' ),
                'choices'       => array( __( '15+ Ready-Made Sections', 'expert-author' ), __( 'One-Click Demo Import', 'expert-author' ), __( 'WooCommerce Integrated', 'expert-author' ), __( 'Drag & Drop Section Reordering', 'expert-author' ),__( 'Advanced Typography Control', 'expert-author' ),__( 'Intuitive Customization Options', 'expert-author' ),__( '24/7 Support', 'expert-author' ), )
            )
        )
    ); 
}
add_action( 'customize_register', 'expert_author_social_media_header_settings' );