WordPress.org

Make WordPress Core

Changeset 43780


Ignore:
Timestamp:
10/22/2018 03:13:09 AM (13 months ago)
Author:
pento
Message:

Block Editor: Add extra body classes when the block editor is loaded.

See #45037.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/admin-header.php

    r39326 r43780  
    175175
    176176$admin_body_class .= ' no-customize-support no-svg';
     177
     178if ( $current_screen->is_block_editor() ) {
     179    // Default to is-fullscreen-mode to avoid jumps in the UI.
     180    $admin_body_class .= ' block-editor-page is-fullscreen-mode wp-embed-responsive';
     181
     182    if ( current_theme_supports( 'editor-styles' ) && current_theme_supports( 'dark-editor-style' ) ) {
     183        $admin_body_class .= ' is-dark-theme';
     184    }
     185}
    177186
    178187?>
Note: See TracChangeset for help on using the changeset viewer.