[wp-trac] [WordPress Trac] #20205: move image_downsize filter to beginning of image_downsize() function

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 8 20:21:17 UTC 2012


#20205: move image_downsize filter to beginning of image_downsize() function
----------------------------+-----------------------------
 Reporter:  helgatheviking  |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:  3.4
 Severity:  normal          |   Keywords:
----------------------------+-----------------------------
 i'm working on a plugin that lets users define any image to serve as the
 thumbnail for any PDF document.  I'm storing the ID of the image as
 post_meta for the PDF attachment.  Instead of showing the default icon
 with wp_get_attachment_image() I'm quite close to being able to do this by
 filtering image_downsize.

 the trouble is that the image_downsize filter it run ''after''


 {{{
 if ( !wp_attachment_is_image($id) )
                 return false;

 }}}

 so the PDF image fails the test and I never have a chance to run my
 filter.

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


More information about the wp-trac mailing list