Add hooks for additional performance calculations
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user