<?php

/**
 * Performance Customizer options
 *
 * @package Acoustics
 */
/*--------------------------------------------
	Performance Panel
---------------------------------------------*/
$wp_customize->add_panel(
	'acoustics_performance_panel',
	array(
		'title'         => esc_html__('Performance', 'acoustics'),
		'priority'      => 80,
	)
);

$wp_customize->add_section(
	'acoustics_performance_section',
	array(
		'title'      => esc_html__('Optimization', 'acoustics'),
		'panel'      => 'acoustics_performance_panel',
	)
);

$wp_customize->add_setting(
	'acoustics_load_google_fonts_locally',
	array(
		'default'           => 0,
		'sanitize_callback' => 'acoustics_sanitize_checkbox',
	)
);
$wp_customize->add_control(
	new Acoustics_Control_Switch(
		$wp_customize,
		'acoustics_load_google_fonts_locally',
		array(
			'label'         	=> esc_html__('Local load google font', 'acoustics'),
			'section'       	=> 'acoustics_performance_section',
			'settings'      	=> 'acoustics_load_google_fonts_locally',
			'priority'  		=> 5
		)
	)
);

$wp_customize->add_setting(
	'acoustics_load_minified_assets',
	array(
		'default'           => 0,
		'sanitize_callback' => 'acoustics_sanitize_checkbox',
	)
);
$wp_customize->add_control(
	new Acoustics_Control_Switch(
		$wp_customize,
		'acoustics_load_minified_assets',
		array(
			'label'         	=> esc_html__('Local minified assets', 'acoustics'),
			'section'       	=> 'acoustics_performance_section',
			'settings'      	=> 'acoustics_load_minified_assets',
			'priority'  		=> 10
		)
	)
);
