Skip to:

Opened 14 years ago

Closed 13 years ago

#2697 closed enhancement (fixed)

Make it easier to shut off Gravatar

Reported by: boonebgorges's profile boonebgorges Owned by: boonebgorges's profile boonebgorges
Milestone: 1.5 Priority: minor
Severity: Version:
Component: Core Keywords:
Cc: westi


Related: #2367

Currently it's possible to disable Gravatar lookups by feeding no_grav=true to bp_core_fetch_avatar. However, bp_core_fetch_avatar() is called in many places throughout BuddyPress, so anyone who wants to disable Gravatar has to jump through a ton of hoops to make it work right.

A global constant, that when defined sets no_grav to true, would be an easy-to-implement solution. A similar check might have to happen in the signup avatar functions, and in the group creation process.

Attachments (1)

2697-1.patch (1.2 KB) - added by boonebgorges 14 years ago.

Download all attachments as: .zip

Change History (4)

#1 @westi
14 years ago

  • Cc westi added

Rather than a global constant a better way is just to pass the $no_grav value through a filter here:


if ( ! apply_filters( 'bp_core_fetch_avatar_no_grav', $no_grav ) {

#2 @boonebgorges
14 years ago

Good call. Here's a first go at a patch that provides just such a filter, and also lets the admin filter the default avatar location based on what kind of avatar it is.

Related: #2712

#3 @djpaul
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3699]) Add filter to allow gravatar lookups to be disabled site-wide. Fixes #2697, props boonebgorges for initial patch.

Note: See TracTickets for help on using tickets.