[wp-trac] [WordPress Trac] #26511: Introduce a locale-switching function
WordPress Trac
noreply at wordpress.org
Mon Oct 17 19:16:43 UTC 2016
#26511: Introduce a locale-switching function
-------------------------------------------------+-------------------------
Reporter: johnbillion | Owner: swissspidy
Type: feature request | Status: accepted
Priority: high | Milestone: 4.7
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs-dev- | Focuses:
note |
-------------------------------------------------+-------------------------
Comment (by ocean90):
Some quick feedback for [attachment:26511.8.diff]:
* `wp_new_user_notification()`: The email for `admin_email` should be sent
using the site locale (`get_locale()`).
* `wp_update_user()`: When `$user['locale']` isn't set `get_locale()`
should be used for the `switch_to_locale()` call.
* `ms-delete-site.php`: Why is this using `get_user_locale()`? I think it
should be `get_locale()`.
* `wpmu_signup_blog_notification()`: The function is only used on `wp-
signup.php`, the front end. `switch_to_locale()` would only be needed if
it's used in the admin. Maybe there are plugins which are using the
function in the admin?
* `wpmu_signup_user_notification()`: Unlike
`wpmu_signup_blog_notification()`, `wpmu_signup_user_notification()` is
also used in the admin on wp-admin/user-new.php for multisite. If the user
already exists it should use their locale, otherwise `get_locale()`.
* `wp_notify_moderator()`: Well, that's a mess. But we should at least
make sure that it's always using the site locale.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26511#comment:78>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list