<?php
function news25_breakingnews_setting( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
	/*=========================================
	Work Process  Section
	=========================================*/
	$wp_customize->add_section(
		'breakingnews_setting', array(
			'title' => esc_html__( 'Breaking News Section', 'news-25' ),
			'panel'  		=> 'header_section',
		)
	);
	$wp_customize->add_setting(
		'breakingnews_title'
			,array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'news25_sanitize_html',
			'priority' => 1,
		)
	);
	
	$wp_customize->add_control(
	'breakingnews_title',
		array(
			'type' => 'text',
			'label' => __('Title','news-25'),
			'section' => 'breakingnews_setting',
		)
	);	
	
	$wp_customize->add_setting(
    'breakingnews_category_id',
		array(
		'capability' => 'edit_theme_options',
		'priority' => 5,
		'sanitize_callback' => 'sanitize_categories',
		)
	);	
	$wp_customize->add_control( new News25_Category_Dropdown_Custom_Control( $wp_customize, 
	'breakingnews_category_id', 
		array(
		'label'   => __('Select Categories','news-25'),
		'section' => 'breakingnews_setting',
		) 
	) );
	// icon // 
	$wp_customize->add_setting(
    	'breakingnews_icon',
    	array(
	        'default' => 'fa-certificate',
			'sanitize_callback' => 'sanitize_text_field',
			'capability' => 'edit_theme_options',
			'priority' => 8,
		)
	);	

	$wp_customize->add_control(new News25_Icon_Picker_Control($wp_customize, 
		'breakingnews_icon',
		array(
		    'label'   		=> __('Icon','news-25'),
		    'section' 		=> 'breakingnews_setting',
			'iconset' => 'fa',
			
		))  
	);
}

add_action( 'customize_register', 'news25_breakingnews_setting' );