Opened 8 years ago
Last modified 4 years ago
#39031 new enhancement
Customize: Include theme as just another setting instead of passing as separate parameter
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Customize | Keywords: | needs-patch |
Focuses: | Cc: |
Description (last modified by )
The customizer state is currently split in two places: the customized
settings (changeset) and the previewed theme
. This separation of the theme from the settings makes sense to a degree since the settings are dependent upon which theme is active. There is currently an active_theme
setting but it is a dummy setting which is used merely for the sake of wiring up the capability check for the themes panel. The active_theme
setting is added with a comment:
unused - the theme is considerably more fundamental to the Customizer experience
However, since the theme
is not just another setting
then this means that the theme cannot currently be made part of a changeset, and as such a theme switch cannot be previewed on the frontend by non-authenticated users and also a theme switch cannot be scheduled in the customizer. Ideally there could be a theme
setting with the switch_themes
capability that could be added to a changeset, and when that changeset is published, the switch_theme
call should then be made.
See also #22880.
It would generally be good to make the theme a setting as opposed to an entirely different thing, and the changesets part would be a further benefit. The comment in the theme switcher code was intended as a reminder to tackle this at some point.