WordPress/wp-includes/rest-api
TimothyBlynJacobs c3b40f7f80 Site Health, App Passwords: Ensure REST API responses are properly translated.
The REST API requests in Site Health and App Passwords now include `_locale=user` in the request URL to ensure the user's locale is used instead of the site locale. Additionally, the `apiRequest` library now sends a JSON `Accept` header which is required by `determine_locale()` to respect the `_locale` query parameter.

The Site Health REST API controllers now manually load the default admin textdomain if not `is_admin()`. This allows for the Site Health tests to be translated even though the translations are part of the administration project and the REST API is not.

Props oglekler, kebbet, Clorith, TimothyBlynJacobs, ocean90, SergeyBiryukov, adamsilverstein.
Fixes #51871.

Built from https://develop.svn.wordpress.org/trunk@49716


git-svn-id: http://core.svn.wordpress.org/trunk@49439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-01 03:44:05 +00:00
..
endpoints Site Health, App Passwords: Ensure REST API responses are properly translated. 2020-12-01 03:44:05 +00:00
fields REST API: Prevent PHP warning when metadata schema is missing properties. 2020-10-25 20:30:08 +00:00
search REST API: Introduce search post format handler. 2020-10-12 19:54:05 +00:00
class-wp-rest-request.php REST API: Support a broader range of JSON media types. 2020-10-27 16:44:06 +00:00
class-wp-rest-response.php Docs: Corrections and improvements to inline docs relating to the REST API. 2020-11-16 11:04:12 +00:00
class-wp-rest-server.php Docs: Corrections and improvements to inline docs relating to the REST API. 2020-11-16 11:04:12 +00:00