Changeset 56180 for trunk/src/wp-includes/class-wp-theme.php
- Timestamp:
- 07/09/2023 09:46:24 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-theme.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme.php
r55941 r56180 322 322 } else { 323 323 $this->headers = get_file_data( $this->theme_root . '/' . $theme_file, self::$file_headers, 'theme' ); 324 // Default themes always trump their pretenders. 325 // Properly identify default themes that are inside a directory within wp-content/themes. 324 /* 325 * Default themes always trump their pretenders. 326 * Properly identify default themes that are inside a directory within wp-content/themes. 327 */ 326 328 $default_theme_slug = array_search( $this->headers['Name'], self::$default_themes, true ); 327 329 if ( $default_theme_slug ) { … … 390 392 // If we got our data from cache, we can assume that 'template' is pointing to the right place. 391 393 if ( ! is_array( $cache ) && $this->template != $this->stylesheet && ! file_exists( $this->theme_root . '/' . $this->template . '/index.php' ) ) { 392 // If we're in a directory of themes inside /themes, look for the parent nearby. 393 // wp-content/themes/directory-of-themes/* 394 /* 395 * If we're in a directory of themes inside /themes, look for the parent nearby. 396 * wp-content/themes/directory-of-themes/* 397 */ 394 398 $parent_dir = dirname( $this->stylesheet ); 395 399 $directories = search_theme_directories(); … … 398 402 $this->template = $parent_dir . '/' . $this->template; 399 403 } elseif ( $directories && isset( $directories[ $this->template ] ) ) { 400 // Look for the template in the search_theme_directories() results, in case it is in another theme root. 401 // We don't look into directories of themes, just the theme root. 404 /* 405 * Look for the template in the search_theme_directories() results, in case it is in another theme root. 406 * We don't look into directories of themes, just the theme root. 407 */ 402 408 $theme_root_template = $directories[ $this->template ]['theme_root']; 403 409 } else { … … 1666 1672 } 1667 1673 1668 // This is all super old MU back compat joy. 1669 // 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name. 1674 /* 1675 * This is all super old MU back compat joy. 1676 * 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name. 1677 */ 1670 1678 if ( false === $allowed_themes[ $blog_id ] ) { 1671 1679 if ( $current ) {
Note: See TracChangeset
for help on using the changeset viewer.