From 3cad846ba0ada6771f586d17d0580352381274a9 Mon Sep 17 00:00:00 2001 From: ella Date: Thu, 12 Feb 2026 13:57:17 +0100 Subject: [PATCH] Make sure wp-build's private-apis script doesn't override Gutenberg's --- packages/wp-build/templates/script-registration.php.template | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/wp-build/templates/script-registration.php.template b/packages/wp-build/templates/script-registration.php.template index 401bfb5d1eea46..8b61386a5f5275 100644 --- a/packages/wp-build/templates/script-registration.php.template +++ b/packages/wp-build/templates/script-registration.php.template @@ -85,5 +85,7 @@ if ( ! function_exists( '{{PREFIX}}_register_package_scripts' ) ) { } } - add_action( 'wp_default_scripts', '{{PREFIX}}_register_package_scripts' ); + // Priority 9 so that the Gutenberg plugin (priority 10) can override + // these scripts with newer versions when it is active. + add_action( 'wp_default_scripts', '{{PREFIX}}_register_package_scripts', 9 ); }