Make WordPress Core


Ignore:
Timestamp:
02/23/2016 05:41:15 PM (9 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/users.php

    r36621 r36640  
    285285     *
    286286     * @since 4.0.0
     287     * @since 4.5.0 The `$userids` parameter was added.
    287288     *
    288      * @param WP_User $current_user WP_User object for the user being deleted.
     289     * @param WP_User $current_user WP_User object for the current user.
     290     * @param array   $userids      Array of IDs for users being deleted.
    289291     */
    290     do_action( 'delete_user_form', $current_user );
     292    do_action( 'delete_user_form', $current_user, $userids );
    291293    ?>
    292294    <input type="hidden" name="action" value="dodelete" />
Note: See TracChangeset for help on using the changeset viewer.