[wp-hackers] Leaving no trace in plugins
mpretty at voceconnect.com
Mon Jun 28 12:16:43 UTC 2010
Thanks for that, guys. I'm embarrassed that I missed this before.
On 6/28/10 8:07 AM, Stephen Rider wrote:
> To consolidate the other two responses:
> There are two things already implemented, register_uninstall_hook() and uninstall.php.
> The first hook registers code to run when a plugin is deleted (not deactivated) through the plugins page GUI.
> Second, if your plugin directory contains an uninstall.php file, it will be loaded when your plugin is deleted.
> Two different ways of doing the same thing, basically.
> Some plugins do (incorrectly, IMO) remove their own data when deactivated, but this is not official best practice.
> On Jun 27, 2010, at 10:03 PM, Michael Pretty wrote:
>> I've seen a lot of discussions on the list mentioning to leave no trace when your plugin is deactivated by removing any options the plugin may have added to the options table. The problem with doing this is that users may deactivate a plugin for reasons other than removing it permanently
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers