wp_nonce_tick( string|int $action = -1 ): float

Returns the time-dependent variable for nonce creation.

Description

A nonce has a lifespan of two ticks. Nonces in their second tick may be updated, e.g. by autosave.

Parameters

$actionstring|intoptional
The nonce action.

Default:-1

Return

float Float value rounded up to the next highest integer.

Source

endif;

if ( ! function_exists( 'wp_nonce_tick' ) ) :
	/**
	 * 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.
	 *
	 * @since 2.5.0
	 * @since 6.1.0 Added `$action` argument.
	 *
	 * @param string|int $action Optional. The nonce action. Default -1.
	 * @return float Float value rounded up to the next highest integer.

Changelog

VersionDescription
6.1.0Added $action argument.
2.5.0Introduced.

User Contributed Notes

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