filtrod 2.5.0
editor_max_image_size
Opis — z kodu źródłowego
Filters the maximum image size dimensions for the editor.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$max_image_size | int[] | { An array of width and height values. @type int $0 The maximum width in pixels. @type int $1 The maximum height in pixels. } |
$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). |
$context | string | The context the image is being resized for. Possible values are 'display' (like in a theme) or 'edit' (like inserting into an editor). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'editor_max_image_size', '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( 'editor_max_image_size', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii