#6989 closed defect (bug) (fixed)
Request: Allow Gravatar's "d" param to be filtered
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.6 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Core | Keywords: | has-patch |
| Cc: |
Description
Inside bp_core_fetch_avatar(), the d param is set like this:
if ( 'gravatar_default' !== $default_grav ) {
$url_args['d'] = $default_grav;
}
$default_grav will be either wavatar, mm etc. These are the "default" default images (generated by Grav). But Gravatar also allows d to be a URL:
Ref: https://en.gravatar.com/site/implement/images/#default-image
Is it possible to add a filter which lets us change the value of the d param before it's passed to Gravatar?
I'm thinking $params would be useful to have in hooked functions because from that we could get the user or group ID etc.
Attachments (1)
Change History (7)
#2
@
10 years ago
- Keywords has-patch added
6989.diff introduces a bp_core_avatar_default filter hook which allows Gravatar's "d" param to be filtered.
Looking at WordPress, the
defaultarg can be set using a filter such aspre_get_avatar_data. The problem is, the value doesn't carry through intobp_core_fetch_avatar().