Add event list format option to player and team events
This commit is contained in:
@@ -391,6 +391,7 @@ class SportsPress_Calendars {
|
|||||||
'options' => array(
|
'options' => array(
|
||||||
'blocks' => __( 'Blocks', 'sportspress' ),
|
'blocks' => __( 'Blocks', 'sportspress' ),
|
||||||
'calendar' => __( 'Calendar', 'sportspress' ),
|
'calendar' => __( 'Calendar', 'sportspress' ),
|
||||||
|
'list' => __( 'List', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -429,6 +430,7 @@ class SportsPress_Calendars {
|
|||||||
'options' => array(
|
'options' => array(
|
||||||
'blocks' => __( 'Blocks', 'sportspress' ),
|
'blocks' => __( 'Blocks', 'sportspress' ),
|
||||||
'calendar' => __( 'Calendar', 'sportspress' ),
|
'calendar' => __( 'Calendar', 'sportspress' ),
|
||||||
|
'list' => __( 'List', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,5 +15,7 @@ if ( ! isset( $id ) )
|
|||||||
$format = get_option( 'sportspress_player_events_format', 'blocks' );
|
$format = get_option( 'sportspress_player_events_format', 'blocks' );
|
||||||
if ( 'calendar' === $format )
|
if ( 'calendar' === $format )
|
||||||
sp_get_template( 'event-calendar.php', array( 'player' => $id ) );
|
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
|
else
|
||||||
sp_get_template( 'event-fixtures-results.php', array( 'player' => $id ) );
|
sp_get_template( 'event-fixtures-results.php', array( 'player' => $id ) );
|
||||||
|
|||||||
@@ -15,5 +15,7 @@ if ( ! isset( $id ) )
|
|||||||
$format = get_option( 'sportspress_team_events_format', 'blocks' );
|
$format = get_option( 'sportspress_team_events_format', 'blocks' );
|
||||||
if ( 'calendar' === $format )
|
if ( 'calendar' === $format )
|
||||||
sp_get_template( 'event-calendar.php', array( 'team' => $id ) );
|
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
|
else
|
||||||
sp_get_template( 'event-fixtures-results.php', array( 'team' => $id ) );
|
sp_get_template( 'event-fixtures-results.php', array( 'team' => $id ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user