Opened 13 years ago
Closed 13 years ago
#3804 closed defect (bug) (fixed)
bp_core_fetch_avatar() doesn't respect 'alt'; we should be passing 'alt' and 'title' where possible
Reported by: | boonebgorges | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
Our directory templates are horrendously inefficient when it comes to displaying avatars. We don't pass 'alt' or 'title' to bp_core_fetch_avatar() (at least in the groups loop), which means that bp_core_fetch_avatar() has to pull up the group object, which means 10 extra queries a page. We already have the necessary information in the groups_template, which should be passed along.
Second, there is a problem in the bp_core_fetch_avatar() logic, so that 'alt' params won't be respected anyway. I'll fix both of these at the same time.
Change History (5)
#2
@
13 years ago
r5455 cuts a couple dozen queries off of the group directory page. I need to go back and check this on (at least) the member directory, and make sure that my changes to bp_core_fetch_avatar()'s alt param will be fully backward compatible.
#3
@
13 years ago
Yes! Thank you!
The main 'bp_core_fetch_avatar' filter also needs to pass the alt text as an additional parameter as well.
I had to code a workaround for this by hooking into the "bp_core_avatar_alt" filter.
(In [5455]) Pass alt and title parameters to bp_core_fetch_avatar() on group directory page, when possible. Fixes alt logic and reduces queries in bp_core_fetch_avatar(). See #3804