diff --git a/lib/compat/wordpress-6.0/client-assets.php b/lib/compat/wordpress-6.0/client-assets.php index 9bb4cf954420f5..66286636a11f76 100644 --- a/lib/compat/wordpress-6.0/client-assets.php +++ b/lib/compat/wordpress-6.0/client-assets.php @@ -62,7 +62,11 @@ function gutenberg_resolve_assets() { foreach ( $block_registry->get_all_registered() as $block_type ) { if ( ! empty( $block_type->style ) ) { if ( is_array( $block_type->style ) ) { - $style_handles[] = $block_type->style[0]; + foreach ( $block_type->style as $single_style ) { + if ( is_string( $single_style ) ) { + $style_handles[] = $single_style; + } + } } else { $style_handles[] = $block_type->style; } diff --git a/lib/compat/wordpress-6.1/blocks.php b/lib/compat/wordpress-6.1/blocks.php index 74acd1baab83c4..a225641abab89e 100644 --- a/lib/compat/wordpress-6.1/blocks.php +++ b/lib/compat/wordpress-6.1/blocks.php @@ -203,6 +203,6 @@ function gutenberg_multiple_block_styles_compat_6_1( $metadata ) { return $metadata; } -remove_filter( 'block_type_metadata', 'gutenberg_multiple_block_styles' ); +remove_filter( 'block_type_metadata', '_wp_multiple_block_styles' ); remove_filter( 'block_type_metadata', 'gutenberg_multiple_block_styles' ); add_filter( 'block_type_metadata', 'gutenberg_multiple_block_styles_compat_6_1', 9 );