<?php
/**
 * Sidebar Option
 *
 * @package Neo Magazine
 */

$wp_customize->add_section(
	'neo_magazine_sidebar_option',
	array(
		'title' => esc_html__( 'Layout', 'neo-magazine' ),
		'panel' => 'neo_magazine_theme_options',
	)
);

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

$wp_customize->add_control(
	'neo_magazine_sidebar_position',
	array(
		'label'   => esc_html__( 'Global Sidebar Position', 'neo-magazine' ),
		'section' => 'neo_magazine_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'neo-magazine' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'neo-magazine' ),
		),
	)
);

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

$wp_customize->add_control(
	'neo_magazine_post_sidebar_position',
	array(
		'label'   => esc_html__( 'Post Sidebar Position', 'neo-magazine' ),
		'section' => 'neo_magazine_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'neo-magazine' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'neo-magazine' ),
		),
	)
);

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

$wp_customize->add_control(
	'neo_magazine_page_sidebar_position',
	array(
		'label'   => esc_html__( 'Page Sidebar Position', 'neo-magazine' ),
		'section' => 'neo_magazine_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'neo-magazine' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'neo-magazine' ),
		),
	)
);
