_rotate_image_resource() deprecated
-
Lately, I’ve been getting a deprecated notice regarding
_rotate_image_resource()
. The advice is to use theWP_Image_Editor
class instead. I don’t think use of the class is entirely necessary but is probably good practice.Anyhow, to avoid the debug notice you can just replace:
$image = _rotate_image_resource( $image, $orientation );
with:
$rotated = imagerotate( $image, $orientation, 0 ); if ( is_resource( $rotated ) ) { imagedestroy( $image ); $image = $rotated; }
Hope that helps.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘_rotate_image_resource() deprecated’ is closed to new replies.