Skip to content

Commit

Permalink
Editor: Fix opinionated block styles loading in editor
Browse files Browse the repository at this point in the history
Related changes in Gutenberg: WordPress/gutenberg#40937.

Backport for WordPress 6.0 RC 4.

Props jffng.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53419 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
gziolo committed May 20, 2022
1 parent 29b78bd commit af8844c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/wp-includes/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,13 @@ function _wp_get_iframed_editor_assets() {
$style_handles = array(
'wp-block-editor',
'wp-block-library',
'wp-block-library-theme',
'wp-edit-blocks',
);

if ( current_theme_supports( 'wp-block-styles' ) ) {
$style_handles[] = 'wp-block-library-theme';
}

if ( 'widgets.php' === $pagenow || 'customize.php' === $pagenow ) {
$style_handles[] = 'wp-widgets';
$style_handles[] = 'wp-edit-widgets';
Expand Down

0 comments on commit af8844c

Please sign in to comment.