#36385 closed feature request (invalid)
Request: Allow Gravatar's "d" param to be filtered
Reported by: | henry.wright | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4.2 |
Component: | Users | Keywords: | |
Focuses: | Cc: |
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
@
9 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.
You can filter all the arguments, including
$args['default']
, using the get_avatar_data filter.