Uses
| Uses | Description |
|---|---|
| wp-includes/pluggable.php: nonce_life | Filters the lifespan of nonces in seconds. |
| wp-includes/plugin.php: apply_filters() | Calls the callback functions that have been added to a filter hook. |
Returns the time-dependent variable for nonce creation.
A nonce has a lifespan of two ticks. Nonces in their second tick may be updated, e.g. by autosave.
(float) Float value rounded up to the next highest integer.
File: wp-includes/pluggable.php
function wp_nonce_tick() {
/**
* Filters the lifespan of nonces in seconds.
*
* @since 2.5.0
*
* @param int $lifespan Lifespan of nonces in seconds. Default 86,400 seconds, or one day.
*/
$nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS );
return ceil( time() / ( $nonce_life / 2 ) );
} | Version | Description |
|---|---|
| 2.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_nonce_tick