filtrod 2.3.0
redirect_canonical
Opis — z kodu źródłowego
Filters the canonical redirect URL.
Returning false to this filter will cancel the redirect.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$redirect_url | string | The redirect URL. |
$requested_url | string | The requested URL. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'redirect_canonical', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'redirect_canonical', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii