WordPress.org

Make WordPress Core

Changeset 44133


Ignore:
Timestamp:
12/14/2018 01:20:12 AM (16 months ago)
Author:
pento
Message:

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

Merges [43780] from the 5.0 branch to trunk.

See #45037.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/admin-header.php

    r43573 r44133  
    186186
    187187$admin_body_class .= ' no-customize-support no-svg';
     188
     189if ( $current_screen->is_block_editor() ) {
     190    // Default to is-fullscreen-mode to avoid jumps in the UI.
     191    $admin_body_class .= ' block-editor-page is-fullscreen-mode wp-embed-responsive';
     192
     193    if ( current_theme_supports( 'editor-styles' ) && current_theme_supports( 'dark-editor-style' ) ) {
     194        $admin_body_class .= ' is-dark-theme';
     195    }
     196}
    188197
    189198?>
Note: See TracChangeset for help on using the changeset viewer.