filtrod 4.4.0
rest_request_parameter_order
Opis — z kodu źródłowego
Filters the parameter priority order for a REST API request.
The order affects which parameters are checked when using WP_REST_Request::get_param() and family. This acts similarly to PHP's request_order setting.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$order | string[] | Array of types to check, in order of priority. |
$request | \WP_REST_Request | The request object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_request_parameter_order', '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_parameter_order', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii