Opened 12 years ago
Closed 12 years ago
#22597 closed defect (bug) (fixed)
Image Editor checking GD directly for rotate support
Reported by: | kirasong | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Media | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
The image editor is currently checking imagerotate() directly to decide whether it should enable the rotate buttons.
We should be checking the image editor.
The initial patch is a bit creative because we assume rotate() is a required function with the WP_Image_Editor class.
Attachments (4)
Change History (12)
#4
@
12 years ago
array( 'methods', array( 'rotate' ) )
— this should be 'methods' => array( 'rotate' )
, I imagine?
@
12 years ago
Also passes the mime_type for a more correct response, although this requires pulling the mime from the post.
#6
@
12 years ago
As a second option, 22597.4.diff also passes mime_type through to check for support.
This requires pulling the mime from the post, though.
It is more accurate, however, since you could get in a situation where rotate() is supported by an editor, but the mime type is not (for instance, in the case of a GD install that is sadly lacking of imagerotate() along with a really old Imagick install lacking setIteratorIndex() when trying to rotate a GIF.
Related: #22543
Got some extra stuff accidentally in initial patch.
22597.2.diff is the proper one.