Add ability to reverse home/away team order in events
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
if ( get_option( 'sportspress_event_show_results', 'yes' ) === 'no' ) return;
|
||||
|
||||
$reverse_teams = get_option( 'sportspress_event_results_reverse_teams', 'no' ) === 'yes' ? true : false;
|
||||
|
||||
if ( ! isset( $id ) )
|
||||
$id = get_the_ID();
|
||||
|
||||
@@ -41,6 +43,10 @@ $output = '';
|
||||
$table_rows = '';
|
||||
$i = 0;
|
||||
|
||||
if ( $reverse_teams ) {
|
||||
$data = array_reverse( $data, true );
|
||||
}
|
||||
|
||||
foreach( $data as $team_id => $result ):
|
||||
if ( $show_outcomes ):
|
||||
$outcomes = array();
|
||||
|
||||
Reference in New Issue
Block a user