<?php
/**
 * Post Layout Settings
 *
 * @package chic-lifestyle
 */

add_action( 'customize_register', 'chic_lifestyle_customize_register_post_layout' );

function chic_lifestyle_customize_register_post_layout( $wp_customize ) {

	$wp_customize->add_section( 'chic_lifestyle_post_layout_section', array(
    'title'          => esc_attr__( 'Post Options', 'chic-lifestyle' ),
	  'description'    => esc_attr__( 'Customize Single Post Options', 'chic-lifestyle' ),
    'panel'          => 'chic_lifestyle_general_panel',
    'priority'       => 6,
    'capability'     => 'edit_theme_options',
  ) );
	
	$wp_customize->add_setting( 'chic_lifestyle_post_details', array(
    'sanitize_callback' => 'chic_lifestyle_sanitize_array',
    'default'     => array( 'date', 'categories', 'tags', 'author_block' ),
  ) );

  $wp_customize->add_control( new Chic_Lifestyle_Multi_Check_Control(
    $wp_customize, 'chic_lifestyle_post_details', array(
      'label'       => esc_attr__( 'Hide / Show Details', 'chic-lifestyle' ),
      'section' => 'chic_lifestyle_post_layout_section',
      'settings' => 'chic_lifestyle_post_details',
      'type'=> 'multi-check',
      'choices'     => array(
        'author' => esc_attr__( 'Show post author', 'chic-lifestyle' ),
				'date' => esc_attr__( 'Show post date', 'chic-lifestyle' ),		
				'categories' => esc_attr__( 'Show Categories', 'chic-lifestyle' ),
				'tags' => esc_attr__( 'Show Tags', 'chic-lifestyle' ),
				'number_of_comments' => esc_attr__( 'Show number of comments', 'chic-lifestyle' ),
				'author_block' => esc_attr__( 'Show Author Block', 'chic-lifestyle' ),
      ),
  	)
  ) );
}
