Skip to content

Commit

Permalink
Expand support for style arrays to editor styles
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel committed Aug 1, 2022
1 parent 3b949e8 commit 99902b6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/compat/wordpress-6.0/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ function gutenberg_resolve_assets() {
}

if ( ! empty( $block_type->editor_style ) ) {
$style_handles[] = $block_type->editor_style;
if ( is_array( $block_type->editor_style ) ) {
foreach ( $block_type->editor_style as $single_style ) {
if ( is_string( $single_style ) ) {
$style_handles[] = $single_style;
}
}
} else {
$style_handles[] = $block_type->editor_style;
}
}

if ( ! empty( $block_type->script ) ) {
Expand Down

0 comments on commit 99902b6

Please sign in to comment.