From 6fa2ce424fddedb4c60fbc90d2aabc9feda8305b Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Wed, 27 Sep 2023 17:38:38 +0000 Subject: [PATCH] Editor: Remove 'wp-edit-site' stylesheet enqueue from iframe. Removes enqueuing the `'wp-edit-site'` stylesheet from the iframed assets in `_wp_get_iframed_editor_assets()`. The global `$pagenow` is also removed as it is no longer used within the function. References: * [https://github.com/WordPress/gutenberg/pull/54254 Gutenberg PR 54254] Props ellatrix, jorgefilipecosta, Mamaduka, mukesh27. Follow-up to [56047], [53160]. Fixes #59456. git-svn-id: https://develop.svn.wordpress.org/trunk@56736 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-editor.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/wp-includes/block-editor.php b/src/wp-includes/block-editor.php index 7b63490a8a..e04b012e7d 100644 --- a/src/wp-includes/block-editor.php +++ b/src/wp-includes/block-editor.php @@ -287,7 +287,6 @@ function get_legacy_widget_block_editor_settings() { * @since 6.0.0 * @access private * - * @global string $pagenow The filename of the current screen. * @global WP_Styles $wp_styles The WP_Styles current instance. * @global WP_Scripts $wp_scripts The WP_Scripts current instance. * @@ -299,7 +298,7 @@ function get_legacy_widget_block_editor_settings() { * } */ function _wp_get_iframed_editor_assets() { - global $wp_styles, $wp_scripts, $pagenow; + global $wp_styles, $wp_scripts; // Keep track of the styles and scripts instance to restore later. $current_wp_styles = $wp_styles; @@ -329,10 +328,6 @@ function _wp_get_iframed_editor_assets() { // Enqueue the `editorStyle` handles for all core block, and dependencies. wp_enqueue_style( 'wp-edit-blocks' ); - if ( 'site-editor.php' === $pagenow ) { - wp_enqueue_style( 'wp-edit-site' ); - } - if ( current_theme_supports( 'wp-block-styles' ) ) { wp_enqueue_style( 'wp-block-library-theme' ); }