[buddypress-trac] [BuddyPress] #2436: Make it easy to just get the avatar URL
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Wed Jun 9 19:20:53 UTC 2010
#2436: Make it easy to just get the avatar URL
-------------------------+--------------------------------------------------
Reporter: hempsworth | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 1.2.5
Component: Core | Keywords: has-patch
-------------------------+--------------------------------------------------
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 [http://buddypress.org/community/groups/how-to-and-
troubleshooting/forum/topic/is-it-possible-to-get-only-the-avatar-url/
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' );
}}}
--
Ticket URL: <http://trac.buddypress.org/ticket/2436>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list