<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][3635] trunk: Improves avatars' HTML alt and title tags.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>3635</dd>
<dt>Author</dt> <dd>djpaul</dd>
<dt>Date</dt> <dd>2011-01-01 18:26:18 +0000 (Sat, 01 Jan 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Improves avatars' HTML alt and title tags. Fixes #2606.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivitytemplatetagsphp">trunk/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#trunkbpblogsbpblogstemplatetagsphp">trunk/bp-blogs/bp-blogs-templatetags.php</a></li>
<li><a href="#trunkbpcorebpcoreavatarsphp">trunk/bp-core/bp-core-avatars.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatetagsphp">trunk/bp-core/bp-core-templatetags.php</a></li>
<li><a href="#trunkbpforumsbpforumstemplatetagsphp">trunk/bp-forums/bp-forums-templatetags.php</a></li>
<li><a href="#trunkbpgroupsbpgroupstemplatetagsphp">trunk/bp-groups/bp-groups-templatetags.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-templatetags.php (3634 => 3635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2010-12-31 18:30:23 UTC (rev 3634)
+++ trunk/bp-activity/bp-activity-templatetags.php        2011-01-01 18:26:18 UTC (rev 3635)
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx">                         'width' => 20,
</span><span class="cx">                         'height' => 20,
</span><span class="cx">                         'class' => 'avatar',
</span><del>-                        'alt' => __( 'Avatar', 'buddypress' ),
</del><ins>+                        'alt' => __( 'Profile picture of %s', 'buddypress' ),
</ins><span class="cx">                         'email' => false
</span><span class="cx">                 );
</span><span class="cx">
</span><span class="lines">@@ -502,7 +502,6 @@
</span><span class="cx">                         'width' => 20,
</span><span class="cx">                         'height' => 20,
</span><span class="cx">                         'class' => 'avatar',
</span><del>-                        'alt' => __( 'Avatar', 'buddypress' ),
</del><span class="cx">                         'email' => false
</span><span class="cx">                 );
</span><span class="cx">
</span><span class="lines">@@ -514,19 +513,35 @@
</span><span class="cx">                         case 'groups' :
</span><span class="cx">                                 $object = 'group';
</span><span class="cx">                                 $item_id = $activities_template->activity->item_id;
</span><ins>+
+                                if ( !$alt )
+                                        $alt = __( 'Group logo of %s', 'buddypress' );
+
</ins><span class="cx">                                 break;
</span><span class="cx">                         case 'blogs' :
</span><span class="cx">                                 $object = 'blog';
</span><span class="cx">                                 $item_id = $activities_template->activity->item_id;
</span><ins>+
+                                if ( !$alt )
+                                        $alt = sprintf( __( 'Blog authored by %s', 'buddypress' ), get_blog_option( $item_id, 'blogname' ) );
+
</ins><span class="cx">                                 break;
</span><span class="cx">                         case 'friends' :
</span><span class="cx">                                 $object = 'user';
</span><span class="cx">                                 $item_id = $activities_template->activity->secondary_item_id;
</span><ins>+
+                                if ( !$alt )
+                                        $alt = __( 'Profile picture of %s', 'buddypress' );
+
</ins><span class="cx">                                 break;
</span><span class="cx">                         default :
</span><span class="cx">                                 $object = 'user';
</span><span class="cx">                                 $item_id = $activities_template->activity->user_id;
</span><span class="cx">                                 $email = $activities_template->activity->user_email;
</span><ins>+
+                                if ( !$alt )
+                                        $alt = __( 'Profile picture of %s', 'buddypress' );
+
</ins><span class="cx">                                 break;
</span><span class="cx">                 }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpblogsbpblogstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-templatetags.php (3634 => 3635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-templatetags.php        2010-12-31 18:30:23 UTC (rev 3634)
+++ trunk/bp-blogs/bp-blogs-templatetags.php        2011-01-01 18:26:18 UTC (rev 3635)
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx">                         'height' => false,
</span><span class="cx">                         'class' => 'avatar',
</span><span class="cx">                         'id' => false,
</span><del>-                        'alt' => __( 'Blog avatar', 'buddypress' ),
</del><ins>+                        'alt' => __( 'Blog authored by %s', 'buddypress' ),
</ins><span class="cx">                         'no_grav' => true
</span><span class="cx">                 );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpcorebpcoreavatarsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-avatars.php (3634 => 3635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-avatars.php        2010-12-31 18:30:23 UTC (rev 3634)
+++ trunk/bp-core/bp-core-avatars.php        2011-01-01 18:26:18 UTC (rev 3635)
</span><span class="lines">@@ -52,8 +52,8 @@
</span><span class="cx"> * Fetches an avatar from a BuddyPress object. Supports user/group/blog as
</span><span class="cx"> * default, but can be extended to include your own custom components too.
</span><span class="cx"> *
</span><del>- * @global object $bp
- * @global object $current_blog
</del><ins>+ * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
+ * @global $current_blog WordPress global containing information and settings for the current blog being viewed.
</ins><span class="cx"> * @param array $args Determine the output of this function
</span><span class="cx"> * @return string Formatted HTML <img> element, or raw avatar URL based on $html arg
</span><span class="cx"> */
</span><span class="lines">@@ -61,25 +61,26 @@
</span><span class="cx">         global $bp, $current_blog;
</span><span class="cx">
</span><span class="cx">         // Set a few default variables
</span><del>-        $def_object                = 'user';
-        $def_type                = 'thumb';
-        $def_class                = 'avatar';
-        $def_alt                = __( 'Avatar Image', 'buddypress' );
</del><ins>+        $def_object = 'user';
+        $def_type = 'thumb';
+        $def_class = 'avatar';
+        $def_alt = __( 'Avatar Image', 'buddypress' );
</ins><span class="cx">
</span><span class="cx">         // Set the default variables array
</span><span class="cx">         $defaults = array(
</span><del>-                'item_id'                => false,
-                'object'                => $def_object,        // user/group/blog/custom type (if you use filters)
-                'type'                        => $def_type,        // thumb or full
-                'avatar_dir'        => false,                // Specify a custom avatar directory for your object
-                'width'                        => false,                // Custom width (int)
-                'height'                => false,                // Custom height (int)
-                'class'                        => $def_class,        // Custom <img> class (string)
-                'css_id'                => false,                // Custom <img> ID (string)
-                'alt'                        => $def_alt,        // Custom <img> alt (string)
-                'email'                        => false,                // Pass the user email (for gravatar) to prevent querying the DB for it
-                'no_grav'                => false,                // If there is no avatar found, return false instead of a grav?
-                'html'                        => true                        // Wrap the return img URL in <img />
</del><ins>+                'item_id' => false,
+                'object' => $def_object, // user/group/blog/custom type (if you use filters)
+                'type' => $def_type, // thumb or full
+                'avatar_dir' => false, // Specify a custom avatar directory for your object
+                'width' => false, // Custom width (int)
+                'height' => false, // Custom height (int)
+                'class' => $def_class, // Custom <img> class (string)
+                'css_id' => false, // Custom <img> ID (string)
+                'alt' => $def_alt, // Custom <img> alt (string)
+                'email' => false, // Pass the user email (for gravatar) to prevent querying the DB for it
+                'no_grav' => false, // If there is no avatar found, return false instead of a grav?
+                'html' => true, // Wrap the return img URL in <img />
+                'title' => '' // Custom <img> title (string)
</ins><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         // Compare defaults to passed and extract
</span><span class="lines">@@ -97,7 +98,8 @@
</span><span class="cx">
</span><span class="cx">                 $item_id = apply_filters( 'bp_core_avatar_item_id', $item_id, $object );
</span><span class="cx">
</span><del>-                if ( !$item_id ) return false;
</del><ins>+                if ( !$item_id )
+                        return false;
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // Set avatar_dir if not passed (uses $object)
</span><span class="lines">@@ -111,12 +113,31 @@
</span><span class="cx">
</span><span class="cx">                 $avatar_dir = apply_filters( 'bp_core_avatar_dir', $avatar_dir, $object );
</span><span class="cx">
</span><del>-                if ( !$avatar_dir ) return false;
</del><ins>+                if ( !$avatar_dir )
+                        return false;
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // Add an identifying class to each item
</span><span class="cx">         $class .= ' ' . $object . '-' . $item_id . '-avatar';
</span><span class="cx">
</span><ins>+        // Get item name for alt/title tags
+        $item_name = '';
+
+        if ( 'user' == $object )
+                $item_name = bp_core_get_user_displayname( $item_id );
+        elseif ( 'group' == $object )
+                $item_name = bp_get_group_name( new BP_Groups_Group( $item_id ) );
+        elseif ( 'blog' == $object )
+                $item_name = get_blog_option( $item_id, 'blogname' );
+
+        $alt = sprintf( $alt, apply_filters( 'bp_core_avatar_alt', $item_name, $item_id, $object ) );
+
+        // Set title tag
+        if ( $title )
+                $title = " title='" . esc_attr( apply_filters( 'bp_core_avatar_title', $title, $item_id, $object ) ) . "'";
+        elseif ( $item_name )
+                $title = " title='" . esc_attr( apply_filters( 'bp_core_avatar_title', $item_name, $item_id, $object ) ) . "'";
+
</ins><span class="cx">         // Set CSS ID if passed
</span><span class="cx">         if ( !empty( $css_id ) )
</span><span class="cx">                 $css_id = " id='{$css_id}'";
</span><span class="lines">@@ -195,7 +216,7 @@
</span><span class="cx">
</span><span class="cx">                         // Return it wrapped in an <img> element
</span><span class="cx">                         if ( true === $html ) {
</span><del>-                                return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $avatar_url . '" alt="' . $alt . '" class="' . $class . '"' . $css_id . $html_width . $html_height . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
</del><ins>+                                return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $avatar_url . '" alt="' . esc_attr( $alt ) . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
</ins><span class="cx">
</span><span class="cx">                         // ...or only the URL
</span><span class="cx">                         } else {
</span><span class="lines">@@ -246,7 +267,7 @@
</span><span class="cx">
</span><span class="cx">                 // Return gravatar wrapped in <img />
</span><span class="cx">                 if ( true === $html )
</span><del>-                        return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $gravatar . '" alt="' . $alt . '" class="' . $class . '"' . $css_id . $html_width . $html_height . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
</del><ins>+                        return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $gravatar . '" alt="' . esc_attr( $alt ) . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
</ins><span class="cx">
</span><span class="cx">                 // ...or only return the gravatar URL
</span><span class="cx">                 else
</span><span class="lines">@@ -505,6 +526,9 @@
</span><span class="cx">         if ( empty( $id ) )
</span><span class="cx">                 return !empty( $avatar ) ? $avatar : $default;
</span><span class="cx">
</span><ins>+        if ( !$alt )
+                $alt = __( 'Avatar of %s', 'buddypress' );
+
</ins><span class="cx">         // Let BuddyPress handle the fetching of the avatar
</span><span class="cx">         $bp_avatar = bp_core_fetch_avatar( array( 'item_id' => $id, 'width' => $size, 'height' => $size, 'alt' => $alt ) );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-templatetags.php (3634 => 3635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-templatetags.php        2010-12-31 18:30:23 UTC (rev 3634)
+++ trunk/bp-core/bp-core-templatetags.php        2011-01-01 18:26:18 UTC (rev 3635)
</span><span class="lines">@@ -321,7 +321,7 @@
</span><span class="cx">                         'height' => false,
</span><span class="cx">                         'class' => 'avatar',
</span><span class="cx">                         'id' => false,
</span><del>-                        'alt' => __( 'Member avatar', 'buddypress' )
</del><ins>+                        'alt' => __( 'Profile picture of %s', 'buddypress' )
</ins><span class="cx">                 );
</span><span class="cx">
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="lines">@@ -670,13 +670,14 @@
</span><span class="cx">                         'type'                => 'thumb',
</span><span class="cx">                         'width'                => false,
</span><span class="cx">                         'height'        => false,
</span><del>-                        'html'                => true
</del><ins>+                        'html'                => true,
+                        'alt' => __( 'Profile picture of %s', 'buddypress' )
</ins><span class="cx">                 );
</span><span class="cx">
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="cx">                 extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_loggedin_user_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->loggedin_user->id, 'type' => $type, 'width' => $width, 'height' => $height, 'html' => $html ) ) );
</del><ins>+                return apply_filters( 'bp_get_loggedin_user_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->loggedin_user->id, 'type' => $type, 'width' => $width, 'height' => $height, 'html' => $html, 'alt' => $alt ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_displayed_user_avatar( $args = '' ) {
</span><span class="lines">@@ -689,13 +690,14 @@
</span><span class="cx">                         'type'                => 'thumb',
</span><span class="cx">                         'width'                => false,
</span><span class="cx">                         'height'        => false,
</span><del>-                        'html'                => true
</del><ins>+                        'html'                => true,
+                        'alt' => __( 'Profile picture of %s', 'buddypress' )
</ins><span class="cx">                 );
</span><span class="cx">
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="cx">                 extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_displayed_user_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->displayed_user->id, 'type' => $type, 'width' => $width, 'height' => $height, 'html' => $html ) ) );
</del><ins>+                return apply_filters( 'bp_get_displayed_user_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->displayed_user->id, 'type' => $type, 'width' => $width, 'height' => $height, 'html' => $html, 'alt' => $alt ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_avatar_admin_step() {
</span></span></pre></div>
<a id="trunkbpforumsbpforumstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-templatetags.php (3634 => 3635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-templatetags.php        2010-12-31 18:30:23 UTC (rev 3634)
+++ trunk/bp-forums/bp-forums-templatetags.php        2011-01-01 18:26:18 UTC (rev 3635)
</span><span class="lines">@@ -287,12 +287,13 @@
</span><span class="cx">                         'type' => 'thumb',
</span><span class="cx">                         'width' => false,
</span><span class="cx">                         'height' => false,
</span><ins>+                        'alt' => __( 'Profile picture of %s', 'buddypress' )
</ins><span class="cx">                 );
</span><span class="cx">
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="cx">                 extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_the_topic_poster_avatar', bp_core_fetch_avatar( array( 'item_id' => $forum_template->topic->topic_poster, 'type' => $type, 'width' => $width, 'height' => $height ) ) );
</del><ins>+                return apply_filters( 'bp_get_the_topic_poster_avatar', bp_core_fetch_avatar( array( 'item_id' => $forum_template->topic->topic_poster, 'type' => $type, 'width' => $width, 'height' => $height, 'alt' => $alt ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_poster_name() {
</span><span class="lines">@@ -368,12 +369,13 @@
</span><span class="cx">                         'type' => 'thumb',
</span><span class="cx">                         'width' => false,
</span><span class="cx">                         'height' => false,
</span><ins>+                        'alt' => __( 'Group logo for %s', 'buddypress' )
</ins><span class="cx">                 );
</span><span class="cx">
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="cx">                 extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_the_topic_object_avatar', bp_core_fetch_avatar( array( 'item_id' => $forum_template->topic->object_id, 'type' => $type, 'object' => 'group', 'width' => $width, 'height' => $height ) ) );
</del><ins>+                return apply_filters( 'bp_get_the_topic_object_avatar', bp_core_fetch_avatar( array( 'item_id' => $forum_template->topic->object_id, 'type' => $type, 'object' => 'group', 'width' => $width, 'height' => $height, 'alt' => $alt ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_last_poster_avatar( $args = '' ) {
</span><span class="lines">@@ -386,12 +388,13 @@
</span><span class="cx">                         'type' => 'thumb',
</span><span class="cx">                         'width' => false,
</span><span class="cx">                         'height' => false,
</span><ins>+                        'alt' => __( 'Profile picture of %s', 'buddypress' )
</ins><span class="cx">                 );
</span><span class="cx">
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="cx">                 extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_the_topic_last_poster_avatar', bp_core_fetch_avatar( array( 'email' => $forum_template->topic->topic_last_poster_email, 'item_id' => $forum_template->topic->topic_last_poster, 'type' => $type, 'width' => $width, 'height' => $height ) ) );
</del><ins>+                return apply_filters( 'bp_get_the_topic_last_poster_avatar', bp_core_fetch_avatar( array( 'email' => $forum_template->topic->topic_last_poster_email, 'item_id' => $forum_template->topic->topic_last_poster, 'type' => $type, 'width' => $width, 'height' => $height, 'alt' => $alt ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_start_time() {
</span><span class="lines">@@ -908,12 +911,13 @@
</span><span class="cx">                         'type' => 'thumb',
</span><span class="cx">                         'width' => 20,
</span><span class="cx">                         'height' => 20,
</span><ins>+                        'alt' => __( 'Profile picture of %s', 'buddypress' )
</ins><span class="cx">                 );
</span><span class="cx">
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="cx">                 extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_the_topic_post_poster_avatar', bp_core_fetch_avatar( array( 'item_id' => $topic_template->post->poster_id, 'type' => $type, 'width' => $width, 'height' => $height ) ) );
</del><ins>+                return apply_filters( 'bp_get_the_topic_post_poster_avatar', bp_core_fetch_avatar( array( 'item_id' => $topic_template->post->poster_id, 'type' => $type, 'width' => $width, 'height' => $height, 'alt' => $alt ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_post_poster_name() {
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-templatetags.php (3634 => 3635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-templatetags.php        2010-12-31 18:30:23 UTC (rev 3634)
+++ trunk/bp-groups/bp-groups-templatetags.php        2011-01-01 18:26:18 UTC (rev 3635)
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx">                         'height' => false,
</span><span class="cx">                         'class' => 'avatar',
</span><span class="cx">                         'id' => false,
</span><del>-                        'alt' => __( 'Group avatar', 'buddypress' )
</del><ins>+                        'alt' => __( 'Group logo of %s', 'buddypress' )
</ins><span class="cx">                 );
</span><span class="cx">
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="lines">@@ -473,7 +473,7 @@
</span><span class="cx">                 <ul id="group-admins">
</span><span class="cx">                         <?php foreach( (array)$group->admins as $admin ) { ?>
</span><span class="cx">                                 <li>
</span><del>-                                        <a href="<?php echo bp_core_get_user_domain( $admin->user_id, $admin->user_nicename, $admin->user_login ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'email' => $admin->user_email ) ) ?></a>
</del><ins>+                                        <a href="<?php echo bp_core_get_user_domain( $admin->user_id, $admin->user_nicename, $admin->user_login ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'email' => $admin->user_email, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?></a>
</ins><span class="cx">                                 </li>
</span><span class="cx">                         <?php } ?>
</span><span class="cx">                 </ul>
</span><span class="lines">@@ -493,7 +493,7 @@
</span><span class="cx">                 <ul id="group-mods">
</span><span class="cx">                         <?php foreach( (array)$group->mods as $mod ) { ?>
</span><span class="cx">                                 <li>
</span><del>-                                        <a href="<?php echo bp_core_get_user_domain( $mod->user_id, $mod->user_nicename, $mod->user_login ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'email' => $mod->user_email ) ) ?></a>
</del><ins>+                                        <a href="<?php echo bp_core_get_user_domain( $mod->user_id, $mod->user_nicename, $mod->user_login ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'email' => $mod->user_email, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?></a>
</ins><span class="cx">                                 </li>
</span><span class="cx">                         <?php } ?>
</span><span class="cx">                 </ul>
</span><span class="lines">@@ -736,12 +736,12 @@
</span><span class="cx">                 <?php foreach ( (array)$admins as $admin ) { ?>
</span><span class="cx">                         <?php if ( $admin_list ) { ?>
</span><span class="cx">                         <li>
</span><del>-                                <?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30 ) ) ?>
</del><ins>+                                <?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?>
</ins><span class="cx">                                 <h5><?php echo bp_core_get_userlink( $admin->user_id ) ?> <span class="small"> &mdash; <a class="confirm admin-demote-to-member" href="<?php bp_group_member_demote_link($admin->user_id) ?>"><?php _e( 'Demote to Member', 'buddypress' ) ?></a></span></h5>
</span><span class="cx">                         </li>
</span><span class="cx">                         <?php } else { ?>
</span><span class="cx">                         <li>
</span><del>-                                <?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'type' => 'thumb' ) ) ?>
</del><ins>+                                <?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'type' => 'thumb', 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?>
</ins><span class="cx">                                 <h5><?php echo bp_core_get_userlink( $admin->user_id ) ?></h5>
</span><span class="cx">                                 <span class="activity"><?php echo bp_core_get_last_activity( strtotime( $admin->date_modified ), __( 'joined %s ago', 'buddypress') ); ?></span>
</span><span class="cx">
</span><span class="lines">@@ -774,12 +774,12 @@
</span><span class="cx">                         <?php foreach ( (array)$group_mods as $mod ) { ?>
</span><span class="cx">                                 <?php if ( $admin_list ) { ?>
</span><span class="cx">                                 <li>
</span><del>-                                        <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30 ) ) ?>
</del><ins>+                                        <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?>
</ins><span class="cx">                                         <h5><?php echo bp_core_get_userlink( $mod->user_id ) ?> <span class="small"> &mdash; <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => $mod->user_id ) ) ?>" class="confirm mod-promote-to-admin" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a> | <a class="confirm mod-demote-to-member" href="<?php bp_group_member_demote_link($mod->user_id) ?>"><?php _e( 'Demote to Member', 'buddypress' ) ?></a></span></h5>
</span><span class="cx">                                 </li>
</span><span class="cx">                                 <?php } else { ?>
</span><span class="cx">                                 <li>
</span><del>-                                        <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb' ) ) ?>
</del><ins>+                                        <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb', 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?>
</ins><span class="cx">                                         <h5><?php echo bp_core_get_userlink( $mod->user_id ) ?></h5>
</span><span class="cx">                                         <span class="activity"><?php echo bp_core_get_last_activity( strtotime( $mod->date_modified ), __( 'joined %s ago', 'buddypress') ); ?></span>
</span><span class="cx">
</span><span class="lines">@@ -1441,7 +1441,7 @@
</span><span class="cx">         function bp_get_group_member_avatar() {
</span><span class="cx">                 global $members_template;
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_group_member_avatar', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'full', 'email' => $members_template->member->user_email ) ) );
</del><ins>+                return apply_filters( 'bp_get_group_member_avatar', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'full', 'email' => $members_template->member->user_email, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_group_member_avatar_thumb() {
</span><span class="lines">@@ -1450,7 +1450,7 @@
</span><span class="cx">         function bp_get_group_member_avatar_thumb() {
</span><span class="cx">                 global $members_template;
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_group_member_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'thumb', 'email' => $members_template->member->user_email ) ) );
</del><ins>+                return apply_filters( 'bp_get_group_member_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'thumb', 'email' => $members_template->member->user_email, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_group_member_avatar_mini( $width = 30, $height = 30 ) {
</span><span class="lines">@@ -1459,7 +1459,7 @@
</span><span class="cx">         function bp_get_group_member_avatar_mini( $width = 30, $height = 30 ) {
</span><span class="cx">                 global $members_template;
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_group_member_avatar_mini', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'thumb', 'width' => $width, 'height' => $height, 'email' => $members_template->member->user_email ) ) );
</del><ins>+                return apply_filters( 'bp_get_group_member_avatar_mini', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'thumb', 'width' => $width, 'height' => $height, 'email' => $members_template->member->user_email, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_group_member_name() {
</span><span class="lines">@@ -2116,7 +2116,7 @@
</span><span class="cx"> function bp_group_request_user_avatar_thumb() {
</span><span class="cx">         global $requests_template;
</span><span class="cx">
</span><del>-        echo apply_filters( 'bp_group_request_user_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $requests_template->request->user_id, 'type' => 'thumb' ) ) );
</del><ins>+        echo apply_filters( 'bp_group_request_user_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $requests_template->request->user_id, 'type' => 'thumb', 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_group_request_reject_link() {
</span></span></pre>
</div>
</div>
</body>
</html>