wp_image_editors
Filter HookDescription
Filters the list of image editing library classes.Hook Information
File Location |
wp-includes/media.php
View on GitHub
|
Hook Type | Filter |
Line Number | 4280 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$image_editors
|
Array of available image editor class names. Defaults are 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD'. |
Usage Examples
Basic Usage
<?php
// Hook into wp_image_editors
add_filter('wp_image_editors', 'my_custom_filter', 10, 1);
function my_custom_filter($image_editors) {
// Your custom filtering logic here
return $image_editors;
}
Source Code Context
wp-includes/media.php:4280
- How this hook is used in WordPress core
<?php
4275 * @since 3.5.0
4276 *
4277 * @param string[] $image_editors Array of available image editor class names. Defaults are
4278 * 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD'.
4279 */
4280 $implementations = apply_filters( 'wp_image_editors', array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) );
4281
4282 $editors = wp_cache_get( 'wp_image_editor_choose', 'image_editor' );
4283
4284 if ( ! is_array( $editors ) ) {
4285 $editors = array();
PHP Documentation
<?php
/**
* Filters the list of image editing library classes.
*
* @since 3.5.0
*
* @param string[] $image_editors Array of available image editor class names. Defaults are
* 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD'.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/media.php
Related Hooks
Related hooks will be displayed here in future updates.