Opened 16 years ago
Closed 16 years ago
#2697 closed enhancement (fixed)
Make it easier to shut off Gravatar
| Reported by: | boonebgorges | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.5 |
| Component: | Core | Version: | |
| Severity: | Keywords: | ||
| Cc: | westi |
Description
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Rather than a global constant a better way is just to pass the $no_grav value through a filter here:
https://trac.buddypress.org/browser/trunk/bp-core/bp-core-avatars.php#L210
e.g.
if ( ! apply_filters( 'bp_core_fetch_avatar_no_grav', $no_grav ) {