WP HOOKS
filtrod 2.6.0

get_image_tag

Args 6Plik wp-includes/media.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the HTML content for the image tag.

Parametry

ParametrTypOpis
$htmlstringHTML content for the image.
$idintAttachment ID.
$altstringImage description for the alt attribute.
$titlestringImage description for the title attribute.
$alignstringPart of the class name for aligning the image.
$sizestring | int[]Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).

Wywołanie

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

function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5, $param_6) {
	// Twój kod
}

Popularne w tej kategorii