<?php
/*-------------------------------------------------------------------------------------------*/
/**
 * Theme Option
 *
 * @since 1.0.0
 */
$wp_customize->add_panel(
    'sewa_single_page_options',
    array(
        'priority'       => 50,
        'capability'     => 'edit_theme_options',
        'theme_supports' => '',
        'title'          => esc_html__('Single Page & Post Options', 'sewa'),
    )
);
/* ========================
* Related Post Section
===========================*/
$wp_customize->add_section(
    'sewa_single_related_post_section',
    array(
        'title'    => esc_html__('Related Post Options', 'sewa'),
        'panel'    => 'sewa_single_page_options',
        'priority' => 7,
    )
);

/**
 * Show Hide Related Post In Single Post
*/
$wp_customize->add_setting(
    'sewa_related_post_show_hide',
    array(
        'default'           => $default['sewa_related_post_show_hide'],
        'sanitize_callback' => 'sewa_sanitize_checkbox',
    )
);

$wp_customize->add_control(
    'sewa_related_post_show_hide',
    array(
        'type'     => 'checkbox',
        'label'    => esc_html__('Show Related Post ', 'sewa'),
        'section'  => 'sewa_single_related_post_section',
        'priority' => 10
    )
);

/**
 * Related Post Title
*/
$wp_customize->add_setting(
    'sewa_related_post_title',
    array(
        'default'           => $default['sewa_related_post_title'],
        'sanitize_callback' => 'sanitize_text_field',
    )
);

$wp_customize->add_control(
    'sewa_related_post_title',
    array(
        'type'     => 'text',
        'label'    => esc_html__('Related Post Title ', 'sewa'),
        'section'  => 'sewa_single_related_post_section',
        'priority' => 10
    )
);