rest_cookie_check_errors
rest_cookie_check_errors ( $result )
Parameters:- (WP_Error|mixed) result Error from another authentication handler, null if we should handle it, or another value if not.
Returns:- (WP_Error|mixed|bool) WP_Error if the cookie is invalid, the $result, otherwise true.
Defined at: - Introduced in WordPress: 4.4.0
- Deprecated in WordPress: —
Description
Checks for errors when using cookie-based authentication.WordPress' built-in cookie authentication is always active
for logged in users. However, the API has to check nonces
for each request to ensure users are not vulnerable to CSRF.