Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php	(revision 21359)
+++ wp-includes/pluggable.php	(working copy)
@@ -1569,26 +1569,18 @@
 }
 endif;
 
-if ( !function_exists( 'get_avatar' ) ) :
+if ( !function_exists( 'get_avatar_url' ) ) :
 /**
- * Retrieve the avatar for a user who provided a user ID or email address.
+ * Retrieve the avatar URL for a user who provided a user ID or email address.
  *
- * @since 2.5
+ * @since 3.5
  * @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. Defaults to blank
  * @return string <img> tag for the user's avatar
 */
-function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
-	if ( ! get_option('show_avatars') )
-		return false;
+function get_avatar_url( $id_or_email, $size = '96', $default = '' ) {
 
-	if ( false === $alt)
-		$safe_alt = '';
-	else
-		$safe_alt = esc_attr( $alt );
-
 	if ( !is_numeric($size) )
 		$size = '96';
 
@@ -1659,11 +1651,45 @@
 		if ( !empty( $rating ) )
 			$out .= "&amp;r={$rating}";
 
-		$avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />";
+		$avatar_url = $out;
 	} else {
-		$avatar = "<img alt='{$safe_alt}' src='{$default}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";
+		$avatar_url = $default;
 	}
 
+	return apply_filters( 'get_avatar_url', $avatar_url, $id_or_email, $size, $default );
+}
+endif;
+
+if ( !function_exists( 'get_avatar' ) ) :
+/**
+ * Retrieve the avatar for a user who provided a user ID or email address.
+ *
+ * @since 2.5
+ * @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. Defaults to blank
+ * @return string <img> tag for the user's avatar
+*/
+function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
+	if ( ! get_option('show_avatars') )
+		return false;
+
+	if ( false === $alt )
+		$safe_alt = '';
+	else
+		$safe_alt = esc_attr( $alt );
+
+	if ( !is_numeric($size) )
+		$size = '96';
+
+	$avatar_url = get_avatar_url( $id_or_email, $size, $default );
+
+	if ( ! $avatar_url )
+		return false;
+
+	$avatar = "<img alt='{$safe_alt}' src='{$avatar_url}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />";
+
 	return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt);
 }
 endif;
