Skip to content

Commit b55b935

Browse files
Coding Standards: Remove unused $key variable in wp-admin/network/sites.php.
Rename `$val` to `$site_id` for clarity. Follow-up to [12603], [18562], [30020]. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55676 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 87154ab commit b55b935

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/wp-admin/network/sites.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@
181181
if ( isset( $_POST['action'] ) && isset( $_POST['allblogs'] ) ) {
182182
$doaction = $_POST['action'];
183183

184-
foreach ( (array) $_POST['allblogs'] as $key => $val ) {
185-
if ( '0' != $val && ! is_main_site( $val ) ) {
184+
foreach ( (array) $_POST['allblogs'] as $site_id ) {
185+
if ( '0' != $site_id && ! is_main_site( $site_id ) ) {
186186
switch ( $doaction ) {
187187
case 'delete':
188188
require_once ABSPATH . 'wp-admin/admin-header.php';
@@ -217,7 +217,7 @@
217217
case 'spam':
218218
case 'notspam':
219219
$updated_action = ( 'spam' === $doaction ) ? 'all_spam' : 'all_notspam';
220-
update_blog_status( $val, 'spam', ( 'spam' === $doaction ) ? '1' : '0' );
220+
update_blog_status( $site_id, 'spam', ( 'spam' === $doaction ) ? '1' : '0' );
221221
break;
222222
}
223223
} else {

0 commit comments

Comments
 (0)