PluginProbe
Github Embed / 2.1.0
Github Embed v2.1.0
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 +15 -13 2.0.22.1.0 View file →
@@ -2,10 +2,10 @@
2 2 /*
3 3 Plugin Name: Github Embed
4 4 Plugin URI: https://wordpress.org/plugins/github-embed/
5 5 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: 2.0.2
7 -Author: Ademti Software
6 +Version: 2.1.0
7 +Author: Ademti Software Ltd.
8 8 Author URI: https://www.ademti-software.co.uk/
9 9 */
10 10
11 11 /**
@@ -201,13 +201,14 @@
201 201 * @param string $owner The owner of the repository
202 202 * @param string $repository The repository name
203 203 */
204 204 private function oembed_github_repo_contributors( $owner, $repository ) {
205 - $data = [];
206 - $data['repo'] = $this->api->get_repo( $owner, $repository );
207 - $data['contributors'] = $this->api->get_repo_contributors( $owner, $repository );
208 - $data['gravatar_size'] = apply_filters( 'github_oembed_gravatar_size', 64 );
209 - $data['logo_class'] = apply_filters( 'wp_github_oembed_logo_class', 'github-logo-octocat' );
205 + $data = [];
206 + $data['repo'] = $this->api->get_repo( $owner, $repository );
207 + $data['contributors'] = $this->api->get_repo_contributors( $owner, $repository );
208 + $data['gravatar_size'] = apply_filters( 'github_oembed_gravatar_size', 64 );
209 + $data['logo_class'] = apply_filters( 'wp_github_oembed_logo_class', 'github-logo-octocat' );
210 + $data['details_expanded'] = apply_filters( 'wp_github_oembed_contributor_details_expanded', true );
210 211
211 212 $response = new stdClass();
212 213 $response->type = 'rich';
213 214 $response->width = '10';
@@ -251,15 +252,16 @@
251 252 * Retrieve the information from github for a repo, and
252 253 * output it as an oembed response
253 254 */
254 255 private function oembed_github_repo( $owner, $repository ) {
255 - $data = [
256 - 'owner_slug' => $owner,
257 - 'repo_slug' => $repository,
256 + $data = [
257 + 'owner_slug' => $owner,
258 + 'repo_slug' => $repository,
258 259 ];
259 - $data['repo'] = $this->api->get_repo( $owner, $repository );
260 - $data['commits'] = $this->api->get_repo_commits( $owner, $repository );
261 - $data['logo_class'] = apply_filters( 'wp_github_oembed_logo_class', 'github-logo-mark' );
260 + $data['repo'] = $this->api->get_repo( $owner, $repository );
261 + $data['commits'] = $this->api->get_repo_commits( $owner, $repository );
262 + $data['logo_class'] = apply_filters( 'wp_github_oembed_logo_class', 'github-logo-mark' );
263 + $data['details_expanded'] = apply_filters( 'wp_github_oembed_repository_commit_details_expanded', true );
262 264
263 265 $response = new stdClass();
264 266 $response->type = 'rich';
265 267 $response->width = '10';