<?php if( ! defined( 'ABSPATH' ) ) exit;
add_action( 'customize_register', 'faster_header_top_customize_register' );
function faster_header_top_customize_register( $wp_customize ) {
/***********************************************************************************
 * Back to top button Options
***********************************************************************************/
		$wp_customize->add_section( 'header_top' , array(
			'title'       => __( 'Header Top', 'faster' ),
			'priority'   => 2,
		) );
		$wp_customize->add_setting( 'activate_header_top', array (
			'sanitize_callback' => 'faster_sanitize_checkbox',
		) );
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'activate_header_top', array(
					'priority'    => 1,
			'label'    => __( 'Deactivate Header Top', 'faster' ),
			'section'  => 'header_top',
			'settings' => 'activate_header_top',
			'type' => 'checkbox',
		) ) );
		$wp_customize->add_setting( 'activate_header_sticky', array (
			'sanitize_callback' => 'faster_sanitize_checkbox',
		) );
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'activate_header_sticky', array(
			'priority'    => 3,
			'label'    => __( 'Deactivate Sticky Posts', 'faster' ),
			'section'  => 'header_top',
			'settings' => 'activate_header_sticky',
			'type' => 'checkbox',
		) ) );
 		$wp_customize->add_setting( 'faster_sticky_speed', array (
            'default' => 0,		
			'sanitize_callback' => 'absint',
		) );
		 $wp_customize->add_control( 'faster_sticky_speed', array(
		    'priority'    => 3,	
		    'type' => 'range',
		    'section' => 'header_top',
		    'settings' => 'faster_sticky_speed',
		    'label' => __( 'Sticky Posts Speed', 'faster' ),
		    'input_attrs' => array(
			  'min' => 10,
			  'max' => 1000,
			  'step' => 1,
		    ),
		) );

		if( class_exists( 'WooCommerce' ) ) {
			$wp_customize->add_setting( 'activate_header_cart', array (
				'sanitize_callback' => 'faster_sanitize_checkbox',
			) );
			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'activate_header_cart', array(
				'priority'    => 3,
				'label'    => __( 'Deactivate Cart', 'faster' ),
				'section'  => 'header_top',
				'settings' => 'activate_header_cart',
				'type' => 'checkbox',
			) ) );
		}
		$wp_customize->add_setting( 'logo', array (
            'default' => '',		
            'sanitize_callback' => 'sanitize_text_field',		
		) );
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'logo', array(
			'label'    => __( 'Logo height should be 80px. The width of the logo is optional.', 'faster' ),
			'section'  => 'title_tagline',
			'priority'    => 2,				
			'settings' => 'logo',
		) ) );
}