[buddypress-trac] [BuddyPress] #5074: get_avatar() filtered by bp_core_fetch_avatar_filter() may result in stretched BP avatar
buddypress-trac
noreply at wordpress.org
Mon Jun 24 16:52:18 UTC 2013
#5074: get_avatar() filtered by bp_core_fetch_avatar_filter() may result in
stretched BP avatar
--------------------------+-----------------------------
Reporter: henrywright | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version: 1.7
Severity: normal | Keywords:
--------------------------+-----------------------------
bp_core_fetch_avatar_filter() filters the get_avatar() function so that
BuddyPress can attempt to find a BP avatar if one has been uploaded.
Imagine this scenario:
Set a default avatar height and width in bp-cutom.php
{{{
define ( 'BP_AVATAR_THUMB_WIDTH', 40 );
define ( 'BP_AVATAR_THUMB_HEIGHT', 40 );
}}}
Then use the get_avatar() function in the loop to display the post
author's avatar
{{{
$author = get_the_author();
echo get_avatar( get_the_author_meta('ID'), 120, '', $author );
}}}
Even though an image 120px x 120px in size is outputted, the 40px x 40px
BuddyPress thumb image is being used which results in a stretched avatar
being displayed (see attached).
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5074>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list