Users: Pass the array of user IDs being deleted to the delete_user_form
action hook in two places.
Also updates documentation for the first parameter, `$current_user`, to clarify that it holds the `WP_User` object for the _current_ user, not the one being deleted. Props usermrpapa. Fixes #35063. git-svn-id: https://develop.svn.wordpress.org/trunk@36640 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ccaa888386
commit
66ec958a5f
@ -1088,7 +1088,7 @@ function confirm_delete_users( $users ) {
|
||||
</table>
|
||||
<?php
|
||||
/** This action is documented in wp-admin/users.php */
|
||||
do_action( 'delete_user_form', $current_user );
|
||||
do_action( 'delete_user_form', $current_user, $allusers );
|
||||
|
||||
if ( 1 == count( $users ) ) : ?>
|
||||
<p><?php _e( 'Once you hit “Confirm Deletion”, the user will be permanently removed.' ); ?></p>
|
||||
|
@ -284,10 +284,12 @@ case 'delete':
|
||||
* Fires at the end of the delete users form prior to the confirm button.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @since 4.5.0 The `$userids` parameter was added.
|
||||
*
|
||||
* @param WP_User $current_user WP_User object for the user being deleted.
|
||||
* @param WP_User $current_user WP_User object for the current user.
|
||||
* @param array $userids Array of IDs for users being deleted.
|
||||
*/
|
||||
do_action( 'delete_user_form', $current_user );
|
||||
do_action( 'delete_user_form', $current_user, $userids );
|
||||
?>
|
||||
<input type="hidden" name="action" value="dodelete" />
|
||||
<?php submit_button( __('Confirm Deletion'), 'primary' ); ?>
|
||||
|
Loading…
Reference in New Issue
Block a user