[wp-trac] [WordPress Trac] #58962: Provide a way to load multiple specific options with a single database request
WordPress Trac
noreply at wordpress.org
Mon Oct 23 14:07:24 UTC 2023
#58962: Provide a way to load multiple specific options with a single database
request
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: flixos90
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.4
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has-dev- | Focuses:
note | performance
-------------------------------------------------+-------------------------
Comment (by joemcgill):
I understand @flixos90 objection to using the underscore here, given the
intent of these functions. For that reason, even though they serve a very
similar purpose to the other `_prime_{thing}_caches()` functions, I think
avoiding the confusion altogether would be better. I'd even avoid adding
`_caches` the end of the function names. To make the distinction and
intent even more clear, I would consider renaming these to
* `wp_load_options()`
* `wp_load_options_group()`
While they still serve the purpose of loading and caching a set of
options, these names would avoid the confusion with internal `prime_`
functions and would more closely align with other option loading
functions, `wp_load_alloptions()` and `wp_load_core_site_options()`.
Given that these are still unreleased functions, I'd prefer the minor
inconvenience of needing to update the dev note over being stuck with
inconsistent function names.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58962#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list