Skip to content

Commit

Permalink
Coding Standards: Use strict comparison in `wp_add_global_styles_for_…
Browse files Browse the repository at this point in the history
…blocks()`.

Follow-up to [57546].

Props immeet94.
Fixes #60964.

git-svn-id: https://develop.svn.wordpress.org/trunk@58026 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Apr 20, 2024
1 parent 22ad614 commit e21aa8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wp-includes/global-styles-and-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function wp_add_global_styles_for_blocks() {
if ( str_starts_with( $metadata['name'], 'core/' ) ) {
$block_name = str_replace( 'core/', '', $metadata['name'] );
$block_handle = 'wp-block-' . $block_name;
if ( in_array( $block_handle, $wp_styles->queue ) ) {
if ( in_array( $block_handle, $wp_styles->queue, true ) ) {
wp_add_inline_style( $stylesheet_handle, $block_css );
}
} else {
Expand All @@ -344,7 +344,7 @@ function wp_add_global_styles_for_blocks() {
if ( str_starts_with( $block_name, 'core/' ) ) {
$block_name = str_replace( 'core/', '', $block_name );
$block_handle = 'wp-block-' . $block_name;
if ( in_array( $block_handle, $wp_styles->queue ) ) {
if ( in_array( $block_handle, $wp_styles->queue, true ) ) {
wp_add_inline_style( $stylesheet_handle, $block_css );
}
} else {
Expand Down

0 comments on commit e21aa8a

Please sign in to comment.