mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@52181 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user