apply_filters( ‘nonce_life’, int $lifespan, string|int $action )

In this article

Filters the lifespan of nonces in seconds.

Parameters

$lifespanint
Lifespan of nonces in seconds. Default 86,400 seconds, or one day.
$actionstring|int
The nonce action, or -1 if none was provided.

Source

$nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS, $action );

Changelog

VersionDescription
6.1.0Added $action argument to allow for more targeted filters.
2.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.