[wp-hackers] do_action('activate_theme')?

Otto otto at ottodestruct.com
Fri Sep 26 20:16:54 GMT 2008


A theme's functions.php could test for deactivation by knowing it's
own theme name and watching for the switch_theme action. When it gets
triggered to switch to something else, there you go.

A theme should be able to notice when it gets activated by testing for
both the cases of (isset($_GET['activated']) && $parent_file ==
"themes.php").



On Fri, Sep 26, 2008 at 2:16 PM, Ozh <ozh at planetozh.com> wrote:
> Guys,
>
> Does anyone have a simple way of testing theme (de)activation, just
> like the 'activate_pluginname' hook?
>
> --
> http://planetOzh.com ~ Blog and WordPress Stuff
> http://FrenchFragFactory.net ~ Daily Quake News
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list