mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-15 01:54:30 +00:00
Coding Standards: Use strict type check for in_array() and array_search().
This addresses all the remaining `WordPress.PHP.StrictInArray.MissingTrueStrict` issues in core. Includes minor code layout fixes for better readability. Follow-up to [47550]. See #49542. git-svn-id: https://develop.svn.wordpress.org/trunk@47557 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -276,7 +276,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
$this->headers = get_file_data( $this->theme_root . '/' . $theme_file, self::$file_headers, 'theme' );
|
||||
// Default themes always trump their pretenders.
|
||||
// Properly identify default themes that are inside a directory within wp-content/themes.
|
||||
$default_theme_slug = array_search( $this->headers['Name'], self::$default_themes );
|
||||
$default_theme_slug = array_search( $this->headers['Name'], self::$default_themes, true );
|
||||
if ( $default_theme_slug ) {
|
||||
if ( basename( $this->stylesheet ) != $default_theme_slug ) {
|
||||
$this->headers['Name'] .= '/' . $this->stylesheet;
|
||||
|
||||
Reference in New Issue
Block a user