[wp-trac] [WordPress Trac] #7795: Activate and Deactivate Theme hooks
WordPress Trac
wp-trac at lists.automattic.com
Thu Oct 4 17:28:30 UTC 2012
#7795: Activate and Deactivate Theme hooks
-------------------------+-----------------------------
Reporter: jacobsantos | Owner:
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Themes | Version: 2.7
Severity: normal | Resolution:
Keywords: revert |
-------------------------+-----------------------------
Comment (by Veraxus):
That's not entirely accurate egorpromo...
'after_switch_theme' is run by a NEW theme after the switch occurs (I'm
not sure why $old_theme was chosen to be passed as an argument, but it has
no bearing on the actual point where the action is run). Hence, it runs on
activation.
'switch_theme' is run when a switch is initiated... by the OLD theme,
before the actual switch takes place. Hence, it runs on deactivation.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/7795#comment:38>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list