diff -r 34716fd837a4 -r be944660c56a wp/wp-admin/includes/class-wp-users-list-table.php
--- a/wp/wp-admin/includes/class-wp-users-list-table.php Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-admin/includes/class-wp-users-list-table.php Wed Sep 21 18:19:35 2022 +0200
@@ -54,7 +54,7 @@
$this->is_site_users = 'site-users-network' === $this->screen->id;
if ( $this->is_site_users ) {
- $this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
+ $this->site_id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
}
}
@@ -259,7 +259,7 @@
*
* @since 3.1.0
*
- * @return string[] Array of bulk action labels keyed by their action.
+ * @return array Array of bulk action labels keyed by their action.
*/
protected function get_bulk_actions() {
$actions = array();
@@ -274,6 +274,11 @@
}
}
+ // Add a password reset link to the bulk actions dropdown.
+ if ( current_user_can( 'edit_users' ) ) {
+ $actions['resetpassword'] = __( 'Send password reset' );
+ }
+
return $actions;
}
@@ -295,6 +300,7 @@
ID && current_user_can( 'edit_user', $user_object->ID ) ) {
+ $actions['resetpassword'] = "" . __( 'Send password reset' ) . '';
+ }
+
/**
* Filters the action links displayed under each user in the Users list table.
*
@@ -521,7 +531,7 @@
$classes .= ' hidden';
}
- $data = 'data-colname="' . wp_strip_all_tags( $column_display_name ) . '"';
+ $data = 'data-colname="' . esc_attr( wp_strip_all_tags( $column_display_name ) ) . '"';
$attributes = "class='$classes' $data";