From f7a4581b163d312fb5b2eb8b36971d757798775b Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Thu, 30 May 2024 12:22:25 -0400 Subject: [PATCH] Rosetta customizations: Fix the return object when settings are customized. This should return `WP_Theme_JSON_Data` (as the phpdoc claims), but was accidentally using `WP_Theme_JSON` instead. Previously this worked, but after r58185-core the use of this class triggered a fatal error. Switching to the correct class fixes the error. --- .../wp-content/themes/wporg-parent-2021/inc/rosetta-styles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/wp-content/themes/wporg-parent-2021/inc/rosetta-styles.php b/source/wp-content/themes/wporg-parent-2021/inc/rosetta-styles.php index 9d4f0f1f..0d3d1b71 100644 --- a/source/wp-content/themes/wporg-parent-2021/inc/rosetta-styles.php +++ b/source/wp-content/themes/wporg-parent-2021/inc/rosetta-styles.php @@ -27,7 +27,7 @@ function inject_i18n_customizations( $theme_json ) { 'settings' => $locale_settings, ); - return new \WP_Theme_JSON( $config, 'custom' ); + return new \WP_Theme_JSON_Data( $config, 'custom' ); } /**