Changeset 5477 for trunk/bp-activity/bp-activity-template.php
- Timestamp:
- 12/10/2011 05:41:37 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-template.php
r5447 r5477 899 899 900 900 $defaults = array( 901 'alt' => __( 'Profile picture of %s', 'buddypress'),901 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $activities_template->activity->display_name ), 902 902 'class' => 'avatar', 903 903 'email' => false, … … 990 990 switch ( $activities_template->activity->component ) { 991 991 case 'groups' : 992 $object = 'group';992 $object = 'group'; 993 993 $item_id = $activities_template->activity->item_id; 994 995 if ( empty( $alt ) ) 996 $alt = __( 'Group logo of %s', 'buddypress' ); 994 995 if ( empty( $alt ) ) { 996 $group = groups_get_group( $item_id ); 997 if ( isset( $group->name ) ) { 998 $alt = sprintf( __( 'Group logo of %s', 'buddypress' ), $group->name ); 999 } else { 1000 $alt = __( 'Group logo', 'buddypress' ); 1001 } 1002 } 997 1003 998 1004 break; 999 1005 case 'blogs' : 1000 $object = 'blog';1006 $object = 'blog'; 1001 1007 $item_id = $activities_template->activity->item_id; 1002 1008 1003 if ( !$alt ) 1004 $alt = sprintf( __( 'Site authored by %s', 'buddypress' ), get_blog_option( $item_id, 'blogname' ) ); 1009 if ( !$alt ) { 1010 $alt = sprintf( __( 'Profile picture of the author of the site %s', 'buddypress' ), get_blog_option( $item_id, 'blogname' ) ); 1011 } 1005 1012 1006 1013 break; … … 1009 1016 $item_id = $activities_template->activity->secondary_item_id; 1010 1017 1011 if ( empty( $alt ) ) 1012 $alt = __( 'Profile picture of %s', 'buddypress' ); 1018 if ( empty( $alt ) ) { 1019 $alt = sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $activities_template->activity->secondary_item_id ) ); 1020 } 1013 1021 1014 1022 break; … … 1016 1024 $object = 'user'; 1017 1025 $item_id = $activities_template->activity->user_id; 1018 $email = $activities_template->activity->user_email; 1019 1020 if ( !$alt ) 1021 $alt = __( 'Profile picture of %s', 'buddypress' ); 1026 $email = $activities_template->activity->user_email; 1027 1028 if ( !$alt ) { 1029 $alt = sprintf( __( 'Profile picture of %s', 'buddypress' ), $activities_template->activity->display_name ); 1030 } 1022 1031 1023 1032 break;
Note: See TracChangeset
for help on using the changeset viewer.