Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#20965 closed enhancement (duplicate)

make deleting data on register_uninstall_hook optional

Reported by: hallsofmontezuma Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: Plugins Keywords:
Focuses: Cc:


When you delete a plugin through wp-admin, and it looks for and finds an uninstall hook that deletes data, a user may not want this and may not have the technical abilities to otherwise delete the plugin if they need to temporarily, but want to keep the data.
It would be nice to have a third option, "remove this plugin and don't delete the data".

Change History (3)

#1 @hallsofmontezuma
8 years ago

  • Summary changed from Make running uninstall hook optional to make deleting data on register_uninstall_hook optional

#2 @ryanduff
8 years ago

  • Cc ryan@… added
  • Component changed from General to Plugins

What about a hook to add a checkbox on the delete confirmation page? eg. "delete all data"

The value of that would be passed to the uninstall hook and the function could proceed accordingly since some users may want to retain the data even though they're uninstalling.

Some plugins are simple where it's all in one spot, but other plugins add things to post meta, etc, and it's not as simple to export a copy for later, etc.

If the user did want to to clean up the old data they chose not to delete before, they could always re-install the plugin, then delete and check the box to remove all data.

#3 @scribu
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.