filtrod 3.5.0
wp_editor_set_quality
Opis — z kodu źródłowego
Filters the default image compression quality setting.
Applies only during initial editor instantiation, or when set_quality() is run manually without the $quality argument.
The WP_Image_Editor::set_quality() method has priority over the filter.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$quality | int | Quality level between 1 (low) and 100 (high). |
$mime_type | string | Image mime type. |
$size | array | { Dimensions of the image. @type int $width The image width. @type int $height The image height. } |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_editor_set_quality', '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( 'wp_editor_set_quality', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii