filtrod 5.9.0
post_thumbnail_url
Opis — z kodu źródłowego
Filters the post thumbnail URL.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$thumbnail_url | string | false | Post thumbnail URL or false if the post does not exist. |
$post | int | \WP_Post | null | Post ID or WP_Post object. Default is global <code>$post</code>. |
$size | string | int[] | Registered image size to retrieve the source for or a flat array of height and width dimensions. Default 'post-thumbnail'. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'post_thumbnail_url', '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( 'post_thumbnail_url', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii