nonce_life
Filters the lifespan of nonces in seconds.
Использование
add_filter( 'nonce_life', 'wp_kama_nonce_life_filter' ); /** * Function for `nonce_life` filter-hook. * * @param int $lifespan Lifespan of nonces in seconds. * * @return int */ function wp_kama_nonce_life_filter( $lifespan ){ // filter... return $lifespan; }
- $lifespan(int)
- Lifespan of nonces in seconds.
По умолчанию: 86,400 seconds, or one day
Список изменений
С версии 2.5.0 | Введена. |
Где вызывается хук
nonce_life
wp-includes/pluggable.php 2239
$nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS );