首页 WordPress函数大全 rest_cookie_check_errors()

rest_cookie_check_errors()

2020-05-02 / 2659阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

rest_cookie_check_errors( WP_Error|mixed $result )

使用基于cookie的身份验证时检查错误。

描述

WordPress的内置cookie身份验证始终对登录用户有效。但是,API必须检查每个请求的随机数,以确保用户不容易受到CSRF的攻击。

参数

$result

(WP_Error|mixed)
(Required)
Error from another authentication handler, null if we should handle it, or another value if not.

返回

(WP_Error|mixed|bool) WP_Error if the cookie is invalid, the $result, otherwise true.

大家谈论
    我的见解