filtrod 4.4.0
rest_url
Opis — z kodu źródłowego
Filters the REST URL.
Use this filter to adjust the url returned by the get_rest_url() function.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$url | string | REST URL. |
$path | string | REST route. |
$blog_id | int | null | Blog ID. |
$scheme | string | Sanitization scheme. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_url', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_url', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii