WP HOOKS
filtrod 4.4.0

embed_thumbnail_image_shape

Args 2Plik wp-includes/theme-compat/embed-content.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the thumbnail shape for use in the embed template.

Rectangular images are shown above the title while square images are shown next to the content.

Parametry

ParametrTypOpis
$shapestringThumbnail image shape. Either 'rectangular' or 'square'.
$thumbnail_idintAttachment ID.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'embed_thumbnail_image_shape', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii