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

add_action( 'customize_register', 'live_news_customize_register_menu' );

function live_news_customize_register_menu( $wp_customize ) {
		
		$wp_customize->add_section( 'seos_menu_section' , array(
			'title'       => __( 'Menu Options', 'live-news' ),
			'priority'    => 2,	
			//'description' => __( 'Social media buttons', 'seos-white' ),
		) );

		$wp_customize->add_setting( 'live_news_header_search', array (
            'default' => '',		
			'sanitize_callback' => 'live_news_sanitize_checkbox',
		) );
				
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'live_news_header_search', array(
			'label'    => __( 'Deactivate Search Icon:', 'live-news' ),
			'section'  => 'seos_menu_section',
			'priority'    => 3,				
			'settings' => 'live_news_header_search',
			'type' => 'checkbox',
		) ) );
		
		if( class_exists( 'WooCommerce' ) ) {
			$wp_customize->add_setting( 'live_news_header_cart', array (
				'default' => '',		
				'sanitize_callback' => 'live_news_sanitize_checkbox',
			) );
				
			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'live_news_header_cart', array(
				'label'    => __( 'Deactivate WooCommerce Cart:', 'live-news' ),
				'section'  => 'seos_menu_section',
				'priority'    => 3,				
				'settings' => 'live_news_header_cart',
				'type' => 'checkbox',
			) ) );

		}	
}