filtrod 3.4.0
image_resize_dimensions
Opis — z kodu źródłowego
Filters whether to preempt calculating the image resize dimensions.
Returning a non-null value from the filter will effectively short-circuit image_resize_dimensions(), returning that value instead.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$null | null | mixed | Whether to preempt output of the resize dimensions. |
$orig_w | int | Original width in pixels. |
$orig_h | int | Original height in pixels. |
$dest_w | int | New width in pixels. |
$dest_h | int | New height in pixels. |
$crop | bool | array | Whether to crop image to specified width and height or resize. An array can specify positioning of the crop area. Default false. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'image_resize_dimensions', 'twoja_funkcja', 10, 6 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5, $param_6) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'image_resize_dimensions', 'twoja_funkcja', 10, 6 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5, $param_6) {
// Twój kod
}Popularne w tej kategorii