2020-05-01 / 4448阅 / 悠然
Retrieve the avatar <img> tag for a user, email address, MD5 hash, comment, or post.
(mixed)
(Required)
The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, user email, WP_User object, WP_Post object, or WP_Comment object.
(int)
(Optional)
Height and width of the avatar image file in pixels.
Default value: 96
(string)
(Optional)
URL for the default image or a default type. Accepts '404' (return a 404 instead of a default image), 'retro' (8bit), 'monsterid' (monster), 'wavatar' (cartoon face), 'indenticon' (the "quilt"), 'mystery', 'mm', or 'mysteryman' (The Oyster Man), 'blank' (transparent GIF), or 'gravatar_default' (the Gravatar logo). Default is the value of the 'avatar_default' option, with a fallback of 'mystery'.
Default value: ''
(string)
(Optional)
Alternative text to use in <img> tag.
Default value: ''
(array)
(Optional)
Extra arguments to retrieve the avatar.
Default value: null
(string|false) <img> tag for the user's avatar. False on failure.