<?php
/**
 * Single Post Options
 */

$wp_customize->add_section(
	'translucent_blog_single_page_options',
	array(
		'title' => esc_html__( 'Single Post Options', 'translucent-blog' ),
		'panel' => 'translucent_blog_theme_options_panel',
	)
);

// Enable single post category setting.
$wp_customize->add_setting(
	'translucent_blog_enable_single_category',
	array(
		'default'           => true,
		'sanitize_callback' => 'translucent_blog_sanitize_checkbox',
	)
);

$wp_customize->add_control(
	new Translucent_Blog_Toggle_Checkbox_Custom_control(
		$wp_customize,
		'translucent_blog_enable_single_category',
		array(
			'label'    => esc_html__( 'Enable Category', 'translucent-blog' ),
			'settings' => 'translucent_blog_enable_single_category',
			'section'  => 'translucent_blog_single_page_options',
			'type'     => 'checkbox',
		)
	)
);

// Enable single post author setting.
$wp_customize->add_setting(
	'translucent_blog_enable_single_author',
	array(
		'default'           => true,
		'sanitize_callback' => 'translucent_blog_sanitize_checkbox',
	)
);

$wp_customize->add_control(
	new Translucent_Blog_Toggle_Checkbox_Custom_control(
		$wp_customize,
		'translucent_blog_enable_single_author',
		array(
			'label'    => esc_html__( 'Enable Author', 'translucent-blog' ),
			'settings' => 'translucent_blog_enable_single_author',
			'section'  => 'translucent_blog_single_page_options',
			'type'     => 'checkbox',
		)
	)
);

// Enable single post date setting.
$wp_customize->add_setting(
	'translucent_blog_enable_single_date',
	array(
		'default'           => true,
		'sanitize_callback' => 'translucent_blog_sanitize_checkbox',
	)
);

$wp_customize->add_control(
	new Translucent_Blog_Toggle_Checkbox_Custom_control(
		$wp_customize,
		'translucent_blog_enable_single_date',
		array(
			'label'    => esc_html__( 'Enable Date', 'translucent-blog' ),
			'settings' => 'translucent_blog_enable_single_date',
			'section'  => 'translucent_blog_single_page_options',
			'type'     => 'checkbox',
		)
	)
);

// Enable single post tag setting.
$wp_customize->add_setting(
	'translucent_blog_enable_single_tag',
	array(
		'default'           => true,
		'sanitize_callback' => 'translucent_blog_sanitize_checkbox',
	)
);

$wp_customize->add_control(
	new Translucent_Blog_Toggle_Checkbox_Custom_control(
		$wp_customize,
		'translucent_blog_enable_single_tag',
		array(
			'label'    => esc_html__( 'Enable Post Tag', 'translucent-blog' ),
			'settings' => 'translucent_blog_enable_single_tag',
			'section'  => 'translucent_blog_single_page_options',
			'type'     => 'checkbox',
		)
	)
);

// Single post related Posts title label.
$wp_customize->add_setting(
	'translucent_blog_related_posts_title',
	array(
		'default'           => __( 'Related Posts', 'translucent-blog' ),
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'translucent_blog_related_posts_title',
	array(
		'label'    => esc_html__( 'Related Posts Title', 'translucent-blog' ),
		'section'  => 'translucent_blog_single_page_options',
		'settings' => 'translucent_blog_related_posts_title',
	)
);
