diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index da57ebd64df80..f6e20d9b846ca 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -4534,7 +4534,11 @@ function get_avatar_data( $id_or_email, $args = null ) { } if ( $email ) { - $email_hash = hash( 'sha256', strtolower( trim( $email ) ) ); + if ( function_exists( 'hash' ) ) { + $email_hash = hash( 'sha256', strtolower( trim( $email ) ) ); + } else { + $email_hash = md5( strtolower( trim( $email ) ) ); + } } }