[wp-hackers] Plugin deactivation

Scott Merrill skippy at skippy.net
Mon Jul 4 03:35:43 GMT 2005

Ryan Boren wrote:
> On Sun, 2005-07-03 at 22:02 -0400, Robert Deaton wrote:
>>I agree that we need activation and deactivation hooks, and its a
>>shame that it was pushed aside for 1.5.1 because its a feature I know
>>a lot of plugin authors really would have liked to seen included. Is
>>there any chance of getting the patch attached to 1052 included in the
> Not that particular patch.  Every plugin listening for those events will
> get them and think they are activating/deactivating.  It's a broadcast
> to all plugins.  Won't work.  

If you pass the name of the plugin as a parameter to the (de)activation 
hook, couldn't plugins just pay attention as necessary?

I can envision modest automated plugin dependency chains.  For example, 
de-activating my WP-Cron plugin should also deactivate all the helper 
plugins it enables.
Yes, the helper plugins should rely on
   `if (function_exists(WP-Cron stuff) { ... }`
but they'll still be left active, cluttering the plugin list for no good 

Skimming the older proposed patch, I looks like it supports all the 
above, just as well.

skippy at skippy.net | http://skippy.net/

gpg --keyserver pgp.mit.edu --recv-keys 9CFA4B35
506C F8BB 17AE 8A05 0B49  3544 476A 7DEC 9CFA 4B35

More information about the wp-hackers mailing list