Automattic / Automattic/co-authors-plus

Javascript Implementation for the Author Box on a post loads Gravatar would like to support WP Avatar or BP Avatar

Open
#272 1 comment 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
PHP
Stars
322
Forks
216
Avg merge
7h 50m
Merged PRs (30d)
65

Description

Hello,

I opened a support ticket - https://wordpress.org/support/topic/javascript-author-box-rendering-of-avatar-uses-gravatar?replies=1#post-7210800

But figured this might be a better place to discuss the issue.

When editing a post the author box is generated via javascript;
![screen shot 2015-07-22 at 5 13 35 pm](https://cloud.githubusercontent.com/assets/8726005/8840368/0a668b48-3095-11e5-97a7-76122170b788.png)
This javascript implementation simply uses the gravatar url comprised of the users MD5 email;

```
// Adapted from http://www.deluxeblogtips.com/2010/04/get-gravatar-using-only-javascript.html
function get_gravatar_link(email, size) {
var size = size || 80;

// need to check if page is secure or not
var gravatar_url = 'http://www.gravatar.com/avatar/';
if ("https:" == document.location.protocol) {
// secure
gravatar_url = 'https://secure.gravatar.com/avatar/';
}
return gravatar_url + MD5(email) + '.jpg?s=' + size;
}
```

When using Buddypress or WP Avatar the avatars are loaded into the actual system and gravatar is just a fall back. I'd like to support Buddypress Avatars and was wondering if there's anyway to access them through javascript so as to amend the co-authors-plus.js script to utilize the appropriate avatar image.

Thoughts/Advice appreciated.
Thanks

Contributor guide

Open the contributing guide

Research direction

Start by reading co-authors-plus.js and the author-box rendering path described in the issue, then investigate how WordPress, BuddyPress, or WP Avatar exposes the appropriate avatar URL. Done means the JavaScript author box uses the selected avatar source while retaining Gravatar as a fallback; the payload names no test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wordpress
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.