Move network only status check out of foreach. See #15318

git-svn-id: http://svn.automattic.com/wordpress/trunk@16346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-11-13 16:25:56 +00:00
parent bdbfca56a7
commit 37f29e649e
1 changed files with 4 additions and 5 deletions

View File

@ -191,7 +191,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
function get_sortable_columns() {
return array(
'name' => 'name',
'name' => 'name',
);
}
@ -308,6 +308,9 @@ class WP_Plugins_List_Table extends WP_List_Table {
$screen = get_current_screen();
if ( is_multisite() && !$screen->is_network && in_array( $context, array( 'mustuse', 'dropins' ) ) )
return;
foreach ( $this->items as $plugin_file => $plugin_data ) {
// preorder
$actions = array(
@ -319,12 +322,8 @@ class WP_Plugins_List_Table extends WP_List_Table {
);
if ( 'mustuse' == $context ) {
if ( is_multisite() && !$screen->is_network )
continue;
$is_active = true;
} elseif ( 'dropins' == $context ) {
if ( is_multisite() && !$screen->is_network )
continue;
$dropins = _get_dropins();
$plugin_name = $plugin_file;
if ( $plugin_file != $plugin_data['Name'] )