From c345aa4b0b3274f131ed5f29367ce9da2a66f2f4 Mon Sep 17 00:00:00 2001 From: nacin Date: Sun, 28 Feb 2010 00:00:43 +0000 Subject: [PATCH] Allow get_(previous|adjacent|next)_post() to be used on attachment and !single templates. props jobjorn, fixes #10867 git-svn-id: http://svn.automattic.com/wordpress/trunk@13475 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 050f34dcc..6d63a3ca3 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -932,7 +932,7 @@ function get_next_post($in_same_cat = false, $excluded_categories = '') { function get_adjacent_post($in_same_cat = false, $excluded_categories = '', $previous = true) { global $post, $wpdb; - if ( empty($post) || !is_single() || is_attachment() ) + if ( empty( $post ) ) return null; $current_post_date = $post->post_date;