Filter hook 'show_network_active_plugins'

in WP Core File wp-admin/includes/class-wp-plugins-list-table.php at line 179

View Source

show_network_active_plugins

Filter Hook
Description
Filters whether to display network-active plugins alongside plugins active for the current site. 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.

Hook Information

File Location wp-admin/includes/class-wp-plugins-list-table.php View on GitHub
Hook Type Filter
Line Number 179

Hook Parameters

Type Name Description
bool $show Whether to show network-active plugins. Default is whether the current user can manage network plugins (ie. a Super Admin).

Usage Examples

Basic Usage
<?php
// Hook into show_network_active_plugins
add_filter('show_network_active_plugins', 'my_custom_filter', 10, 1);

function my_custom_filter($show) {
    // Your custom filtering logic here
    return $show;
}

Source Code Context

wp-admin/includes/class-wp-plugins-list-table.php:179 - How this hook is used in WordPress core
<?php
 174  			 * @since 4.4.0
 175  			 *
 176  			 * @param bool $show Whether to show network-active plugins. Default is whether the current
 177  			 *                   user can manage network plugins (ie. a Super Admin).
 178  			 */
 179  			$show_network_active = apply_filters( 'show_network_active_plugins', $show );
 180  		}
 181  
 182  		if ( $screen->in_admin( 'network' ) ) {
 183  			$recently_activated = get_site_option( 'recently_activated', array() );
 184  		} else {

PHP Documentation

<?php
/**
			 * Filters whether to display network-active plugins alongside plugins active for the current site.
			 *
			 * 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.
			 *
			 * @since 4.4.0
			 *
			 * @param bool $show Whether to show network-active plugins. Default is whether the current
			 *                   user can manage network plugins (ie. a Super Admin).
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/class-wp-plugins-list-table.php
Related Hooks

Related hooks will be displayed here in future updates.