WordPress at a glance
function is not described

WP_Image_Editor_GD::test() public WP 3.5.0

Checks to see if current environment supports GD.

{} It's a method of the class: WP_Image_Editor_GD{}

No Hooks.

Return

true|false. Nothing.

Usage

$result = WP_Image_Editor_GD::test( $args );
$args(array)
-

Changelog

Since 3.5.0 Introduced.

Code of WP_Image_Editor_GD::test() WP 5.7.2

<?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;
}