Centralize the function here until it gets added to core.
public static get_avatar_url ( integer | string | object $id_or_email, integer $size = 96, string $default = '', boolean $force_display = false ) : array | ||
$id_or_email | integer | string | object | A user ID, email address, or comment object |
$size | integer | Size of the avatar image |
$default | string | URL to a default image to use if no avatar is available |
$force_display | boolean | Whether to force it to return an avatar even if show_avatars is disabled |
Résultat | array | First element is the URL, second is the class. |