WP HOOKS
filtrod 2.6.0

get_image_tag_class

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

Opis — z kodu źródłowego

Filters the value of the attachment's image tag class attribute.

Parametry

ParametrTypOpis
$classstringCSS class name or space-separated list of classes.
$idintAttachment ID.
$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_class', 'twoja_funkcja', 10, 4 );

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

Popularne w tej kategorii