wphooks.info - image_edit_before_change

image_edit_before_change

(trunk - 5.0-alpha-42993)

The hook occurs in the following file:

wp-admin/includes/image-edit.php:
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
		/**
		 * 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 {