wp_verify_nonce_failed

动作钩子
do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token )
参数
  • (string) $nonce The invalid nonce.
    Required:
  • (string|int) $action The nonce action.
    Required:
  • (WP_User) $user The current user object.
    Required:
  • (string) $token The user's session token.
    Required:
定义位置
相关勾子
wp_login_failedwp_mail_failedwp_is_php_version_acceptablewp_error_addedwp_refresh_nonces
相关方法
wp_verify_noncewp_nonce_fieldverify_file_md5is_wp_version_compatiblewp_get_duotone_filter_idwp_save_image_file
引入
4.4.0
弃用
-

wp_verify_nonce_failed: 这是一个WordPress钩子,它在验证一个nonce(一种用于防止某些类型的安全漏洞的令牌)失败时被触发。通常,当请求数据不安全或不可信时,将会验证nonce。如果nonce验证失败,则会触发该钩子,允许开发人员执行特定的操作,例如发送错误信息或重定向请求。

当nonce验证失败时触发。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token );
do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token );
do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token );

常见问题

FAQs
查看更多 >
闪电伯伯

(工作日 10:00 - 18:30 为您服务)

2025-11-01 22:19:47

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: