Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update script-loader.php
  • Loading branch information
mikachan committed Jan 26, 2023
commit 2bdf0f6e576dc3bbbcc31d3df901fe473e785431
5 changes: 4 additions & 1 deletion src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,10 @@ function wp_default_styles( $styles ) {
$wp_edit_blocks_dependencies[] = 'wp-editor-classic-layout-styles';
}

if ( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 ) {
if (
current_theme_supports( 'wp-block-styles' ) &&
( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 )
) {
// Include opinionated block styles if no $editor_styles are declared, so the editor never appears broken.
$wp_edit_blocks_dependencies[] = 'wp-block-library-theme';
}
Expand Down