Display emdash when no teams

This commit is contained in:
Brian Miyaji
2014-03-21 20:03:49 +11:00
parent 172278dd61
commit 7206cebaf6

View File

@@ -40,7 +40,8 @@ function sportspress_manage_posts_custom_column( $column, $post_id ) {
break;
case 'sp_team':
$post_type = get_post_type( $post );
$teams = get_post_meta( $post_id, 'sp_team', false );
$teams = (array)get_post_meta( $post_id, 'sp_team', false );
$teams = array_filter( $teams );
if ( empty( $teams ) ):
echo '—';
break;