WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/25/2010 10:19:03 PM (8 years ago)
Author:
westi
Message:

Just pass the comment object to get_avatar in floated_admin_avatar rather than duplicating logic. Fixes #12291 props Otto42.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/comment.php

    r12733 r13420  
    143143 * Add avatars to relevant places in admin, or try to.
    144144 *
    145  * @since unknown
     145 * @since 2.5.0
    146146 * @uses $comment
    147147 *
     
    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}
Note: See TracChangeset for help on using the changeset viewer.