<?php
/**
 * Sidebar Position
 *
 * @package Zenith Blog
 */

$wp_customize->add_section(
	'zenith_blog_sidebar_position',
	array(
		'title' => esc_html__( 'Sidebar Position', 'zenith-blog' ),
		'panel' => 'zenith_blog_theme_options',
	)
);

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

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

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

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

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

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