Skip to:
Content

BuddyPress.org

Changeset 11669


Ignore:
Timestamp:
08/04/2017 06:16:51 PM (4 years ago)
Author:
r-a-y
Message:

Avatars: If requested width is larger than our thumb width, set avatar size to 'full'.

After r11614, fixes a regression where avatars might appear blurry when
fetching a post author's avatar.

Props coach-afrane.

Fixes #7578 (2.9-branch).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.9/src/bp-core/bp-core-avatars.php

    r11638 r11669  
    14011401    $args['html']    = false;
    14021402
     1403    // Use the 'full' type if size is larger than BP's thumb width.
     1404    if ( (int) $args['size'] > bp_core_avatar_thumb_width() ) {
     1405        $args['type'] = 'full';
     1406    }
     1407
    14031408    // Get the BuddyPress avatar URL.
    14041409    if ( $bp_avatar = bp_core_fetch_avatar( $args ) ) {
Note: See TracChangeset for help on using the changeset viewer.