Changeset 3173
- Timestamp:
- 08/10/2010 12:27:53 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-activity/bp-activity-templatetags.php
r3169 r3173 478 478 // Set item_id and object (default to user) 479 479 switch ( $activities_template->activity->component ) { 480 case $bp->groups->id:480 case 'blogs' : 481 481 $object = 'group'; 482 482 $item_id = $activities_template->activity->item_id; 483 483 break; 484 case $bp->blogs->id:484 case 'blogs' : 485 485 $object = 'blog'; 486 486 $item_id = $activities_template->activity->item_id; 487 break; 488 case 'friends' : 489 $object = 'user'; 490 $item_id = $activities_template->activity->secondary_item_id; 487 491 break; 488 492 default : 489 493 $object = 'user'; 490 494 $item_id = $activities_template->activity->user_id; 495 $email = $activities_template->activity->user_email; 491 496 break; 492 497 } … … 496 501 $item_id = apply_filters( 'bp_get_activity_secondary_avatar_item_id', $item_id ); 497 502 498 // Used for any user to user activity499 if ( 'user' == $object && empty( $email) )500 $email = $activities_template->activity->user_email;503 // If we have no item_id or object, there is no avatar to display 504 if ( empty( $item_id ) || empty( $object ) ) 505 return false; 501 506 502 507 return apply_filters( 'bp_get_activity_secondary_avatar', bp_core_fetch_avatar( array( 'item_id' => $item_id, 'object' => $object, 'type' => $type, 'alt' => $alt, 'class' => $class, 'width' => $width, 'height' => $height, 'email' => $email ) ) );
Note: See TracChangeset
for help on using the changeset viewer.