WP HOOKS
filtrod 5.8.0

image_editor_output_format

Args 3Plik wp-includes/media.phpDokumentacja WP ↗

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

ParametrTypOpis
$output_formatstring[]{ 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. }
$filenamestringPath to the image.
$mime_typestringThe 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
}

Popularne w tej kategorii