[wp-trac] [WordPress Trac] #58317: Refactor determine_locale() for performance
WordPress Trac
noreply at wordpress.org
Fri Jun 23 16:01:23 UTC 2023
#58317: Refactor determine_locale() for performance
---------------------------------------------+--------------------------
Reporter: Cybr | Owner: swissspidy
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.3
Component: I18N | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses: performance
---------------------------------------------+--------------------------
Changes (by swissspidy):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"56003" 56003]:
{{{
#!CommitTicketReference repository="" revision="56003"
I18N: Ensure `determine_locale()` does not potentially return an empty
string.
Call `get_locale()` as a last resort in case the sanitized locale is an
empty string.
Also swaps conditionals to cater for more typical use case and adds tests.
Follow-up to [55862]
Props Cybr, swissspidy.
Fixes #58317.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58317#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list