[wp-hackers] Uninstall Handling

William P. Davis will.davis at gmail.com
Sat Apr 9 02:14:56 UTC 2011


I personally support this approach, actually — I think it's a bad idea to delete tables, destroy options, etc. on deactivate. What if you're just momentarily deactivating to test something — if you delete everything on deactivation you will lose everything. Instead, having a sort of "hard uninstall" that destroys all your data makes sense to me. 

will
Sent from my BlackBerry® wireless device

-----Original Message-----
From: Andrew Nacin <wp at andrewnacin.com>
Sender: wp-hackers-bounces at lists.automattic.com
Date: Fri, 8 Apr 2011 20:05:09 
To: <wp-hackers at lists.automattic.com>
Reply-To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Uninstall Handling

On Fri, Apr 8, 2011 at 8:00 PM, Ryan Bilesky <rbilesky at gmail.com> wrote:

> What I do is at the bottom of my options page for my plugins I have a
> check box, labeled 'Uninstall on Deactivation'.  When the user clicks
> that and saves the options that sets an uninstall flag in my plugin
> options.  When the user deactivates the plugin I have a deactivation
> hook that runs, that will check for that uninstall flag and if set
> will then proceed to delete all the options and stuff associated with
> my plugin.  I don't personally include any code to delete my plugin
> files, thats simple enough for them to do from the plugin manager.


I really don't understand that approach at all. You're adding an unnecessary
and inconsistent UI option rather than leveraging the consistent uninstall
process that WordPress provides plugin authors.
_______________________________________________
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