Add event result filters

This commit is contained in:
Brian Miyaji
2015-10-07 01:14:12 +11:00
parent cf16de8d30
commit f0b30f4048
6 changed files with 20 additions and 30 deletions

View File

@@ -131,11 +131,13 @@ if ( is_array( $teams ) ):
$allowed_labels[ $label->post_name ] = $label->post_title;
}
$allowed_labels = apply_filters( 'sportspress_event_performance_allowed_labels', $allowed_labels, $position_index );
$sublabels = array_intersect_key( $sublabels, $allowed_labels );
}
if ( sizeof( $subdata ) ) {
$subdata = apply_filters( 'sportspress_event_performance_split_team_split_position_subdata', $subdata, $data );
$subdata = apply_filters( 'sportspress_event_performance_split_team_split_position_subdata', $subdata, $data, $position_index );
sp_get_template( 'event-performance-table.php', array(
'position' => sp_get_position_caption( $position->term_id ),
@@ -209,6 +211,8 @@ if ( is_array( $teams ) ):
$subdata[ $player_id ] = $data[ $player_id ];
}
}
$subdata = apply_filters( 'sportspress_event_performance_split_position_subdata', $subdata, $data, $position_index );
if ( sizeof( $subdata ) ) {
sp_get_template( 'event-performance-table-combined.php', array(