Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_nonce_tick ›

Desde2.5.0
Obsoleton/a
wp_nonce_tick ( Sem parâmetros )
Retorna:
  • (float) Float value rounded up to the next highest integer.
Definido em:
Codex:

Get 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.



Fonte

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 ));
}