进行了一些小修复
This commit is contained in:
@@ -27,7 +27,6 @@ class Scripts {
|
||||
public function init(): void {
|
||||
add_action('wp_enqueue_scripts', [$this, 'enqueue_public']);
|
||||
add_action('admin_enqueue_scripts', [$this, 'enqueue_admin']);
|
||||
add_action('admin_enqueue_scripts', [$this, 'enqueue_passive_polyfill'], 1);
|
||||
add_action('wp_head', [$this, 'inline_css_vars']);
|
||||
add_action('wp_head', [$this, 'output_custom_codes']);
|
||||
add_action('wp_body_open', [$this, 'output_loading_overlay'], 1);
|
||||
|
||||
@@ -30,19 +30,6 @@ trait ScriptsPart2 {
|
||||
wp_send_json_success(['logged' => true]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Passive event listener polyfill — 全局加载,消除 Chrome Violation 警告
|
||||
*/
|
||||
public function enqueue_passive_polyfill(): void {
|
||||
wp_enqueue_script(
|
||||
'aksrt-passive-events',
|
||||
get_template_directory_uri() . '/assets/js/passive-events.js',
|
||||
[],
|
||||
AKSRT_VERSION,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载后台资源 — 仅在 AKSRT 设置页面加载(与前端样式完全隔离)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user