wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_get_session_token › WordPress Function

Since4.0.0
Deprecatedn/a
wp_get_session_token ( No parameters )
Returns:
  • (string) Token.
Defined at:
Codex:

Retrieves the current session token from the logged_in cookie.



Source

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