mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Add 'wp_verify_nonce_failed' action that fires when nonce verification fails.
props johnbillion, garza, Shelob9. fixes #24030. git-svn-id: https://develop.svn.wordpress.org/trunk@33744 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1812,6 +1812,18 @@ function wp_verify_nonce( $nonce, $action = -1 ) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires when nonce verification fails.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param string $nonce The invalid nonce.
|
||||
* @param string|int $action The nonce action.
|
||||
* @param WP_User $user The current user object.
|
||||
* @param string $token The user's session token.
|
||||
*/
|
||||
do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token );
|
||||
|
||||
// Invalid nonce
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user