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

	/*=========================================
	top header
	=========================================*/
	$wp_customize->add_section(
        'expert_construction_company_topbar',
        array(
        	'priority'      => 3,
            'title' 		=> __('Header Informations','expert-construction-company'),
			'panel'  		=> 'expert_construction_company_frontpage_sections',
		)
    );
    
	$wp_customize->add_setting('expert_construction_company_call_text',array(
		'default'=> 'Call Us Today',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('expert_construction_company_call_text',array(
		'label'	=> __('Add Call Text','expert-construction-company'),
		'section'=> 'expert_construction_company_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting('expert_construction_company_call',array(
		'default'=> '+1 800 559 6580',
		'sanitize_callback'	=> 'expert_construction_company_sanitize_phone_number'
	));
	$wp_customize->add_control('expert_construction_company_call',array(
		'label'	=> __('Add Phone Number','expert-construction-company'),
		'section'=> 'expert_construction_company_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting('expert_construction_company_mail_text',array(
		'default'=> 'Email',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('expert_construction_company_mail_text',array(
		'label'	=> __('Add Mail Text','expert-construction-company'),
		'section'=> 'expert_construction_company_topbar',
		'type'=> 'text'
	));

	$wp_customize->selective_refresh->add_partial( 'expert_construction_company_mail_text', array(
		'selector' => '.email',
		'render_callback' => 'Expert_Construction_Company_Customize_partial_expert_construction_company_mail_text',
	) );
	
	$wp_customize->add_setting('expert_construction_company_mail',array(
		'default'=> 'info@example.com',
		'sanitize_callback'	=> 'sanitize_email'
	));
	$wp_customize->add_control('expert_construction_company_mail',array(
		'label'	=> __('Add Mail Address','expert-construction-company'),
		'section'=> 'expert_construction_company_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting('expert_construction_company_location_text',array(
		'default'=> 'Address',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('expert_construction_company_location_text',array(
		'label'	=> __('Add Location Text','expert-construction-company'),
		'section'=> 'expert_construction_company_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting('expert_construction_company_location',array(
		'default'=> '99 S.t Jomblo Park Pekanbaru 28292',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('expert_construction_company_location',array(
		'label'	=> __('Add location','expert-construction-company'),
		'section'=> 'expert_construction_company_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting( 'expert_construction_company_upgrade_page_settings_589',
	array(
		'sanitize_callback' => 'sanitize_text_field'
	)
	);
	$wp_customize->add_control( new Expert_Construction_Company_Control_Upgrade(
		$wp_customize, 'expert_construction_company_upgrade_page_settings_589',
			array(
				'priority'      => 200,
				'section'       => 'expert_construction_company_topbar',
				'settings'      => 'expert_construction_company_upgrade_page_settings_589',
				'label'         => __( 'Expert Construction Company Pro comes with additional features.', 'expert-construction-company' ),
				'choices'       => array( __( '15+ Ready-Made Sections', 'expert-construction-company' ), __( 'One-Click Demo Import', 'expert-construction-company' ), __( 'WooCommerce Integrated', 'expert-construction-company' ), __( 'Drag & Drop Section Reordering', 'expert-construction-company' ),__( 'Advanced Typography Control', 'expert-construction-company' ),__( 'Intuitive Customization Options', 'expert-construction-company' ),__( '24/7 Support', 'expert-construction-company' ), )
			)
		)
	);

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