WordPress.org

Support

Support » Plugins and Hacks » [Plugin: JSON API] retrieving the users avatar from comments

[Plugin: JSON API] retrieving the users avatar from comments

  • thanks for this wonderful plugin. i am trying to get the avatars from a comment via your JSON api.

    This is working fine when i am extending the comment.php:

    $this->email = $wp_comment->comment_author_email;

    This not:

    $this->avatar = $wp_comment->comment_author_avatar;

    Sorry for the ignorance here, i am sure that my question is very evident – but i’m really a newbie to coding 🙂

    Cheers,

    Sandor

Viewing 1 replies (of 1 total)
  • Plugin Author dphiffer

    @dphiffer

    Hi sandor,

    Sorry for the slow reply.

    I think your instinct is right, but it seems that $wp_comment objects don’t get avatars added by WordPress. There’s a function called get_avatar (ref) that would be the way to do this.

    I think it’s a good feature idea, but I’m going to hold off on implementing it for now. If you want to share your approach here, I’d consider it for the main release.

    Thanks,
    -Dan

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: JSON API] retrieving the users avatar from comments’ is closed to new replies.