Skip to content

Commit

Permalink
Rosetta customizations: Fix the return object when settings are custo…
Browse files Browse the repository at this point in the history
…mized.

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.
  • Loading branch information
ryelle committed May 30, 2024
1 parent 0c7ab0b commit f7a4581
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}

/**
Expand Down

0 comments on commit f7a4581

Please sign in to comment.