<?php
/**
 * Sidebar settings
 */

$wp_customize->add_section(
	'early_news_sidebar_option',
	array(
		'title' => esc_html__( 'Sidebar Options', 'early-news' ),
		'panel' => 'early_news_theme_options_panel',
	)
);

// Sidebar Option - Archive Sidebar Position.
$wp_customize->add_setting(
	'early_news_archive_sidebar_position',
	array(
		'sanitize_callback' => 'early_news_sanitize_select',
		'default'           => 'right-sidebar',
	)
);

$wp_customize->add_control(
	'early_news_archive_sidebar_position',
	array(
		'label'   => esc_html__( 'Archive Sidebar Position', 'early-news' ),
		'section' => 'early_news_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'early-news' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'early-news' ),
		),
	)
);

// Sidebar Option - Post Sidebar Position.
$wp_customize->add_setting(
	'early_news_post_sidebar_position',
	array(
		'sanitize_callback' => 'early_news_sanitize_select',
		'default'           => 'right-sidebar',
	)
);

$wp_customize->add_control(
	'early_news_post_sidebar_position',
	array(
		'label'   => esc_html__( 'Post Sidebar Position', 'early-news' ),
		'section' => 'early_news_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'early-news' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'early-news' ),
		),
	)
);

// Sidebar Option - Page Sidebar Position.
$wp_customize->add_setting(
	'early_news_page_sidebar_position',
	array(
		'sanitize_callback' => 'early_news_sanitize_select',
		'default'           => 'right-sidebar',
	)
);

$wp_customize->add_control(
	'early_news_page_sidebar_position',
	array(
		'label'   => esc_html__( 'Page Sidebar Position', 'early-news' ),
		'section' => 'early_news_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'early-news' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'early-news' ),
		),
	)
);
