[wp-trac] [WordPress Trac] #25671: get_theme_mods does not have a filter
WordPress Trac
noreply at wordpress.org
Sun Sep 13 06:50:19 UTC 2015
#25671: get_theme_mods does not have a filter
-----------------------------------------+------------------------------
Reporter: scottsweb | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: has-patch reporter-feedback | Focuses:
-----------------------------------------+------------------------------
Comment (by spacedmonkey):
There should also be a pre filter at the top of the function. At the
moment, the get_theme_mods function is not cached at all. Something I have
mentioned in #33628 . It makes two calls to get_options, every time the
function is call, which is ALOT.
This filter would run before the two uncached get_options calls. This
filter could be used to cache theme mods in memory or to populated from
another source, such as a file.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25671#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list