#12139 closed enhancement (fixed)
Deprecate Site Wide Only: true in favor of Network: true
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Plugins | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
1- Currently network only plugins are recognized by
Site Wide Only: true
We should add support for network only so site wide only can be deprecated in a future version.
Network Only: true
2-When activated, network only plugins are added to the active plugins list on the blog/site and the network meta active_sitewide_plugins. If the plugin file is missing, it is removed from the active plugins but left in the active sitewide plugins. Until the plugin file is restored and deactivated, the super admin has an error message on the plugins screen whenever they visit it:
The plugin 1265383606 has been deactivated due to an error: Plugin file does not exist.
(Note also that is a timestamp vs the plugin name.)
When a network plugin is activated, it does not need to be added to the active plugins list on the site/blog.
Attachments (4)
Change History (16)
#2
@
15 years ago
Semantically, should there be a difference between Network and Site Wide?
A plugin that is "Site Wide: Only" can be installed sitewide, or !is_multisite(). But a "Network Only" plugin seems to connotate that the plugin can be only run when the Network feature is on, and cannot be run when !is_multisite().
I'm not sure if there should be a difference or needs to be a distinction. I just wanted to point that out.
Also, I'm looking into part 2. validate_active_plugins() and deactivate_plugins() need some tweaks it looks like.
#3
@
15 years ago
"Network Wide" would be a better choice re: terminology without changing behavior.
Do we want the ability for a plugin to say, "Sorry, I can only run when is_multisite()"? In that case, "Network: Required" sounds like a good header.
#6
@
15 years ago
- Milestone changed from 3.0 to Future Release
- Summary changed from Network plugins do not deactivate correctly when plugin file is missing to Deprecate Site Wide Only: true in favor of Network: true
- Type changed from defect (bug) to enhancement
Keeping this for a future release to deprecate Site Wide Only.
#7
@
15 years ago
- Milestone changed from Future Release to 3.0
Patch three incorporates a _deprecated_argument() call. It only triggers when Network is missing AND Site Wide Only exists. A plugin author that includes both trying to cover the bases or maintain compat (even though he shouldn't need to do either) is probably aware of what he's doing.
_deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The <code>%1$s</code> plugin header is deprecated. Use <code>%2$s</code> instead.' ), 'Site Wide Only: true', 'Network: true' ) );
Moving back to 3.0, I guess. Should be handled now or never.
@
15 years ago
Missing is_multisite() check prevented a Network plugin on a single blog install from having an Activate link.
#10
@
15 years ago
- Keywords has-patch added
- Resolution fixed deleted
- Status changed from closed to reopened
A missing is_multisite() check prevents a Network plugin on a single blog install from having an Activate link. 12139.4.diff
(In [12970]) add support for network only to identify network plugins, see #12139