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.


Built from https://develop.svn.wordpress.org/trunk@53419
  • Loading branch information
gziolo committed May 20, 2022
1 parent a0bfaef commit eb47d33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion 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
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-53418';
$wp_version = '6.1-alpha-53419';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit eb47d33

Please sign in to comment.