mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Move network only status check out of foreach. See #15318
git-svn-id: https://develop.svn.wordpress.org/trunk@16346 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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'] )
|
||||
|
||||
Reference in New Issue
Block a user