Changes between Initial Version and Version 1 of Ticket #57123, comment 8
- Timestamp:
- 01/30/2023 05:33:15 PM (23 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #57123, comment 8
initial v1 3 3 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… 4 4 5 Does `_current_` convey “global state”, even when used within the confines of a class or Namespace? 5 Does `_current_` convey “global state”, even when used within the confines of a class or Namespace? Is it possible a future plugin developer might think of these as simple local-scoped wrappers to return those globals? 6 6 7 Seems likeexisting 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.7 Tangentially, 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. 8 8 9 9 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” ?