WP HOOKS
filtrod 5.2.0

wp_protected_ajax_actions

Args 1Plik wp-includes/load.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the array of protected Ajax actions.

This filter is only fired when doing Ajax and the Ajax request has an 'action' property.

Parametry

ParametrTypOpis
$actions_to_protectstring[]Array of strings with Ajax actions to protect.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'wp_protected_ajax_actions', 'twoja_funkcja' );

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

Popularne w tej kategorii