diff --git a/projects/packages/forms/changelog/update-forms-wp-build-remove-default-scripts-re-add b/projects/packages/forms/changelog/update-forms-wp-build-remove-default-scripts-re-add new file mode 100644 index 000000000000..ab3ff81419df --- /dev/null +++ b/projects/packages/forms/changelog/update-forms-wp-build-remove-default-scripts-re-add @@ -0,0 +1,5 @@ +Significance: patch +Type: removed +Comment: Removed a temporary fix that was never in production + + diff --git a/projects/packages/forms/src/dashboard/class-dashboard.php b/projects/packages/forms/src/dashboard/class-dashboard.php index f4e0129a2fed..ccfe25889a86 100644 --- a/projects/packages/forms/src/dashboard/class-dashboard.php +++ b/projects/packages/forms/src/dashboard/class-dashboard.php @@ -54,15 +54,6 @@ public static function load_wp_build() { if ( file_exists( $wp_build_index ) ) { require_once $wp_build_index; - - // Re-add core's registration only when Gutenberg isn't providing it - if ( ! defined( 'IS_GUTENBERG_PLUGIN' ) || ! IS_GUTENBERG_PLUGIN ) { - // `wp-build` currently removes `wp_default_script_modules` from `wp_default_scripts`. - // Re-add the core hook so script modules work in vanilla wp-admin (no Gutenberg plugin). - if ( function_exists( 'wp_default_script_modules' ) ) { - add_action( 'wp_default_scripts', 'wp_default_script_modules', 0 ); - } - } } } }