<?php
/**
 * Header Options settings
 */

$wp_customize->add_section(
	'hot_news_header_options_section',
	array(
		'title' => esc_html__( 'Header Options', 'hot-news' ),
		'panel' => 'hot_news_theme_options_panel',
	)
);

// Enable topbar Options.
$wp_customize->add_setting(
	'hot_news_enable_topbar',
	array(
		'default'           => true,
		'sanitize_callback' => 'hot_news_sanitize_checkbox',
	)
);

$wp_customize->add_control(
	new Hot_News_Toggle_Checkbox_Custom_control(
		$wp_customize,
		'hot_news_enable_topbar',
		array(
			'label'    => esc_html__( 'Enable Topbar.', 'hot-news' ),
			'section'  => 'hot_news_header_options_section',
			'settings' => 'hot_news_enable_topbar',
			'type'     => 'checkbox',
		)
	)
);

// Header Section Advertisement Image.
$wp_customize->add_setting(
	'hot_news_advertisement_image',
	array(
		'default'           => '',
		'sanitize_callback' => 'hot_news_sanitize_image',
	)
);

$wp_customize->add_control(
	new WP_Customize_Image_Control(
		$wp_customize,
		'hot_news_advertisement_image',
		array(
			'label'    => esc_html__( 'Advertisement Image', 'hot-news' ),
			'settings' => 'hot_news_advertisement_image',
			'section'  => 'hot_news_header_options_section',
		)
	)
);

	// Header Advertisement Url.
$wp_customize->add_setting(
	'hot_news_advertisement_url',
	array(
		'default'           => '#',
		'sanitize_callback' => 'esc_url_raw',
	)
);

$wp_customize->add_control(
	'hot_news_advertisement_url',
	array(
		'label'    => esc_html__( 'Advertisement Url', 'hot-news' ),
		'settings' => 'hot_news_advertisement_url',
		'section'  => 'hot_news_header_options_section',
		'type'     => 'url',
	)
);
