filtrod 5.2.0
wp_protected_ajax_actions
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
| Parametr | Typ | Opis |
|---|---|---|
$actions_to_protect | string[] | 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
}
// rejestracja funkcji zwrotnej
add_filter( 'wp_protected_ajax_actions', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii