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

$wp_customize->add_setting(
    'maglink_options[enable_preloader_options]',
    array(
        'default'           => $maglink_default['enable_preloader_options'],
        'sanitize_callback' => 'maglink_sanitize_checkbox',
    )
);
$wp_customize->add_control(
    'maglink_options[enable_preloader_options]',
    array(
        'label'       => esc_html__( 'Enable Preloader Option', 'maglink' ),
        'section'     => 'preloader_options',
        'type'        => 'checkbox',
    )
);

$wp_customize->add_setting(
    'maglink_options[maglink_preloader_style]',
    array(
        'default'           => $maglink_default['maglink_preloader_style'],
        'sanitize_callback' => 'maglink_sanitize_select',
    )
);
$wp_customize->add_control(
    'maglink_options[maglink_preloader_style]',
    array(
        'label'         => esc_html__( 'Select Preloader Style', 'maglink' ),
        'section'     => 'preloader_options',
        'type'        => 'select',
        'choices'       => maglink_preloader_style_option(),

    )
);
