Skip to content

Commit

Permalink
Handle arrays of styles in gutenberg_resolve_assets
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel committed Jun 27, 2022
1 parent 7be526c commit 6ff8c57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/compat/wordpress-6.0/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ function gutenberg_resolve_assets() {

foreach ( $block_registry->get_all_registered() as $block_type ) {
if ( ! empty( $block_type->style ) ) {
$style_handles[] = $block_type->style;
if ( is_array( $block_type->style ) ) {
$style_handles[] = $block_type->style[0];
} else {
$style_handles[] = $block_type->style;
}
}

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

0 comments on commit 6ff8c57

Please sign in to comment.