WP HOOKS
akcjaod 2.1.0

check_ajax_referer

Args 2Plik wp-includes/pluggable.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires once the Ajax request has been validated or not.

Parametry

ParametrTypOpis
$actionstringThe Ajax nonce action.
$resultfalse | intFalse if the nonce is invalid, 1 if the nonce is valid and generated between 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'check_ajax_referer', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii