PluginProbe
Github Embed / 1.3
Github Embed v1.3
trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.0.1 2.0.2 2.1.0 2.2.0 2.2.1
← All changes | github-embed.php +8 -4 1.41.3 View file →
@@ -3,9 +3,9 @@
3 3 /*
4 4 Plugin Name: Github Embed
5 5 Plugin URI: http://www.leewillis.co.uk/wordpress-plugins
6 6 Description: Paste the URL to a Github project into your posts or pages, and have the project information pulled in and displayed automatically
7 -Version: 1.4
7 +Version: 1.3
8 8 Author: Lee Willis
9 9 Author URI: http://www.leewillis.co.uk/
10 10 */
11 11
@@ -251,14 +251,18 @@
251 251 $response->html .= '<ul class="github-repo-contributors">';
252 252
253 253 foreach ( $contributors as $contributor ) {
254 254
255 + $details = $this->api->get_user ($contributor->login);
255 256 $response->html .= '<li class="github-repo-contributor">';
256 257 $response->html .= '<img class="github-repo-contributor-avatar" src="';
257 - $response->html .= esc_url(add_query_arg(array('s'=>$gravatar_size), $contributor->author->avatar_url));
258 - $response->html .= '" alt="Picture of '.esc_attr($contributor->author->login).'">';
258 + $response->html .= esc_url(add_query_arg(array('s'=>$gravatar_size), $contributor->avatar_url));
259 + $response->html .= '" alt="Picture of '.esc_attr($contributor->login).'">';
260 + if ( ! empty ( $details->name ) ) {
261 + $response->html .= '<span class="github-repo-contributor-name">'.esc_html($details->name)."</span><br>";
262 + }
259 263 $response->html .= '<span class="github-repo-contributor-login">';
260 - $response->html .= '<a href="https://github.com/'.esc_attr($contributor->author->login).'">'.esc_attr($contributor->author->login).'</a></span>';
264 + $response->html .= '<a href="https://github.com/'.esc_attr($contributor->login).'">'.esc_attr($contributor->login).'</a></span>';
261 265 }
262 266
263 267 $response->html .= '</ul>';
264 268 $response->html .= '<div style="clear: both;"></div>';