rebase on oct-10-2023
This commit is contained in:
@@ -58,7 +58,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the current user's permissions.
|
||||
* Checks the current user's permissions.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
@@ -73,7 +73,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the users list for display.
|
||||
* Prepares the users list for display.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
@@ -150,7 +150,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Output 'no users' message.
|
||||
* Outputs 'no users' message.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*/
|
||||
@@ -159,7 +159,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an associative array listing all the views that can be used
|
||||
* Returns an associative array listing all the views that can be used
|
||||
* with this table.
|
||||
*
|
||||
* Provides a list of roles and user count for that role for easy
|
||||
@@ -262,7 +262,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve an associative array of bulk actions available on this table.
|
||||
* Retrieves an associative array of bulk actions available on this table.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
@@ -290,7 +290,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the controls to allow user roles to be changed in bulk.
|
||||
* Outputs the controls to allow user roles to be changed in bulk.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
@@ -343,7 +343,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Capture the bulk action required, and return it.
|
||||
* Captures the bulk action required, and return it.
|
||||
*
|
||||
* Overridden from the base class implementation to capture
|
||||
* the role change drop-down.
|
||||
@@ -353,7 +353,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
* @return string The bulk action required.
|
||||
*/
|
||||
public function current_action() {
|
||||
if ( isset( $_REQUEST['changeit'] ) && ! empty( $_REQUEST['new_role'] ) ) {
|
||||
if ( isset( $_REQUEST['changeit'] ) ) {
|
||||
return 'promote';
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of columns for the list table.
|
||||
* Gets a list of columns for the list table.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
@@ -385,7 +385,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of sortable columns for the list table.
|
||||
* Gets a list of sortable columns for the list table.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
@@ -393,15 +393,15 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
*/
|
||||
protected function get_sortable_columns() {
|
||||
$columns = array(
|
||||
'username' => 'login',
|
||||
'email' => 'email',
|
||||
'username' => array( 'login', false, __( 'Username' ), __( 'Table ordered by Username.' ), 'asc' ),
|
||||
'email' => array( 'email', false, __( 'E-mail' ), __( 'Table ordered by E-mail.' ) ),
|
||||
);
|
||||
|
||||
return $columns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the list table rows.
|
||||
* Generates the list table rows.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*/
|
||||
@@ -417,7 +417,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate HTML for a single row on the users.php admin panel.
|
||||
* Generates HTML for a single row on the users.php admin panel.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @since 4.2.0 The `$style` parameter was deprecated.
|
||||
@@ -502,6 +502,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
// Add a link to send the user a reset password link by email.
|
||||
if ( get_current_user_id() !== $user_object->ID
|
||||
&& current_user_can( 'edit_user', $user_object->ID )
|
||||
&& true === wp_is_password_reset_allowed_for_user( $user_object )
|
||||
) {
|
||||
$actions['resetpassword'] = "<a class='resetpassword' href='" . wp_nonce_url( "users.php?action=resetpassword&users=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Send password reset' ) . '</a>';
|
||||
}
|
||||
@@ -523,7 +524,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
|
||||
// Set up the checkbox (because the user is editable, otherwise it's empty).
|
||||
$checkbox = sprintf(
|
||||
'<label class="screen-reader-text" for="user_%1$s">%2$s</label>' .
|
||||
'<label class="label-covers-full-cell" for="user_%1$s"><span class="screen-reader-text">%2$s</span></label>' .
|
||||
'<input type="checkbox" name="users[]" id="user_%1$s" class="%3$s" value="%1$s" />',
|
||||
$user_object->ID,
|
||||
/* translators: Hidden accessibility text. %s: User login. */
|
||||
|
||||
Reference in New Issue
Block a user