show_network_active_plugins
Filters whether to display network-active plugins alongside plugins active for the current site.
Description
This also controls the display of inactive network-only plugins (plugins with "Network: true" in the plugin header).
Plugins cannot be network-activated or network-deactivated from this screen.
Parameters (1)
- 0. $show (bool)
- Whether to show network-active plugins. Default is whether the current user can manage network plugins (ie. a Super Admin).
Usage
- To run the hook, copy the example below.
- $show = apply_filters( 'show_network_active_plugins', $show );
- if ( !empty( $show ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the show_network_active_plugins callback
- function filter_show_network_active_plugins( $show ) {
- // make filter magic happen here...
- return $show;
- };
- // add the filter
- add_filter( 'show_network_active_plugins', 'filter_show_network_active_plugins', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'show_network_active_plugins', 'filter_show_network_active_plugins', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-admin/includes/class-wp-plugins-list-table.php
- $show_network_active = apply_filters( 'show_network_active_plugins', $show );