WordPress.org

Make WordPress Core

Ticket #12291: 12291.diff

File 12291.diff, 584 bytes (added by Otto42, 4 years ago)

make floating_admin_avatar work better with plugins

  • wp-admin/includes/comment.php

     
    150150 */ 
    151151function floated_admin_avatar( $name ) { 
    152152        global $comment; 
    153  
    154         $id = $avatar = false; 
    155         if ( $comment->comment_author_email ) 
    156                 $id = $comment->comment_author_email; 
    157         if ( $comment->user_id ) 
    158                 $id = $comment->user_id; 
    159  
    160         if ( $id ) 
    161                 $avatar = get_avatar( $id, 32 ); 
    162  
     153        $avatar = get_avatar( $comment, 32 ); 
    163154        return "$avatar $name"; 
    164155} 
    165156