<?php
/**
* Layouts Settings.
*
* @package Modern Art Gallery
*/

$modern_art_gallery_default = modern_art_gallery_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'modern_art_gallery_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'modern-art-gallery' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'modern_art_gallery_theme_option_panel',
	)
);

$wp_customize->add_setting( 'modern_art_gallery_global_sidebar_layout',
    array(
    'default'           => $modern_art_gallery_default['modern_art_gallery_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'modern_art_gallery_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'modern_art_gallery_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'modern-art-gallery' ),
    'section'     => 'modern_art_gallery_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'modern-art-gallery' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'modern-art-gallery' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'modern-art-gallery' ),
        ),
    )
);

$wp_customize->add_setting('modern_art_gallery_page_sidebar_layout', array(
    'default'           => $modern_art_gallery_default['modern_art_gallery_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'modern_art_gallery_sanitize_sidebar_option',
));

$wp_customize->add_control('modern_art_gallery_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'modern-art-gallery'),
    'section'     => 'modern_art_gallery_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'modern-art-gallery'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'modern-art-gallery'),
        'no-sidebar'    => esc_html__('No Sidebar', 'modern-art-gallery'),
    ),
));

$wp_customize->add_setting('modern_art_gallery_post_sidebar_layout', array(
    'default'           => $modern_art_gallery_default['modern_art_gallery_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'modern_art_gallery_sanitize_sidebar_option',
));

$wp_customize->add_control('modern_art_gallery_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'modern-art-gallery'),
    'section'     => 'modern_art_gallery_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'modern-art-gallery'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'modern-art-gallery'),
        'no-sidebar'    => esc_html__('No Sidebar', 'modern-art-gallery'),
    ),
));

$wp_customize->add_setting('modern_art_gallery_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'modern_art_gallery_sanitize_checkbox',
    )
);
$wp_customize->add_control('modern_art_gallery_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'modern-art-gallery'),
        'section' => 'modern_art_gallery_layout_setting',
        'type' => 'checkbox',
    )
);