<?php
/**
 * Sidebar settings
 */

$wp_customize->add_section(
	'nice_blog_sidebar_option',
	array(
		'title' => esc_html__( 'Sidebar Options', 'nice-blog' ),
		'panel' => 'nice_blog_theme_options_panel',
	)
);

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

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

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

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

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

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