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:
parent
bdbfca56a7
commit
37f29e649e
|
@ -191,7 +191,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||||
|
|
||||||
function get_sortable_columns() {
|
function get_sortable_columns() {
|
||||||
return array(
|
return array(
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,6 +308,9 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||||
|
|
||||||
$screen = get_current_screen();
|
$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 ) {
|
foreach ( $this->items as $plugin_file => $plugin_data ) {
|
||||||
// preorder
|
// preorder
|
||||||
$actions = array(
|
$actions = array(
|
||||||
|
@ -319,12 +322,8 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( 'mustuse' == $context ) {
|
if ( 'mustuse' == $context ) {
|
||||||
if ( is_multisite() && !$screen->is_network )
|
|
||||||
continue;
|
|
||||||
$is_active = true;
|
$is_active = true;
|
||||||
} elseif ( 'dropins' == $context ) {
|
} elseif ( 'dropins' == $context ) {
|
||||||
if ( is_multisite() && !$screen->is_network )
|
|
||||||
continue;
|
|
||||||
$dropins = _get_dropins();
|
$dropins = _get_dropins();
|
||||||
$plugin_name = $plugin_file;
|
$plugin_name = $plugin_file;
|
||||||
if ( $plugin_file != $plugin_data['Name'] )
|
if ( $plugin_file != $plugin_data['Name'] )
|
||||||
|
|
Loading…
Reference in New Issue