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
檢視更多 >