Abbreviate team names independently
This commit is contained in:
@@ -21,6 +21,7 @@ $defaults = array(
|
||||
'show_leagues' => get_option( 'sportspress_player_show_leagues', 'no' ) == 'yes' ? true : false,
|
||||
'show_seasons' => get_option( 'sportspress_player_show_seasons', 'no' ) == 'yes' ? true : false,
|
||||
'show_nationality_flags' => get_option( 'sportspress_player_show_flags', 'yes' ) == 'yes' ? true : false,
|
||||
'abbreviate_teams' => get_option( 'sportspress_abbreviate_teams', 'yes' ) === 'yes' ? true : false,
|
||||
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
||||
);
|
||||
|
||||
@@ -62,7 +63,7 @@ $data = array_merge( $metrics_before, $common, $metrics_after );
|
||||
if ( $show_current_teams && $current_teams ):
|
||||
$teams = array();
|
||||
foreach ( $current_teams as $team ):
|
||||
$team_name = get_the_title( $team );
|
||||
$team_name = sp_get_team_name( $team, $abbreviate_teams );
|
||||
if ( $link_teams ) $team_name = '<a href="' . get_post_permalink( $team ) . '">' . $team_name . '</a>';
|
||||
$teams[] = $team_name;
|
||||
endforeach;
|
||||
@@ -72,7 +73,7 @@ endif;
|
||||
if ( $show_past_teams && $past_teams ):
|
||||
$teams = array();
|
||||
foreach ( $past_teams as $team ):
|
||||
$team_name = get_the_title( $team );
|
||||
$team_name = sp_get_team_name( $team, $abbreviate_teams );
|
||||
if ( $link_teams ) $team_name = '<a href="' . get_post_permalink( $team ) . '">' . $team_name . '</a>';
|
||||
$teams[] = $team_name;
|
||||
endforeach;
|
||||
|
||||
Reference in New Issue
Block a user