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

@@ -220,3 +220,13 @@ if ( !function_exists( 'sp_short_name' ) ) {
echo sp_get_short_name( $post );
}
}
if ( !function_exists( 'sp_get_team_name' ) ) {
function sp_get_team_name( $post = 0, $short = true ) {
if ( $short ) {
return sp_team_abbreviation( $post );
} else {
return get_the_title( $post );
}
}
}