<?php
/**
 * Header Options
 *
 * @package Macro News
 */

$wp_customize->add_section(
	'macro_news_header_options',
	array(
		'panel' => 'macro_news_theme_options',
		'title' => esc_html__( 'Header Options', 'macro-news' ),
	)
);

// Header Options - Advertisement.
$wp_customize->add_setting(
	'macro_news_header_advertisement',
	array(
		'default'           => '',
		'sanitize_callback' => 'macro_news_sanitize_image',
	)
);

$wp_customize->add_control(
	new WP_Customize_Image_Control(
		$wp_customize,
		'macro_news_header_advertisement',
		array(
			'label'    => esc_html__( 'Advertisement', 'macro-news' ),
			'section'  => 'macro_news_header_options',
			'settings' => 'macro_news_header_advertisement',
		)
	)
);

	// Header Options - Advertisement URL.
$wp_customize->add_setting(
	'macro_news_header_advertisement_url',
	array(
		'default'           => '',
		'sanitize_callback' => 'esc_url_raw',
	)
);

$wp_customize->add_control(
	'macro_news_header_advertisement_url',
	array(
		'label'    => esc_html__( 'Advertisement URL', 'macro-news' ),
		'section'  => 'macro_news_header_options',
		'settings' => 'macro_news_header_advertisement_url',
		'type'     => 'url',
	)
);
