<?php
/**
 * Section Preloader Settings
 *
 * @since 1.0.0
 */
$wp_customize->add_section(
    'trainify_wesbsite_preloader',
    array(
        'title'         => esc_html__( 'Preloader for Website', 'trainify' ),
        'description'   => esc_html__( 'Choose a Image For Website Preloader', 'trainify' ),
        'priority'      => 30,
        'panel'         => 'site_setting_options',
    )
);

$wp_customize->add_setting(
    'trainify_preloader_image',
    array( 
        'default'           => '',
        'sanitize_callback' => 'esc_url',
    )
);

$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'trainify_preloader_image',
        array(
            'priority'      => 10,
            'label'      => esc_html__('Upload preloader image', 'trainify' ),
           'section'    => 'trainify_wesbsite_preloader',
           'settings'   => 'trainify_preloader_image',
       )
    )    
);