SHARE
TWEET

r-a-y

a guest Aug 10th, 2010 21 Never
  1.                 if ( (int)$activities_template->activity->user_id )
  2.                         $item_id = $activities_template->activity->user_id;
  3.                 //else if ( $activities_template->activity->item_id )
  4.                 //      $item_id = $activities_template->activity->item_id;
  5.  
  6.                 $object = 'user';
  7.                 //if ( $bp->groups->id == $activities_template->activity->component && !(int) $activities_template->activity->user_id )
  8.                 if ( $bp->groups->id == $activities_template->activity->component ) {
  9.                         $object = 'group';
  10.                         $item_id = $activities_template->activity->item_id;
  11.                 }
  12.                 if ( $bp->blogs->id == $activities_template->activity->component ) {
  13.                         $object = 'blog';
  14.                         $item_id = $activities_template->activity->item_id;
  15.                 }
  16.  
  17.                 $object = apply_filters( 'bp_get_activity_avatar_object_' . $activities_template->activity->component, $object );
  18.  
  19.                 /* If this is a user object pass the users' email address for Gravatar so we don't have to refetch it. */
  20.                 if ( 'user' == $object && empty($email) )
  21.                         $email = $activities_template->activity->user_email;
  22.  
  23.                 return apply_filters( 'bp_get_activity_avatar', bp_core_fetch_avatar( array( 'item_id' => $item_id, 'object' => $object, 'type' => $type, 'alt' => $alt, 'class' => $class, 'width' => $width, 'height' => $height, 'email' => $email ) ) );
  24.         }
RAW Paste Data
Top