[wp-trac] [WordPress Trac] #37898: Prompt message when removing a plugin is sometimes misleading

WordPress Trac noreply at wordpress.org
Tue Sep 13 23:24:05 UTC 2016


#37898: Prompt message when removing a plugin is sometimes misleading
-------------------------------------------------+-------------------------
 Reporter:  bradt                                |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Plugins                              |  Review
 Severity:  normal                               |     Version:  4.6
 Keywords:  shiny-updates has-screenshots        |  Resolution:
  needs-patch ui-feedback ux-feedback            |     Focuses:  ui
-------------------------------------------------+-------------------------

Comment (by mordauk):

 I'd love to see
 https://developer.wordpress.org/reference/functions/is_uninstallable_plugin/
 get a filter so that plugins can override it.

 Right now the determination of whether a plugin should uninstall its data
 is far too binary. It's either "yes" or "no", there is no "maybe". A
 plugin is deemed as uninstallable by the presence of `uninstall.php`, but
 what a plugin that should be capable of uninstalling its data but the
 choice needs to be left up to the site administrator?

 It's very common for site admins to delete plugins and then immediately
 re-install the same plugin (perhaps a different version). In order to be
 good citizens, plugin authors are encouraged to cleanup after themselves
 and delete their data with uninstall.php, but what about scenarios where
 you want to give the site admin the choice of cleaning up the data?

 I don't believe determining whether data should be deleted on the simple
 presence of a file is enough. I typically offer site admins the choice of
 deleting data through a setting like this:

 [[Image(https://cldup.com/cZMyJT1xq6-3000x3000.png)]]

 And then in the `uninstall.php` only deleting the data if that option is
 checked.

 This works very well except it leaves the site admin with the misleading
 message that Brad initially mentioned. Even with the `Remove Data on
 Uninstall` option unchecked, site admins still see:
 [[Image(https://core.trac.wordpress.org/raw-
 attachment/ticket/37898/Screen%20Shot%202016-08-31%20at%204.31.05%20PM.png)]]

 If we could filter the uninstallable status for plugins, we could give an
 accurate message to site admins instead of the current, mis-leading
 message.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37898#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list