Add options to display competition and season in player details
This commit is contained in:
@@ -22,6 +22,26 @@ class SP_Player extends SP_Custom_Post {
|
||||
return get_the_terms( $this->ID, 'sp_position' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns leagues
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function leagues() {
|
||||
return get_the_terms( $this->ID, 'sp_league' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns seasons
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function seasons() {
|
||||
return get_the_terms( $this->ID, 'sp_season' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns current teams
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user