diff --git a/lib/compat/wordpress-6.1/get-global-styles-and-settings.php b/lib/compat/wordpress-6.1/get-global-styles-and-settings.php index e636637ae2b022..ccccdad9a814b9 100644 --- a/lib/compat/wordpress-6.1/get-global-styles-and-settings.php +++ b/lib/compat/wordpress-6.1/get-global-styles-and-settings.php @@ -45,8 +45,8 @@ function ( $item ) { ) ); if ( isset( $result[0] ) ) { - if ( str_starts_with( $metadata['name'], 'core/' ) ) { - $block_name = str_replace( 'core/', '', $result[0] ); + if ( str_starts_with( $result[0], 'core/' ) ) { + $block_name = str_replace( 'core/', '', $result[0] ); $stylesheet_handle = 'wp-block-' . $block_name; } wp_add_inline_style( $stylesheet_handle, $block_css );