From c6354d6bfd9b6511644b4784bcb69c430a28ee5c Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 22 Oct 2015 19:55:30 +0000 Subject: [PATCH] Plugins: after [35151], set default `$restrict_network_*` values to prevent notices. Props johnjamesjacoby. Fixes #20104. git-svn-id: https://develop.svn.wordpress.org/trunk@35361 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-plugins-list-table.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index 3a51d177f7..43dcc6ea5a 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -503,6 +503,10 @@ class WP_Plugins_List_Table extends WP_List_Table { 'delete' => '', ); + // Do not restrict by default + $restrict_network_active = false; + $restrict_network_only = false; + if ( 'mustuse' === $context ) { $is_active = true; } elseif ( 'dropins' === $context ) { @@ -525,8 +529,6 @@ class WP_Plugins_List_Table extends WP_List_Table { } else { if ( $screen->in_admin( 'network' ) ) { $is_active = is_plugin_active_for_network( $plugin_file ); - $restrict_network_active = false; - $restrict_network_only = false; } else { $is_active = is_plugin_active( $plugin_file ); $restrict_network_active = ( is_multisite() && is_plugin_active_for_network( $plugin_file ) );