mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-06 10:45:44 +03:00
Add contributors report, and allow data to be downloaded.
This commit is contained in:
parent
554347ac52
commit
a26287cd68
2 changed files with 139 additions and 0 deletions
|
@ -69,6 +69,25 @@ function get_all_xprofile_contributor_hours_teams(): array {
|
|||
return $users;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Reconfigures xprofile data to be in indexed array.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function get_all_xprofile_contributors_indexed() : array {
|
||||
|
||||
$all_data = get_all_xprofile_contributor_hours_teams();
|
||||
|
||||
$newdata = array();
|
||||
foreach ( $all_data as $contributor ) {
|
||||
$newdata[ $contributor->user_id ] = [ 'hours_per_week' => $contributor->hours_per_week, 'team_names' => $contributor->team_names ];
|
||||
}
|
||||
|
||||
return $newdata;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Pull relevant data from profiles.wordpress.org.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue