filtrod 3.0.0
post_type_link
Opis — z kodu źródłowego
Filters the permalink for a post of a custom post type.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$post_link | string | The post's permalink. |
$post | \WP_Post | The post in question. |
$leavename | bool | Whether to keep the post name. |
$sample | bool | Is it a sample permalink. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'post_type_link', '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( 'post_type_link', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii