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

$wp_customize->add_setting(
    'newsmachine_options[enable_preloader_options]',
    array(
        'default'           => $newsmachine_default['enable_preloader_options'],
        'sanitize_callback' => 'newsmachine_sanitize_checkbox',
    )
);
$wp_customize->add_control(
    'newsmachine_options[enable_preloader_options]',
    array(
        'label'       => esc_html__( 'Enable Preloader Option', 'newsmachine' ),
        'section'     => 'preloader_options',
        'type'        => 'checkbox',
    )
);

$wp_customize->add_setting(
    'newsmachine_options[newsmachine_preloader_style]',
    array(
        'default'           => $newsmachine_default['newsmachine_preloader_style'],
        'sanitize_callback' => 'newsmachine_sanitize_select',
    )
);
$wp_customize->add_control(
    'newsmachine_options[newsmachine_preloader_style]',
    array(
        'label'         => esc_html__( 'Select Preloader Style', 'newsmachine' ),
        'section'     => 'preloader_options',
        'type'        => 'select',
        'choices'       => newsmachine_preloader_style_option(),

    )
);
