{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/comments/222289339","pull_request_review_id":161137930,"id":222289339,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjI4OTMzOQ==","diff_hunk":"@@ -676,19 +676,31 @@ function coauthors_wp_list_authors( $args = array() ) {\n  * This is a replacement for using get_avatar(), which only operates on email addresses and cannot differentiate\n  * between Guest Authors (who may share an email) and regular user accounts\n  *\n- * @param  object   $coauthor The Co Author or Guest Author object\n- * @param  int      $size     The desired size\n- * @return string             The image tag for the avatar, or an empty string if none could be determined\n+ * @param  object        $coauthor The Co Author or Guest Author object.\n+ * @param  int           $size     The desired size.\n+ * @param  string        $default  Optional. URL for the default image or a default type. Accepts '404'\n+ *                                 (return a 404 instead of a default image), 'retro' (8bit), 'monsterid'\n+ *                                 (monster), 'wavatar' (cartoon face), 'indenticon' (the \"quilt\"),\n+ *                                 'mystery', 'mm', or 'mysteryman' (The Oyster Man), 'blank' (transparent GIF),\n+ *                                 or 'gravatar_default' (the Gravatar logo). Default is the value of the\n+ *                                 'avatar_default' option, with a fallback of 'mystery'.\n+ * @param  string        $alt      Optional. Alternative text to use in &lt;img&gt; tag. Default false.\n+ * @param  array|string  $class    Array or string of additional classes to add to the &lt;img&gt; element. Default null.\n+ * @return string                  The image tag for the avatar, or an empty string if none could be determined.\n  */\n-function coauthors_get_avatar( $coauthor, $size = 32, $default = '', $alt = false ) {\n+function coauthors_get_avatar( $coauthor, $size = 32, $default = '', $alt = false, $class = null ) {\n \tglobal $coauthors_plus;\n \n \tif ( ! is_object( $coauthor ) ) {\n \t\treturn '';\n \t}\n \n+\tif ( ! empty( $class ) && is_array( $class ) ) {","path":"template-tags.php","position":27,"original_position":27,"commit_id":"21c4c17e71840c9e701edd6eb9d7d7e9c1ae50ba","original_commit_id":"21c4c17e71840c9e701edd6eb9d7d7e9c1ae50ba","user":{"login":"shantanu2704","id":9296246,"node_id":"MDQ6VXNlcjkyOTYyNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/9296246?v=4","gravatar_id":"","url":"https://api.github.com/users/shantanu2704","html_url":"https://github.com/shantanu2704","followers_url":"https://api.github.com/users/shantanu2704/followers","following_url":"https://api.github.com/users/shantanu2704/following{/other_user}","gists_url":"https://api.github.com/users/shantanu2704/gists{/gist_id}","starred_url":"https://api.github.com/users/shantanu2704/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantanu2704/subscriptions","organizations_url":"https://api.github.com/users/shantanu2704/orgs","repos_url":"https://api.github.com/users/shantanu2704/repos","events_url":"https://api.github.com/users/shantanu2704/events{/privacy}","received_events_url":"https://api.github.com/users/shantanu2704/received_events","type":"User","site_admin":false},"body":"Yes, I agree. That way we can pass in the $class parameter as is, and `get_guest_author_thumbnail()` and `get_avatar()` will check if it's an array or string.","created_at":"2018-10-03T12:31:17Z","updated_at":"2018-10-03T12:31:17Z","html_url":"https://github.com/Automattic/Co-Authors-Plus/pull/610#discussion_r222289339","pull_request_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/610","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/comments/222289339"},"html":{"href":"https://github.com/Automattic/Co-Authors-Plus/pull/610#discussion_r222289339"},"pull_request":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/610"}},"in_reply_to_id":221800006},"pull_request":{"url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/610","id":219467538,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NDY3NTM4","html_url":"https://github.com/Automattic/Co-Authors-Plus/pull/610","diff_url":"https://github.com/Automattic/Co-Authors-Plus/pull/610.diff","patch_url":"https://github.com/Automattic/Co-Authors-Plus/pull/610.patch","issue_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/610","number":610,"state":"open","locked":false,"title":"Add the ability to add additional classes to coauthors_get_avatar()","user":{"login":"shantanu2704","id":9296246,"node_id":"MDQ6VXNlcjkyOTYyNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/9296246?v=4","gravatar_id":"","url":"https://api.github.com/users/shantanu2704","html_url":"https://github.com/shantanu2704","followers_url":"https://api.github.com/users/shantanu2704/followers","following_url":"https://api.github.com/users/shantanu2704/following{/other_user}","gists_url":"https://api.github.com/users/shantanu2704/gists{/gist_id}","starred_url":"https://api.github.com/users/shantanu2704/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantanu2704/subscriptions","organizations_url":"https://api.github.com/users/shantanu2704/orgs","repos_url":"https://api.github.com/users/shantanu2704/repos","events_url":"https://api.github.com/users/shantanu2704/events{/privacy}","received_events_url":"https://api.github.com/users/shantanu2704/received_events","type":"User","site_admin":false},"body":"Addresses #266.\r\n\r\nBased on the type of co-author, `coauthors_get_avatar()` calls either `get_guest_author_thumbnail()` or `get_avatar()`.\r\n\r\n[`get_avatar()`](https://github.com/WordPress/WordPress/blob/master/wp-includes/pluggable.php#L2533) accepts an `args` array, an element of which is an `array|string` of additional classes.\r\n\r\nA similar modification is required for [`get_guest_author_thumbnail()`](https://github.com/Automattic/Co-Authors-Plus/blob/master/php/class-coauthors-guest-authors.php#L965) which will also accept an additional parameter `$class`; a string of additional classes. \r\n\r\n[`coauthors_get_avatar()`](https://github.com/Automattic/Co-Authors-Plus/blob/master/template-tags.php#L683) now accepts an optional param `$class` which will be either an array or string of additional classes, the default value of which will be `null`. If it is an array of classes, it will be converted to a space delimited string using `implode()` and passed to either `get_guest_author_thumbnail()` or `get_avatar()`.","created_at":"2018-10-01T18:14:28Z","updated_at":"2018-10-03T12:31:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b623736dbc757195a95e7dd763fde8bcc7d7744a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/610/commits","review_comments_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/610/comments","review_comment_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/610/comments","statuses_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/statuses/21c4c17e71840c9e701edd6eb9d7d7e9c1ae50ba","head":{"label":"shantanu2704:266/add-classes-to-avatars","ref":"266/add-classes-to-avatars","sha":"21c4c17e71840c9e701edd6eb9d7d7e9c1ae50ba","user":{"login":"shantanu2704","id":9296246,"node_id":"MDQ6VXNlcjkyOTYyNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/9296246?v=4","gravatar_id":"","url":"https://api.github.com/users/shantanu2704","html_url":"https://github.com/shantanu2704","followers_url":"https://api.github.com/users/shantanu2704/followers","following_url":"https://api.github.com/users/shantanu2704/following{/other_user}","gists_url":"https://api.github.com/users/shantanu2704/gists{/gist_id}","starred_url":"https://api.github.com/users/shantanu2704/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantanu2704/subscriptions","organizations_url":"https://api.github.com/users/shantanu2704/orgs","repos_url":"https://api.github.com/users/shantanu2704/repos","events_url":"https://api.github.com/users/shantanu2704/events{/privacy}","received_events_url":"https://api.github.com/users/shantanu2704/received_events","type":"User","site_admin":false},"repo":{"id":117942786,"node_id":"MDEwOlJlcG9zaXRvcnkxMTc5NDI3ODY=","name":"Co-Authors-Plus","full_name":"shantanu2704/Co-Authors-Plus","private":false,"owner":{"login":"shantanu2704","id":9296246,"node_id":"MDQ6VXNlcjkyOTYyNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/9296246?v=4","gravatar_id":"","url":"https://api.github.com/users/shantanu2704","html_url":"https://github.com/shantanu2704","followers_url":"https://api.github.com/users/shantanu2704/followers","following_url":"https://api.github.com/users/shantanu2704/following{/other_user}","gists_url":"https://api.github.com/users/shantanu2704/gists{/gist_id}","starred_url":"https://api.github.com/users/shantanu2704/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantanu2704/subscriptions","organizations_url":"https://api.github.com/users/shantanu2704/orgs","repos_url":"https://api.github.com/users/shantanu2704/repos","events_url":"https://api.github.com/users/shantanu2704/events{/privacy}","received_events_url":"https://api.github.com/users/shantanu2704/received_events","type":"User","site_admin":false},"html_url":"https://github.com/shantanu2704/Co-Authors-Plus","description":"Multiple bylines and Guest Authors for WordPress","fork":true,"url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus","forks_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/forks","keys_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/teams","hooks_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/hooks","issue_events_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/issues/events{/number}","events_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/events","assignees_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/assignees{/user}","branches_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/branches{/branch}","tags_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/tags","blobs_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/git/refs{/sha}","trees_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/statuses/{sha}","languages_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/languages","stargazers_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/stargazers","contributors_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/contributors","subscribers_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/subscribers","subscription_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/subscription","commits_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/commits{/sha}","git_commits_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/git/commits{/sha}","comments_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/comments{/number}","issue_comment_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/issues/comments{/number}","contents_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/contents/{+path}","compare_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/merges","archive_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/downloads","issues_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/issues{/number}","pulls_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/pulls{/number}","milestones_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/milestones{/number}","notifications_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/labels{/name}","releases_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/releases{/id}","deployments_url":"https://api.github.com/repos/shantanu2704/Co-Authors-Plus/deployments","created_at":"2018-01-18T06:35:18Z","updated_at":"2018-10-01T17:04:39Z","pushed_at":"2018-10-01T17:58:51Z","git_url":"git://github.com/shantanu2704/Co-Authors-Plus.git","ssh_url":"git@github.com:shantanu2704/Co-Authors-Plus.git","clone_url":"https://github.com/shantanu2704/Co-Authors-Plus.git","svn_url":"https://github.com/shantanu2704/Co-Authors-Plus","homepage":"http://vip.wordpress.com/plugins/co-authors-plus/","size":1825,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"cb77cb36c8cdc615375ca4ad4152a7e6d4635e4b","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":3251207,"node_id":"MDEwOlJlcG9zaXRvcnkzMjUxMjA3","name":"Co-Authors-Plus","full_name":"Automattic/Co-Authors-Plus","private":false,"owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Automattic/Co-Authors-Plus","description":"Multiple bylines and Guest Authors for WordPress","fork":false,"url":"https://api.github.com/repos/Automattic/Co-Authors-Plus","forks_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/forks","keys_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/teams","hooks_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/hooks","issue_events_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/events","assignees_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/tags","blobs_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/languages","stargazers_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/stargazers","contributors_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/contributors","subscribers_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/subscribers","subscription_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/subscription","commits_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/merges","archive_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/downloads","issues_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/deployments","created_at":"2012-01-23T22:43:07Z","updated_at":"2018-10-02T18:04:36Z","pushed_at":"2018-10-01T18:14:29Z","git_url":"git://github.com/Automattic/Co-Authors-Plus.git","ssh_url":"git@github.com:Automattic/Co-Authors-Plus.git","clone_url":"https://github.com/Automattic/Co-Authors-Plus.git","svn_url":"https://github.com/Automattic/Co-Authors-Plus","homepage":"http://vip.wordpress.com/plugins/co-authors-plus/","size":1848,"stargazers_count":180,"watchers_count":180,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":146,"mirror_url":null,"archived":false,"open_issues_count":146,"license":null,"forks":146,"open_issues":146,"watchers":180,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/610"},"html":{"href":"https://github.com/Automattic/Co-Authors-Plus/pull/610"},"issue":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/610"},"comments":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/610/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/610/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/610/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/statuses/21c4c17e71840c9e701edd6eb9d7d7e9c1ae50ba"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"shantanu2704"}}