Skip adding logos to event if not available

This commit is contained in:
Brian Miyaji
2014-10-23 13:28:26 +11:00
parent a1c0a186f2
commit d9f6774290

View File

@@ -18,6 +18,7 @@ $teams = array_filter( $teams );
if ( $teams ):
$team_logos = array();
foreach ( $teams as $team ):
if ( ! has_post_thumbnail( $team ) ) continue;
$logo = get_the_post_thumbnail( $team, 'sportspress-fit-icon' );
if ( get_option( 'sportspress_link_teams', 'no' ) == 'yes' ) $logo = '<a href="' . get_post_permalink( $team ) . '">' . $logo . '</a>';
$team_logos[] = $logo;