Skip to:
Content

BuddyPress.org

Changeset 10369


Ignore:
Timestamp:
11/19/2015 06:42:56 PM (6 years ago)
Author:
r-a-y
Message:

Avatars: Fix issue when selecting 'Gravatar Logo' from 'Settings > Discussion > Default Avatar'.

If 'Gravatar Logo' was selected from the 'Settings > Discussion' admin
page, avatars on BuddyPress pages that did not have a valid Gravatar would
not display properly.

This is a regression due to changes in #6622.

Fixes #6737 (2.4-branch).

Props henry.wright.

File:
1 edited

Legend:

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

    r10287 r10369  
    624624        // Main Gravatar URL args
    625625        $url_args = array(
    626             'd' => $default_grav,
    627626            's' => $params['width']
    628627        );
     
    634633        if ( ! empty( $params['rating'] ) ) {
    635634            $url_args['r'] = strtolower( $params['rating'] );
     635        }
     636        // Only set default image if 'Gravatar Logo' is not requested
     637        if ( 'gravatar_default' !== $default_grav ) {
     638            $url_args['d'] = $default_grav;
    636639        }
    637640
Note: See TracChangeset for help on using the changeset viewer.