<?php
/**
 * Theme Ostrich Customizer
 *
 * @package Ostrich Magazine
 *
 * Header panel
 */


// Header section
$wp_customize->add_section(
	'ostrich_magazine_header_section',
	array(
		'title' => esc_html__( 'Header', 'ostrich-magazine' ),
		'panel' => 'ostrich_magazine_general_panel',
	)
);

$wp_customize->add_setting( 'ostrich_magazine_enable_secondary_menu',
	array(
		'default' => false,
		'sanitize_callback' => 'ostrich_magazine_switch_sanitization'
	)
);
$wp_customize->add_control( new Ostrich_Magazine_Toggle_Switch_Custom_control( $wp_customize, 'ostrich_magazine_enable_secondary_menu',
	array(
		'label' => esc_html__( 'Enable Secondary Menu', 'ostrich-magazine' ),
		'section' => 'ostrich_magazine_header_section'
	)
) );

$wp_customize->add_setting( 'ostrich_magazine_enable_header_social_menu',
	array(
		'default' => false,
		'sanitize_callback' => 'ostrich_magazine_switch_sanitization'
	)
);
$wp_customize->add_control( new Ostrich_Magazine_Toggle_Switch_Custom_control( $wp_customize, 'ostrich_magazine_enable_header_social_menu',
	array(
		'label' => esc_html__( 'Enable Social Menu', 'ostrich-magazine' ),
		'section' => 'ostrich_magazine_header_section'
	)
) );

$wp_customize->add_setting( 
	'ostrich_magazine_header_bg_image',
	array(
		'sanitize_callback' => 'ostrich_magazine_sanitize_image',
	) 
);

$wp_customize->add_control( 
	new WP_Customize_Image_Control( $wp_customize, 'ostrich_magazine_header_bg_image',
	array(
		'label'       		=> esc_html__( 'Background Image', 'ostrich-magazine' ),
		'section'     		=> 'ostrich_magazine_header_section',
	)
) );



$wp_customize->add_setting( 'ostrich_magazine_enable_header_date',
	array(
		'default' => false,
		'sanitize_callback' => 'ostrich_magazine_switch_sanitization'
	)
);
$wp_customize->add_control( new Ostrich_Magazine_Toggle_Switch_Custom_control( $wp_customize, 'ostrich_magazine_enable_header_date',
	array(
		'label' => esc_html__( 'Enable Date', 'ostrich-magazine' ),
		'section' => 'ostrich_magazine_header_section'
	)
) );



$wp_customize->add_setting( 
	'ostrich_magazine_ads_image',
	array(
		'sanitize_callback' => 'ostrich_magazine_sanitize_image',
	) 
);

$wp_customize->add_control( 
	new WP_Customize_Image_Control( $wp_customize, 'ostrich_magazine_ads_image',
	array(
		'label'       		=> esc_html__( 'Ads Image', 'ostrich-magazine' ),
		'section'     		=> 'ostrich_magazine_header_section',
	)
) );


$wp_customize->add_setting(
	'ostrich_magazine_ads_url',
	array(
		'sanitize_callback' => 'esc_url_raw',
	)
);

$wp_customize->add_control(
	'ostrich_magazine_ads_url',
	array(
		'section'		=> 'ostrich_magazine_header_section',
		'label'			=> esc_html__( 'Ads Url', 'ostrich-magazine' ),
		'type'	=> 'url'
	)
);
