Abbreviate team names independently
This commit is contained in:
@@ -268,18 +268,6 @@ function sportspress_team_permalink( $permalink, $post ) {
|
||||
}
|
||||
add_filter( 'post_type_link', 'sportspress_team_permalink', 10, 2 );
|
||||
|
||||
function sportspress_abbreviate_team( $title, $id = null ) {
|
||||
if ( ! is_admin() && 'sp_team' == get_post_type( $id ) && get_option( 'sportspress_abbreviate_teams', 'yes' ) == 'yes' ):
|
||||
if ( in_the_loop() && get_the_ID() == $id ) return $title;
|
||||
$abbreviation = get_post_meta( $id, 'sp_abbreviation', true );
|
||||
if ( ! empty( $abbreviation ) ):
|
||||
return $abbreviation;
|
||||
endif;
|
||||
endif;
|
||||
return $title;
|
||||
}
|
||||
add_filter( 'the_title', 'sportspress_abbreviate_team', 10, 2 );
|
||||
|
||||
function sportspress_no_terms_links( $term_list, $taxonomy ) {
|
||||
|
||||
if ( in_array( $taxonomy, array( 'sp_league', 'sp_season', 'sp_position', 'sp_role' ) ) )
|
||||
|
||||
Reference in New Issue
Block a user