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

WordPress Trac noreply at wordpress.org
Thu Nov 22 18:51:06 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):

 > function my_image_editor_decorate( $instance, $args ) {
 >       return new My_Image_Editor_Decorator( $instance );
 > }
 > add_filter( 'wp_image_editor_instance', 'my_image_editor_init', 10, 2 );
 > }}}
 >
 > Now to see if we could use 'wp_image_editor_instance' in the unit tests
 instead of 'wp_image_editor_class'.

 Err, so you want a new function with a new filter where you pass the
 editor instance and $args? Why not pass args to (one of) the existing
 filters?

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


More information about the wp-trac mailing list