How to remove the Gravatar image from Username column in the All User admin page?
Leave a Reply
You must be logged in to post a comment.
How to remove the Gravatar image from Username column in the All User admin page?
You must be logged in to post a comment.
Since there is no special avatar column to unset (the avatars are inside the username column), you could try instead to hide the avatars via css:
where they are hidden for non-admins.
The result will be like this:
pre_option_show_avatars
and return something that evaluates toFALSE
but isn’tFALSE
. Let’s say a0
.restrict_manage_users
.restrict_manage_users-network
, but that doesn’t work, so we use the filterwpmu_users_columns
and return whatever we get here.Result:
There seems to be a filter for the
get_avatar
function. So I just output an empty string to it.UPDATE: Restrict to ‘All Users‘ page only.
This is an old thread, but just in case someone else needs it: starting in version 4.2, you can use the
pre_get_avatar
filter to bypass pulling the actual avatar and just sending back an empty string.