From b9ac82d18053db07eab73195f997ea6be0a8e0c0 Mon Sep 17 00:00:00 2001 From: savvasha Date: Sun, 21 Oct 2018 10:49:45 +0300 Subject: [PATCH] If Reverse Teams option is enabled then the Main Results should be reversed also --- includes/class-sp-event.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/class-sp-event.php b/includes/class-sp-event.php index f75d1056..21cbde04 100644 --- a/includes/class-sp-event.php +++ b/includes/class-sp-event.php @@ -471,6 +471,10 @@ class SP_Event extends SP_Custom_Post{ $output[] = $team_result; } } + + if ( 'yes' === get_option( 'sportspress_event_reverse_teams', 'no' ) ) { + $output = array_reverse( $output, true ); + } return $output; }