<?php
/**
* Header Options.
*
* @package Elegant Jewellery
*/

$elegant_jewellery_default = elegant_jewellery_get_default_theme_options();

// Header Section.
$wp_customize->add_section( 'elegant_jewellery_button_header_setting',
	array(
	'title'      => esc_html__( 'Header Settings', 'elegant-jewellery' ),
	'priority'   => 10,
	'capability' => 'edit_theme_options',
	'panel'      => 'elegant_jewellery_theme_option_panel',
	)
);

$wp_customize->add_setting( 'elegant_jewellery_header_layout_button_url',
    array(
    'default'           => $elegant_jewellery_default['elegant_jewellery_header_layout_button_url'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'elegant_jewellery_header_layout_button_url',
    array(
    'label'    => esc_html__( 'Button Url', 'elegant-jewellery' ),
    'section'  => 'elegant_jewellery_button_header_setting',
    'type'     => 'url',
    )
);

$wp_customize->add_setting('elegant_jewellery_menu_font_size',
    array(
        'default'           => $elegant_jewellery_default['elegant_jewellery_menu_font_size'],
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'elegant_jewellery_sanitize_number_range',
    )
);
$wp_customize->add_control('elegant_jewellery_menu_font_size',
    array(
        'label'       => esc_html__('Menu Font Size', 'elegant-jewellery'),
        'section'     => 'elegant_jewellery_button_header_setting',
        'type'        => 'number',
        'input_attrs' => array(
           'min'   => 1,
           'max'   => 30,
           'step'   => 1,
        ),
    )
);

$wp_customize->add_setting( 'elegant_jewellery_menu_text_transform',
    array(
    'default'           => $elegant_jewellery_default['elegant_jewellery_menu_text_transform'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'elegant_jewellery_sanitize_menu_transform',
    )
);
$wp_customize->add_control( 'elegant_jewellery_menu_text_transform',
    array(
    'label'       => esc_html__( 'Menu Text Transform', 'elegant-jewellery' ),
    'section'     => 'elegant_jewellery_button_header_setting',
    'type'        => 'select',
    'choices'     => array(
        'capitalize' => esc_html__( 'Capitalize', 'elegant-jewellery' ),
        'uppercase'  => esc_html__( 'Uppercase', 'elegant-jewellery' ),
        'lowercase'    => esc_html__( 'Lowercase', 'elegant-jewellery' ),
        ),
    )
);

$wp_customize->add_setting( 'elegant_jewellery_header_layout_email_address',
    array(
    'default'           => $elegant_jewellery_default['elegant_jewellery_header_layout_email_address'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'elegant_jewellery_header_layout_email_address',
    array(
    'label'    => esc_html__( 'Email Id', 'elegant-jewellery' ),
    'section'  => 'elegant_jewellery_button_header_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'elegant_jewellery_header_advertisement_text',
    array(
    'default'           => $elegant_jewellery_default['elegant_jewellery_header_advertisement_text'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'elegant_jewellery_header_advertisement_text',
    array(
    'label'    => esc_html__( 'Adevertisement Text', 'elegant-jewellery' ),
    'section'  => 'elegant_jewellery_button_header_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting('elegant_jewellery_display_gtranslator',
    array(
        'default' => $elegant_jewellery_default['elegant_jewellery_display_gtranslator'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'elegant_jewellery_sanitize_checkbox',
    )
);
$wp_customize->add_control('elegant_jewellery_display_gtranslator',
    array(
        'label' => esc_html__('Enable Gtranslator', 'elegant-jewellery'),
        'section' => 'elegant_jewellery_button_header_setting',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('elegant_jewellery_display_currency_switcher',
    array(
        'default' => $elegant_jewellery_default['elegant_jewellery_display_currency_switcher'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'elegant_jewellery_sanitize_checkbox',
    )
);
$wp_customize->add_control('elegant_jewellery_display_currency_switcher',
    array(
        'label' => esc_html__('Enable Currency Switcher', 'elegant-jewellery'),
        'section' => 'elegant_jewellery_button_header_setting',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('elegant_jewellery_header_search',
    array(
        'default' => $elegant_jewellery_default['elegant_jewellery_header_search'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'elegant_jewellery_sanitize_checkbox',
    )
);
$wp_customize->add_control('elegant_jewellery_header_search',
    array(
        'label' => esc_html__('Enable Search', 'elegant-jewellery'),
        'section' => 'elegant_jewellery_button_header_setting',
        'type' => 'checkbox',
    )
);

// Header Section.
$wp_customize->add_section( 'elegant_jewellery_social_media_setting',
	array(
	'title'      => esc_html__( 'Social Media Settings', 'elegant-jewellery' ),
	'priority'   => 10,
	'capability' => 'edit_theme_options',
	'panel'      => 'elegant_jewellery_theme_option_panel',
	)
);

$wp_customize->add_setting( 'elegant_jewellery_header_layout_facebook_link',
    array(
    'default'           => $elegant_jewellery_default['elegant_jewellery_header_layout_facebook_link'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control( 'elegant_jewellery_header_layout_facebook_link',
    array(
    'label'    => esc_html__( 'Facebook Link', 'elegant-jewellery' ),
    'section'  => 'elegant_jewellery_social_media_setting',
    'type'     => 'url',
    )
);

$wp_customize->add_setting( 'elegant_jewellery_header_layout_twitter_link',
    array(
    'default'           => $elegant_jewellery_default['elegant_jewellery_header_layout_twitter_link'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control( 'elegant_jewellery_header_layout_twitter_link',
    array(
    'label'    => esc_html__( 'Twitter Link', 'elegant-jewellery' ),
    'section'  => 'elegant_jewellery_social_media_setting',
    'type'     => 'url',
    )
);

$wp_customize->add_setting( 'elegant_jewellery_header_layout_pintrest_link',
    array(
    'default'           => $elegant_jewellery_default['elegant_jewellery_header_layout_pintrest_link'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control( 'elegant_jewellery_header_layout_pintrest_link',
    array(
    'label'    => esc_html__( 'Pintrest Link', 'elegant-jewellery' ),
    'section'  => 'elegant_jewellery_social_media_setting',
    'type'     => 'url',
    )
);

$wp_customize->add_setting( 'elegant_jewellery_header_layout_instagram_link',
    array(
    'default'           => $elegant_jewellery_default['elegant_jewellery_header_layout_instagram_link'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control( 'elegant_jewellery_header_layout_instagram_link',
    array(
    'label'    => esc_html__( 'Instagram Link', 'elegant-jewellery' ),
    'section'  => 'elegant_jewellery_social_media_setting',
    'type'     => 'url',
    )
);

$wp_customize->add_setting( 'elegant_jewellery_header_layout_youtube_link',
    array(
    'default'           => $elegant_jewellery_default['elegant_jewellery_header_layout_youtube_link'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control( 'elegant_jewellery_header_layout_youtube_link',
    array(
    'label'    => esc_html__( 'Youtube Link', 'elegant-jewellery' ),
    'section'  => 'elegant_jewellery_social_media_setting',
    'type'     => 'url',
    )
);


