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. Built from https://develop.svn.wordpress.org/trunk@52077 git-svn-id: http://core.svn.wordpress.org/trunk@51669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ea201ced16
commit
de1c682e0a
|
@ -363,7 +363,7 @@ class WP_Theme_JSON_Resolver {
|
||||||
*/
|
*/
|
||||||
public static function theme_has_support() {
|
public static function theme_has_support() {
|
||||||
if ( ! isset( self::$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;
|
return self::$theme_has_support;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.9-alpha-52076';
|
$wp_version = '5.9-alpha-52077';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue