Abbreviate team names independently

This commit is contained in:
Brian Miyaji
2016-04-13 23:59:21 +10:00
parent 99c29a0766
commit 6ba028f2cf
11 changed files with 31 additions and 26 deletions

View File

@@ -13,6 +13,7 @@ if ( get_option( 'sportspress_event_show_logos', 'yes' ) === 'no' ) return;
$show_team_names = get_option( 'sportspress_event_logos_show_team_names', 'no' ) === 'yes' ? true : false;
$show_time = get_option( 'sportspress_event_logos_show_time', 'no' ) === 'yes' ? true : false;
$show_results = get_option( 'sportspress_event_logos_show_results', 'no' ) === 'yes' ? true : false;
$abbreviate_teams = get_option( 'sportspress_abbreviate_teams', 'yes' ) === 'yes' ? true : false;
if ( ! isset( $id ) )
$id = get_the_ID();
@@ -43,9 +44,9 @@ if ( $teams ):
// Add team name
if ( $show_team_names ) {
if ( $alt ) {
$logo .= ' <strong class="sp-team-name">' . get_the_title( $team ) . '</strong>';
$logo .= ' <strong class="sp-team-name">' . sp_get_team_name( $team, $abbreviate_teams ) . '</strong>';
} else {
$logo = '<strong class="sp-team-name">' . get_the_title( $team ) . '</strong> ' . $logo;
$logo = '<strong class="sp-team-name">' . sp_get_team_name( $team, $abbreviate_teams ) . '</strong> ' . $logo;
}
}