函数原型
rest_cookie_collect_status()
函数描述
Collects cookie authentication status.
是否弃用
未弃用
函数参数
无
函数返回值
无
函数位置
File: wp-includes/rest-api.php.
函数源码
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;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |

