#2436 closed enhancement (fixed)
Make it easy to just get the avatar URL
| Reported by: | hempsworth | Owned by: | hempsworth |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2.5 |
| Component: | Core | Version: | |
| Severity: | Keywords: | has-patch | |
| Cc: | hempsworth@… |
Description
There is no easy way to just get the avatar URL, all of the available methods:
bp_displayed_user_avatar() bp_loggedin_user_avatar() bp_core_fetch_avatar()
all return the entire <img>. I've slightly modified these functions to allow just the URL to be outputted. Completely backwards compatible, and negates the need for hacks like this.
Now, to get the URL all you need to do is:
bp_displayed_user_avatar( 'url=true' ); bp_loggedin_user_avatar( 'url=true' );
Attachments (1)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(In [3086]) Fixes #2436 and adds some documentation to bp_core_fetch_avatar