diff --git a/templates/event-list.php b/templates/event-list.php
index a9f87c7f..590f0a8b 100644
--- a/templates/event-list.php
+++ b/templates/event-list.php
@@ -17,6 +17,7 @@ $defaults = array(
'date_to' => 'default',
'number' => -1,
'show_team_logo' => get_option( 'sportspress_event_list_show_logos', 'no' ) == 'yes' ? true : false,
+ 'link_events' => get_option( 'sportspress_link_events', 'yes' ) == 'yes' ? true : false,
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
'link_venues' => get_option( 'sportspress_link_venues', 'yes' ) == 'yes' ? true : false,
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
@@ -181,7 +182,11 @@ if ( $id ) {
echo '
';
- echo '| ' . get_post_time( 'Y-m-d H:i:s', false, $event ) . '' . get_post_time( get_option( 'date_format' ), false, $event, true ) . ' | ';
+ $date_html = '' . get_post_time( 'Y-m-d H:i:s', false, $event ) . '' . get_post_time( get_option( 'date_format' ), false, $event, true );
+
+ if ( $link_events ) $date_html = '' . $date_html . '';
+
+ echo '' . $date_html . ' | ';
switch ( $title_format ) {
case 'homeaway':
@@ -190,85 +195,104 @@ if ( $id ) {
echo '' . $team . ' | ';
if ( 'combined' == $time_format && sp_column_active( $usecolumns, 'time' ) ) {
- echo '';
+ echo ' | ';
+ if ( $link_events ) echo '';
if ( ! empty( $main_results ) ):
echo implode( ' - ', $main_results );
else:
echo ' ' . get_post_time( 'H:i:s', false, $event ) . '' . sp_get_time( $event );
endif;
- echo ' | ';
+ if ( $link_events ) echo '';
+ echo '';
} elseif ( in_array( $time_format, array( 'separate', 'results' ) ) && sp_column_active( $usecolumns, 'results' ) ) {
- echo '';
+ echo ' | ';
+ if ( $link_events ) echo '';
if ( ! empty( $main_results ) ):
echo implode( ' - ', $main_results );
else:
echo '-';
endif;
- echo ' | ';
+ if ( $link_events ) echo '';
+ echo '';
}
$team = array_shift( $teams_array );
echo '' . $team . ' | ';
if ( in_array( $time_format, array( 'separate', 'time' ) ) && sp_column_active( $usecolumns, 'time' ) ) {
- echo '';
+ echo ' | ';
+ if ( $link_events ) echo '';
echo ' ' . get_post_time( 'H:i:s', false, $event ) . '' . sp_get_time( $event );
- echo ' | ';
+ if ( $link_events ) echo '';
+ echo '';
}
}
break;
default:
if ( sp_column_active( $usecolumns, 'event' ) ) {
- if ( $title_format == 'teams' )
+ if ( $title_format == 'teams' ) {
echo '' . $teams_output . ' | ';
- else
- echo '' . implode( ' ', $team_logos ) . ' ' . $event->post_title . ' | ';
+ } else {
+ $title_html = implode( ' ', $team_logos ) . ' ' . $event->post_title;
+ if ( $link_events ) $title_html = '' . $title_html . '';
+ echo '' . $title_html . ' | ';
+ }
}
switch ( $time_format ) {
case 'separate':
if ( sp_column_active( $usecolumns, 'time' ) ) {
- echo '';
+ echo ' | ';
+ if ( $link_events ) echo '';
echo ' ' . get_post_time( 'H:i:s', false, $event ) . '' . sp_get_time( $event );
- echo ' | ';
+ if ( $link_events ) echo '';
+ echo '';
}
if ( sp_column_active( $usecolumns, 'results' ) ) {
- echo '';
+ echo ' | ';
+ if ( $link_events ) echo '';
if ( ! empty( $main_results ) ):
echo implode( ' - ', $main_results );
else:
echo '-';
endif;
- echo ' | ';
+ if ( $link_events ) echo '';
+ echo '';
}
break;
case 'time':
if ( sp_column_active( $usecolumns, 'time' ) ) {
- echo '';
+ echo ' | ';
+ if ( $link_events ) echo '';
echo ' ' . get_post_time( 'H:i:s', false, $event ) . '' . sp_get_time( $event );
- echo ' | ';
+ if ( $link_events ) echo '';
+ echo '';
}
break;
case 'results':
if ( sp_column_active( $usecolumns, 'results' ) ) {
- echo '';
+ echo ' | ';
+ if ( $link_events ) echo '';
if ( ! empty( $main_results ) ):
echo implode( ' - ', $main_results );
else:
echo '-';
endif;
- echo ' | ';
+ if ( $link_events ) echo '';
+ echo '';
}
break;
default:
if ( sp_column_active( $usecolumns, 'time' ) ) {
- echo '';
+ echo ' | ';
+ if ( $link_events ) echo '';
if ( ! empty( $main_results ) ):
echo implode( ' - ', $main_results );
else:
echo ' ' . get_post_time( 'H:i:s', false, $event ) . '' . sp_get_time( $event );
endif;
- echo ' | ';
+ if ( $link_events ) echo '';
+ echo '';
}
}
}
@@ -305,8 +329,8 @@ if ( $id ) {
endif;
if ( sp_column_active( $usecolumns, 'article' ) ):
- echo '
- ';
+ echo ' | ';
+ if ( $link_events ) echo '';
if ( $video ):
echo '';
@@ -321,8 +345,8 @@ if ( $id ) {
endif;
endif;
- echo '
- | ';
+ if ( $link_events ) echo '';
+ echo '';
endif;
echo '
';