filtrod 4.1.0
wp_constrain_dimensions
Opis — z kodu źródłowego
Filters dimensions to constrain down-sampled images to.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$dimensions | int[] | { An array of width and height values. @type int $0 The width in pixels. @type int $1 The height in pixels. } |
$current_width | int | The current width of the image. |
$current_height | int | The current height of the image. |
$max_width | int | The maximum width permitted. |
$max_height | int | The maximum height permitted. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_constrain_dimensions', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_constrain_dimensions', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}Popularne w tej kategorii