From 489b10513999298de150d9a4cd48c8bcb835a904 Mon Sep 17 00:00:00 2001 From: Aki Hamano Date: Mon, 3 Aug 2026 20:20:30 +0900 Subject: [PATCH] Media: Register the `wp-media-utils` style handle. The `@wordpress/media-utils` package ships a stylesheet that is built into `wp-includes/css/dist/media-utils/`, but no matching style handle was registered. As a result the styles for the media editing modal provided by the package were never enqueued and the modal rendered unstyled. Register `wp-media-utils` alongside the other package styles, add it to the RTL-enabled handles, and make `wp-edit-post` depend on it so the modal is styled wherever the block editor loads it. See #65794. --- src/wp-includes/script-loader.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index fd1f24a08968d..b5df9291ef354 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -1781,9 +1781,11 @@ function wp_default_styles( $styles ) { 'wp-reusable-blocks', 'wp-patterns', 'wp-preferences', + 'wp-media-utils', ), 'format-library' => array(), 'list-reusable-blocks' => array( 'wp-components' ), + 'media-utils' => array( 'wp-components' ), 'reusable-blocks' => array( 'wp-components' ), 'patterns' => array( 'wp-components' ), 'preferences' => array( 'wp-components' ), @@ -1892,6 +1894,7 @@ function wp_default_styles( $styles ) { 'wp-editor', 'wp-format-library', 'wp-list-reusable-blocks', + 'wp-media-utils', 'wp-reusable-blocks', 'wp-patterns', 'wp-nux',