From c7aa32c0ac0c7354600353551cf8d999892cb7dc Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 25 Feb 2010 22:19:03 +0000 Subject: [PATCH] Just pass the comment object to get_avatar in floated_admin_avatar rather than duplicating logic. Fixes #12291 props Otto42. git-svn-id: http://svn.automattic.com/wordpress/trunk@13420 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/comment.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php index 684917f1e0..185251a0cd 100644 --- a/wp-admin/includes/comment.php +++ b/wp-admin/includes/comment.php @@ -142,7 +142,7 @@ function get_pending_comments_num( $post_id ) { /** * Add avatars to relevant places in admin, or try to. * - * @since unknown + * @since 2.5.0 * @uses $comment * * @param string $name User name. @@ -150,16 +150,7 @@ function get_pending_comments_num( $post_id ) { */ function floated_admin_avatar( $name ) { global $comment; - - $id = $avatar = false; - if ( $comment->comment_author_email ) - $id = $comment->comment_author_email; - if ( $comment->user_id ) - $id = $comment->user_id; - - if ( $id ) - $avatar = get_avatar( $id, 32 ); - + $avatar = get_avatar( $comment, 32 ); return "$avatar $name"; }