wp_logout
Fires after a user is logged out.
Usage
add_action( 'wp_logout', 'wp_kama_logout_action' );
/**
* Function for `wp_logout` action-hook.
*
* @param int $user_id ID of the user that was logged out.
*
* @return void
*/
function wp_kama_logout_action( $user_id ){
// action...
}
- $user_id(int)
- ID of the user that was logged out.
Changelog
| Since 1.5.0 | Introduced. |
| Since 5.5.0 | Added the $user_id parameter. |
Where the hook is called
wp_logout
wp-includes/pluggable.php 759
do_action( 'wp_logout', $user_id );
Where the hook is used in WordPress
wp-includes/class-wp-recovery-mode.php 95
add_action( 'wp_logout', array( $this, 'exit_recovery_mode' ) );