From c542deaa2bcbfe24cb71bf1510d6992630cfa30b Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Thu, 4 Dec 2025 15:41:59 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20Update=20script=20equeues?= =?UTF-8?q?=20for=20WP=206.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/class-enqueue.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/class-enqueue.php b/lib/class-enqueue.php index 8bb55c3..722eb62 100644 --- a/lib/class-enqueue.php +++ b/lib/class-enqueue.php @@ -51,7 +51,8 @@ class Enqueue { if ( file_exists( $theme_dir . $js_path ) ) { $version = filemtime( $theme_dir . $js_path ); - wp_enqueue_script_module( 'basicwp-theme', $theme_uri . $js_path, array( 'jquery' ), $version, true ); + wp_enqueue_script( 'jquery' ); // Needed by downstream scripts; modules can't depend on classic scripts. + wp_enqueue_script_module( 'basicwp-theme', $theme_uri . $js_path, array(), $version, true ); wp_enqueue_script_module( 'basicwp-button', $theme_uri . '/static/js/components/button.js', array( 'basicwp-theme' ), $version, true ); } } @@ -90,7 +91,8 @@ class Enqueue { $admin_js_path = '/static/js/admin.js'; if ( file_exists( $theme_dir . $admin_js_path ) ) { $version = filemtime( $theme_dir . $admin_js_path ); - wp_enqueue_script_module( 'basicwp-admin', $theme_uri . $admin_js_path, array( 'jquery' ), $version, true ); + wp_enqueue_script( 'jquery' ); // Needed by downstream scripts; modules can't depend on classic scripts. + wp_enqueue_script_module( 'basicwp-admin', $theme_uri . $admin_js_path, array(), $version, true ); wp_enqueue_script_module( 'basicwp-button', $theme_uri . '/static/js/components/button.js', array( 'basicwp-admin' ), $version, true ); } }