WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp image editor supports

Description

Tests whether there is an editor that supports a given mime type or methods.

Usage

$arg = array(
	'mime_type' => 'image/png',
	'methods' => array(
		'rotate',
		'resize',
		'save'
	)
);
$img_editor_test = wp_image_editor_supports($arg);
if ($img_editor_test !== false) {
	//mime_type and method(s) supported!
}

Parameters

Examples

Default Usage

Change Log

Source File

WP_Image_Editor_Supports() is located in wp-includes/media.php.

Related