Opened 12 years ago
Closed 12 years ago
#4503 closed enhancement (fixed)
bp_core_fetch_avatar hooking into get_avatar
Reported by: | melindrea | Owned by: | |
---|---|---|---|
Milestone: | 1.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: | jkudish@… |
Description
In its' core, get_avatar returns the gravatar with the classes avatar, avatar-$size and photo. Buddypress hooks in to the get_avatar filter (line 686, bp-core-avatars.php) to see if there is a locally uploaded avatar. The gravatar returned, whether local or not, has the classes avatar and user-$id-avatar.
I feel that it would be a good idea if the filter returned the same classes as the get_avatar, since it's very unexpected behaviour for them to not be there.
Attachments (2)
Change History (8)
#3
@
12 years ago
Looking at these, we need to patch bp_core_fetch_avatar_filter(). We could use $width for the avatar-$size class, but $width is an optional parameter. If it's not set, what then? bp_core_avatar_full_width()? bp_core_avatar_thumb_width()?
Doesn't look to be too hard to patch if someone wants to go for it. The scope of the ticket is to add "avatar-$size" and "photo" to the avatars.
@
12 years ago
bp_core_fetch_avatar(): adjust how the image width is set and how the html width attribute is created and add avatar-$width and photo classes to the html output by the function
I can't see any reason not to do this?