filtrod 4.6.0
get_canonical_url
Opis — z kodu źródłowego
Filters the canonical URL for a post.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$canonical_url | string | The post's canonical URL. |
$post | \WP_Post | Post object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_canonical_url', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_canonical_url', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii