From 0514fd25dca6476606eb4b42408fa943e2360f91 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 26 Jun 2014 20:27:43 +1000 Subject: [PATCH] Fix previous and next post link function --- 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 404b9f36..64650a64 100644 --- a/includes/sp-template-hooks.php +++ b/includes/sp-template-hooks.php @@ -366,8 +366,8 @@ function sportspress_post_updated_messages( $messages ) { return $messages; } -function sportspress_hide_adjacent_post_links( $output, $format, $link, $post ) { - if ( property_exists( $post, 'post_type' ) && in_array( $post->post_type, sp_post_types() ) ) +function sportspress_hide_adjacent_post_links( $output = null, $format = null, $link = null, $post = null ) { + if ( is_object( $post ) && property_exists( $post, 'post_type' ) && in_array( $post->post_type, sp_post_types() ) ) return false; return $output; }