wp_image_editor_before_change filter-hookWP 3.5.0

Filters the WP_Image_Editor instance before applying changes to the image.

Usage

add_filter( 'wp_image_editor_before_change', 'wp_kama_image_editor_before_change_filter', 10, 2 );

/**
 * Function for `wp_image_editor_before_change` filter-hook.
 * 
 * @param WP_Image_Editor $image   WP_Image_Editor instance.
 * @param array           $changes Array of change operations.
 *
 * @return WP_Image_Editor
 */
function wp_kama_image_editor_before_change_filter( $image, $changes ){

	// filter...
	return $image;
}
$image(WP_Image_Editor)
WP_Image_Editor instance.
$changes(array)
Array of change operations.

Changelog

Since 3.5.0 Introduced.

Where the hook is called

image_edit_apply_changes()
wp_image_editor_before_change
wp-admin/includes/image-edit.php 616
$image = apply_filters( 'wp_image_editor_before_change', $image, $changes );

Where the hook is used in WordPress

Usage not found.