[wp-trac] [WordPress Trac] #43799: Add a UI and functionality to deactivate gravatar completely (for single site as well as network-wide)
WordPress Trac
noreply at wordpress.org
Thu Apr 19 06:13:35 UTC 2018
#43799: Add a UI and functionality to deactivate gravatar completely (for single
site as well as network-wide)
------------------------------+------------------------------
Reporter: TZ Media | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: gdpr 2nd-opinion | Focuses:
------------------------------+------------------------------
Changes (by TZ Media):
* keywords: gdpr => gdpr 2nd-opinion
Comment:
Upon looking at it - yes, it might be. I must admit that I didn't actually
look at the implementation of {{{get_avatar()}}} before opening this
ticket.
However, the implementation of get_avatar() allows for 2 ways to display
avatars even if show_avatars is false:
* {{{$args[''force_display'']}}}.
* the {{{pre_get_avatar}}}-filter hook.
This effectively makes it impossible for an admin to override a plugin or
theme trying to force the display of gravatars.
At least In the case of {{{show_avatars = false}}} and {{{force_display =
true}}}, we might have to deliver a (local!) placeholder image, because
the layout might depend on "something" being present, hence forcing its
output.
So to fix this we need to
* immediately return false if {{{show_avatars = false}}} and
{{{force_display = false}}}, even before executing {{{pre_get_avatar}}}
* immediately return a local placeholder image if {{{show_avatars =
false}}} and {{{force_display = true}}}
* in all other cases, run through get_avatar as usual.
I could easily patch this, but the question is if we should filter the
local placeholder through {{{pre_get_avatar}}} and {{{get_avatar}}}, and
effectively allow third party code to replace it with a non-local avatar
again.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43799#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list