[wp-hackers] Uninstall Handling

Ken Brucker Ken at pumastudios.com
Fri Apr 8 22:35:52 UTC 2011


That's a good option.  I was trying to leverage the support already in place in WP as documented here:

Feels like re-inventing the wheel to have to put an 'uninstall' option into the plugin options page.  Core will almost do what is needed and other authors that do use the documented method fall into the same trap.  If the admin doesn't want to, or can't, supply FTP login information it's not possible to get to the uninstall handling built into the plugin.  This seems like a design flaw.

ps.  Just so happens I posted an answer to a question of yours on stackexchange re: WP Rewrite right before reading your response below.  :)

On Apr 8, 2011, at 5:15 PM, Eric Mann wrote:

> Ken,
> In the past, I've seen developers place an "Uninstall" link on the plugins
> page for their plugin.  Then they bind any uninstall scripts to this link
> and also deactivate the plugin at the same time.
> Is that the kind of setup you're looking for?  I'm not sure what else you're
> trying to accomplish or how you're trying to do it.
> On Fri, Apr 8, 2011 at 2:54 PM, Ken Brucker <Ken at pumastudios.com> wrote:
>> Hi all - been lurking for a while, first time asking a question here.
>> I'm trying to cleanup a bunch of stuff that gets put into the database
>> related to a plugin I'm writing but am stymied by the flow in
>> delete_plugins().  I've got my uninstall.php file setup and have found that
>> unless I provide FTP login information during the Delete operation I can't
>> get to the point that the uninstall script will run.
>> Should I open a bug in the tracker to have the delete_plugins() flow
>> improved to allow the uninstall process to run separate from the file
>> deletion?  I really want to clean the database and don't want (or need) WP
>> to go do the actual file deletion.
>> And any thoughts on how to get my uninstall to run given the current state
>> of the logic?
>> I don't want to do the cleanup when the plugin is deactivated since there
>> are many reasons to deactivate on a temporary basis.
>> -- Ken
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> 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