Opened 11 years ago
Closed 9 years ago
#24744 closed enhancement (invalid)
Prevent user to activate a plugin network wide
Reported by: | wpfo | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6 |
Component: | Plugins | Keywords: | reporter-feedback |
Focuses: | multisite | Cc: |
Description
So long we have not Settings API for network_wide activated plugins we need a way to prevent user to activate a plugin network wide.
Possible Solution:
New header in Plugin File Header: Blog
Blog - Boolean. Whether the plugin can only be activated per-site.
If true - Action link 'Network Activate' will be hiden in Network Admin Plugins Table
(problems are the bulk_actions in this approach).
We have now no way to prevent user to activate a plugin network wide.
All 'plugin_action_links' Filters work only if a plugin is already activated.
Or am I missing something?
Alternatively:
we could have only one header for all activation modes e.g.
Activation (or ActivationMode) - String
Network - plugin can only be activated network wide.
Blog - plugin can only be activated per-site.
Both - plugin can be activated network wide or per-site.
Change History (6)
#4
@
11 years ago
Wouldn't it be more consistent if we altered the "Network" header to allow
Network: false (boolean)
to disallow "Network activation"?
I could integrate this into #26925
#6
@
9 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Not a ton of people wanting this. For those who want something like this, a better solution would be to add a filter on $network_wide in activate_plugin() and then have a second plugin that does the limitations, rather than yet another plugin header, thus allowing for more fine grained control.
What's the use case for preventing a plugin from being activated network-wide?