| @@ -1,9 +1,4 @@ | ||
| 1 | -<?php | |
| 2 | - if ( ! isset( $data ) && isset( $args['data'] ) ) { | |
| 3 | - $data = $args['data']; | |
| 4 | - } | |
| 5 | -?> | |
| 6 | 1 | <div class="github-embed github-embed-repository <?php echo $data['logo_class'] ?>"> |
| 7 | 2 | <p> |
| 8 | 3 | <a href="<?php echo esc_attr( $data['repo']->html_url ) ?>" target="_blank"> |
| 9 | 4 | <strong> |
| @@ -14,21 +9,19 @@ | ||
| 14 | 9 | <a href="<?php echo esc_attr( $data['repo']->html_url ) ?>" target="_blank"><?php echo esc_html( $data['repo']->html_url ) ?></a><br> |
| 15 | 10 | <a href="<?php echo esc_attr( $data['repo']->html_url ) ?>/network" target="_blank"><?php echo esc_html( number_format_i18n( $data['repo']->forks_count ) ) ?></a> forks.<br> |
| 16 | 11 | <a href="<?php echo esc_attr( $data['repo']->html_url ) ?>/stargazers" target="_blank"><?php echo esc_html( number_format_i18n( $data['repo']->stargazers_count ) ) ?></a> stars.<br> |
| 17 | 12 | <a href="<?php echo esc_attr( $data['repo']->html_url ) ?>/issues" target="_blank"><?php echo esc_html( number_format_i18n( $data['repo']->open_issues_count ) ) ?></a> open issues.<br> |
| 18 | - <details <?php echo $data['details_expanded'] ? 'open' : ''; ?>> | |
| 19 | - <summary>Recent commits:</summary> | |
| 20 | - <ul class="github_commits"> | |
| 21 | - <?php | |
| 22 | - $i = 0; | |
| 23 | - foreach ( $data['commits'] as $commit ) : ?> | |
| 24 | - <li class="github_commit"> | |
| 25 | - <a href="https://github.com/<?php echo $data['owner_slug'] ?>/<?php echo $data['repo_slug'] ?>/commit/<?php echo esc_attr( $commit->sha ) ?>" target="_blank"><?php echo esc_html( $commit->commit->message ) ?></a>, <?php echo esc_html( $commit->commit->committer->name ); ?> | |
| 26 | - </li> | |
| 27 | - <?php | |
| 28 | - if (++$i == 5) break; | |
| 29 | - endforeach; | |
| 30 | - ?> | |
| 31 | - </ul> | |
| 32 | - </details> | |
| 13 | + Recent commits: | |
| 14 | + <ul class="github_commits"> | |
| 15 | + <?php | |
| 16 | + $i = 0; | |
| 17 | + foreach ( $data['commits'] as $commit ) : ?> | |
| 18 | + <li class="github_commit"> | |
| 19 | + <a href="https://github.com/<?php echo $data['owner_slug'] ?>/<?php echo $data['repo_slug'] ?>/commit/<?php echo esc_attr( $commit->sha ) ?>" target="_blank"><?php echo esc_html( $commit->commit->message ) ?></a>, <?php echo esc_html( $commit->commit->committer->name ); ?> | |
| 20 | + </li> | |
| 21 | + <?php | |
| 22 | + if (++$i == 5) break; | |
| 23 | + endforeach; | |
| 24 | + ?> | |
| 25 | + </ul> | |
| 33 | 26 | </p> |
| 34 | 27 | </div> |