Make WordPress Core


Ignore:
Timestamp:
11/27/2012 02:36:55 PM (12 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-image-editor-gd.php

    r22817 r22863  
    3737        if ( ! extension_loaded('gd') || ! function_exists('gd_info') )
    3838            return false;
     39
     40        // On some setups GD library does not provide imagerotate() - Ticket #11536
     41        if ( isset( $args['methods'] ) &&
     42             in_array( 'rotate', $args['methods'] ) &&
     43             ! function_exists('imagerotate') ){
     44
     45                return false;
     46        }
    3947
    4048        return true;
Note: See TracChangeset for help on using the changeset viewer.