mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-15 06:45:47 +03:00
Build: 7dc7e421ae
This commit is contained in:
parent
7dc7e421ae
commit
5f016b5491
34 changed files with 891 additions and 12 deletions
26
themes/wporg-5ftf-2024/build/pledge-teams/render.php
Normal file
26
themes/wporg-5ftf-2024/build/pledge-teams/render.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
use WordPressDotOrg\FiveForTheFuture\XProfile;
|
||||
|
||||
if ( ! $block->context['postId'] ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$contribution_data = XProfile\get_aggregate_contributor_data_for_pledge( $block->context['postId'] );
|
||||
|
||||
?>
|
||||
<div
|
||||
<?php echo get_block_wrapper_attributes(); // phpcs:ignore ?>
|
||||
>
|
||||
<ul class="team-grid">
|
||||
<?php foreach ( $contribution_data['teams'] as $team ) :
|
||||
$badge_classes = XProfile\get_association_classes( $team );
|
||||
?>
|
||||
<li>
|
||||
<div class="badge item dashicons <?php echo esc_attr( implode( ' ', $badge_classes ) ); ?>"></div>
|
||||
<span class="badge-label"><?php echo esc_html( $team ); ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<p class="has-small-font-size"><a href="https://make.wordpress.org/"><?php esc_html_e( 'Learn more about contributor teams', 'wporg-5ftf' ); ?></a></p>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue