Make WordPress Core


Ignore:
Timestamp:
07/05/2020 10:55:18 AM (6 years ago)
Author:
ocean90
Message:

Users: Pass the WP_User object to the wpmu_delete_user, delete_user, and deleted_user actions.

See #43232.

File:
1 edited

Legend:

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

    r48197 r48313  
    161161     *
    162162     * @since MU (3.0.0)
    163      *
    164      * @param int $id ID of the user about to be deleted from the network.
     163     * @since 5.5.0 Added the `$user` parameter.
     164     *
     165     * @param int     $id   ID of the user about to be deleted from the network.
     166     * @param WP_User $user WP_User object of the user about to be deleted from the network.
    165167     */
    166     do_action( 'wpmu_delete_user', $id );
     168    do_action( 'wpmu_delete_user', $id, $user );
    167169
    168170    $blogs = get_blogs_of_user( $id );
     
    201203
    202204    /** This action is documented in wp-admin/includes/user.php */
    203     do_action( 'deleted_user', $id, null );
     205    do_action( 'deleted_user', $id, null, $user );
    204206
    205207    return true;
Note: See TracChangeset for help on using the changeset viewer.