You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In contrast to default WP behaviour nothing (an empty string) is returned when the user doesn't have an avatar assigned. This means that you can't have a default avatar as the default argument of get_avatar is ignored.
There are multiple options to handle this:
1. Fall back to default behaviour (Gravatar) when no local avatar is set
This is probably expected behaviour when this plugin is seen as an extension of default WP behaviour.
2. Only fall back to default if it is a URL
This is probably expected behaviour if this plugin is seen as a replacement of default WP behaviour. Especially since one of the benefits of this plugin is/can be not to leak any information to Gravatar this should in any case be an option.
Personally I'd prefer option 2 as it is the safe default. But option 1 is probably more aligned with user expectations. A filter for this should exist in any case.
The text was updated successfully, but these errors were encountered:
Totally agree. The plugin now is at a point where it needs three things (in pretty much this order):
Fix the existing bugs
Remove everything (files, strings) from the original plugin that is not in use
Start writing up the actual user stories and things that really happen
Especially point three is what I think is important if the plugin should stay maintainable. Then decisions like this issue are much easier (with an overview of where things need to change). Also it would make it easier for other developer using this plugin when there is a written description of what use cases this plugin serves – this with a certain attention of detail is what I am often missing with other plugins and what I would like to have here in the "end" with a v1.0.0. So +1 from me.
In contrast to default WP behaviour nothing (an empty string) is returned when the user doesn't have an avatar assigned. This means that you can't have a default avatar as the
default
argument ofget_avatar
is ignored.There are multiple options to handle this:
1. Fall back to default behaviour (Gravatar) when no local avatar is set
This is probably expected behaviour when this plugin is seen as an extension of default WP behaviour.
2. Only fall back to
default
if it is a URLThis is probably expected behaviour if this plugin is seen as a replacement of default WP behaviour. Especially since one of the benefits of this plugin is/can be not to leak any information to Gravatar this should in any case be an option.
Personally I'd prefer option 2 as it is the safe default. But option 1 is probably more aligned with user expectations. A filter for this should exist in any case.
The text was updated successfully, but these errors were encountered: