filtrod 4.5.0
wp_calculate_image_srcset_meta
Opis — z kodu źródłowego
Pre-filters the image meta to be able to fix inconsistencies in the stored data.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$image_meta | array | The image meta data as returned by 'wp_get_attachment_metadata()'. |
$size_array | int[] | { An array of requested width and height values. @type int $0 The width in pixels. @type int $1 The height in pixels. } |
$image_src | string | The 'src' of the image. |
$attachment_id | int | The 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
}
// 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