filtrod 3.0.0
pre_post_link
Opis — z kodu źródłowego
Filters the permalink structure for a post before token replacement occurs.
Only applies to posts with post_type of 'post'.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$permalink | string | The site's permalink structure. |
$post | \WP_Post | The post in question. |
$leavename | bool | Whether to keep the post name. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_post_link', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_post_link', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii