Changeset 47808 for trunk/src/wp-includes/class-wp-theme.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme.php
r47794 r47808 341 341 $parent_dir = dirname( $this->stylesheet ); 342 342 $directories = search_theme_directories(); 343 if ( '.' != $parent_dir && file_exists( $this->theme_root . '/' . $parent_dir . '/' . $this->template . '/index.php' ) ) { 343 344 if ( '.' !== $parent_dir && file_exists( $this->theme_root . '/' . $parent_dir . '/' . $this->template . '/index.php' ) ) { 344 345 $this->template = $parent_dir . '/' . $this->template; 345 346 } elseif ( $directories && isset( $directories[ $this->template ] ) ) { … … 1143 1144 $screenshot = $this->cache_get( 'screenshot' ); 1144 1145 if ( $screenshot ) { 1145 if ( 'relative' == $uri ) {1146 if ( 'relative' === $uri ) { 1146 1147 return $screenshot; 1147 1148 } … … 1154 1155 if ( file_exists( $this->get_stylesheet_directory() . "/screenshot.$ext" ) ) { 1155 1156 $this->cache_add( 'screenshot', 'screenshot.' . $ext ); 1156 if ( 'relative' == $uri ) {1157 if ( 'relative' === $uri ) { 1157 1158 return 'screenshot.' . $ext; 1158 1159 } … … 1320 1321 1321 1322 $relative_path = trailingslashit( $relative_path ); 1322 if ( '/' == $relative_path ) {1323 if ( '/' === $relative_path ) { 1323 1324 $relative_path = ''; 1324 1325 } … … 1337 1338 1338 1339 foreach ( $results as $result ) { 1339 if ( '.' == $result[0] || in_array( $result, $exclusions, true ) ) {1340 if ( '.' === $result[0] || in_array( $result, $exclusions, true ) ) { 1340 1341 continue; 1341 1342 } … … 1408 1409 } 1409 1410 1410 if ( 'both' == $check || 'network'== $check ) {1411 if ( 'both' === $check || 'network' === $check ) { 1411 1412 $allowed = self::get_allowed_on_network(); 1412 1413 if ( ! empty( $allowed[ $this->get_stylesheet() ] ) ) { … … 1415 1416 } 1416 1417 1417 if ( 'both' == $check || 'site'== $check ) {1418 if ( 'both' === $check || 'site' === $check ) { 1418 1419 $allowed = self::get_allowed_on_site( $blog_id ); 1419 1420 if ( ! empty( $allowed[ $this->get_stylesheet() ] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.