WP HOOKS
filtrod 4.5.0

wp_calculate_image_srcset_meta

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

Opis — z kodu źródłowego

Pre-filters the image meta to be able to fix inconsistencies in the stored data.

Parametry

ParametrTypOpis
$image_metaarrayThe image meta data as returned by 'wp_get_attachment_metadata()'.
$size_arrayint[]{ An array of requested width and height values. @type int $0 The width in pixels. @type int $1 The height in pixels. }
$image_srcstringThe 'src' of the image.
$attachment_idintThe image attachment ID or 0 if not supplied.

Wywołanie

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

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

Popularne w tej kategorii