diff --git wp-admin/includes/class-wp-users-list-table.php wp-admin/includes/class-wp-users-list-table.php
index 09cb215..00b1ba0 100644
|
|
|
class WP_Users_List_Table extends WP_List_Table { |
| 193 | 193 | |
| 194 | 194 | $style = ''; |
| 195 | 195 | foreach ( $this->items as $userid => $user_object ) { |
| 196 | | $role = reset( $user_object->roles ); |
| 197 | | |
| 198 | | if ( is_multisite() && empty( $role ) ) |
| 199 | | continue; |
| 200 | | |
| 201 | 196 | $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; |
| 202 | | echo "\n\t", $this->single_row( $user_object, $style, $role, isset( $post_counts ) ? $post_counts[ $userid ] : 0 ); |
| | 197 | echo "\n\t"; |
| | 198 | echo $this->single_row( $user_object, $style, isset( $post_counts ) ? $post_counts[ $userid ] : 0 ); |
| 203 | 199 | } |
| 204 | 200 | } |
| 205 | 201 | |
| … |
… |
class WP_Users_List_Table extends WP_List_Table { |
| 210 | 206 | * |
| 211 | 207 | * @param object $user_object |
| 212 | 208 | * @param string $style Optional. Attributes added to the TR element. Must be sanitized. |
| 213 | | * @param string $role Key for the $wp_roles array. |
| 214 | 209 | * @param int $numposts Optional. Post count to display for this user. Defaults to zero, as in, a new user has made zero posts. |
| 215 | 210 | * @return string |
| 216 | 211 | */ |
| 217 | | function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) { |
| | 212 | function single_row( $user_object, $style = '', $numposts = 0 ) { |
| 218 | 213 | global $wp_roles; |
| 219 | 214 | |
| 220 | 215 | if ( !( is_object( $user_object ) && is_a( $user_object, 'WP_User' ) ) ) |
| 221 | 216 | $user_object = new WP_User( (int) $user_object ); |
| 222 | 217 | $user_object->filter = 'display'; |
| | 218 | |
| 223 | 219 | $email = $user_object->user_email; |
| 224 | 220 | |
| | 221 | if ( !empty( $user_object->roles ) ) |
| | 222 | $role = reset( $user_object->roles ); |
| | 223 | else |
| | 224 | $role = ''; |
| | 225 | |
| 225 | 226 | if ( $this->is_site_users ) |
| 226 | 227 | $url = "site-users.php?id={$this->site_id}&"; |
| 227 | 228 | else |