Make WordPress Core

Ticket #60964: 60964.diff

File 60964.diff, 1.1 KB (added by immeet94, 14 months ago)
  • src/wp-includes/global-styles-and-settings.php

    diff --git a/src/wp-includes/global-styles-and-settings.php b/src/wp-includes/global-styles-and-settings.php
    index fae7ae6ffb..fd1890c53a 100644
    a b function wp_add_global_styles_for_blocks() { 
    329329                        if ( str_starts_with( $metadata['name'], 'core/' ) ) {
    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                                }
    335335                        } else {
    function wp_add_global_styles_for_blocks() { 
    344344                                if ( str_starts_with( $block_name, 'core/' ) ) {
    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                                        }
    350350                                } else {