wp_verify_nonce_failed
Fires when nonce verification fails.
Description
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.
- // run the action
- do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token );
- The following example is for adding a hook callback.
- // define the wp_verify_nonce_failed callback
- function action_wp_verify_nonce_failed( $nonce, $action, $user, $token ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'wp_verify_nonce_failed', 'action_wp_verify_nonce_failed', 10, 4 );
- To remove a hook callback, use the example below.
- // remove the action
- 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
- do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token );