From 3bf0c0fbb8dd0c2f3370c152eb787ff1c306ea60 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sat, 31 May 2014 13:19:14 +1000 Subject: [PATCH] Display delimiter between event team logos --- assets/css/sportspress.css | 6 ++++++ includes/sp-template-hooks.php | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/assets/css/sportspress.css b/assets/css/sportspress.css index d3d14108..62abfcff 100644 --- a/assets/css/sportspress.css +++ b/assets/css/sportspress.css @@ -6,6 +6,12 @@ overflow: visible; } +/* Title */ +.sp-event-teams { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + /* Data Tables */ .sp-scrollable-table-wrapper { overflow: auto; diff --git a/includes/sp-template-hooks.php b/includes/sp-template-hooks.php index b0f4d312..5f0efe07 100644 --- a/includes/sp-template-hooks.php +++ b/includes/sp-template-hooks.php @@ -108,9 +108,12 @@ function sportspress_the_title( $title, $id ) { $teams = get_post_meta( $id, 'sp_team' ); if ( $teams ): $title .= '
'; + $delimiter = get_option( 'sportspress_event_teams_delimiter', 'vs' ); + $team_logos = array(); foreach ( $teams as $team ): - $title .= get_the_post_thumbnail( $team, 'sportspress-fit-icon' ) . ' '; + $team_logos[] = get_the_post_thumbnail( $team, 'sportspress-fit-icon' ); endforeach; + $title .= implode( ' ' . $delimiter . ' ', $team_logos ); $title .= '
'; endif; endif;