The basic_user_avatar filter isn't very useful, because you just get a blob of HTML and you have no idea what user it's for. This adds $user_id to the filter, so you could re-fetch the user meta and re-create the HTML however you wanted.
My use case for this is to append a user-meta-stored version number to the src so that browser caches are immediately invalidated when a user updates their avatar.
The
basic_user_avatar
filter isn't very useful, because you just get a blob of HTML and you have no idea what user it's for. This adds$user_id
to the filter, so you could re-fetch the user meta and re-create the HTML however you wanted.My use case for this is to append a user-meta-stored version number to the
src
so that browser caches are immediately invalidated when a user updates their avatar.