#36385 closed feature request (invalid)
Request: Allow Gravatar's "d" param to be filtered
| Reported by: | henry.wright | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Users | Version: | 4.4.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Inside get_avatar_data() the d param is set like this:
$url_args = array(
's' => $args['size'],
'd' => $args['default'],
'f' => $args['force_default'] ? 'y' : false,
'r' => $args['rating'],
);
Here, $args['default'] will be something like mm or wavatar etc. These are the "default" default images generated and then served up by Gravatar. However, Gravatar also allows d to be a custom URL. Let's call this a "custom" default image.
Ref: https://en.gravatar.com/site/implement/images/#default-image
Is it possible to add a filter so that we can filter the value of d?
Change History (5)
#3
@
11 years ago
Correction: get_avatar_data probably won't work for this use case, as it runs after the URL is constructed.
pre_get_avatar_data should work.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
You can filter all the arguments, including
$args['default'], using the get_avatar_data filter.