Allow comment object to be passed to get_avatar() for convenience. see #5775

git-svn-id: https://develop.svn.wordpress.org/trunk@6946 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-02-20 20:58:58 +00:00
parent 641818a02b
commit 66f1454a22
1 changed files with 1 additions and 1 deletions

View File

@ -1195,7 +1195,7 @@ function get_avatar( $id_or_email, $size = '96', $default = '' ) {
} elseif ( is_object($id_or_email) ) {
if ( !empty($id_or_email->user_id) ) {
$id = (int) $id_or_email->user_id;
$user = get_userdata();
$user = get_userdata($id);
if ( $user)
$email = $user->user_email;
} elseif ( !empty($id_or_email->comment_author_email) ) {