Opened 9 years ago
Last modified 7 years ago
#33600 new enhancement
Add `theme_mods_{$stylesheet}` option during `populate_options()`
Reported by: | dlh | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-patch has-unit-tests needs-testing |
Focuses: | Cc: |
Description
After switch_theme()
, a theme_mods_{$stylesheet}
option is created if one doesn't exist to avoid extra database queries (if I understand #14828 correctly).
No similar option is currently created during installation, so a fresh install can includes those queries if the default theme looks for the mods before the option is added.
The attached patch would add the option during populate_options()
.
I included a unit test, although I'm not sure where the best location for it would be.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Hmm, my theme actually uses the fact that it is not populated to supply default values and know that it is brand new.