filtrod 5.1.0
has_post_thumbnail
Opis — z kodu źródłowego
Filters whether a post has a post thumbnail.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$has_thumbnail | bool | true if the post has a post thumbnail, otherwise false. |
$post | int | \WP_Post | null | Post ID or WP_Post object. Default is global <code>$post</code>. |
$thumbnail_id | int | false | Post thumbnail ID or false if the post does not exist. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'has_post_thumbnail', '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( 'has_post_thumbnail', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii