Merge pull request #6 from Vincent-Design-Inc/fix/wp-script-module-args

Update script enqueueing for WordPress version 6.9
This commit is contained in:
Keith Solomon
2026-02-20 08:25:31 -06:00
committed by GitHub

View File

@@ -52,8 +52,8 @@ class Enqueue {
if ( file_exists( $theme_dir . $js_path ) ) {
$version = filemtime( $theme_dir . $js_path );
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 );
wp_enqueue_script_module( 'basicwp-theme', $theme_uri . $js_path, array(), $version );
wp_enqueue_script_module( 'basicwp-button', $theme_uri . '/static/js/components/button.js', array( 'basicwp-theme' ), $version );
}
}