| @@ -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.3 | |
| 7 | +Version: 1.4 | |
| 8 | 8 | Author: Lee Willis |
| 9 | 9 | Author URI: http://www.leewillis.co.uk/ |
| 10 | 10 | */ |
| 11 | 11 | |
| @@ -251,18 +251,14 @@ | ||
| 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); | |
| 256 | 255 | $response->html .= '<li class="github-repo-contributor">'; |
| 257 | 256 | $response->html .= '<img class="github-repo-contributor-avatar" src="'; |
| 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 | - } | |
| 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).'">'; | |
| 263 | 259 | $response->html .= '<span class="github-repo-contributor-login">'; |
| 264 | - $response->html .= '<a href="https://github.com/'.esc_attr($contributor->login).'">'.esc_attr($contributor->login).'</a></span>'; | |
| 260 | + $response->html .= '<a href="https://github.com/'.esc_attr($contributor->author->login).'">'.esc_attr($contributor->author->login).'</a></span>'; | |
| 265 | 261 | } |
| 266 | 262 | |
| 267 | 263 | $response->html .= '</ul>'; |
| 268 | 264 | $response->html .= '<div style="clear: both;"></div>'; |