Skip to content

Commit

Permalink
Fix undefined array key "name" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Lende committed Sep 13, 2022
1 parent 3a45ac3 commit fd60049
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/compat/wordpress-6.1/get-global-styles-and-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit fd60049

Please sign in to comment.