Enable individual players to compete in events

This commit is contained in:
Brian Miyaji
2014-12-10 04:11:08 +11:00
parent e90e32af8b
commit 46cd25d73d
7 changed files with 54 additions and 22 deletions

View File

@@ -106,6 +106,13 @@ class SP_Event extends SP_Custom_Post{
endif;
endforeach;
endif;
// Move individual players to top level of array
if ( array_key_exists( 0, $performance ) ) {
foreach ( $performance[ 0 ] as $player_id => $player_performance ) {
$performance[ $player_id ] = array( $player_id => $player_performance );
}
}
$performance[0] = $labels;
return $performance;
endif;