filtrod 4.5.0
rest_request_from_url
Opis — z kodu źródłowego
Filters the REST API request generated from a URL.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$request | \WP_REST_Request | false | Generated request object, or false if URL could not be parsed. |
$url | string | URL the request was generated from. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_request_from_url', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_request_from_url', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii