wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_get_session_token › WordPress Function

Since4.0.0
已弃用n/a
wp_get_session_token ( 没有参数 )
返回:
  • (string) Token.
定义在:
文档:

Retrieves the current session token from the logged_in cookie.



源码

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