[wp-hackers] A third action for plugins

Paul Menard paul at codehooligans.com
Sun Nov 25 00:02:09 GMT 2007


On Nov 24, 2007, at 5:44 PM, Andy Skelton wrote:

> I used to add links to the plugin description for stuff like
> initializing tables. Now I wonder if we should have an Uninstall
> (remove tables/options and then deactivate [and delete?] the plugin)
> button beside the Deactivate button, for plugins that are activated
> and have registered an uninstall function:
>
> add_action("uninstall-myplugin", 'myplugin_uninstall');
>
> Andy

Thats sort of what I was thinking Andy. Something on the plugin admin  
page that that user can trigger. A deactivation is just that  
deactivates the plugin or turns it off. Then another option, possibly  
a new table column, to actually uninstall the plugin thus removing any  
items from wp_options as well as any plugin specific tables. Though I  
realize it's up to the plugin author to actually implement.

Don't really have a suggestion on the mechanics for this. And really I  
know the wp_options table is keyed such that the extra rows don't  
really effect the performance. It just bugs me to have the extra bloat  
in the system.Sort of like there is no uninstall on OS X for  
applications.

Paul


More information about the wp-hackers mailing list