我想返回登录错误消息,即使用户密钥在其权限正确。换句话说,终止登录并显示错误消息。
当我们输入错误的密码时,wordpress会显示:
There was an error authenticating your details.
ERROR: The password you entered for the username admin is incorrect. Lost your password?
。。在登录页面上。这是因为
WP_Error
返回对象。
所以我好奇的问题是:
如何获取/生成WP_Error
反对我自己回去?是阵列吗