From 6ff8c57ee8b9fd8384f4d396a111c61635ddbc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Thu, 23 Jun 2022 15:48:48 +0200 Subject: [PATCH] Handle arrays of styles in gutenberg_resolve_assets --- lib/compat/wordpress-6.0/client-assets.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/compat/wordpress-6.0/client-assets.php b/lib/compat/wordpress-6.0/client-assets.php index 0c5697817a94a8..9bb4cf954420f5 100644 --- a/lib/compat/wordpress-6.0/client-assets.php +++ b/lib/compat/wordpress-6.0/client-assets.php @@ -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 ) ) {