Don't include Network Only plugins in the site admin plugin counts. props PeteMall, fixes #15502.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-11-20 01:23:44 +00:00
parent 1310eaa966
commit 9576fc93bf
1 changed files with 3 additions and 2 deletions

View File

@ -84,9 +84,10 @@ class WP_Plugins_List_Table extends WP_List_Table {
foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
// Filter into individual sections
if ( is_plugin_active_for_network($plugin_file) && !$screen->is_network ) {
if ( is_multisite() && is_network_only_plugin( $plugin_file ) && !$screen->is_network ) {
unset( $plugins['all'][ $plugin_file] );
} elseif ( is_plugin_active_for_network($plugin_file) && !$screen->is_network ) {
unset( $plugins['all'][ $plugin_file ] );
continue;
} elseif ( is_multisite() && is_network_only_plugin( $plugin_file ) && !current_user_can( 'manage_network_plugins' ) ) {
$plugins['network'][ $plugin_file ] = $plugin_data;
} elseif ( ( !$screen->is_network && is_plugin_active( $plugin_file ) )