Add "Next Team" preset to league tables

This commit is contained in:
Brian Miyaji
2018-05-02 13:53:19 +10:00
parent 52f96851b1
commit 0722a9fb49
4 changed files with 140 additions and 7 deletions

View File

@@ -618,12 +618,12 @@ class SP_League_Table extends SP_Secondary_Post {
endif;
else:
// Solve
$placeholder = sp_solve( $stat->equation, sp_array_value( $totals, $team_id, array() ), $stat->precision );
$placeholder = sp_solve( $stat->equation, sp_array_value( $totals, $team_id, array() ), $stat->precision, 0, $team_id );
if ( '$gamesback' == $stat->equation )
$gb_column = $stat->post_name;
if ( ! in_array( $stat->equation, array( '$gamesback', '$streak', '$form', '$last5', '$last10', '$homerecord', '$awayrecord' ) ) ):
if ( ! in_array( $stat->equation, apply_filters( 'sportspress_equation_presets', array( '$gamesback', '$streak', '$form', '$last5', '$last10', '$homerecord', '$awayrecord' ) ) ) ):
// Adjustments
$adjustment = sp_array_value( $adjustments, $team_id, array() );