Skip to content

Commit

Permalink
Constrain is-fullscreen-mode to posts list
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Jul 5, 2024
1 parent 17c8928 commit ee2a4e3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/experimental/posts/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@

add_action( 'admin_menu', 'gutenberg_replace_posts_dashboard' );

// Default to is-fullscreen-mode to avoid jumps in the UI.
add_filter(
'admin_body_class',
static function ( $classes ) {
return "$classes is-fullscreen-mode";
}
);
if ( isset( $_GET['page'] ) && 'gutenberg-posts-dashboard' === $_GET['page'] ) {
// Default to is-fullscreen-mode to avoid jumps in the UI.
add_filter(
'admin_body_class',
static function ( $classes ) {
return "$classes is-fullscreen-mode";
}
);
}

/**
* Renders the new posts dashboard page.
Expand Down

0 comments on commit ee2a4e3

Please sign in to comment.