wphooks.info - image_edit_before_change

image_edit_before_change

The hook occurs in the following file:

wp-admin/includes/image-edit.php:
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
		/**
		 * Filters the GD image resource before applying changes to the image.
		 *
		 * @since 2.9.0
		 * @deprecated 3.5.0 Use wp_image_editor_before_change instead.
		 *
		 * @param resource $image   GD image resource.
 		 * @param array    $changes Array of change operations.
		 */
		$image = apply_filters( 'image_edit_before_change', $image, $changes );
	}

	foreach ( $changes as $operation ) {
		switch ( $operation->type ) {
			case 'rotate':
				if ( $operation->angle != 0 ) {
					if ( $image instanceof WP_Image_Editor )
						$image->rotate( $operation->angle );
					else