Changeset 47550 for trunk/src/wp-includes/theme.php
- Timestamp:
- 04/05/2020 03:00:44 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r47267 r47550 49 49 if ( isset( $theme_directories[ $current_theme ] ) ) { 50 50 $root_of_current_theme = get_raw_theme_root( $current_theme ); 51 if ( ! in_array( $root_of_current_theme, $wp_theme_directories ) ) {51 if ( ! in_array( $root_of_current_theme, $wp_theme_directories, true ) ) { 52 52 $root_of_current_theme = WP_CONTENT_DIR . $root_of_current_theme; 53 53 } … … 120 120 if ( false === $theme_root ) { 121 121 $theme_root = WP_CONTENT_DIR . '/themes'; 122 } elseif ( ! in_array( $theme_root, (array) $wp_theme_directories ) ) {122 } elseif ( ! in_array( $theme_root, (array) $wp_theme_directories, true ) ) { 123 123 $theme_root = WP_CONTENT_DIR . $theme_root; 124 124 } … … 412 412 413 413 $untrailed = untrailingslashit( $directory ); 414 if ( ! empty( $untrailed ) && ! in_array( $untrailed, $wp_theme_directories ) ) {414 if ( ! empty( $untrailed ) && ! in_array( $untrailed, $wp_theme_directories, true ) ) { 415 415 $wp_theme_directories[] = $untrailed; 416 416 } … … 584 584 // Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory. 585 585 // This gives relative theme roots the benefit of the doubt when things go haywire. 586 if ( ! in_array( $theme_root, (array) $wp_theme_directories ) ) {586 if ( ! in_array( $theme_root, (array) $wp_theme_directories, true ) ) { 587 587 $theme_root = WP_CONTENT_DIR . $theme_root; 588 588 } … … 627 627 628 628 if ( $stylesheet_or_template && $theme_root ) { 629 if ( in_array( $theme_root, (array) $wp_theme_directories ) ) {629 if ( in_array( $theme_root, (array) $wp_theme_directories, true ) ) { 630 630 // Absolute path. Make an educated guess. YMMV -- but note the filter below. 631 631 if ( 0 === strpos( $theme_root, WP_CONTENT_DIR ) ) { … … 2739 2739 function remove_theme_support( $feature ) { 2740 2740 // Blacklist: for internal registrations not used directly by themes. 2741 if ( in_array( $feature, array( 'editor-style', 'widgets', 'menus' ) ) ) {2741 if ( in_array( $feature, array( 'editor-style', 'widgets', 'menus' ), true ) ) { 2742 2742 return false; 2743 2743 } … … 2847 2847 * If no array was passed, then any type is accepted. 2848 2848 */ 2849 if ( true === $_wp_theme_features[ $feature ] ) { // Registered for all types 2849 if ( true === $_wp_theme_features[ $feature ] ) { // Registered for all types. 2850 2850 return true; 2851 2851 } 2852 2852 $content_type = $args[0]; 2853 return in_array( $content_type, $_wp_theme_features[ $feature ][0] );2853 return in_array( $content_type, $_wp_theme_features[ $feature ][0], true ); 2854 2854 2855 2855 case 'html5': … … 2862 2862 */ 2863 2863 $type = $args[0]; 2864 return in_array( $type, $_wp_theme_features[ $feature ][0] );2864 return in_array( $type, $_wp_theme_features[ $feature ][0], true ); 2865 2865 2866 2866 case 'custom-logo':
Note: See TracChangeset
for help on using the changeset viewer.