diff --git a/src/wp-admin/includes/class-wp-ms-users-list-table.php b/src/wp-admin/includes/class-wp-ms-users-list-table.php index 640e23be00..be72876c36 100644 --- a/src/wp-admin/includes/class-wp-ms-users-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-users-list-table.php @@ -370,13 +370,13 @@ class WP_MS_Users_List_Table extends WP_List_Table { return; } - foreach ( $blogs as $val ) { - if ( ! can_edit_network( $val->site_id ) ) { + foreach ( $blogs as $site ) { + if ( ! can_edit_network( $site->site_id ) ) { continue; } - $path = ( '/' === $val->path ) ? '' : $val->path; - $site_classes = array( 'site-' . $val->site_id ); + $path = ( '/' === $site->path ) ? '' : $site->path; + $site_classes = array( 'site-' . $site->site_id ); /** * Filters the span class for a site listing on the mulisite user list table. * @@ -387,33 +387,33 @@ class WP_MS_Users_List_Table extends WP_List_Table { * @param int $network_id Network ID. * @param WP_User $user WP_User object. */ - $site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $val->userblog_id, $val->site_id, $user ); + $site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $site->userblog_id, $site->site_id, $user ); if ( is_array( $site_classes ) && ! empty( $site_classes ) ) { $site_classes = array_map( 'sanitize_html_class', array_unique( $site_classes ) ); echo ''; } else { echo ''; } - echo '' . str_replace( '.' . get_network()->domain, '', $val->domain . $path ) . ''; + echo '' . str_replace( '.' . get_network()->domain, '', $site->domain . $path ) . ''; echo ' '; $actions = array(); - $actions['edit'] = '' . __( 'Edit' ) . ''; + $actions['edit'] = '' . __( 'Edit' ) . ''; $class = ''; - if ( 1 === (int) $val->spam ) { + if ( 1 === (int) $site->spam ) { $class .= 'site-spammed '; } - if ( 1 === (int) $val->mature ) { + if ( 1 === (int) $site->mature ) { $class .= 'site-mature '; } - if ( 1 === (int) $val->deleted ) { + if ( 1 === (int) $site->deleted ) { $class .= 'site-deleted '; } - if ( 1 === (int) $val->archived ) { + if ( 1 === (int) $site->archived ) { $class .= 'site-archived '; } - $actions['view'] = '' . __( 'View' ) . ''; + $actions['view'] = '' . __( 'View' ) . ''; /** * Filters the action links displayed next the sites a user belongs to @@ -424,7 +424,7 @@ class WP_MS_Users_List_Table extends WP_List_Table { * @param string[] $actions An array of action links to be displayed. Default 'Edit', 'View'. * @param int $userblog_id The site ID. */ - $actions = apply_filters( 'ms_user_list_site_actions', $actions, $val->userblog_id ); + $actions = apply_filters( 'ms_user_list_site_actions', $actions, $site->userblog_id ); $action_count = count( $actions );