<?php
/**
 * Header Settings
 *
 * @package Feminine_Lifestyle_Blog
 */

function feminine_lifestyle_blog_customize_register_header_settings( $wp_customize ) {
    
    /** Header Settings */
    $wp_customize->add_section(
        'header_settings',
        array(
            'title'    => __( 'Header', 'feminine-lifestyle-blog' ),
            'priority' => 6,
            'panel'    => 'general_settings',
        )
    );
    
    /** Header Search */
    $wp_customize->add_setting(
        'ed_header_search',
        array(
            'default'           => false,
            'sanitize_callback' => 'feminine_lifestyle_blog_sanitize_checkbox',
        )
    );
    
    $wp_customize->add_control(
		new Feminine_Lifestyle_Blog_Toggle_Control( 
			$wp_customize,
			'ed_header_search',
			array(
				'section'		=> 'header_settings',
				'label'			=> __( 'Header Search', 'feminine-lifestyle-blog' ),
				'description'	=> __( 'Enable to display search form in header.', '' ),
			)
		)
	);
    
    if( feminine_lifestyle_blog_is_woocommerce_activated() ){
        /** Shop Section */
        $wp_customize->add_setting( 
            'ed_shopping_cart', 
            array(
                'default'           => false,
                'sanitize_callback' => 'feminine_lifestyle_blog_sanitize_checkbox'
            ) 
        );
        
        $wp_customize->add_control(
    		new Feminine_Lifestyle_Blog_Toggle_Control( 
    			$wp_customize,
    			'ed_shopping_cart',
    			array(
    				'section'     => 'header_settings',
    				'label'	      => __( 'Shopping Cart', 'feminine-lifestyle-blog' ),
                    'description' => __( 'Enable to show Shopping cart in the header.', '' ),
    			)
    		)
    	); 
    }

}
add_action( 'customize_register', 'feminine_lifestyle_blog_customize_register_header_settings' );