image_edit_before_change filter-hookWP 2.9.0

Deprecated from version 3.5.0. It is no longer supported and can be removed in future releases. See wp_image_editor_before_change.

Filters the GD image resource before applying changes to the image.

Usage

add_filter( 'image_edit_before_change', 'wp_kama_image_edit_before_change_filter', 10, 3 );

/**
 * Function for `image_edit_before_change` filter-hook.
 * 
 * @param resource|GdImage $image   GD image resource or GdImage instance.
 * @param array            $changes Array of change operations.
 * @param                  $string  
 *
 * @return resource|GdImage
 */
function wp_kama_image_edit_before_change_filter( $image, $changes, $string ){

	// filter...
	return $image;
}
$image(resource|GdImage)
GD image resource or GdImage instance.
$changes(array)
Array of change operations.
$string
-

Changelog

Since 2.9.0 Introduced.
Deprecated since 3.5.0 Use {@see 'wp_image_editor_before_change'} instead.

Where the hook is called

image_edit_apply_changes()
image_edit_before_change
wp-admin/includes/image-edit.php 707
$image = apply_filters_deprecated( 'image_edit_before_change', array( $image, $changes ), '3.5.0', 'wp_image_editor_before_change' );

Where the hook is used in WordPress

Usage not found.