修复了一些问题

This commit is contained in:
2026-08-25 19:59:43 +08:00
parent f5746da0ae
commit c484ee6ef3
5 changed files with 16 additions and 87 deletions
+5 -9
View File
@@ -16,15 +16,11 @@ trait ScriptsPart1b {
$runtime_uri = $base_uri . '/assets';
$fa5_uri = $base_uri . '/assets/fontawesome5';
// The legacy frontend runtime is the single public dependency stack.
wp_deregister_script('jquery');
wp_register_script(
'jquery',
$runtime_uri . '/js/runtime/libs/jquery.min.js',
[],
'1.9.1',
false
);
// Keep the WordPress handle but make its modern core build the only runtime.
$wp_scripts = wp_scripts();
if (isset($wp_scripts->registered['jquery'])) {
$wp_scripts->registered['jquery']->deps = ['jquery-core'];
}
wp_enqueue_script('jquery');
wp_enqueue_script(