Core Function
View Source on Trac ↗ wp_verify_nonce()
wp_verify_nonce( mixed $nonce, mixed $action = -1 ) Verifies that a correct security nonce was used with time limit.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $nonce string | Nonce value that was used for verification, usually via a form field. Required |
| (string | | int) $action Should give context to what is taking place and be the same when nonce was created. Required |
Return Value
((int)
(int | false) 1 if the nonce is valid and generated between 0-12 hours ago,
2 if the nonce is valid and generated between 12-24 hours ago.
False if the nonce is invalid.
Function Information
Since Version
2.0.3
Source File
wp-includes/pluggable.php
Advertisement