diff --git a/lib/class-wp-theme-json-resolver.php b/lib/class-wp-theme-json-resolver.php index d1b8cb376ec67..e622e937846e8 100644 --- a/lib/class-wp-theme-json-resolver.php +++ b/lib/class-wp-theme-json-resolver.php @@ -56,14 +56,6 @@ class WP_Theme_JSON_Resolver_Base { */ protected static $theme = null; - /** - * Whether or not the theme supports theme.json. - * - * @since 5.8.0 - * @var bool - */ - protected static $theme_has_support = null; - /** * Container for data coming from the user. * @@ -596,18 +588,14 @@ public static function get_user_global_styles_post_id() { * * @since 5.8.0 * @since 5.9.0 Added a check in the parent theme. + * @deprecated 6.2.0 Use wp_theme_has_theme_json() instead. * * @return bool */ public static function theme_has_support() { - if ( ! isset( static::$theme_has_support ) ) { - static::$theme_has_support = ( - static::get_file_path_from_theme( 'theme.json' ) !== '' || - static::get_file_path_from_theme( 'theme.json', true ) !== '' - ); - } + _deprecated_function( __METHOD__, '6.2.0', 'wp_theme_has_theme_json()' ); - return static::$theme_has_support; + return wp_theme_has_theme_json(); } /** @@ -650,7 +638,6 @@ public static function clean_cached_data() { static::$theme = null; static::$user = null; static::$user_custom_post_type_id = null; - static::$theme_has_support = null; static::$i18n_schema = null; } diff --git a/lib/compat/wordpress-6.2/class-wp-theme-json-resolver-6-2.php b/lib/compat/wordpress-6.2/class-wp-theme-json-resolver-6-2.php index fa85d34c52073..d25d6df090c06 100644 --- a/lib/compat/wordpress-6.2/class-wp-theme-json-resolver-6-2.php +++ b/lib/compat/wordpress-6.2/class-wp-theme-json-resolver-6-2.php @@ -97,21 +97,6 @@ public static function get_user_data_from_wp_global_styles( $theme, $create_post return $user_cpt; } - /** - * Determines whether the active theme has a theme.json file. - * - * @since 5.8.0 - * @since 5.9.0 Added a check in the parent theme. - * @deprecated 6.2.0 Use wp_theme_has_theme_json() instead. - * - * @return bool - */ - public static function theme_has_support() { - _deprecated_function( __METHOD__, '6.2.0', 'wp_theme_has_theme_json()' ); - - return wp_theme_has_theme_json(); - } - /** * Returns the data merged from multiple origins. *