WP HOOKS
filtrod 5.9.0

post_thumbnail_url

Args 3Plik wp-includes/post-thumbnail-template.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the post thumbnail URL.

Parametry

ParametrTypOpis
$thumbnail_urlstring | falsePost thumbnail URL or false if the post does not exist.
$postint | \WP_Post | nullPost ID or WP_Post object. Default is global <code>$post</code>.
$sizestring | 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
}

Popularne w tej kategorii