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.
Built from https://develop.svn.wordpress.org/trunk@56736


git-svn-id: http://core.svn.wordpress.org/trunk@56248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
hellofromTonya 2023-09-27 17:40:20 +00:00
parent 872ad9e0b8
commit 565c2179ff
2 changed files with 2 additions and 7 deletions

View File

@ -287,7 +287,6 @@ function get_legacy_widget_block_editor_settings() {
* @since 6.0.0 * @since 6.0.0
* @access private * @access private
* *
* @global string $pagenow The filename of the current screen.
* @global WP_Styles $wp_styles The WP_Styles current instance. * @global WP_Styles $wp_styles The WP_Styles current instance.
* @global WP_Scripts $wp_scripts The WP_Scripts 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() { 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. // Keep track of the styles and scripts instance to restore later.
$current_wp_styles = $wp_styles; $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. // Enqueue the `editorStyle` handles for all core block, and dependencies.
wp_enqueue_style( 'wp-edit-blocks' ); wp_enqueue_style( 'wp-edit-blocks' );
if ( 'site-editor.php' === $pagenow ) {
wp_enqueue_style( 'wp-edit-site' );
}
if ( current_theme_supports( 'wp-block-styles' ) ) { if ( current_theme_supports( 'wp-block-styles' ) ) {
wp_enqueue_style( 'wp-block-library-theme' ); wp_enqueue_style( 'wp-block-library-theme' );
} }

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.4-beta1-56735'; $wp_version = '6.4-beta1-56736';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.