mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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 ) );
|
||||
|
||||
Reference in New Issue
Block a user