Make WordPress Core

Changeset 58026


Ignore:
Timestamp:
04/20/2024 03:59:10 AM (6 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp_add_global_styles_for_blocks().

Follow-up to [57546].

Props immeet94.
Fixes #60964.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/global-styles-and-settings.php

    r57546 r58026  
    330330                $block_name   = str_replace( 'core/', '', $metadata['name'] );
    331331                $block_handle = 'wp-block-' . $block_name;
    332                 if ( in_array( $block_handle, $wp_styles->queue ) ) {
     332                if ( in_array( $block_handle, $wp_styles->queue, true ) ) {
    333333                    wp_add_inline_style( $stylesheet_handle, $block_css );
    334334                }
     
    345345                    $block_name   = str_replace( 'core/', '', $block_name );
    346346                    $block_handle = 'wp-block-' . $block_name;
    347                     if ( in_array( $block_handle, $wp_styles->queue ) ) {
     347                    if ( in_array( $block_handle, $wp_styles->queue, true ) ) {
    348348                        wp_add_inline_style( $stylesheet_handle, $block_css );
    349349                    }
Note: See TracChangeset for help on using the changeset viewer.