In `get_avatar_data()`, promote `stdClass` objects to `WP_Comment` if passed.
Props DrewAPicture, ocean90. Fixes #32619. git-svn-id: https://develop.svn.wordpress.org/trunk@34160 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5168b2e303
commit
2817bb6557
|
@ -3604,6 +3604,10 @@ function get_avatar_data( $id_or_email, $args = null ) {
|
|||
$email_hash = '';
|
||||
$user = $email = false;
|
||||
|
||||
if ( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ) {
|
||||
$id_or_email = get_comment( $id_or_email );
|
||||
}
|
||||
|
||||
// Process the user identifier.
|
||||
if ( is_numeric( $id_or_email ) ) {
|
||||
$user = get_user_by( 'id', absint( $id_or_email ) );
|
||||
|
|
Loading…
Reference in New Issue