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
1530  *
1531  * @param array $args Additional data. Accepts { 'mime_type'=>string, 'methods'=>{string, string, ...} }
1532  * @return string|bool Class name for the first editor that claims to support the request. False if no editor claims to support the request.
1533  */
1534 function _wp_image_editor_choose( $args = array() ) {
1535      require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
1536      require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
1537      require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
1538
1539      $implementations = apply_filters( 'wp_image_editors',
1540           array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) );
1541
1542      foreach ( $implementations as $implementation ) {
1543           if ( ! call_user_func( array( $implementation, 'test' ), $args ) )
1544                continue;
1545
1546           if ( isset( $args['mime_type'] ) &&
1547                ! call_user_func(
1548                     array( $implementation, 'supports_mime_type' ),