Skip to content

Commit 6fa2ce4

Browse files
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: * [WordPress/gutenberg#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
1 parent e34c8b7 commit 6fa2ce4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/wp-includes/block-editor.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ function get_legacy_widget_block_editor_settings() {
287287
* @since 6.0.0
288288
* @access private
289289
*
290-
* @global string $pagenow The filename of the current screen.
291290
* @global WP_Styles $wp_styles The WP_Styles current instance.
292291
* @global WP_Scripts $wp_scripts The WP_Scripts current instance.
293292
*
@@ -299,7 +298,7 @@ function get_legacy_widget_block_editor_settings() {
299298
* }
300299
*/
301300
function _wp_get_iframed_editor_assets() {
302-
global $wp_styles, $wp_scripts, $pagenow;
301+
global $wp_styles, $wp_scripts;
303302

304303
// Keep track of the styles and scripts instance to restore later.
305304
$current_wp_styles = $wp_styles;
@@ -329,10 +328,6 @@ function _wp_get_iframed_editor_assets() {
329328
// Enqueue the `editorStyle` handles for all core block, and dependencies.
330329
wp_enqueue_style( 'wp-edit-blocks' );
331330

332-
if ( 'site-editor.php' === $pagenow ) {
333-
wp_enqueue_style( 'wp-edit-site' );
334-
}
335-
336331
if ( current_theme_supports( 'wp-block-styles' ) ) {
337332
wp_enqueue_style( 'wp-block-library-theme' );
338333
}

0 commit comments

Comments
 (0)