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:
parent
bdd5e1755a
commit
c345aa4b0b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue