<?php
/**
 * Sidebar Option
 *
 * @package Majestic Blog
 */

$wp_customize->add_section(
	'majestic_blog_sidebar_option',
	array(
		'title' => esc_html__( 'Layout', 'majestic-blog' ),
		'panel' => 'majestic_blog_theme_options',
	)
);

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

$wp_customize->add_control(
	'majestic_blog_sidebar_position',
	array(
		'label'   => esc_html__( 'Global Sidebar Position', 'majestic-blog' ),
		'section' => 'majestic_blog_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'majestic-blog' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'majestic-blog' ),
		),
	)
);

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

$wp_customize->add_control(
	'majestic_blog_post_sidebar_position',
	array(
		'label'   => esc_html__( 'Post Sidebar Position', 'majestic-blog' ),
		'section' => 'majestic_blog_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'majestic-blog' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'majestic-blog' ),
		),
	)
);

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

$wp_customize->add_control(
	'majestic_blog_page_sidebar_position',
	array(
		'label'   => esc_html__( 'Page Sidebar Position', 'majestic-blog' ),
		'section' => 'majestic_blog_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'majestic-blog' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'majestic-blog' ),
		),
	)
);
