[wp-trac] [WordPress Trac] #57123: Make it easier to switch to a user's locale
WordPress Trac
noreply at wordpress.org
Mon Jan 30 17:30:57 UTC 2023
#57123: Make it easier to switch to a user's locale
------------------------------+-------------------------
Reporter: swissspidy | Owner: swissspidy
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.2
Component: I18N | Version: 4.7
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+-------------------------
Comment (by johnjamesjacoby):
This is excellent!
I have a thought about the new method names (`get_current_locale`,
`get_current_user_id`). Apologies for it being after-commit đ and for
maybe digging up an old conversationâŚ
Does `_current_` convey âglobal stateâ, even when used within the confines
of a class or Namespace?
Seems like existing global functions that start with `get_current_` or
`restore_current_` established a pattern that âcurrentâ could be either
âswitchedâ or âoriginatingâ depending on the caller.
Is this, perhaps, a decent opportunity to establish a more
intentional/explicit/strict naming pattern to differentiate things that
are âcurrently switchedâ from âreset back to what we started withâ ?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57123#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list