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

	/*=========================================
	Social Media
	=========================================*/
	$wp_customize->add_section(
        'expert_digital_agency_social_media_header',
        array(
        	'priority'      => 3,
            'title' 		=> __('Social Media','expert-digital-agency'),
			'panel'  		=> 'expert_digital_agency_frontpage_sections',
		)
    );

   	$wp_customize->add_setting(
    	'expert_digital_agency_social_media_facebook',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_digital_agency_social_media_facebook',
		array(
		    'label'   		=> __('Facebook URL','expert-digital-agency'),
		    'section'		=> 'expert_digital_agency_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'expert_digital_agency_social_media_twitter',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_digital_agency_social_media_twitter',
		array(
		    'label'   		=> __('Twitter URL','expert-digital-agency'),
		    'section'		=> 'expert_digital_agency_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);	

	$wp_customize->add_setting(
    	'expert_digital_agency_social_media_instagram',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_digital_agency_social_media_instagram',
		array(
		    'label'   		=> __('Instagram URL','expert-digital-agency'),
		    'section'		=> 'expert_digital_agency_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'expert_digital_agency_social_media_linkedin',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_digital_agency_social_media_linkedin',
		array(
		    'label'   		=> __('Linkedin URL','expert-digital-agency'),
		    'section'		=> 'expert_digital_agency_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'expert_digital_agency_social_media_pinterest',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_digital_agency_social_media_pinterest',
		array(
		    'label'   		=> __('Pinterest URL','expert-digital-agency'),
		    'section'		=> 'expert_digital_agency_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'expert_digital_agency_social_media_youtube',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'expert_digital_agency_social_media_youtube',
		array(
		    'label'   		=> __('Youtube URL','expert-digital-agency'),
		    'section'		=> 'expert_digital_agency_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting( 'expert_digital_agency_upgrade_page_settings_11',
        array(
            'sanitize_callback' => 'sanitize_text_field'
        )
    );
    $wp_customize->add_control( new Expert_Digital_Agency_Control_Upgrade(
        $wp_customize, 'expert_digital_agency_upgrade_page_settings_11',
            array(
                'priority'      => 200,
                'section'       => 'expert_digital_agency_social_media_header',
                'settings'      => 'expert_digital_agency_upgrade_page_settings_11',
                'label'         => __( 'Digital Agency Pro comes with additional features.', 'expert-digital-agency' ),
                'choices'       => array( __( '15+ Ready-Made Sections', 'expert-digital-agency' ), __( 'One-Click Demo Import', 'expert-digital-agency' ), __( 'WooCommerce Integrated', 'expert-digital-agency' ), __( 'Drag & Drop Section Reordering', 'expert-digital-agency' ),__( 'Advanced Typography Control', 'expert-digital-agency' ),__( 'Intuitive Customization Options', 'expert-digital-agency' ),__( '24/7 Support', 'expert-digital-agency' ), )
            )
        )
    );

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