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



rest_cookie_collect_status › WordPress Function

Since4.4.0
已弃用n/a
rest_cookie_collect_status ( 没有参数 )
查看:
定义在:
文档:

Collects cookie authentication status.

Collects errors from wp_validate_auth_cookie for use by rest_cookie_check_errors.


源码

function rest_cookie_collect_status() {
	global $wp_rest_auth_cookie;

	$status_type = current_action();

	if ( 'auth_cookie_valid' !== $status_type ) {
		$wp_rest_auth_cookie = substr( $status_type, 12 );
		return;
	}

	$wp_rest_auth_cookie = true;
}