Enable custom headings for player positions

This commit is contained in:
Brian Miyaji
2015-07-17 15:34:11 +10:00
parent c00c938195
commit 4f610cf360
2 changed files with 88 additions and 15 deletions

View File

@@ -256,3 +256,19 @@ function sp_venue_map( $term = 0 ) {
$meta = get_option( "taxonomy_$term" );
sp_get_template( 'venue-map.php', array( 'meta' => $meta ) );
}
/*
*
*/
function sp_get_position_caption( $term = 0 ) {
$meta = get_option( "taxonomy_$term" );
$caption = sp_array_value( $meta, 'sp_caption', '' );
if ( $caption ) {
return $caption;
} else {
$term = get_term( $term, 'sp_position' );
return $term->name;
}
}