filtrod 5.8.0
image_editor_output_format
Opis — z kodu źródłowego
Filters the image editor output format mapping.
Enables filtering the mime type used to save images. By default HEIC/HEIF images are converted to JPEGs.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$output_format | string[] | { An array of mime type mappings. Maps a source mime type to a new destination mime type. By default maps HEIC/HEIF input to JPEG output. @type string ...$0 The new mime type. } |
$filename | string | Path to the image. |
$mime_type | string | The source image mime type. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'image_editor_output_format', '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_editor_output_format', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii