HTTP/2 200
server: nginx
date: Wed, 08 Oct 2025 23:03:43 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
wp_destroy_current_session() – Function | Developer.WordPress.org
WordPress Developer Resources
wp_destroy_current_session()
wp_destroy_current_session()
Removes the current session token from the database.
function wp_destroy_current_session() {
$token = wp_get_session_token();
if ( $token ) {
$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
$manager->destroy( $token );
}
}
View all references View on Trac View on GitHub
Version | Description |
---|
4.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.