Skip to content

Commit

Permalink
Fix condition for global styles on mobile (#31844)
Browse files Browse the repository at this point in the history
* Fix condition for global styles on mobile

* Set mobile context if theme has support
  • Loading branch information
geriux committed May 20, 2021
1 parent 96134ef commit 298f508
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/global-styles.php
Expand Up @@ -92,7 +92,8 @@ function_exists( 'gutenberg_is_edit_site_page' ) &&
defined( 'REST_REQUEST' ) &&
REST_REQUEST &&
isset( $_GET['context'] ) &&
'mobile' === $_GET['context']
'mobile' === $_GET['context'] &&
WP_Theme_JSON_Resolver::theme_has_support()
) {
$context = 'mobile';
}
Expand Down

0 comments on commit 298f508

Please sign in to comment.