Add ability to reverse home/away team order in events

This commit is contained in:
Brian Miyaji
2015-04-11 14:41:02 +10:00
parent 4c50b4a12c
commit c0f8cc54ca
3 changed files with 35 additions and 8 deletions

View File

@@ -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();