Theme: Add functions, markup, and styles to show team badges

This commit is contained in:
Corey McKrill 2019-10-24 16:54:09 -07:00
parent 24d5f67040
commit 886dca56de
No known key found for this signature in database
GPG key ID: C2C0746F7BF17E38
4 changed files with 270 additions and 2 deletions

View file

@ -58,9 +58,11 @@ $contributors = Contributor\get_contributor_user_objects(
?>
</p>
<ul class="team-grid">
<?php foreach ( $contribution_data['teams'] as $team ) : ?>
<?php foreach ( $contribution_data['teams'] as $team ) :
$badge_classes = get_badge_classes( $team );
?>
<li>
<span class="team-badge team-<?php echo esc_attr( strtolower( $team ) ); ?>"></span>
<div class="badge item dashicons <?php echo esc_attr( implode( ' ', $badge_classes ) ); ?>"></div>
<?php echo esc_html( $team ); ?>
</li>
<?php endforeach; ?>