Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send the full comment object to get_avatar() rather than just the comment author's email address #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mdawaffe
Copy link

get_avatar() can accept a user ID, email address, or comment object. It's best to use a comment object because it provides the most context to plugins which use the get_avatar filter to change the response of the get_avatar() function.

Note that core WordPress always sends the full comment object to get_avatar() when rendering comment avatars.

Jetpack uses the get_avatar filter to replace the default avatar with the Twitter or Facebook avatar for comments submitted using Twitter or Facebook authentication. Jetpack needs the full comment object to do this.

Michael D Adams added 2 commits February 18, 2013 22:03
…mail address.

`get_avatar()` can accept a user ID, email address, or comment object.  It's best to use a comment object because it provides the most context to plugins which use the `get_avatar` filter to change the response of the `get_avatar()` function.

Core WordPress always sends the full comment object to `get_avatar()` when rendering comment avatars.
@ghost ghost assigned OddOneOut Feb 19, 2013
@kminh kminh removed this from the 1.2.1 milestone Aug 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants