<?php
/**
 * General Layout Settings
 *
 * @package Feminine_Lifestyle_Blog
 */

function feminine_lifestyle_blog_customize_register_layout_general( $wp_customize ) {
    
    /** Home Page Layout Settings */
    $wp_customize->add_section(
        'general_layout_settings',
        array(
            'title'    => __( 'General Sidebar Layout', 'feminine-lifestyle-blog' ),
            'priority' => 80,
            'panel'    => 'layout_settings',
        )
    );
    
    /** Page Sidebar layout */
    $wp_customize->add_setting( 
        'page_sidebar_layout', 
        array(
            'default'           => 'right-sidebar',
            'sanitize_callback' => 'feminine_lifestyle_blog_sanitize_radio'
        ) 
    );
    
    $wp_customize->add_control(
		new Feminine_Lifestyle_Blog_Radio_Image_Control(
			$wp_customize,
			'page_sidebar_layout',
			array(
				'section'	  => 'general_layout_settings',
				'label'		  => __( 'Page Sidebar Layout', 'feminine-lifestyle-blog' ),
				'description' => __( 'You can set your overall page sidebar layout from here.', 'feminine-lifestyle-blog' ),
				'choices'	  => array(
					'no-sidebar'    => get_template_directory_uri() . '/assets/images/full-width.jpg',
                    'centered'      => get_template_directory_uri() . '/assets/images/full-width-centered.jpg',
					'left-sidebar'  => get_template_directory_uri() . '/assets/images/left-sidebar.jpg',
                    'right-sidebar' => get_template_directory_uri() . '/assets/images/right-sidebar.jpg',
				)
			)
		)
	);
    
    /** Post Sidebar layout */
    $wp_customize->add_setting( 
        'post_sidebar_layout', 
        array(
            'default'           => 'right-sidebar',
            'sanitize_callback' => 'feminine_lifestyle_blog_sanitize_radio'
        ) 
    );
    
    $wp_customize->add_control(
		new Feminine_Lifestyle_Blog_Radio_Image_Control(
			$wp_customize,
			'post_sidebar_layout',
			array(
				'section'	  => 'general_layout_settings',
				'label'		  => __( 'Post Sidebar Layout', 'feminine-lifestyle-blog' ),
				'description' => __( 'You can set your overall post sidebar layout from here.', 'feminine-lifestyle-blog' ),
				'choices'	  => array(
					'no-sidebar'    => get_template_directory_uri() . '/assets/images/full-width.jpg',
                    'centered'      => get_template_directory_uri() . '/assets/images/full-width-centered.jpg',
					'left-sidebar'  => get_template_directory_uri() . '/assets/images/left-sidebar.jpg',
                    'right-sidebar' => get_template_directory_uri() . '/assets/images/right-sidebar.jpg',
				)
			)
		)
	);
    
    /** Post Sidebar layout */
    $wp_customize->add_setting( 
        'layout_style', 
        array(
            'default'           => 'right-sidebar',
            'sanitize_callback' => 'feminine_lifestyle_blog_sanitize_radio'
        ) 
    );
    
    $wp_customize->add_control(
		new Feminine_Lifestyle_Blog_Radio_Image_Control(
			$wp_customize,
			'layout_style',
			array(
				'section'	  => 'general_layout_settings',
				'label'		  => __( 'Default Sidebar Layout', 'feminine-lifestyle-blog' ),
				'description' => __( 'You can set your overall archive page layout from here.', 'feminine-lifestyle-blog' ),
				'choices'	  => array(
					'no-sidebar'    => get_template_directory_uri() . '/assets/images/full-width.jpg',
					'left-sidebar'  => get_template_directory_uri() . '/assets/images/left-sidebar.jpg',
                    'right-sidebar' => get_template_directory_uri() . '/assets/images/right-sidebar.jpg',
				)
			)
		)
	);
    
}
add_action( 'customize_register', 'feminine_lifestyle_blog_customize_register_layout_general' );