<?php 
$defaults                       = portfolio_one_customizer_defaults();
$portfolio_one_get_widget_areas = portfolio_one_get_widget_areas();


/* Single Post/Page Section */

$wp_customize->add_section( 'portfolio_one_inner_single_section', array(
	'title' => __('Single Page / Post Settings', 'portfolio-one' ),
	'capability' => 'edit_theme_options',
	'panel' => 'portfolio_one_sidebar_panel',
	'priority' => 20,
) );




$wp_customize->add_setting( 'portfolio_one_inner_single_sidebar', array( 
	'default' 			=> $defaults['portfolio_one_inner_single_sidebar'],
	'sanitize_callback' => 'sanitize_text_field' 
) );

$wp_customize->add_control( new Image_Radio_Buttons( $wp_customize, 'portfolio_one_inner_single_sidebar', array(
	'label'    => __( 'Single Page / Post Sidebar Style','portfolio-one'),
	'section' => 'portfolio_one_inner_single_section',
	'type'    => 'select',
	'choices' => array(
		'sidebar-left' => array(
			'image'=> get_template_directory_uri().'/assets/img/sidebar-layouts/left-sidebar.png',
			'name'=> esc_html__('Left Sidebar', 'portfolio-one')
		),
		'sidebar-right' => array(
			'image'=> get_template_directory_uri().'/assets/img/sidebar-layouts/right-sidebar.png',
			'name'=> esc_html__('Right Sidebar', 'portfolio-one')
		),
		'sidebar-none' => array(
			'image'=> get_template_directory_uri().'/assets/img/sidebar-layouts/no-sidebar.png',
			'name'=> esc_html__('No Sidebar', 'portfolio-one')
		),
		
	)
) ) );


$wp_customize->add_setting( 'portfolio_one_post_sidebar_area', array( 
    'default' 			=> $defaults['portfolio_one_post_sidebar_area'],
    'sanitize_callback' => 'esc_html' 
) );

$wp_customize->add_control( 'portfolio_one_post_sidebar_area', array(
    'label'         => esc_html__( 'Sidebar Area','portfolio-one'),
	'description' 	=> esc_html__( 'Choose area for sidebar to display.','portfolio-one'),
    'section'       => 'portfolio_one_inner_single_section',
    'type'          => 'select',
    'choices'       => $portfolio_one_get_widget_areas
) );


$wp_customize->add_setting( 'portfolio_one_post_sidebar_sticky_enable', array( 
    'default' 			=> $defaults['portfolio_one_post_sidebar_sticky_enable'],
    'sanitize_callback' => 'sanitize_text_field' 
) );

$wp_customize->add_control( 'portfolio_one_post_sidebar_sticky_enable', array(
    'label'         => esc_html__( 'Sticky Sidebar','portfolio-one'),
	'description' 	=> esc_html__( 'Make sidebar sticky as you scroll down?','portfolio-one'),
    'section'       => 'portfolio_one_inner_single_section',
    'type'          => 'checkbox',
) );
