Opened 20 years ago
Closed 19 years ago
#1052 closed enhancement (wontfix)
Plugin Activation/Deactivation action
Reported by: | jcumberland | Owned by: | skippy |
---|---|---|---|
Milestone: | Priority: | lowest | |
Severity: | normal | Version: | 1.5 |
Component: | Administration | Keywords: | bg|dev-feedback |
Focuses: | Cc: |
Description
Add actions to plugins.php to call local activation and deactivation functions, allowing each plugin the ability to create and destroy the necessary environment for the plugin. Attached is a diff with the changes, only two lines. The idea came up when I needed to create a table to store values.
Attachments (1)
Change History (9)
#4
@
20 years ago
Interesting concept, but of dubious merit. It would be counterintuitive to a user to deactivate a plugin and have the plugin delete all reference to itself everywhere such that the user would have to re-enter any configuration options.
On a plugin _delete_ I could certainly see some merit but even so, to my mind, it's nice for people to be able to be fluid in the plugins that they want to use and if they later want to try to use a plugin that they had been using before that the plugin will "remember" what it was that they did.
#5
@
19 years ago
- Keywords bg|2nd-opinion added
- Owner changed from anonymous to skippy
- Priority changed from normal to lowest
- Status changed from new to assigned
I agree with ColdForged that leaving plugin data lying around doesn't cause harm, and can be quite beneficial.
Are there any other instances where a hook for plugin activation or deactivation would be useful?
#6
@
19 years ago
My initial comment notwithstanding, I'd have to go with "more hooks == better". While I disagree with the intent of the original poster (destroy environment) you never know what people might have in mind for future ideas.
#7
@
19 years ago
- Keywords bg|dev-feedback added; bg|2nd-opinion removed
Yeah, there are certainly other uses for this hook. Maybe not deleting all the options (I'd leave them), but for coordination between plugins, for instance.
Passing on for dev feedback.
Whoops! I didn't take other plugins into account, my mistake.