Skip to content

Commit

Permalink
Do not output styles in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Feb 24, 2022
1 parent 37d2a43 commit 64ffed5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/compat/wordpress-5.9/block-editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ function_exists( 'gutenberg_is_edit_site_page' ) &&
$context = 'site-editor';
}

if (
defined( 'REST_REQUEST' ) &&
REST_REQUEST &&
isset( $_GET['context'] ) &&
'mobile' === $_GET['context']
) {
$context = 'mobile';
}

if ( 'other' === $context ) {
// Make sure the styles array exists.
// In some contexts, like the navigation editor, it doesn't.
Expand Down

0 comments on commit 64ffed5

Please sign in to comment.