Skip to content

Commit

Permalink
Coding Standards: Use strict type check for in_array() in `register…
Browse files Browse the repository at this point in the history
…_block_script_handle()`.

Follow-up to [51501].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@51888 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
hellofromtonya committed Oct 5, 2021
1 parent f2d146d commit 374adaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/blocks.php
Expand Up @@ -116,7 +116,7 @@ function register_block_script_handle( $metadata, $field_name ) {
return false;
}

if ( ! empty( $metadata['textdomain'] ) && in_array( 'wp-i18n', $script_dependencies ) ) {
if ( ! empty( $metadata['textdomain'] ) && in_array( 'wp-i18n', $script_dependencies, true ) ) {
wp_set_script_translations( $script_handle, $metadata['textdomain'] );
}

Expand Down

0 comments on commit 374adaa

Please sign in to comment.