Make WordPress Core


Ignore:
Timestamp:
09/27/2023 05:38:38 PM (15 months ago)
Author:
hellofromTonya
Message:

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:

Props ellatrix, jorgefilipecosta, Mamaduka, mukesh27.

Follow-up to [56047], [53160].
Fixes #59456.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-editor.php

    r56706 r56736  
    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.
     
    300299 */
    301300function _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.
     
    329328    // Enqueue the `editorStyle` handles for all core block, and dependencies.
    330329    wp_enqueue_style( 'wp-edit-blocks' );
    331 
    332     if ( 'site-editor.php' === $pagenow ) {
    333         wp_enqueue_style( 'wp-edit-site' );
    334     }
    335330
    336331    if ( current_theme_supports( 'wp-block-styles' ) ) {
Note: See TracChangeset for help on using the changeset viewer.