[wp-hackers] Plugin deactivation
Ryan Boren
ryan at boren.nu
Mon Jul 4 01:18:46 GMT 2005
On Sun, 2005-07-03 at 20:52 -0400, Scott Merrill wrote:
> Terrence Wood wrote:
> > Is there any way for a plugin to determine when it's deactivated so it
> > can run some cleanup code?
> >
> > I am testing a plugin that modifies .htaccess, and would like to remove
> > some rewrite rules if the plugin is deactivated.
>
> Ticket 1052 was filed in early March:
> http://trac.wordpress.org/ticket/1052
>
> I see no reason not to add hooks for plugin_activated
> plugin_deactivated. The hooks could even take as options the name of
> the plugin being (de-)activated.
That method won't work. We'll probably need to use something like the
register_activation_hook(), register_deactivation_hook() stuff I
proposed during the thread on overriding core functions. We pushed that
aside because we decided to go with the simpler pluggable-functions.php
method for 1.5.1. Maybe now is the time to investigate it again.
Ryan
More information about the wp-hackers
mailing list