From 3108fd93d96f38b16d49bc5d6bf5118fe6cab29d Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Fri, 13 Jun 2014 18:59:13 +1000 Subject: [PATCH] Adjust title filter to check for 2nd argument --- includes/sp-template-hooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/sp-template-hooks.php b/includes/sp-template-hooks.php index 5f0efe07..de6ff053 100644 --- a/includes/sp-template-hooks.php +++ b/includes/sp-template-hooks.php @@ -92,8 +92,8 @@ add_action( 'loop_start', 'sportspress_output_venue_map' ); add_filter( 'previous_post_link', 'sportspress_hide_adjacent_post_links', 10, 4 ); add_filter( 'next_post_link', 'sportspress_hide_adjacent_post_links', 10, 4 ); -function sportspress_the_title( $title, $id ) { - if ( ! is_admin() && ! current_theme_supports( 'sportspress' ) && in_the_loop() && $id == get_the_ID() ): +function sportspress_the_title( $title, $id = null ) { + if ( $id && ! is_admin() && ! current_theme_supports( 'sportspress' ) && in_the_loop() && $id == get_the_ID() ): if ( is_singular( 'sp_player' ) ): $number = get_post_meta( $id, 'sp_number', true ); if ( $number != null ):