From 90b97764ac9c27797569bf1311239e92c9006960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:38:33 +0200 Subject: [PATCH 1/3] Deprecate WP_Theme_JSON_Resolver::theme_has_support --- .../class-wp-theme-json-resolver-6-2.php | 35 +++++++++++++++++++ ...class-wp-theme-json-resolver-gutenberg.php | 2 +- lib/load.php | 5 +-- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 lib/compat/wordpress-6.2/class-wp-theme-json-resolver-6-2.php 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 new file mode 100644 index 0000000000000..c061365f5de5f --- /dev/null +++ b/lib/compat/wordpress-6.2/class-wp-theme-json-resolver-6-2.php @@ -0,0 +1,35 @@ + Date: Fri, 28 Oct 2022 14:42:23 +0200 Subject: [PATCH 2/3] Declare alternative --- lib/compat/wordpress-6.2/class-wp-theme-json-resolver-6-2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c061365f5de5f..5b4069b4968b5 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 @@ -27,7 +27,7 @@ class WP_Theme_JSON_Resolver_6_2 extends WP_Theme_JSON_Resolver_6_1 { * @return bool */ public static function theme_has_support() { - _deprecated_function( __METHOD__, '6.2.0' ); + _deprecated_function( __METHOD__, '6.2.0', 'wp_theme_has_theme_json()'); return wp_theme_has_theme_json(); } From 412b351f8786a55a3b7c6be01789070eddf913d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Fri, 28 Oct 2022 15:03:46 +0200 Subject: [PATCH 3/3] Make linter happy --- lib/compat/wordpress-6.2/class-wp-theme-json-resolver-6-2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5b4069b4968b5..e10710e0f4709 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 @@ -27,7 +27,7 @@ class WP_Theme_JSON_Resolver_6_2 extends WP_Theme_JSON_Resolver_6_1 { * @return bool */ public static function theme_has_support() { - _deprecated_function( __METHOD__, '6.2.0', 'wp_theme_has_theme_json()'); + _deprecated_function( __METHOD__, '6.2.0', 'wp_theme_has_theme_json()' ); return wp_theme_has_theme_json(); }