Add GB calculation

This commit is contained in:
Brian Miyaji
2015-04-09 21:31:17 +10:00
parent b9f98e1463
commit 0d26e5fb48
4 changed files with 101 additions and 3 deletions

View File

@@ -235,7 +235,11 @@ class SP_Team extends SP_Custom_Post {
// Generate array of placeholder values for each league
$placeholders[ $div_id ] = array();
foreach ( $equations as $key => $value ):
$placeholders[ $div_id ][ $key ] = sp_solve( $value['equation'], $totals, $value['precision'] );
if ( '$gamesback' == $value['equation'] ) {
$placeholders[ $div_id ][ $key ] = __( '(Auto)', 'sportspress' );
} else {
$placeholders[ $div_id ][ $key ] = sp_solve( $value['equation'], $totals, $value['precision'] );
}
endforeach;
endforeach;