<?php
/**
* Posts Settings.
*
* @package Vintuna
*/

$vintuna_default = vintuna_get_default_theme_options();

// Single Post Section.
$wp_customize->add_section( 'posts_settings',
	array(
	'title'      => esc_html__( 'Article Meta Settings', 'vintuna' ),
	'priority'   => 35,
	'capability' => 'edit_theme_options',
	'panel'      => 'theme_option_panel',
	)
);

$wp_customize->add_setting('ed_post_date',
    array(
        'default' => $vintuna_default['ed_post_date'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'vintuna_sanitize_checkbox',
    )
);
$wp_customize->add_control('ed_post_date',
    array(
        'label' => esc_html__('Enable Posts Date', 'vintuna'),
        'section' => 'posts_settings',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('ed_post_author',
    array(
        'default' => $vintuna_default['ed_post_author'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'vintuna_sanitize_checkbox',
    )
);
$wp_customize->add_control('ed_post_author',
    array(
        'label' => esc_html__('Enable Posts Author', 'vintuna'),
        'section' => 'posts_settings',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('ed_post_category',
    array(
        'default' => $vintuna_default['ed_post_category'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'vintuna_sanitize_checkbox',
    )
);
$wp_customize->add_control('ed_post_category',
    array(
        'label' => esc_html__('Enable Posts Category', 'vintuna'),
        'section' => 'posts_settings',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('ed_post_tags',
    array(
        'default' => $vintuna_default['ed_post_tags'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'vintuna_sanitize_checkbox',
    )
);
$wp_customize->add_control('ed_post_tags',
    array(
        'label' => esc_html__('Enable Posts Tags', 'vintuna'),
        'section' => 'posts_settings',
        'type' => 'checkbox',
    )
);


// Enable Disable Post.
$wp_customize->add_setting('post_date_format',
    array(
        'default' => $vintuna_default['post_date_format'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'vintuna_sanitize_select',
    )
);
$wp_customize->add_control('post_date_format',
    array(
        'label' => esc_html__('Posted Date Format', 'vintuna'),
        'section' => 'posts_settings',
        'type' => 'select',
        'choices'               => array(
            'default' => esc_html__( 'Apply Default Format', 'vintuna' ),
            'time-ago' => esc_html__( 'Apply Time Age Format', 'vintuna' ),
            ),
        )
);