记录当前用户。
原型
wp_logout()
源文件
路径:wp-includes/pluggable.php
<?php
...
function wp_logout() {
wp_destroy_current_session();
wp_clear_auth_cookie();
/**
* Fires after a user is logged-out.
*
* @since 1.5.0
*/
do_action( 'wp_logout' );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/wp_logout/