From de1c682e0a908b1ee9ee4373e59b6fc44117de08 Mon Sep 17 00:00:00 2001 From: desrosj Date: Tue, 9 Nov 2021 18:08:01 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp-theme-json-resolver.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-theme-json-resolver.php b/wp-includes/class-wp-theme-json-resolver.php index 34d3ab9fcf..ea9e5e677f 100644 --- a/wp-includes/class-wp-theme-json-resolver.php +++ b/wp-includes/class-wp-theme-json-resolver.php @@ -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; diff --git a/wp-includes/version.php b/wp-includes/version.php index fa1861e3c0..40ec4eb5af 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @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.