[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:37:28 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 | Keywords: has-patch needs-testing
-----------------------------+-------------------------------------
There should be another hook in the switch_theme function that occurs
before the previous theme is switched but during the switch theme process.
The current switch_theme action hook occurs after the new theme has been
activated, which takes away the ability to reference data from the
previous theme. The are many use-cases that would warrant such a hook, but
one in particular is a theme deactivating plugins specific to that theme
(as there would be no use for them once the them has been switched). You
can always reference the page and $_GET action, but a hook would be easier
to work with in my opinion.
I've suggested the name before_switch_theme, but it could be something
else. Just as long as it occurs during the switch theme process but before
the current theme is replaced.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19682>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list