[wp-trac] [WordPress Trac] #8268: Apply image_downsize filter before wp_attachment_is_image check in image_downsize function

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 18 01:11:35 GMT 2008


#8268: Apply image_downsize filter before wp_attachment_is_image check in
image_downsize function
-------------------------+--------------------------------------------------
 Reporter:  jbrinley     |       Owner:           
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  2.8      
Component:  Gallery      |     Version:  2.7      
 Severity:  normal       |    Keywords:  has-patch
-------------------------+--------------------------------------------------
 The function `image_downsize` in wp-include/media.php calls
 `wp_attachment_is_image`, which must return `true` before applying the
 `image_downsize` filter. By moving the call to the `image_downsize` filter
 to the beginning of the function, plugins (let's say, for example, the
 [http://wordpress.org/extend/plugins/custom-thumbnails/ Custom Thumbnails
 plugin]) can return representations of non-image media.

 The only possible negative consequence that I can see: plugin writers
 can't assume that the `image_downsize` filter will only be called for
 images (but I don't know that they should assume that, anyway).

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8268>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list