Make WordPress Core

Opened 11 years ago

Closed 9 years ago

#24744 closed enhancement (invalid)

Prevent user to activate a plugin network wide

Reported by: wpfo's profile wpfo Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.6
Component: Plugins Keywords: reporter-feedback
Focuses: multisite Cc:


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?

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)

#1 @johnbillion
11 years ago

  • Keywords reporter-feedback added; needs-patch removed

What's the use case for preventing a plugin from being activated network-wide?

#2 @nacin
11 years ago

  • Type changed from defect (bug) to enhancement

#3 @jeremyfelt
10 years ago

  • Component changed from Network Admin to Plugins

#4 @cfoellmann
10 years ago

Wouldn't it be more consistent if we altered the "Network" header to allow

 Network: false (boolean)

to disallow "Network activation"?

Version 0, edited 10 years ago by cfoellmann (next)

#5 @cfoellmann
10 years ago

We could add this to #26909 since the other ticket is a duplicate.

#6 @chriscct7
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.

Note: See TracTickets for help on using tickets.