Themes: Check both parent and child themes for a `theme.json` file.
This updates `WP_Theme_JSON_Resolver::theme_has_support()` to properly check for a `theme.json` file in both parent and child themes when determining whether a theme supports block templates. Follow up to [52077]. Props Mamaduka. Fixes #54401. Built from https://develop.svn.wordpress.org/trunk@52181 git-svn-id: http://core.svn.wordpress.org/trunk@51773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c5518c2f11
commit
533afcd3b9
|
@ -363,7 +363,10 @@ class WP_Theme_JSON_Resolver {
|
|||
*/
|
||||
public static function theme_has_support() {
|
||||
if ( ! isset( self::$theme_has_support ) ) {
|
||||
self::$theme_has_support = is_readable( self::get_file_path_from_theme( 'theme.json' ) );
|
||||
self::$theme_has_support = (
|
||||
is_readable( self::get_file_path_from_theme( 'theme.json' ) ) ||
|
||||
is_readable( self::get_file_path_from_theme( 'theme.json', true ) )
|
||||
);
|
||||
}
|
||||
|
||||
return self::$theme_has_support;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-52180';
|
||||
$wp_version = '5.9-alpha-52181';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue