WordPress.org

Make WordPress Core

Changeset 36640


Ignore:
Timestamp:
02/23/2016 05:41:15 PM (2 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.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

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

    r36569 r36640  
    10891089    <?php
    10901090    /** This action is documented in wp-admin/users.php */
    1091     do_action( 'delete_user_form', $current_user );
     1091    do_action( 'delete_user_form', $current_user, $allusers );
    10921092
    10931093    if ( 1 == count( $users ) ) : ?>
  • 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.