WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/05/2020 10:55:18 AM (16 months 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/user.php

    r48115 r48313  
    359359     *
    360360     * @since 2.0.0
     361     * @since 5.5.0 Added the `$user` parameter.
    361362     *
    362363     * @param int      $id       ID of the user to delete.
    363364     * @param int|null $reassign ID of the user to reassign posts and links to.
    364365     *                           Default null, for no reassignment.
     366     * @param WP_User  $user     WP_User object of the user to delete.
    365367     */
    366     do_action( 'delete_user', $id, $reassign );
     368    do_action( 'delete_user', $id, $reassign, $user );
    367369
    368370    if ( null === $reassign ) {
     
    436438     *
    437439     * @since 2.9.0
     440     * @since 5.5.0 Added the `$user` parameter.
    438441     *
    439442     * @param int      $id       ID of the deleted user.
    440443     * @param int|null $reassign ID of the user to reassign posts and links to.
    441444     *                           Default null, for no reassignment.
     445     * @param WP_User  $user     WP_User object of the deleted user.
    442446     */
    443     do_action( 'deleted_user', $id, $reassign );
     447    do_action( 'deleted_user', $id, $reassign, $user );
    444448
    445449    return true;
Note: See TracChangeset for help on using the changeset viewer.