From 562e69d1f5197db203df097a11bb7cf2ee404439 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Fri, 21 Feb 2014 10:26:43 +1100 Subject: [PATCH] Fix event results display --- admin/hooks/post-thumbnail-html.php | 2 +- admin/hooks/the-content.php | 10 ++++++---- admin/templates/event-results.php | 9 ++++++++- admin/templates/event-venue.php | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/admin/hooks/post-thumbnail-html.php b/admin/hooks/post-thumbnail-html.php index e3cb8085..3ed6fdfb 100644 --- a/admin/hooks/post-thumbnail-html.php +++ b/admin/hooks/post-thumbnail-html.php @@ -1,6 +1,6 @@ $result ): if ( sportspress_array_value( $result, 'outcome', '-1' ) != '-1' ): @@ -43,7 +46,11 @@ if ( !function_exists( 'sportspress_event_results' ) ) { endif; endforeach; - if ( ! empty( $table_rows ) ): + if ( empty( $table_rows ) ): + + return false; + + else: $output .= '

' . __( 'Results', 'sportspress' ) . '

'; diff --git a/admin/templates/event-venue.php b/admin/templates/event-venue.php index 55adc85c..683899de 100644 --- a/admin/templates/event-venue.php +++ b/admin/templates/event-venue.php @@ -22,7 +22,7 @@ if ( !function_exists( 'sportspress_event_venue' ) ) { $longitude = sportspress_array_value( $term_meta, 'sp_longitude', 0 ); $output .= '

' . __( 'Venue', 'sportspress' ) . '

'; - $output .= '

' . $venue->name . '
' . $address . '

'; + $output .= '

' . $venue->name . '
' . $address . '

'; if ( $latitude != null && $longitude != null ) $output .= '
';