[wp-trac] [WordPress Trac] #22538: 'wp_image_editor_class' vs. 'wp_image_editors'

WordPress Trac noreply at wordpress.org
Thu Nov 22 18:46:44 UTC 2012


#22538: 'wp_image_editor_class' vs. 'wp_image_editors'
--------------------------+--------------------
 Reporter:  scribu        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5
Component:  Media         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+--------------------

Comment (by macbrink):

 Replying to [comment:6 scribu]:
 > Actually, it doesn't make sense to pass $args to either filter, since
 $args should be checked by the test() method of your image editor.
 >
 > The 'wp_image_editors' filter is just for registering the class as a
 candidate:
 >
 so the candidate classes test() should check args, and check for GD or
 Imagick functionality. This class then should be selected against other
 classes which could return true for test(), but would not handle the image
 as required by the plugin.
 Because this is a filter, other plugins could add candidate class names
 too. So without passing $args in the filters (preferably
 'wp_image_editor_class'), the plugin has no control over the actual class
 being selected.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22538#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list