<?php
/**
 * General Settings Customizer
 *
 * @package news
*/

function mediapulse_general_settings_customizer ( $wp_customize )
{
     
    /* GLOBAL SETTINGS */        
    $wp_customize->add_panel('news_general_settings',
        array(
            'priority'      => 1,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__('Global','mediapulse')
        )
    );  

    /* ====================
    * Breadcrumb setting  
    ==================== */   

        $wp_customize->add_section('bredcrumb_section',
            array(
                'title'     =>  esc_html__('Breadcrumb','mediapulse'),
                'panel'     =>  'news_general_settings',
                'priority'  =>  3   
            )
        );
        // Enable/Disable breadcrumbs section
        $wp_customize->add_setting('breadcrumb_banner_enable',
            array(
				'type'              => 'theme_mod',
                'default'           => true,
                'sanitize_callback' => 'mediapulse_sanitize_checkbox'
            )
        );
        $wp_customize->add_control(new mediapulse_Toggle_Control( $wp_customize, 'breadcrumb_banner_enable',
            array(
                'label'             =>  esc_html__( 'Enable/Disable breadcrumb', 'mediapulse'),
                'section'           =>  'bredcrumb_section',
                'type'              =>  'toggle',
                'priority'          =>  1
            )
        ));
		
		/* ====================
		* scroll to top
		==================== */   
        $wp_customize->add_section('scroll_section',
            array(
                'title'     =>  esc_html__('Scroll to top','mediapulse'),
                'panel'     =>  'news_general_settings',
                'priority'  =>  3   
            )
        );
        $wp_customize->add_setting('scroll_top_enable',
            array(
				'type'              => 'theme_mod',
                'default'           => true,
                'sanitize_callback' => 'mediapulse_sanitize_checkbox'
            )
        );
        $wp_customize->add_control(new mediapulse_Toggle_Control( $wp_customize, 'scroll_top_enable',
            array(
                'label'             =>  esc_html__( 'Enable/Disable Scroll to top', 'mediapulse'),
                'section'           =>  'scroll_section',
                'type'              =>  'toggle',
                'priority'          =>  1
            )
        ));


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