<?php if( ! defined( 'ABSPATH' ) ) exit;

add_action( 'customize_register', 'live_news_header_top_customize_register' );

function live_news_header_top_customize_register( $wp_customize ) {
	
/***********************************************************************************
 * Back to top button Options
***********************************************************************************/
 
		$wp_customize->add_section( 'header_top' , array(
			'title'       => __( 'Header Top', 'live-news' ),
			'priority'   => 2,
		) );
		
		$wp_customize->add_setting( 'activate_header_top', array (
			'sanitize_callback' => 'live_news_sanitize_checkbox',
		) );
		
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'activate_header_top', array(
					'priority'    => 1,
			'label'    => __( 'Deactivate Header Top', 'live-news' ),
			'section'  => 'header_top',
			'settings' => 'activate_header_top',
			'type' => 'checkbox',
		) ) );
		
		$wp_customize->add_setting( 'activate_header_clock', array (
			'sanitize_callback' => 'live_news_sanitize_checkbox',
		) );
		
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'activate_header_clock', array(
			'priority'    => 3,
			'label'    => __( 'Deactivate Header Clock', 'live-news' ),
			'section'  => 'header_top',
			'settings' => 'activate_header_clock',
			'type' => 'checkbox',
		) ) );		
				
		$wp_customize->add_setting( 'activate_header_date', array (
			'sanitize_callback' => 'live_news_sanitize_checkbox',
		) );
		
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'activate_header_date', array(
			'priority'    => 3,
			'label'    => __( 'Deactivate Header Date', 'live-news' ),
			'section'  => 'header_top',
			'settings' => 'activate_header_date',
			'type' => 'checkbox',
		) ) );
		
		$wp_customize->add_setting( 'activate_header_sticky', array (
			'sanitize_callback' => 'live_news_sanitize_checkbox',
		) );
		
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'activate_header_sticky', array(
			'priority'    => 3,
			'label'    => __( 'Deactivate Sticky Posts', 'live-news' ),
			'section'  => 'header_top',
			'settings' => 'activate_header_sticky',
			'type' => 'checkbox',
		) ) );

 		$wp_customize->add_setting( 'live_news_sticky_speed', array (
            'default' => 0,		
			'sanitize_callback' => 'absint',
		) );
				
		 $wp_customize->add_control( 'live_news_sticky_speed', array(
		    'priority'    => 3,	
		    'type' => 'range',
		    'section' => 'header_top',
		    'settings' => 'live_news_sticky_speed',
		    'label' => __( 'Sticky Posts Speed', 'live-news' ),
		    'input_attrs' => array(
			  'min' => 10,
			  'max' => 1000,
			  'step' => 1,
		    ),
		) );
		
}



