wp_image_editors
Filters the list of image editing library classes.
Usage
add_filter( 'wp_image_editors', 'wp_kama_image_editors_filter' ); /** * Function for `wp_image_editors` filter-hook. * * @param string[] $image_editors Array of available image editor class names. * * @return string[] */ function wp_kama_image_editors_filter( $image_editors ){ // filter... return $image_editors; }
- $image_editors(string[])
- Array of available image editor class names.
Default: are 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD'
Changelog
Since 3.5.0 | Introduced. |
Where the hook is called
wp_image_editors
wp-includes/media.php 4122
$implementations = apply_filters( 'wp_image_editors', array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) );