From 956f076095c6472706cc9d0635d4ff9e631efeb9 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 16 Sep 2015 17:34:24 +0000 Subject: [PATCH] After [34160], also upgrade objects passed to `get_avatar()`. See #32619. Built from https://develop.svn.wordpress.org/trunk@34244 git-svn-id: http://core.svn.wordpress.org/trunk@34208 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index e26b36ce28..afccae9367 100644 --- a/wp-includes/pluggable.php +++ b/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. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 04d63c4a7b..a4bd64dfa2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34243'; +$wp_version = '4.4-alpha-34244'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.