Only show network-only plugins in the network admin. props SergeyBiryukov. see #21187, for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@21700 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-09-03 19:42:31 +00:00
parent 1cf2f96b3c
commit 9a4bba9390

View File

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