Skip to content

Commit

Permalink
Coding Standards: Fix missing strict in_array on block-template-utils…
Browse files Browse the repository at this point in the history
….php.

Props swissspidy.

git-svn-id: https://develop.svn.wordpress.org/trunk@57946 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
jorgefilipecosta committed Apr 8, 2024
1 parent 6ef8cf9 commit 1393dc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ function get_template_hierarchy( $slug, $is_custom = false, $template_prefix = '
list( $template_type ) = explode( '-', $slug );
}
$valid_template_types = array( '404', 'archive', 'attachment', 'author', 'category', 'date', 'embed', 'frontpage', 'home', 'index', 'page', 'paged', 'privacypolicy', 'search', 'single', 'singular', 'tag', 'taxonomy' );
if ( in_array( $template_type, $valid_template_types ) ) {
if ( in_array( $template_type, $valid_template_types, true ) ) {
/** This filter is documented in wp-includes/template.php */
return apply_filters( "{$template_type}_template_hierarchy", $template_hierarchy );
}
Expand Down

0 comments on commit 1393dc2

Please sign in to comment.