Skip to:
Content

BuddyPress.org

Changeset 10368


Ignore:
Timestamp:
11/19/2015 06:42:13 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 (trunk).

Props henry.wright.

File:
1 edited

Legend:

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

    r10356 r10368  
    623623        // Main Gravatar URL args.
    624624        $url_args = array(
    625             'd' => $default_grav,
    626625            's' => $params['width']
    627626        );
     
    633632        if ( ! empty( $params['rating'] ) ) {
    634633            $url_args['r'] = strtolower( $params['rating'] );
     634        }
     635        // Only set default image if 'Gravatar Logo' is not requested
     636        if ( 'gravatar_default' !== $default_grav ) {
     637            $url_args['d'] = $default_grav;
    635638        }
    636639
Note: See TracChangeset for help on using the changeset viewer.