Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php	(revision 6736)
+++ wp-includes/pluggable.php	(working copy)
@@ -1178,6 +1178,43 @@
 }
 endif;
 
+if ( !function_exists( 'get_avatar' ) ) :
+function get_avatar( $id_or_email, $size = '80', $default = '' ) {
+	if ( ! get_option('show_avatars') )
+		return false;
+
+	if ( is_numeric($id_or_email) ) {
+		$id = (int) $id_or_email;
+		$user = get_userdata($id);
+		if ( !$user)
+			$email = '';
+		else
+			$email = $user->user_email;
+	} else {
+		$email = $id_or_email;
+	}
+
+	if ( !empty($email) ) {
+		$default = urlencode( $default );
+
+		$out = 'http://www.gravatar.com/avatar.php?gravatar_id=';
+		$out .= md5( $email );
+		$out .= "&amp;size={$size}";
+		$out .= "&amp;default={$default}";
+
+		$rating = get_option('avatar_rating');
+		if ( !empty( $rating ) )
+			$out .= "&amp;rating={$rating}";
+
+		$avatar = "<img alt='' src='{$out}' class='avatar avatar-{$size}' height='{$size}' width='{$size}' />";
+	} else {
+		$avatar = "<img alt='' src='{$default}' />";
+	}
+
+	return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default);
+}
+endif;
+
 if ( !function_exists('wp_setcookie') ) :
 /**
  * wp_setcookie() - Sets a cookie for a user who just logged in
