Add short name setting to teams and automate display

This commit is contained in:
Brian Miyaji
2018-05-02 12:52:01 +10:00
parent 4b6d23895b
commit bc57f39eba
18 changed files with 44 additions and 50 deletions

View File

@@ -115,7 +115,6 @@ class SP_Player extends SP_Custom_Post {
$metrics = (array)get_post_meta( $this->ID, 'sp_metrics', true );
$stats = (array)get_post_meta( $this->ID, 'sp_statistics', true );
$leagues = sp_array_value( (array)get_post_meta( $this->ID, 'sp_leagues', true ), $league_id, array() );
$abbreviate_teams = get_option( 'sportspress_abbreviate_teams', 'yes' ) === 'yes' ? true : false;
$manual_columns = 'manual' == get_option( 'sportspress_player_columns', 'auto' ) ? true : false;
// Get performance labels
@@ -581,7 +580,7 @@ class SP_Player extends SP_Custom_Post {
$season_name = sp_array_value( $season_names, $season_id, ' ' );
if ( $team_id ):
$team_name = sp_get_team_name( $team_id, $abbreviate_teams );
$team_name = sp_team_short_name( $team_id );
if ( get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false ):
$team_permalink = get_permalink( $team_id );