Repository navigation
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Description
When a registered user has selected a locale on their profile, the privacy request confirmation email is sent in that locale (#43985), but the "User action confirmed" page they land on after clicking the link (
wp-login.php?action=confirmaction) is shown in the site's locale.This PR adds the user's selected locale to the confirmation URL as
wp_lang.determine_locale()already useswp_langonwp-login.php, so the confirmation page now matches the email's language.wp_langis added only when the request belongs to a registered user who has explicitly chosen a locale, even if it's the same as the site's locale. That way the page keeps the user's language if the site locale changes later. Unregistered requesters and users on "Site Default" get the same URL as before and follow the site locale.This refreshes
44550.3.diffagainst current trunk:wp-login.phpchange is dropped. Theconfirmactionhandler no longer switches locales, anddetermine_locale()handleswp_langitself.$request->confirm_key(#44940).assertStringContainsString()/assertStringNotContainsString().Trac ticket
Trac ticket: https://core.trac.wordpress.org/ticket/44550
Testing Instructions
&wp_lang=de_DE. Open it in a logged-out window. The "User action confirmed" page should appear in German.wp_lang, and the page should use the site language.Unit tests:
npm run test:php -- --filter wpSendUserRequestUse of AI Tools
AI assistance: Yes
Tool(s): Claude (Anthropic)
Model(s): Opus 5.5
Used for: Patch refresh and test updates were drafted with AI and reviewed and tested locally by me. AI generated description to PR
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.