[wp-trac] [WordPress Trac] #6903: avatar-default Class Not Assigned to Default Avatars By get_avatar() function

WordPress Trac wp-trac at lists.automattic.com
Sat May 3 04:39:26 GMT 2008


#6903: avatar-default Class Not Assigned to Default Avatars By get_avatar()
function
------------------------+---------------------------------------------------
 Reporter:  jcrens8392  |       Owner:  anonymous                    
     Type:  defect      |      Status:  new                          
 Priority:  normal      |   Milestone:  2.7                          
Component:  General     |     Version:  2.5.1                        
 Severity:  normal      |    Keywords:  get_avatar, gravatar, avatars
------------------------+---------------------------------------------------
 This is my first ticket submission. I did read the docs, but apologize in
 advance if I've done something incorrectly.

 See wp-includes > pluggable.php, beginning on line 1217 - the get_avatar
 function. When the default avatar is used, the class "avatar-default" is
 not being assigned. It seems it's only being assigned when the $email
 variable is empty. This results in the default avatar images not being
 assigned the "avatar-default" class.

 Adding the following on line 1257 in pluggable.php solves the problem,
 although there may be a better way:

 {{{
 if ($default ==
 "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=$size")
                         $avatar = "<img alt='' src='{$out}' class='avatar
 avatar-{$size} avatar-default' height='{$size}' width='{$size}' />";
 }}}

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


More information about the wp-trac mailing list