WP HOOKS
filtrod 3.5.0

wp_save_image_editor_file

Args 5Plik wp-admin/includes/image-edit.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters whether to skip saving the image file.

Returning a non-null value will short-circuit the save method, returning that value instead.

Parametry

ParametrTypOpis
$overridebool | nullValue to return instead of saving. Default null.
$filenamestringName of the file to be saved.
$image\WP_Image_EditorThe image editor instance.
$mime_typestringThe mime type of the image.
$post_idintAttachment post ID.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_save_image_editor_file', 'twoja_funkcja', 10, 5 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
	// Twój kod
}

Popularne w tej kategorii