From fc639bc31d4972f5870de8144e46c5ec47b3ffeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Thu, 22 Dec 2022 15:20:58 +0100 Subject: [PATCH] 6.2: substitute WP_Theme_JSON_Resolver::theme_has_support by wp_theme_has_theme_json() https://github.com/WordPress/gutenberg/pull/45168 --- lib/class-wp-theme-json-resolver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/class-wp-theme-json-resolver.php b/lib/class-wp-theme-json-resolver.php index e622e937846e81..9f258fe6a0e0ea 100644 --- a/lib/class-wp-theme-json-resolver.php +++ b/lib/class-wp-theme-json-resolver.php @@ -286,7 +286,7 @@ public static function get_theme_data( $deprecated = array(), $options = array() * and merge the static::$theme upon that. */ $theme_support_data = WP_Theme_JSON_Gutenberg::get_from_editor_settings( get_default_block_editor_settings() ); - if ( ! static::theme_has_support() ) { + if ( ! wp_theme_has_theme_json() ) { if ( ! isset( $theme_support_data['settings']['color'] ) ) { $theme_support_data['settings']['color'] = array(); } @@ -407,11 +407,11 @@ public static function get_user_data_from_wp_global_styles( $theme, $create_post /* * Bail early if the theme does not support a theme.json. * - * Since WP_Theme_JSON_Resolver::theme_has_support() only supports the active + * Since wp_theme_has_theme_json() only supports the active * theme, the extra condition for whether $theme is the active theme is * present here. */ - if ( $theme->get_stylesheet() === get_stylesheet() && ! static::theme_has_support() ) { + if ( $theme->get_stylesheet() === get_stylesheet() && ! wp_theme_has_theme_json() ) { return array(); }