Users List Table: after [34963], remove unused code/add doc for global import.
See #22959. git-svn-id: https://develop.svn.wordpress.org/trunk@35011 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b98303ae58
commit
aa9b423cf4
@ -374,8 +374,6 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
* @return string Output for a single row.
|
||||
*/
|
||||
public function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
|
||||
$wp_roles = wp_roles();
|
||||
|
||||
if ( ! ( $user_object instanceof WP_User ) ) {
|
||||
$user_object = get_userdata( (int) $user_object );
|
||||
}
|
||||
@ -431,7 +429,6 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
} else {
|
||||
$edit = '<strong>' . $user_object->user_login . '</strong>';
|
||||
}
|
||||
$role_name = isset( $wp_roles->role_names[$role] ) ? translate_user_role( $wp_roles->role_names[$role] ) : __( 'None' );
|
||||
$avatar = get_avatar( $user_object->ID, 32 );
|
||||
|
||||
// Comma-separated list of user roles.
|
||||
@ -527,6 +524,8 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
* @since 4.4.0
|
||||
* @access protected
|
||||
*
|
||||
* @global WP_Roles $wp_roles WP_Roles instance.
|
||||
*
|
||||
* @param WP_User $user_object The WP_User object.
|
||||
* @return array An array of user roles.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user