/home/techb158/public_html/wp-content/plugins/kirki/customizer
Edit: /home/techb158/public_html/wp-content/plugins/kirki/customizer/class-customizer.php (3244B)
modules = new Modules();
// Instantiate classes.
new Kirki();
new L10n('kirki', dirname(__DIR__) . '/languages');
// Add an empty config for global fields.
Kirki::add_config('');
// Load custom config if exists.
$custom_config_path = dirname(__DIR__) . '/custom-config.php';
if (file_exists($custom_config_path)) {
require_once $custom_config_path;
}
// Load packages.
require_once __DIR__ . '/packages/index.php';
// Handle tests.
if (defined('KIRKI_TEST') && true === constant('KIRKI_TEST') && file_exists(__DIR__ . '/example.php')) {
include_once __DIR__ . '/example.php';
}
// Enqueue common assets.
add_action('customize_controls_enqueue_scripts', [__CLASS__, 'enqueue_assets'], 5);
add_action('customize_preview_init', [__CLASS__, 'enqueue_assets'], 5);
}
/**
* Enqueue common assets.
*
* @param array $deps The script dependencies.
* @return void
*/
public static function enqueue_assets($deps = [])
{
// Preview frame is NOT admin, Pane frame IS admin.
$is_preview_frame = is_customize_preview() && !is_admin();
if (empty($deps)) {
$deps = ['jquery', 'wp-element'];
if ($is_preview_frame) {
$deps[] = 'customize-preview';
} else {
$deps[] = 'customize-controls';
}
}
$file = $is_preview_frame ? 'preview' : 'controls';
wp_enqueue_style('kirki-customizer', URL::get_from_path(dirname(__DIR__) . "/assets/customizer/{$file}.min.css"), [], KIRKI_VERSION);
wp_enqueue_script('kirki-customizer', URL::get_from_path(dirname(__DIR__) . "/assets/customizer/{$file}.min.js"), $deps, KIRKI_VERSION, true);
}
}
}