diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php
index 8a753a1dad..ea9d3f93a4 100644
--- a/wp-includes/pluggable.php
+++ b/wp-includes/pluggable.php
@@ -1454,13 +1454,18 @@ if ( !function_exists( 'get_avatar' ) ) :
* @param int|string|object $id_or_email A user ID, email address, or comment object
* @param int $size Size of the avatar image
* @param string $default URL to a default image to use if no avatar is available
- * @param string $alt Alternate text to use in image tag
+ * @param string $alt Alternate text to use in image tag, the default is Avatar
* @return string tag for the user's avatar
*/
-function get_avatar( $id_or_email, $size = '96', $default = '', $alt = 'Avatar' ) {
+function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
if ( ! get_option('show_avatars') )
return false;
+ if ( false === $alt)
+ $alt = __( 'Avatar' );
+
+ $safe_alt = attribute_escape( $alt );
+
if ( !is_numeric($size) )
$size = '96';
@@ -1517,9 +1522,9 @@ function get_avatar( $id_or_email, $size = '96', $default = '', $alt = 'Avatar'
if ( !empty( $rating ) )
$out .= "&r={$rating}";
- $avatar = "";
+ $avatar = "";
} else {
- $avatar = "";
+ $avatar = "";
}
return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt);