Skip to content

Commit

Permalink
Account for changes in __unstableType in WordPress core
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Nov 15, 2021
1 parent ad47f05 commit 196de5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/global-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ function_exists( 'gutenberg_is_edit_site_page' ) &&
// Reset existing global styles.
$styles_without_existing_global_styles = array();
foreach ( $settings['styles'] as $style ) {
if ( ! isset( $style['__unstableType'] ) || 'globalStyles' !== $style['__unstableType'] ) {
if (
! isset( $style['__unstableType'] ) ||
! in_array( $style['__unstableType'], array( 'globalStyles', 'theme', 'presets' ), true )
) {
$styles_without_existing_global_styles[] = $style;
}
}
Expand Down

0 comments on commit 196de5a

Please sign in to comment.