Add hooks for additional performance calculations
This commit is contained in:
@@ -420,8 +420,8 @@ class SP_Player_List extends SP_Secondary_Post {
|
||||
endif;
|
||||
endforeach;
|
||||
elseif ( array_key_exists( $key, $totals[ $player_id ] ) ):
|
||||
$value = floatval( $value );
|
||||
$totals[ $player_id ][ $key ] += $value;
|
||||
$add = apply_filters( 'sportspress_player_performance_add_value', floatval( $value ), $key );
|
||||
$totals[ $player_id ][ $key ] += $add;
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
@@ -601,7 +601,7 @@ class SP_Player_List extends SP_Secondary_Post {
|
||||
$placeholder = number_format( $placeholder, $stat->precision, '.', '' );
|
||||
endif;
|
||||
|
||||
$placeholders[ $player_id ][ $stat->post_name ] = $placeholder;
|
||||
$placeholders[ $player_id ][ $stat->post_name ] = apply_filters( 'sportspress_player_performance_table_placeholder', $placeholder, $stat->post_name );
|
||||
endforeach;
|
||||
|
||||
endforeach;
|
||||
|
||||
Reference in New Issue
Block a user