Make WordPress Core

Opened 7 years ago

Last modified 3 years ago

#39031 new enhancement

Customize: Include theme as just another setting instead of passing as separate parameter

Reported by: westonruter's profile westonruter Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.1
Component: Customize Keywords: needs-patch
Focuses: Cc:

Description (last modified by westonruter)

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.

Change History (5)

#1 @westonruter
7 years ago

  • Description modified (diff)

#2 @celloexpressions
7 years ago

  • Keywords needs-patch added
  • Version set to 4.1

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.

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.

7 years ago

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.

7 years ago

#5 @celloexpressions
3 years ago

This is probably a prerequisite for #22880. The potential usability benefits there likely warrant the amount of refactoring that this will probably require.

Note: See TracTickets for help on using tickets.