<?php
/**
* Layouts Settings.
*
* @package Online Learning LMS
*/

$online_learning_lms_default = online_learning_lms_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'online_learning_lms_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'online-learning-lms' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'online_learning_lms_theme_option_panel',
	)
);

$wp_customize->add_setting( 'online_learning_lms_global_sidebar_layout',
    array(
    'default'           => $online_learning_lms_default['online_learning_lms_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'online_learning_lms_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'online_learning_lms_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'online-learning-lms' ),
    'section'     => 'online_learning_lms_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'online-learning-lms' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'online-learning-lms' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'online-learning-lms' ),
        ),
    )
);

$wp_customize->add_setting('online_learning_lms_page_sidebar_layout', array(
    'default'           => $online_learning_lms_default['online_learning_lms_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'online_learning_lms_sanitize_sidebar_option',
));

$wp_customize->add_control('online_learning_lms_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'online-learning-lms'),
    'section'     => 'online_learning_lms_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'online-learning-lms'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'online-learning-lms'),
        'no-sidebar'    => esc_html__('No Sidebar', 'online-learning-lms'),
    ),
));

$wp_customize->add_setting('online_learning_lms_post_sidebar_layout', array(
    'default'           => $online_learning_lms_default['online_learning_lms_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'online_learning_lms_sanitize_sidebar_option',
));

$wp_customize->add_control('online_learning_lms_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'online-learning-lms'),
    'section'     => 'online_learning_lms_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'online-learning-lms'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'online-learning-lms'),
        'no-sidebar'    => esc_html__('No Sidebar', 'online-learning-lms'),
    ),
));

$wp_customize->add_setting('online_learning_lms_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'online_learning_lms_sanitize_checkbox',
    )
);
$wp_customize->add_control('online_learning_lms_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'online-learning-lms'),
        'section' => 'online_learning_lms_layout_setting',
        'type' => 'checkbox',
    )
);