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.


Top ↑

Source

File: wp-includes/pluggable.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More