bp_dtheme_activity_secondary_avatars( string $action, BP_Activity_Activity $activity )
Add secondary avatar image to this activity stream’s record, if supported.
Parameters Parameters
- $action
-
(string) (Required) The text of this activity
- $activity
-
(BP_Activity_Activity) (Required) Activity object
Return Return
(string)
Source Source
File: bp-themes/bp-default/functions.php
function bp_dtheme_activity_secondary_avatars( $action, $activity ) { switch ( $activity->component ) { case 'groups' : case 'friends' : // Only insert avatar if one exists if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) { $reverse_content = strrev( $action ); $position = strpos( $reverse_content, 'a<' ); $action = substr_replace( $action, $secondary_avatar, -$position - 2, 0 ); } break; } return $action; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
BuddyPress (1.2.6) | Introduced. |