Skip to content

Commit

Permalink
Editor: Remove 'wp-edit-site' stylesheet enqueue from iframe.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hellofromtonya committed Sep 27, 2023
1 parent e34c8b7 commit 6fa2ce4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/wp-includes/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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;
Expand Down Expand Up @@ -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' );
}
Expand Down

0 comments on commit 6fa2ce4

Please sign in to comment.