From dd9bca79bbe3057b10bf08fbf35b00b9d4675afc Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 9 Nov 2021 09:12:38 +0000 Subject: [PATCH] Site Editor: Load as full screen by default. To avoid UI jumps when loading the page, the site-editor.php page is marked as full screen by default. This also matches the behavior of the post editor. See #54337. git-svn-id: https://develop.svn.wordpress.org/trunk@52071 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/site-editor.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wp-admin/site-editor.php b/src/wp-admin/site-editor.php index e5d149f235..14c190be8c 100644 --- a/src/wp-admin/site-editor.php +++ b/src/wp-admin/site-editor.php @@ -31,6 +31,14 @@ $parent_file = 'themes.php'; $current_screen = get_current_screen(); $current_screen->is_block_editor( true ); +// Default to is-fullscreen-mode to avoid jumps in the UI. +add_filter( + 'admin_body_class', + static function( $classes ) { + return "$classes is-fullscreen-mode"; + } +); + $block_editor_context = new WP_Block_Editor_Context(); $active_global_styles_id = WP_Theme_JSON_Resolver::get_user_custom_post_type_id();