[wp-trac] [WordPress Trac] #24596: get_avatar() using BuddyPress thumb image

WordPress Trac noreply at wordpress.org
Tue Jun 18 08:36:58 UTC 2013


#24596: get_avatar() using BuddyPress thumb image
--------------------------+-----------------------------
 Reporter:  henrywright   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 I am using the get_avatar() function in the loop to display the post
 author's avatar.

 {{{
 <?php $author = get_the_author(); ?>
 <?php echo get_avatar( get_the_author_meta('ID'), 120, '', $author ); ?>
 }}}

 In bp-custom.php, I have set a default height and width on BuddyPress
 avatars

 {{{
 define ( 'BP_AVATAR_THUMB_WIDTH', 40 );

 define ( 'BP_AVATAR_THUMB_HEIGHT', 40 );
 }}}

 Even though my get_avatar() function is outputting an avatar 120x120 in
 size, the 40x40 BuddyPress thumb is being used which is resulting in a
 stretched avatar being displayed (see attached screenshot).

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24596>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list