mirror of
git://develop.git.wordpress.org/
synced 2025-04-05 04:33:18 +02:00
Themes: Avoid fatal error loading admin styles when SCRIPT_DEBUG
is false
.
This removes the use of `get_theme_file_path()` within `WP_Theme_JSON_Resolver` in favor of the similar `get_file_path_from_theme()` method. The former is found within `wp-includes/link-template.php`, which is not currently loaded when `load-styles.php` attempts to load the necessary styles. `self::get_file_path_from_theme()` was used previously, but this was changed in [52049]. Props Mamaduka, audrasjb, hellofromTonya, jorbin, desrosj. Fixes #54401. See #54336. git-svn-id: https://develop.svn.wordpress.org/trunk@52077 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f0de932e45
commit
f22abe7610
@ -363,7 +363,7 @@ class WP_Theme_JSON_Resolver {
|
||||
*/
|
||||
public static function theme_has_support() {
|
||||
if ( ! isset( self::$theme_has_support ) ) {
|
||||
self::$theme_has_support = is_readable( get_theme_file_path( 'theme.json' ) );
|
||||
self::$theme_has_support = is_readable( self::get_file_path_from_theme( 'theme.json' ) );
|
||||
}
|
||||
|
||||
return self::$theme_has_support;
|
||||
|
Loading…
x
Reference in New Issue
Block a user