[wp-trac] Re: [WordPress Trac] #3605: Proposal fine-tuned function

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 17 17:53:33 GMT 2007


#3605: Proposal fine-tuned function
------------------------------------------------------------+---------------
 Reporter:  BjornW                                          |        Owner:  anonymous
     Type:  enhancement                                     |       Status:  new      
 Priority:  normal                                          |    Milestone:  2.1      
Component:  Administration                                  |      Version:  2.1      
 Severity:  normal                                          |   Resolution:           
 Keywords:  wp_create_thumbnail, thumbnail, core, proposal  |  
------------------------------------------------------------+---------------
Comment (by mdawaffe):

 The changes made at #3588 ([4751] and [4759]) make the thumbnail size
 fully pluggable by filtering inside
 {{{wp_generate_attachment_metadata()}}}.  Just before a thumbnail is made,
 a plugin could check the image's aspect ratio and decide what
 {{{$maxside}}} value to pass on to {{{wp_create_thumbnail()}}}.

 It's not the cleanest solution, but it's backward compatible.  For some
 future release of WP, we may want to audit the image manipulation
 functions WP provides and see what the easiest way to use them really is.

 So I think your changes to {{{wp_create_thumbnail()}}} are interesting but
 not strictly necessary now that {{{wp_generate_attachment_metadata()}}} is
 pluggable.

 Also, for error reporting, check out the nice {{{WP_Error}}} class and
 {{{is_wp_error()}}} that were introduced... I don't know... not so long
 ago.  All error reporting should eventually be switched over to use those.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3605#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list