Apply "Reverse Teams" to the Box Score metabox

This commit is contained in:
Nabil Kadimi
2018-06-25 10:48:47 +01:00
committed by GitHub
parent 51e5ba02b2
commit 85914360bf

View File

@@ -89,6 +89,10 @@ class SP_Event extends SP_Custom_Post{
public function performance( $admin = false ) { public function performance( $admin = false ) {
$teams = get_post_meta( $this->ID, 'sp_team', 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 ); $performance = (array)get_post_meta( $this->ID, 'sp_players', true );
$args = array( $args = array(