<?php
/**
 * Header Customizer Options
 *
 * @package Matrimony
 */

$wp_customize->add_setting('site_identity_options', 
    array(
    'default'           => 'title-text',
    'sanitize_callback' => 'matrimony_sanitize_select'
    )
);
$wp_customize->add_control('site_identity_options', 
    array(    
    'priority' => 20,  
    'label'     => esc_html__('Choose Options', 'matrimony'),
    'section'   => 'title_tagline',
    'settings'  => 'site_identity_options',
    'type'      => 'radio',
    'choices'   =>  array(
          'logo-only'     => esc_html__('Logo Only', 'matrimony'),
          'logo-text'     => esc_html__('Logo + Tagline', 'matrimony'),
          'title-only'    => esc_html__('Title Only', 'matrimony'),
          'title-text'    => esc_html__('Title + Tagline', 'matrimony')
        )
    )
);
// Header Setting Panel
$wp_customize->add_panel('matrimony_header_setups',
	array(
		'priority' => 1,
		'capability' => 'edit_theme_options',
		'title' => esc_html__('Header Sections','matrimony'),
	)
);

// Header Settings Section  
$wp_customize->add_section('matrimony_header_settings',
	array(
	    'title' => esc_html__('Header Banner Settings','matrimony'),
	    'panel' => 'matrimony_header_setups'
	)
);

// Enable Banner Image
$wp_customize->add_setting('matrimonial_header_option',
	array(
		'default' => false,
		'sanitize_callback' => 'matrimonial_sanitize_switch_options'
	)
);
$wp_customize->add_control(new Matrimony_WP_Customize_Switch_Control($wp_customize,'matrimonial_header_option',
	array(
		'type' => 'switch',
		'label' => esc_html__('Enable Header Banner', 'matrimony'),
		'description' => esc_html__ ('Select Yes to show Header banner on homepage.','matrimony'),
		'section' => 'matrimony_header_settings',
		)
	)
);
// Header Title
$wp_customize->add_setting('matrimony_header_title',
  	array(
      'default'           =>  '',
      'sanitize_callback' =>  'sanitize_text_field',
    )
);
$wp_customize->add_control('matrimony_header_title',
  array(
      'label'         =>  esc_html__('Header Title','matrimony'),
      'section'       =>  'matrimony_header_settings',
      'setting'       =>  'matrimony_header_title',
      'type'          =>  'text',
    )                                     
);
// Header Description
$wp_customize->add_setting('matrimony_header_sub_title',
	array(
	  'default'           =>  '',
	  'sanitize_callback' =>  'sanitize_text_field',
	)
);
$wp_customize->add_control('matrimony_header_sub_title',
  array(
      'label'         =>  esc_html__('Header Description','matrimony'),
      'section'       =>  'matrimony_header_settings',
      'setting'       =>  'matrimony_header_sub_title',
      'type'          =>  'text', 
    )                                     
);

$wp_customize->add_setting('matrimony_header_banner_image',
	array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	)
);
$wp_customize->add_control(new WP_Customize_Image_Control( $wp_customize,'matrimony_header_banner_image',
	array(
		'label'      => esc_html__( ' Header Banner Image ', 'matrimony' ),
		'section'    => 'matrimony_header_settings',
		'settings'   => 'matrimony_header_banner_image',
	)
) );

// Header Search Section
$wp_customize->add_section('matrimony_header_search_settings',
    array(
      'title' => esc_html__('Top Header Settings','matrimony'),
      'panel' => 'matrimony_header_setups'
    )
);
// Enable/Disable Header Button Text
$wp_customize->add_setting('matrimonial_header_settings_option',
    array(
        'default' => 0,
        'sanitize_callback' => 'matrimonial_sanitize_switch_options'
    )
);
$wp_customize->add_control(new Matrimony_WP_Customize_Switch_Control($wp_customize,'matrimonial_header_settings_option',
    array(
        'type' => 'switch',
        'label' => esc_html__('Enable Header RVSP', 'matrimony'),
        'description' => esc_html__ ('Select Yes to show Header RVSP on homepage.','matrimony'),
        'section' => 'matrimony_header_search_settings',
    )
) );
// Header Button Text
$wp_customize->add_setting('matrimony_rvsp_text',
    array(
        'default'           =>  '',
        'sanitize_callback' =>  'sanitize_text_field',
    )
);

$wp_customize->add_control('matrimony_rvsp_text',
    array(
        'label'         =>  esc_html__('RVSP Text','matrimony'),
        'section'       =>  'matrimony_header_search_settings',
        'setting'       =>  'matrimony_rvsp_text',
        'type'          =>  'text', 
    )                                     
);
// Button Header Text Url
$wp_customize->add_setting('martimony_link',
    array( 
        'default'           =>  '#',
        'sanitize_callback' =>  'esc_url_raw',
    )
);
$wp_customize->add_control('martimony_link',
    array(
        'label'         =>  esc_html__('RVSP Link','matrimony'),
        'section'       =>  'matrimony_header_search_settings',
        'setting'       =>  'martimony_link',
        'type'          =>  'text',  
    )                                     
);
// Enable/Disable Header Search
$wp_customize->add_setting('matrimonial_header_search_settings_option',
    array(
        'default' => 0,
        'sanitize_callback' => 'matrimonial_sanitize_switch_options'
    )
);
$wp_customize->add_control(new Matrimony_WP_Customize_Switch_Control($wp_customize,'matrimonial_header_search_settings_option',
    array(
        'type' => 'switch',
        'label' => esc_html__('Enable Header Search', 'matrimony'),
        'description' => esc_html__ ('Select Yes to show Header Search on homepage.','matrimony'),
        'section' => 'matrimony_header_search_settings',
    )
));
// Enable/Disable Header Section Title
$wp_customize->add_setting('general_header_section_options',
    array(
        'default' => 0,
        'sanitize_callback' => 'matrimonial_sanitize_switch_options'
    )
);
$wp_customize->add_control(new Matrimony_WP_Customize_Switch_Control($wp_customize,'general_header_section_options',
    array(
    'type' => 'switch',
    'label' => esc_html__('Enable/Disable Section Title', 'matrimony'),
    'description' => esc_html__ ('Select Yes to show.','matrimony'),
    'section' => 'matrimony_header_search_settings',
    )
) );
// Header Section Image
$wp_customize->add_setting('matrimony_breadcrumb_image',
    array(
      'default' => '',
      'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(new WP_Customize_Image_Control( $wp_customize,'matrimony_breadcrumb_image',
    array(
        'label'      => esc_html__( 'Header Breadcrumb Image', 'matrimony' ),
        'section'    => 'matrimony_header_search_settings',
        'settings'   => 'matrimony_breadcrumb_image',
    )
) );