Make WordPress Core

Opened 9 years ago

Last modified 6 years ago

#33600 new enhancement

Add `theme_mods_{$stylesheet}` option during `populate_options()`

Reported by: dlh's profile 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)

33600.patch (1.1 KB) - added by dlh 9 years ago.

Download all attachments as: .zip

Change History (4)

@dlh
9 years ago

#1 @swissspidy
7 years ago

  • Keywords has-patch has-unit-tests needs-testing added
  • Milestone changed from Awaiting Review to Future Release

This ticket was mentioned in Slack in #themereview by joyously. View the logs.


6 years ago

#3 @joyously
6 years ago

Hmm, my theme actually uses the fact that it is not populated to supply default values and know that it is brand new.

Note: See TracTickets for help on using tickets.