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
1208  *
1209  * @param array $args Additional data. Accepts { 'mime_type'=>string, 'methods'=>{string, string, ...} }
1210  * @return string|bool Class name for the first editor that claims to support the request. False if no editor claims to support the request.
1211  */
1212 function _wp_image_editor_choose( $args = array() ) {
1213      require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
1214      require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
1215      require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
1216
1217      $implementations = apply_filters( 'wp_image_editors',
1218           array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) );
1219
1220      foreach ( $implementations as $implementation ) {
1221           if ( ! call_user_func( array( $implementation, 'test' ), $args ) )
1222                continue;
1223
1224           if ( isset( $args['mime_type'] ) &&
1225                ! call_user_func(
1226                     array( $implementation, 'supports_mime_type' ),