Don't reverse teams in class. Let them be home-away in admin.
This commit is contained in:
@@ -49,10 +49,6 @@ class SP_Event extends SP_Custom_Post{
|
|||||||
|
|
||||||
// Get results for all teams
|
// Get results for all teams
|
||||||
$data = sp_array_combine( $teams, $results, true );
|
$data = sp_array_combine( $teams, $results, true );
|
||||||
|
|
||||||
if ( 'yes' === get_option( 'sportspress_event_reverse_teams', 'no' ) ) {
|
|
||||||
$data = array_reverse( $data, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $admin ):
|
if ( $admin ):
|
||||||
return array( $columns, $usecolumns, $data );
|
return array( $columns, $usecolumns, $data );
|
||||||
@@ -471,10 +467,6 @@ class SP_Event extends SP_Custom_Post{
|
|||||||
$output[] = $team_result;
|
$output[] = $team_result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'yes' === get_option( 'sportspress_event_reverse_teams', 'no' ) ) {
|
|
||||||
$output = array_reverse( $output, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user