<?php
/**
* Single Post Options.
*
* @package Maizzy
*/

$maizzy_default = maizzy_get_default_theme_options();

$wp_customize->add_section( 'single_post_setting',
	array(
	'title'      => esc_html__( 'Single Post Settings', 'maizzy' ),
	'priority'   => 35,
	'capability' => 'edit_theme_options',
	'panel'      => 'theme_option_panel',
	)
);

$wp_customize->add_setting('ed_related_post',
    array(
        'default' => $maizzy_default['ed_related_post'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'maizzy_sanitize_checkbox',
    )
);
$wp_customize->add_control('ed_related_post',
    array(
        'label' => esc_html__('Enable Related Posts', 'maizzy'),
        'section' => 'single_post_setting',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting( 'related_post_title',
    array(
    'default'           => $maizzy_default['related_post_title'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'related_post_title',
    array(
    'label'    => esc_html__( 'Related Posts Section Title', 'maizzy' ),
    'section'  => 'single_post_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting('twp_navigation_type',
    array(
        'default' => $maizzy_default['twp_navigation_type'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'maizzy_sanitize_single_pagination_layout',
    )
);
$wp_customize->add_control('twp_navigation_type',
    array(
        'label' => esc_html__('Single Post Navigation Type', 'maizzy'),
        'section' => 'single_post_setting',
        'type' => 'select',
        'choices' => array(
                'no-navigation' => esc_html__('Disable Navigation','maizzy' ),
                'norma-navigation' => esc_html__('Next Previous Navigation','maizzy' ),
                'ajax-next-post-load' => esc_html__('Ajax Load Next 3 Posts Contents','maizzy' )
            ),
    )
);