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