Make WordPress Core

Changeset 52071


Ignore:
Timestamp:
11/09/2021 09:12:38 AM (3 years ago)
Author:
youknowriad
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/site-editor.php

    r52069 r52071  
    3131$current_screen = get_current_screen();
    3232$current_screen->is_block_editor( true );
     33
     34// Default to is-fullscreen-mode to avoid jumps in the UI.
     35add_filter(
     36    'admin_body_class',
     37    static function( $classes ) {
     38        return "$classes is-fullscreen-mode";
     39    }
     40);
    3341
    3442$block_editor_context = new WP_Block_Editor_Context();
Note: See TracChangeset for help on using the changeset viewer.