Archived
Updates
This commit is contained in:
1 parent
70d2335bba
commit
7428b67da5
1086 files changed
+94145
-59082
No files matched your search
@@ -120,7 +120,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
* @access public
|
||||
*/
|
||||
public function no_items() {
|
||||
_e( 'No matching users were found.' );
|
||||
_e( 'No users found.' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -306,7 +306,6 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
|
||||
$editable_roles = array_keys( get_editable_roles() );
|
||||
|
||||
$style = '';
|
||||
foreach ( $this->items as $userid => $user_object ) {
|
||||
if ( count( $user_object->roles ) <= 1 ) {
|
||||
$role = reset( $user_object->roles );
|
||||
@@ -319,8 +318,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
if ( is_multisite() && empty( $user_object->allcaps ) )
|
||||
continue;
|
||||
|
||||
$style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
|
||||
echo "\n\t" . $this->single_row( $user_object, $style, $role, isset( $post_counts ) ? $post_counts[ $userid ] : 0 );
|
||||
echo "\n\t" . $this->single_row( $user_object, $style = '', $role, isset( $post_counts ) ? $post_counts[ $userid ] : 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,11 +326,13 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
* Generate HTML for a single row on the users.php admin panel.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @since 4.2.0 The `$style` argument was deprecated.
|
||||
* @access public
|
||||
*
|
||||
* @global WP_Roles $wp_roles User roles object.
|
||||
*
|
||||
* @param object $user_object The current user object.
|
||||
* @param string $style Optional. Style attributes added to the <tr> element.
|
||||
* Must be sanitized. Default empty.
|
||||
* @param string $style Deprecated. Not used.
|
||||
* @param string $role Optional. Key for the $wp_roles array. Default empty.
|
||||
* @param int $numposts Optional. Post count to display for this user. Defaults
|
||||
* to zero, as in, a new user has made zero posts.
|
||||
@@ -341,8 +341,9 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
public function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
|
||||
global $wp_roles;
|
||||
|
||||
if ( !( is_object( $user_object ) && is_a( $user_object, 'WP_User' ) ) )
|
||||
if ( ! ( $user_object instanceof WP_User ) ) {
|
||||
$user_object = get_userdata( (int) $user_object );
|
||||
}
|
||||
$user_object->filter = 'display';
|
||||
$email = $user_object->user_email;
|
||||
|
||||
@@ -386,7 +387,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
$edit .= $this->row_actions( $actions );
|
||||
|
||||
// Set up the checkbox ( because the user is editable, otherwise it's empty )
|
||||
$checkbox = '<label class="screen-reader-text" for="cb-select-' . $user_object->ID . '">' . sprintf( __( 'Select %s' ), $user_object->user_login ) . '</label>'
|
||||
$checkbox = '<label class="screen-reader-text" for="user_' . $user_object->ID . '">' . sprintf( __( 'Select %s' ), $user_object->user_login ) . '</label>'
|
||||
. "<input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' />";
|
||||
|
||||
} else {
|
||||
@@ -395,7 +396,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
$role_name = isset( $wp_roles->role_names[$role] ) ? translate_user_role( $wp_roles->role_names[$role] ) : __( 'None' );
|
||||
$avatar = get_avatar( $user_object->ID, 32 );
|
||||
|
||||
$r = "<tr id='user-$user_object->ID'$style>";
|
||||
$r = "<tr id='user-$user_object->ID'>";
|
||||
|
||||
list( $columns, $hidden ) = $this->get_column_info();
|
||||
|
||||
|
||||
Reference in new issue
Block a user