Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_image_editors

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
4184      require_once ABSPATH . WPINC . '/class-avif-info.php';
4185      /**
4186       * Filters the list of image editing library classes.
4187       *
4188       * @since 3.5.0
4189       *
4190       * @param string[] $image_editors Array of available image editor class names. Defaults are
4191       *                                'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD'.
4192       */
4193      $implementations = apply_filters( 'wp_image_editors', array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) );
4194
4195      $editors = wp_cache_get( 'wp_image_editor_choose', 'image_editor' );
4196
4197      if ( ! is_array( $editors ) ) {
4198           $editors = array();
4199      }
4200
4201      // Cache the chosen editor implementation based on specific args and available implementations.
4202      $cache_key = md5( serialize( array( $args, $implementations ) ) );