mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
In wp_image_editor(), use wp_image_editor_supports() to check for rotation capabilities rather than directly checking the existence of the imagerotate function.
In WP_Image_Editor_GD::test(), check for existence of imagerotate if the rotate capability is required. Props DH-Shredder fixes #22597 git-svn-id: https://develop.svn.wordpress.org/trunk@22863 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -37,6 +37,14 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||
if ( ! extension_loaded('gd') || ! function_exists('gd_info') )
|
||||
return false;
|
||||
|
||||
// On some setups GD library does not provide imagerotate() - Ticket #11536
|
||||
if ( isset( $args['methods'] ) &&
|
||||
in_array( 'rotate', $args['methods'] ) &&
|
||||
! function_exists('imagerotate') ){
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user