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

git-svn-id: http://core.svn.wordpress.org/trunk@21700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-09-03 19:42:31 +00:00
parent 95de46bf19
commit 55e3541896

View File

@ -83,7 +83,9 @@ class WP_Plugins_List_Table extends WP_List_Table {
foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
// 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 ] );
} elseif ( ( ! $screen->is_network && is_plugin_active( $plugin_file ) )
|| ( $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) {