Theme: Add support for Openverse team, fix Themes Team badge

This syncs `r17406-dotorg` to the canonical Git repo.
This commit is contained in:
Corey McKrill 2022-03-17 15:13:24 -07:00 committed by Ian Dunn
parent a545168ef2
commit 174a0381d6
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
3 changed files with 24 additions and 0 deletions

View file

@ -120,6 +120,17 @@ function get_aggregate_contributor_data_for_pledge( $pledge_id ) {
return $carry;
}, $initial );
$aggregate_data['teams'] = array_map(
function( $team ) {
// Fix for renamed team.
if ( 'Theme Review Team' === $team ) {
$team = 'Themes Team';
}
return $team;
},
$aggregate_data['teams']
);
$aggregate_data['teams'] = array_unique( $aggregate_data['teams'] );
sort( $aggregate_data['teams'] );