diff --git a/presets/target-sports/golf.json b/presets/target-sports/golf.json index ed4c1966..e844d7a1 100644 --- a/presets/target-sports/golf.json +++ b/presets/target-sports/golf.json @@ -7,12 +7,12 @@ { "name" : "Finish", "condition" : "else", "description" : "Finished" } ], "results": [ - { "name" : "Par", "equation" : "$strokes - $par", "description" : "Reported score", "primary" : 1 }, + { "name" : "Score", "equation" : "$strokes", "description" : "Total score" }, { "name" : "FH", "description" : "Fairways hit" }, { "name" : "GIR", "description" : "Greens in regulation" }, { "name" : "Avg. Drive", "id" : "avgdrive", "description" : "Average drive (yards)" }, { "name" : "Putts", "description" : "Number of putts" }, - { "name" : "Score", "equation" : "$strokes", "description" : "Total score" } + { "name" : "Par", "equation" : "$strokes - $par", "description" : "Reported score", "primary" : 1 } ], "performance": [ { "name" : "1", "id" : "one", "description" : "Hole 1" }, diff --git a/templates/event-results.php b/templates/event-results.php index c15a4f8c..fa8e5935 100644 --- a/templates/event-results.php +++ b/templates/event-results.php @@ -23,6 +23,9 @@ if ( ! isset( $caption ) ) $caption = __( 'Results', 'sportspress' ); // Get event result data $data = $event->results(); +// Apply filters to results data +$data = apply_filters( 'sportspress_event_results', $data, $id ); + // The first row should be column labels $labels = $data[0];