From 2d11d6cd90bb0384c58b1ca134408a36ab072c78 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 16 Sep 2015 17:33:34 +0000 Subject: [PATCH] After [34160], also upgrade objects passed to `get_avatar()`. See #32619. git-svn-id: https://develop.svn.wordpress.org/trunk@34244 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/pluggable.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index e26b36ce28..afccae9367 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -2274,6 +2274,10 @@ function get_avatar( $id_or_email, $size = 96, $default = '', $alt = '', $args = $args['width'] = $args['size']; } + if ( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ) { + $id_or_email = get_comment( $id_or_email ); + } + /** * Filter whether to retrieve the avatar URL early. *