wp_get_session_token() – Retrieve the current session token from the logged_in cookie.

You appear to be a bot. Output may be restricted

Description

Retrieves the current session token from the logged_in cookie.

Usage

$string = wp_get_session_token();

Parameters

Returns

string Token.

Source

File name: wordpress/wp-includes/user.php
Lines:

1 to 4 of 4
function wp_get_session_token() {
  $cookie = wp_parse_auth_cookie( '', 'logged_in' );
  return ! empty( $cookie['token'] ) ? $cookie['token'] : '';
}
 

 View on GitHub View on Trac