WP HOOKS
filtrod 3.5.0

wp_editor_set_quality

Args 3Plik wp-includes/class-wp-image-editor.phpDokumentacja WP ↗

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

ParametrTypOpis
$qualityintQuality level between 1 (low) and 100 (high).
$mime_typestringImage mime type.
$sizearray{ 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
}

Popularne w tej kategorii