<?php
/*** Header Latest Posts
 *
 * @package Newsxo
 */

$newsxo_default = newsxo_get_default_theme_options();

// Breaking Section
Newsxo_Customizer_Control::add_section(
	'breaking_news_section',
	array(
		'title' => esc_html__( 'Breaking', 'newsxo' ), 
        'panel' => 'header_option_panel',
        'priority' => 40,
	)
);

    Newsxo_Customizer_Control::add_field(
        array(
            'type'     => 'hidden', 
            'settings'  => 'breaking_news_settings',
            'label' => esc_html__('Breaking', 'newsxo'),
            'section'  => 'breaking_news_section',
            'sanitize_callback' => 'newsxo_sanitize_text',
        )
    );

    Newsxo_Customizer_Control::add_field( 
        array(
            'type'     => 'toggle', 
            'settings'  => 'brk_news_enable',
            'label' => esc_html__('Hide/Show', 'newsxo'),
            'section'  => 'breaking_news_section',
            // 'transport' => 'postMessage',
            'default' => true, 
            'sanitize_callback' => 'newsxo_sanitize_checkbox',
        )
    );

    Newsxo_Customizer_Control::add_field( 
        array(
            'type'     => 'text', 
            'settings'  => 'breaking_news_title',
            'label' => esc_html__('Title', 'newsxo'),
            'section'  => 'breaking_news_section',
            // 'transport' => 'postMessage',
            'default' => $newsxo_default['breaking_news_title'],
            'sanitize_callback' => 'sanitize_text_field',
        )
    );