nonce_life WordPress Filter Hook
The nonce_life hook is used to set the number of seconds that a nonce will be valid for. By default, nonces are only valid for 24 hours. This hook can be used to change the expiration time of a nonce. This hook is useful for tasks that need to be completed within a certain timeframe. For example, if you need to give a user 24 hours to complete a task, you can use this hook to set the expiration time of the nonce to 24 hours.
apply_filters( 'nonce_life', int $lifespan ) #
Filters the lifespan of nonces in seconds.
Parameters
- $lifespan
(int)Lifespan of nonces in seconds. Default 86,400 seconds, or one day.
Source
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |