wp_verify_nonce_failed

Fires when nonce verification fails.

Description

do_action( 'wp_verify_nonce_failed', (string) $nonce, (string|int) $action, (WP_User) $user, (string) $token ); 

Parameters (4)

0. $nonce (string)
The invalid nonce.
1. $action (string|int)
The nonce action.
2. $user (WP_User)
The current user object.
3. $token (string)
The user's session token.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token ); 
The following example is for adding a hook callback.
  1. // define the wp_verify_nonce_failed callback 
  2. function action_wp_verify_nonce_failed( $nonce, $action, $user, $token ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'wp_verify_nonce_failed', 'action_wp_verify_nonce_failed', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'wp_verify_nonce_failed', 'action_wp_verify_nonce_failed', 10, 4 ); 

Defined (1)

The action is defined in the following location(s).

/wp-includes/pluggable.php  
  1. do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token );