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
This commit is contained in:
nacin 2010-02-28 00:00:43 +00:00
parent bdd5e1755a
commit c345aa4b0b
1 changed files with 1 additions and 1 deletions

View File

@ -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;