From 8771fe192e10e1daf10cdc5e217320d73855e406 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Mon, 19 Dec 2016 21:12:34 +1100 Subject: [PATCH] Add event list format option to player and team events --- modules/sportspress-calendars.php | 2 ++ templates/player-events.php | 2 ++ templates/team-events.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/modules/sportspress-calendars.php b/modules/sportspress-calendars.php index c4aee54f..d2b5da31 100644 --- a/modules/sportspress-calendars.php +++ b/modules/sportspress-calendars.php @@ -391,6 +391,7 @@ class SportsPress_Calendars { 'options' => array( 'blocks' => __( 'Blocks', 'sportspress' ), 'calendar' => __( 'Calendar', 'sportspress' ), + 'list' => __( 'List', 'sportspress' ), ), ), ) @@ -429,6 +430,7 @@ class SportsPress_Calendars { 'options' => array( 'blocks' => __( 'Blocks', 'sportspress' ), 'calendar' => __( 'Calendar', 'sportspress' ), + 'list' => __( 'List', 'sportspress' ), ), ), ) diff --git a/templates/player-events.php b/templates/player-events.php index 77888e33..b8d85ab7 100644 --- a/templates/player-events.php +++ b/templates/player-events.php @@ -15,5 +15,7 @@ if ( ! isset( $id ) ) $format = get_option( 'sportspress_player_events_format', 'blocks' ); if ( 'calendar' === $format ) sp_get_template( 'event-calendar.php', array( 'player' => $id ) ); +elseif ( 'list' === $format ) + sp_get_template( 'event-list.php', array( 'player' => $id, 'title_format' => 'homeaway', 'time_format' => 'separate', 'columns' => array( 'event', 'time', 'results' ) ) ); else sp_get_template( 'event-fixtures-results.php', array( 'player' => $id ) ); diff --git a/templates/team-events.php b/templates/team-events.php index 2297f52e..c4aea9bf 100644 --- a/templates/team-events.php +++ b/templates/team-events.php @@ -15,5 +15,7 @@ if ( ! isset( $id ) ) $format = get_option( 'sportspress_team_events_format', 'blocks' ); if ( 'calendar' === $format ) sp_get_template( 'event-calendar.php', array( 'team' => $id ) ); +elseif ( 'list' === $format ) + sp_get_template( 'event-list.php', array( 'team' => $id, 'title_format' => 'homeaway', 'time_format' => 'separate', 'columns' => array( 'event', 'time', 'results' ) ) ); else sp_get_template( 'event-fixtures-results.php', array( 'team' => $id ) );