filtrod 2.5.0
image_downsize
Opis — z kodu źródłowego
Filters whether to preempt the output of image_downsize().
Returning a truthy value from the filter will effectively short-circuit down-sizing the image, returning that value instead.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$downsize | bool | array | Whether to short-circuit the image downsize. |
$id | int | Attachment ID for image. |
$size | string | 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( 'image_downsize', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'image_downsize', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii