<?php
/**
 * Theme Customizer Controls
 *
 * @package Home Shifting Services
 */

if ( ! function_exists( 'home_shifting_services_customizer_global_color_setting_register' ) ) :
function home_shifting_services_customizer_global_color_setting_register( $wp_customize ) {
 
 	$wp_customize->add_section(
        'home_shifting_services_global_color_settings',
        array (
            'priority'      => 40,
            'capability'    => 'edit_theme_options',
            'title'         => esc_html__( 'Global Color Settings', 'home-shifting-services' )
        )
    );

    // Title label
	$wp_customize->add_setting( 
		'home_shifting_services_theme_color_settings', 
		array(
		    'sanitize_callback' => 'home_shifting_services_sanitize_title',
		) 
	);

	$wp_customize->add_control( 
		new Home_Shifting_Services_Title_Info_Control( $wp_customize, 'home_shifting_services_theme_color_settings', 
		array(
		    'label'       => esc_html__( 'Global Color Settings', 'home-shifting-services' ),
		    'section'     => 'home_shifting_services_global_color_settings',
		    'type'        => 'home-shifting-services-title',
		    'settings'    => 'home_shifting_services_theme_color_settings',
		) 
	));

	$wp_customize->add_setting('home_shifting_services_global_color1',
        array(
            'type' => 'theme_mod',
            'default'           => '#f70643',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );

    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'home_shifting_services_global_color1',
            array(
                'label'      => esc_html__( 'Global Color1', 'home-shifting-services' ),
                'section'    => 'home_shifting_services_global_color_settings',
                'settings'   => 'home_shifting_services_global_color1',
            )
        )
    ); 

    $wp_customize->add_setting('home_shifting_services_global_color2',
        array(
            'type' => 'theme_mod',
            'default'           => '#2f2c2b',
            'sanitize_callback' => 'sanitize_hex_color'
        )
    );

    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'home_shifting_services_global_color2',
            array(
                'label'      => esc_html__( 'Global Color2', 'home-shifting-services' ),
                'section'    => 'home_shifting_services_global_color_settings',
                'settings'   => 'home_shifting_services_global_color2',
            )
        )
    );   

}
endif;

add_action( 'customize_register', 'home_shifting_services_customizer_global_color_setting_register' );