Opened 11 years ago
Closed 10 years ago
#4436 closed enhancement (fixed)
Secondary Avatar Link
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 1.7 | Priority: | normal |
Severity: | normal | Version: | 1.2.6 |
Component: | Activity | Keywords: | has-patch |
Cc: |
Description
I've been trying to wrap any secondary avatar in a link to that profile, group, event etc. I would like to use this within the activity stream, so that users can just click on the avatars to reach a destination. Currently BuddyPress only has the first avatar linked. However I would like the secondary to be 'linkable', and any further avatars within the activity.
After posting this Boone stated that because there are not enough filters within a particular hook to get the information I need.
Here's another quick example:
On a fresh BP install, if one navigated to their activity feed where there were two avatars per activity item, only the first one would be linked. However the second one would be mid sentence and have a link next to it. I wanted to move this avatar next to the first one, and have it linked to the appropriate destination.
Attachments (1)
Change History (8)
#1
@
11 years ago
- Component changed from Core to Activity
- Milestone changed from Awaiting Review to 1.7
- Severity changed from major to normal
- Version changed from 1.6 to 1.2.6
#3
@
11 years ago
- Keywords has-patch added
Add optional argument to bp_get_activity_secondary_avatar - (bool) "linked", if true, wraps the secondary avatar with a link to the corresponding object.
Add two new filters:
bp_get_activity_secondary_avatar_link - passed the URI of the computed link to the object
bp_get_activity_secondary_avatar_link_class - passed an empty string that is added as a class to the link
#5
@
11 years ago
Added new version of patch with better handling (use case) of the class attribute for the optional link applied to the secondary avatar. This patch removes the bp_get_activity_secondary_avatar_link_class and adds another optional argument "link_class". The value of the provided "link_class" argument is added to the secondary avatar link (default value is "")
#6
@
11 years ago
Thanks for the patch, transom. This approach generally looks good - linking the secondary avatar seems like a pretty common request, so I'm happy to add the 'linked'
option in addition to the filters. I'll have a closer look in the upcoming weeks (unless another core dev gets to it first)
I think this involves changing/adding filters in bp_get_activity_secondary_avatar()