Opened 15 years ago
Closed 15 years ago
#11850 closed enhancement (fixed)
Add plugin uninstaller notification text
Reported by: | cyberhobo | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Plugins | Keywords: | has-patch tested commit |
Focuses: | Cc: |
Description
I'd like to see some indication in the plugin delete interface that a plugin has an uninstaller, and so will probably delete its data.
This is similar to issue #8783, but instead of proposing any new functionality, I just want to add some display information. I also have a patch.
The scenario that concerns me is this: a user has a plugin zip and wants to upgrade a plugin. They're not FTP savvy, so they try to use the upload interface, and get the "Destination folder already exists" message. So, they go back to the plugin listing and click "Delete" by the current plugin. It warns them that the files will be deleted, but this happens with automatic upgrades anyway, so it doesn't sound that scary. They click "Yes, delete these files", and their data is gone too...
Attachments (3)
Change History (22)
#2
@
15 years ago
- Milestone changed from Unassigned to 3.0
+1 on this.
I would replace
will also uninstall its data
with
will also delete its data
Also, I think we should open a new ticket for letting users upgrade plugins using the admin interface.
#4
@
15 years ago
The patch works. However, is_uninstallable_plugin() only works for plugins that have an uninstall.php file.
It would be good if it detected if any callbacks are registered with register_uninstall_hook().
#5
@
15 years ago
PS: Try to make patches relative to the wp root directory, not a subdirectory.
svn diff wp-admin/plugins.php
This saves a step for testers and commiters.
#6
@
15 years ago
Thanks for the tip, I've updated my patch.
I can't confirm your statement about is_uninstallable_plugin(), though. The attached plugin registers an uninstall hook. I found that if the plugin is never activated, is_uninstallable_plugin() returns false for it, and the hook is not run on deletion. After it is activated and deactivated, is_uninstallable_plugin() returns true for it and the hook is executed on deletion.
Is that a bug for a separate ticket?
#7
@
15 years ago
- Keywords tested added; dev-feedback needs-testing removed
You're right. I hadn't activated the plugin.
One last thing: I think it would be good to make the notice more well... noticeable.
I was thinking of putting that text in ( ).
#8
@
15 years ago
I wondered about that too - it's hard to compete with both STRONG and EM text already on the line. I think another STRONG doesn't hurt too much though. Updating the patch with:
'<strong>%s</strong> by <em>%s</em> (will also <strong>delete its data</strong>)'
#11
@
15 years ago
- Keywords needs-patch added; has-patch tested commit removed
Patch got stale (probably due to MU merge).
#17
@
15 years ago
This looked really good. I adjusted some of the other strings as well and got rid of the Delete Plugin(s)-type strings by adding some pluralization checks. (And poked fun at that in the changeset message.)
I concur with this! +1