[wp-trac] [WordPress Trac] #27177: Child themes should inherit parent theme customizer settings on activation / switching
WordPress Trac
noreply at wordpress.org
Fri May 1 22:48:40 UTC 2015
#27177: Child themes should inherit parent theme customizer settings on activation
/ switching
-------------------------+------------------------------
Reporter: krogsgard | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 3.8
Severity: normal | Resolution:
Keywords: | Focuses: administration
-------------------------+------------------------------
Comment (by greenshady):
One thing we need to watch out for is when a child theme developer
overwrites the default theme mods of the parent theme. For example, child
themes can hook into `theme_mod_$mod`, check if the user has set anything
yet, and return a new default mod if not.
If core begins overwriting mods on theme switch. I know there are several
child themes of my parent themes that wouldn't have their correct default
theme mods if that were the case (mostly color options). Users will think
something is wrong because the child theme they activated will look
nothing like it supposed to. It'd just look like the parent theme.
What theme authors really need to be doing is using the options storage
method that best suits their needs. Theme mods are specific to the
`get_stylesheet()`. If a theme author wants to store everything based on
the parent theme, there are options to do so.
I'd be in favor of a `get_theme_mod_parent()` function though. Or,
another filter that we could introduce is `theme_mod_default_$mod` (or
something to that effect) to give child theme developers time to switch
over.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27177#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list