| @@ -1,19 +1,20 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | /* |
| 3 | 4 | Plugin Name: Github Embed |
| 4 | 5 | Plugin URI: http://www.leewillis.co.uk/wordpress-plugins |
| 5 | 6 | Description: Paste the URL to a Github project into your posts or pages, and have the project information pulled in and displayed automatically |
| 6 | -Version: 1.7 | |
| 7 | +Version: 1.6 | |
| 7 | 8 | Author: Lee Willis |
| 8 | 9 | Author URI: http://www.leewillis.co.uk/ |
| 9 | 10 | */ |
| 10 | 11 | |
| 11 | 12 | /** |
| 12 | - * Copyright (c) 2013-2019 Lee Willis. All rights reserved. | |
| 13 | + * Copyright (c) 2013 Lee Willis. All rights reserved. | |
| 13 | 14 | * |
| 14 | - * Released under the GPL license v2 | |
| 15 | - * https://www.gnu.org/licenses/gpl-2.0.en.html | |
| 15 | + * Released under the GPL license | |
| 16 | + * http://www.opensource.org/licenses/gpl-license.php | |
| 16 | 17 | * |
| 17 | 18 | * This is an add-on for WordPress |
| 18 | 19 | * http://wordpress.org/ |
| 19 | 20 | * |
| @@ -193,10 +194,9 @@ | ||
| 193 | 194 | |
| 194 | 195 | $gravatar_size = apply_filters( 'github_oembed_gravatar_size', 64 ); |
| 195 | 196 | |
| 196 | 197 | // @TODO This should all be templated |
| 197 | - $logo_class = apply_filters( 'wp_github_oembed_logo_class', 'github-logo-octocat' ); | |
| 198 | - $response->html = '<div class="github-embed github-embed-repo-contributors ' . $logo_class . '">'; | |
| 198 | + $response->html = '<div class="github-embed github-embed-repo-contributors">'; | |
| 199 | 199 | $response->html .= '<p><a href="' . esc_attr( $repo->html_url ) . '" target="_blank">'; |
| 200 | 200 | $response->html .= '<strong>' . esc_html( $repo->description ) . '</strong></a><br/>'; |
| 201 | 201 | $response->html .= '<span class="github-heading">Contributors: </span>'; |
| 202 | 202 | $response->html .= '<ul class="github-repo-contributors">'; |
| @@ -231,10 +231,9 @@ | ||
| 231 | 231 | $response->version = '1.0'; |
| 232 | 232 | $response->title = $repo->description; |
| 233 | 233 | |
| 234 | 234 | // @TODO This should all be templated |
| 235 | - $logo_class = apply_filters( 'wp_github_oembed_logo_class', 'github-logo-octocat' ); | |
| 236 | - $response->html = '<div class="github-embed github-embed-milestone-summary ' . $logo_class . '">'; | |
| 235 | + $response->html = '<div class="github-embed github-embed-milestone-summary">'; | |
| 237 | 236 | $response->html .= '<p><a href="' . esc_attr( $repo->html_url ) . '" target="_blank"><strong>' . esc_html( $repo->description ) . '</strong></a><br/>'; |
| 238 | 237 | |
| 239 | 238 | $response->html .= '<span class="github-heading">Milestone: </span>'; |
| 240 | 239 | $response->html .= '<span class="github-milestone-title">' . esc_html( $summary->title ) . '</span><br>'; |
| @@ -274,10 +273,9 @@ | ||
| 274 | 273 | $response->version = '1.0'; |
| 275 | 274 | $response->title = $repo->description; |
| 276 | 275 | |
| 277 | 276 | // @TODO This should all be templated |
| 278 | - $logo_class = apply_filters( 'wp_github_oembed_logo_class', 'github-logo-mark' ); | |
| 279 | - $response->html = '<div class="github-embed github-embed-repository ' . $logo_class . '">'; | |
| 277 | + $response->html = '<div class="github-embed github-embed-repository">'; | |
| 280 | 278 | $response->html .= '<p><a href="' . esc_attr( $repo->html_url ) . '" target="_blank"><strong>' . esc_html( $repo->description ) . '</strong></a><br/>'; |
| 281 | 279 | $response->html .= '<a href="' . esc_attr( $repo->html_url ) . '" target="_blank">' . esc_html( $repo->html_url ) . '</a><br/>'; |
| 282 | 280 | $response->html .= '<a href="' . esc_attr( $repo->html_url . '/network' ) . '" target="_blank">' . esc_html( number_format_i18n( $repo->forks_count ) ) . '</a> forks.<br/>'; |
| 283 | 281 | $response->html .= '<a href="' . esc_attr( $repo->html_url . '/stargazers' ) . '" target="_blank">' . esc_html( number_format_i18n( $repo->stargazers_count ) ) . '</a> stars.<br/>'; |
| @@ -321,10 +319,9 @@ | ||
| 321 | 319 | $response->version = '1.0'; |
| 322 | 320 | $response->title = $owner_info->name; |
| 323 | 321 | |
| 324 | 322 | // @TODO This should all be templated |
| 325 | - $logo_class = apply_filters( 'wp_github_oembed_logo_class', 'github-logo-octocat' ); | |
| 326 | - $response->html = '<div class="github-embed github-embed-user ' . $logo_class . '">'; | |
| 323 | + $response->html = '<div class="github-embed github-embed-user">'; | |
| 327 | 324 | $response->html .= '<p><a href="https://github.com/' . esc_attr( $owner ) . '" target="_blank"><strong>' . esc_html( $owner ) . '</strong></a><br/>'; |
| 328 | 325 | $response->html .= esc_html( number_format_i18n( $owner_info->public_repos ) ) . ' repositories, '; |
| 329 | 326 | $response->html .= esc_html( number_format_i18n( $owner_info->followers ) ) . ' followers.</p>'; |
| 330 | 327 | $response->html .= '</div>'; |