Add hooks for additional performance calculations

This commit is contained in:
Brian Miyaji
2019-05-31 15:55:03 +10:00
parent dd81afec31
commit 2b1583f0bd
4 changed files with 9 additions and 9 deletions

View File

@@ -130,7 +130,7 @@ $i = 0;
foreach ( $labels as $key => $label ):
if ( 'name' == $key )
continue;
$format = sp_array_value( $formats, $key, 'number' );
$placeholder = sp_get_format_placeholder( $format );
@@ -169,7 +169,7 @@ $i = 0;
endif;
if ( 'number' === $format ):
$add = floatval( $value );
$add = apply_filters( 'sportspress_event_performance_add_value', floatval( $value ), $key );
$totals[ $key ] += $add;
endif;
endif;

View File

@@ -96,7 +96,7 @@ if ( is_array( $teams ) ):
$formats[ $column->post_name ] = $format;
}
do_action( 'sportspress_before_event_performance' );
do_action( 'sportspress_before_event_performance', $columns );
if ( $is_individual ) {
// Combined table