<?php
/**
 * All settings related to preloader.
 *
 * @package TruthMag
 */
$wp_customize->add_section(
	'preloader_options',
	array(
		'title' => esc_html__( 'Preloader Options', 'truthmag' ),
		'panel' => 'general_options_panel',
	)
);

$wp_customize->add_setting(
    'truthmag_options[enable_preloader_options]',
    array(
        'default'           => $truthmag_default['enable_preloader_options'],
        'sanitize_callback' => 'truthmag_sanitize_checkbox',
    )
);
$wp_customize->add_control(
    'truthmag_options[enable_preloader_options]',
    array(
        'label'       => esc_html__( 'Enable Preloader Option', 'truthmag' ),
        'section'     => 'preloader_options',
        'type'        => 'checkbox',
    )
);

$wp_customize->add_setting(
    'truthmag_options[truthmag_preloader_style]',
    array(
        'default'           => $truthmag_default['truthmag_preloader_style'],
        'sanitize_callback' => 'truthmag_sanitize_select',
    )
);
$wp_customize->add_control(
    'truthmag_options[truthmag_preloader_style]',
    array(
        'label'         => esc_html__( 'Select Preloader Style', 'truthmag' ),
        'section'     => 'preloader_options',
        'type'        => 'select',
        'choices'       => truthmag_preloader_style_option(),

    )
);
