Opened 6 years ago
Closed 6 years ago
#8026 closed defect (bug) (fixed)
Default avatar choices show same generated icon in general discussion settings
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.0.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
If you go to the Settings > Discussion settings page of WP, you'll notice all the avatar icons are the same generated icon according to the setting chosen.
For example, if your site default is Wavatar, all the choices show a Wavatar as an example.
The culprit is around line 653 of bp-core/bp-core-avatars.php
$default_grav = apply_filters( 'bp_core_avatar_default', $default_grav, $params );
// Only set default image if 'Gravatar Logo' is not requested.
if ( 'gravatar_default' !== $default_grav ) {
$url_args['d'] = $default_grav;
}
This does not respect the
$args['default']
argument provided by WordPress get_avatar() and
$url_args['d']
gets given an incorrect default gravatar for a regular user in the settings context.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Thanks for the ticket. I'm fairly sure that this is a very old issue in BP - I've noticed it before but never bothered to try figuring it out :)
I had to do the following to fix it. See 8026.diff:
force_default
, don't attempt to scan for uploaded images.force_default
, ensure that thed
param is set todefault
as passed fromget_avatar()
default_avatar
override ifforce_default
@r-a-y Since you have touched this in the past, maybe you could give a brief review?