[wp-trac] [WordPress Trac] #19682: Add hook before_switch_theme to the switch_theme function
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 29 04:43:03 UTC 2011
#19682: Add hook before_switch_theme to the switch_theme function
-------------------------------------+------------------------------
Reporter: griffinjt | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 3.3
Severity: minor | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+------------------------------
Comment (by dd32):
The switch_theme action is fired whilst the current theme is still active,
so in reality, the switch_theme action is a deactivation hook for a theme.
The only downside is that at the time of firing, the template/stylesheet
options will now refer to the new theme, however the old themes files will
be loaded.
You can use `get_option('theme_switched')` in the action to retrieve the
previous theme details, perhaps we should be passing those details to the
switch_theme action itself.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19682#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list