| @@ -9,19 +9,21 @@ | ||
| 9 | 9 | <a href="<?php echo esc_attr( $data['repo']->html_url ) ?>" target="_blank"><?php echo esc_html( $data['repo']->html_url ) ?></a><br> |
| 10 | 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> |
| 11 | 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> |
| 12 | 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> |
| 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> | |
| 13 | + <details <?php echo $data['details_expanded'] ? 'open' : ''; ?>> | |
| 14 | + <summary>Recent commits:</summary> | |
| 15 | + <ul class="github_commits"> | |
| 16 | + <?php | |
| 17 | + $i = 0; | |
| 18 | + foreach ( $data['commits'] as $commit ) : ?> | |
| 19 | + <li class="github_commit"> | |
| 20 | + <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 ); ?> | |
| 21 | + </li> | |
| 22 | + <?php | |
| 23 | + if (++$i == 5) break; | |
| 24 | + endforeach; | |
| 25 | + ?> | |
| 26 | + </ul> | |
| 27 | + </details> | |
| 26 | 28 | </p> |
| 27 | 29 | </div> |