<?php
/**
* Layouts Settings.
*
* @package OTT Vlogger
*/

$ott_vlogger_default = ott_vlogger_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'ott_vlogger_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'ott-vlogger' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'ott_vlogger_theme_option_panel',
	)
);

$wp_customize->add_setting( 'ott_vlogger_global_sidebar_layout',
    array(
    'default'           => $ott_vlogger_default['ott_vlogger_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'ott_vlogger_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'ott_vlogger_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'ott-vlogger' ),
    'section'     => 'ott_vlogger_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'ott-vlogger' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'ott-vlogger' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'ott-vlogger' ),
        ),
    )
);

$wp_customize->add_setting('ott_vlogger_page_sidebar_layout', array(
    'default'           => $ott_vlogger_default['ott_vlogger_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'ott_vlogger_sanitize_sidebar_option',
));

$wp_customize->add_control('ott_vlogger_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'ott-vlogger'),
    'section'     => 'ott_vlogger_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'ott-vlogger'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'ott-vlogger'),
        'no-sidebar'    => esc_html__('No Sidebar', 'ott-vlogger'),
    ),
));

$wp_customize->add_setting('ott_vlogger_post_sidebar_layout', array(
    'default'           => $ott_vlogger_default['ott_vlogger_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'ott_vlogger_sanitize_sidebar_option',
));

$wp_customize->add_control('ott_vlogger_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'ott-vlogger'),
    'section'     => 'ott_vlogger_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'ott-vlogger'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'ott-vlogger'),
        'no-sidebar'    => esc_html__('No Sidebar', 'ott-vlogger'),
    ),
));

$wp_customize->add_setting('ott_vlogger_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'ott_vlogger_sanitize_checkbox',
    )
);
$wp_customize->add_control('ott_vlogger_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'ott-vlogger'),
        'section' => 'ott_vlogger_layout_setting',
        'type' => 'checkbox',
    )
);