<?php
/**
 * Sidebar Option
 *
 * @package Routine News
 */

$wp_customize->add_section(
	'routine_news_sidebar_option',
	array(
		'title' => esc_html__( 'Layout', 'routine-news' ),
		'panel' => 'routine_news_theme_options',
	)
);

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

$wp_customize->add_control(
	'routine_news_sidebar_position',
	array(
		'label'   => esc_html__( 'Global Sidebar Position', 'routine-news' ),
		'section' => 'routine_news_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'routine-news' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'routine-news' ),
		),
	)
);

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

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

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

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