From 7206cebaf6c0cdab9eaa7d89672ad2ff2cff7bc9 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Fri, 21 Mar 2014 20:03:49 +1100 Subject: [PATCH] Display emdash when no teams --- admin/hooks/manage-posts-columns.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/hooks/manage-posts-columns.php b/admin/hooks/manage-posts-columns.php index 9e569cff..e9ce0ce1 100644 --- a/admin/hooks/manage-posts-columns.php +++ b/admin/hooks/manage-posts-columns.php @@ -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;