Make WordPress Core

Opened 2 years ago

Last modified 19 months ago

#24744 new enhancement

Prevent user to activate a plugin network wide

Reported by: wpfo Owned by:
Milestone: Awaiting Review 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 (5)

comment:1 @johnbillion2 years ago

  • Keywords reporter-feedback added; needs-patch removed

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

comment:2 @nacin2 years ago

  • Type changed from defect (bug) to enhancement

comment:3 @jeremyfelt20 months ago

  • Component changed from Network Admin to Plugins

comment:4 @cfoellmann20 months 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

Last edited 20 months ago by cfoellmann (previous) (diff)

comment:5 @cfoellmann19 months ago

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

Note: See TracTickets for help on using tickets.