Make WordPress Core

Changeset 51888


Ignore:
Timestamp:
10/05/2021 04:51:15 PM (3 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Use strict type check for in_array() in register_block_script_handle().

Follow-up to [51501].

Props aristath, sergeybiryukov.
Fixes #54206. See #53359.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks.php

    r51674 r51888  
    117117    }
    118118
    119     if ( ! empty( $metadata['textdomain'] ) && in_array( 'wp-i18n', $script_dependencies ) ) {
     119    if ( ! empty( $metadata['textdomain'] ) && in_array( 'wp-i18n', $script_dependencies, true ) ) {
    120120        wp_set_script_translations( $script_handle, $metadata['textdomain'] );
    121121    }
Note: See TracChangeset for help on using the changeset viewer.