From 85914360bf1de03dbdac92234dd8e0198c2bb003 Mon Sep 17 00:00:00 2001 From: Nabil Kadimi Date: Mon, 25 Jun 2018 10:48:47 +0100 Subject: [PATCH] Apply "Reverse Teams" to the Box Score metabox --- 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 1b0ae5c9..fe770f2c 100644 --- a/includes/class-sp-event.php +++ b/includes/class-sp-event.php @@ -89,6 +89,10 @@ class SP_Event extends SP_Custom_Post{ public function performance( $admin = false ) { $teams = get_post_meta( $this->ID, 'sp_team', false ); + if ( 'yes' === get_option( 'sportspress_event_reverse_teams', 'no' ) ) { + $teams = array_reverse( $teams, true ); + } + $performance = (array)get_post_meta( $this->ID, 'sp_players', true ); $args = array(