[buddypress-trac] [BuddyPress Trac] #6415: Missing title element on group_amins and group_mods avatar

buddypress-trac noreply at wordpress.org
Tue May 12 17:56:36 UTC 2015


#6415: Missing title element on group_amins and group_mods avatar
-----------------------------------------+------------------------------
 Reporter:  danbp                        |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Appearance - Template Parts  |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch                    |
-----------------------------------------+------------------------------
Changes (by danbp):

 * keywords:  needs-patch => has-patch


Comment:

 Ha, ha, the ''do it yourself'' answer. Here it is ! :)

 For group admins (line 1536)

 {{{
 <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, 'title' => sprintf( ( '%s' ), bp_core_get_username(
 $admin->user_id ) ) ) ) ?></a>
 }}}


 For group mods (line 1579):



 {{{
 <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, 'title' => sprintf( ( '%s' ), bp_core_get_username(
 $mod->user_id ) ) ) ) ?></a>
 }}}

 alt tag is automatically added by bp_core_fetch_avatar, so i simply
 replaced it by title in the original code and to get the short nicename, i
 use bp_core_get_username instead of bp_core_get_user_displayname.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6415#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list