[wp-trac] Re: [WordPress Trac] #6246: get_avatar() should return the Gravatar URL instead of a whole image tag

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 16 11:29:57 GMT 2008


#6246: get_avatar() should return the Gravatar URL instead of a whole image tag
-------------------------+--------------------------------------------------
 Reporter:  BoltClock    |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:           
Component:  Template     |      Version:  2.5      
 Severity:  normal       |   Resolution:           
 Keywords:               |  
-------------------------+--------------------------------------------------
Changes (by ionfish):

  * component:  General => Template
  * milestone:  2.5 =>

Comment:

 get_avatar()'s return value is filtered, so you can add a class to the img
 element with a filter. For example, here's a filter I wrote to remove
 default avatar images:

 {{{
 function remove_default_avatars($avatar, $id_or_email, $size, $default) {
         if ( $avatar == "<img alt='' src='{$default}' />" )
                 return false;
         else
                 return $avatar;
 }
 }}}

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


More information about the wp-trac mailing list