wp_logout
Fires after a user is logged out.
Использование
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.
Список изменений
| С версии 1.5.0 | Введена. |
| С версии 5.5.0 | Added the $user_id parameter. |
Где вызывается хук
wp_logout
wp-includes/pluggable.php 755
do_action( 'wp_logout', $user_id );
Где используется хук в WordPress
wp-includes/class-wp-recovery-mode.php 95
add_action( 'wp_logout', array( $this, 'exit_recovery_mode' ) );