Checks to see if current environment supports GD.
(array) (Optional)
Default value: array()
(bool)
File: wp-includes/class-wp-image-editor-gd.php
public static function test( $args = array() ) { 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'], true ) && ! function_exists( 'imagerotate' ) ) { return false; } return true; }
Version | Description |
---|---|
3.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_image_editor_gd/test