Opened 8 years ago
Closed 8 years ago
#39342 closed defect (bug) (invalid)
locale switcher: switching to `get_locale` is useless
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 4.7 |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
With the introduction of the locale switcher in [38961], we've implemented 3 core switches that use get_locale()
as the locale argument:
switch_to_locale( get_locale() );
delete site email
wp_notify_postauthor
wp_new_user_notification
Switching to get_locale()
is useless because locale
gets filtered by the locale switcher, which will use the last locale switched to as the return value. So we're just switching to the current locale (if no locale switch has ever happened) or to the current locale again if we did switch.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Test demonstrating the issue