wpmu_delete_user
Fires before a user is deleted from the network.
Usage
add_action( 'wpmu_delete_user', 'wp_kama_wpmu_delete_user_action', 10, 2 ); /** * Function for `wpmu_delete_user` action-hook. * * @param int $id ID of the user about to be deleted from the network. * @param WP_User $user WP_User object of the user about to be deleted from the network. * * @return void */ function wp_kama_wpmu_delete_user_action( $id, $user ){ // action... }
- $id(int)
- ID of the user about to be deleted from the network.
- $user(WP_User)
- WP_User object of the user about to be deleted from the network.
Changelog
Since 3.0.0 | Introduced. |
Since 5.5.0 | Added the $user parameter. |
Where the hook is called
wpmu_delete_user
wp-admin/includes/ms.php 174
do_action( 'wpmu_delete_user', $id, $user );