filtrod 4.4.0
max_srcset_image_width
Opis — z kodu źródłowego
Filters the maximum image width to be included in a 'srcset' attribute.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$max_width | int | The maximum image width to be included in the 'srcset'. Default '2048'. |
$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. } |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'max_srcset_image_width', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'max_srcset_image_width', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii