<?php
/*header management section start */
$wp_customize->add_section('header_section_settings',
    array(
        'title' => esc_html__('Header Options', 'united-blog'),
        'priority' => 5,
        'capability' => 'edit_theme_options',
        'panel' => 'theme_option_panel',
    )
);
// Setting - enable_header_search.
$wp_customize->add_setting('enable_header_search',
    array(
        'default' => $default['enable_header_search'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'united_blog_sanitize_checkbox',
    )
);
$wp_customize->add_control('enable_header_search',
    array(
        'label' => esc_html__('Enable Header Search', 'united-blog'),
        'section' => 'header_section_settings',
        'type' => 'checkbox',
    )
);
// Setting - enable_random_post.
$wp_customize->add_setting('enable_random_post',
    array(
        'default' => $default['enable_random_post'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'united_blog_sanitize_checkbox',
    )
);
$wp_customize->add_control('enable_random_post',
    array(
        'label' => esc_html__('Enable Random Post', 'united-blog'),
        'section' => 'header_section_settings',
        'type' => 'checkbox',
    )
);
// Setting - enable_header_favorites.
$wp_customize->add_setting('enable_header_favorites',
    array(
        'default' => $default['enable_header_favorites'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'united_blog_sanitize_checkbox',
    )
);
$wp_customize->add_control('enable_header_favorites',
    array(
        'label' => esc_html__('Enable Favorites', 'united-blog'),
        'section' => 'header_section_settings',
        'type' => 'checkbox',
    )
);
// Banner Post Category.
$wp_customize->add_setting(
    'random_post_category',
    array(
        'default' => $default['random_post_category'],
        'sanitize_callback' => 'absint',
    )
);
$wp_customize->add_control(
    new united_blog_Dropdown_Taxonomies_Control(
        $wp_customize,
        'random_post_category',
        array(
            'label' => __('Select Random Post Category', 'united-blog'),
            'description' => __('Leave Empty if you don\'t want the posts to be category specific', 'united-blog'),
            'section' => 'header_section_settings',
        )
    )
);
$wp_customize->add_setting(
    'header_section_dropdown',
    array(
        'default' => $default['header_section_dropdown'],
        'sanitize_callback' => 'united_blog_sanitize_select',
    )
);
$wp_customize->add_control(
    'header_section_dropdown',
    array(
        'label' => __('Select Header Section Layout', 'united-blog'),
        'section' => 'header_section_settings',
        'type' => 'select',
        'choices' => array(
            'header_layout_1' => __('Header Layout 1', 'united-blog'),
            'header_layout_2' => __('Header Layout 2', 'united-blog'),
        ),
    )
);