diff --git a/lib/class-wp-theme-json-resolver.php b/lib/class-wp-theme-json-resolver.php index 6815dc68ecca2e..e312fe8b3813a9 100644 --- a/lib/class-wp-theme-json-resolver.php +++ b/lib/class-wp-theme-json-resolver.php @@ -31,7 +31,7 @@ class WP_Theme_JSON_Resolver { * * @var boolean */ - private static $theme_has_support = null; + private static $theme_has_support = array(); /** * Container for data coming from the user. @@ -503,11 +503,12 @@ public static function get_user_custom_post_type_id() { * @return boolean */ public static function theme_has_support() { - if ( ! isset( self::$theme_has_support ) ) { - self::$theme_has_support = (bool) self::get_file_path_from_theme( 'experimental-theme.json' ); + $theme_slug = get_stylesheet(); + if ( ! isset( self::$theme_has_support[ $theme_slug ] ) ) { + self::$theme_has_support[ $theme_slug ] = (bool) self::get_file_path_from_theme( 'experimental-theme.json' ); } - return self::$theme_has_support; + return self::$theme_has_support[ $theme_slug ]; } /**