<?php
/**
 * Sidebar settings.
 */

$wp_customize->add_section(
	'adore_news_sidebar_option',
	array(
		'title' => esc_html__( 'Sidebar Options', 'adore-news' ),
		'panel' => 'adore_news_theme_options_panel',
	)
);

// Sidebar Option - Global Sidebar Position.
$wp_customize->add_setting(
	'adore_news_sidebar_position',
	array(
		'sanitize_callback' => 'adore_news_sanitize_select',
		'default'           => 'right-sidebar',
	)
);

$wp_customize->add_control(
	'adore_news_sidebar_position',
	array(
		'label'   => esc_html__( 'Global Sidebar Position', 'adore-news' ),
		'section' => 'adore_news_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'adore-news' ),
			'left-sidebar'  => esc_html__( 'Left Sidebar', 'adore-news' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'adore-news' ),
		),
	)
);

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

$wp_customize->add_control(
	'adore_news_post_sidebar_position',
	array(
		'label'   => esc_html__( 'Post Sidebar Position', 'adore-news' ),
		'section' => 'adore_news_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'adore-news' ),
			'left-sidebar'  => esc_html__( 'Left Sidebar', 'adore-news' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'adore-news' ),
		),
	)
);

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

$wp_customize->add_control(
	'adore_news_page_sidebar_position',
	array(
		'label'   => esc_html__( 'Page Sidebar Position', 'adore-news' ),
		'section' => 'adore_news_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'adore-news' ),
			'left-sidebar'  => esc_html__( 'Left Sidebar', 'adore-news' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'adore-news' ),
		),
	)
);
