mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-03 11:31:39 +00:00
Allow get_(previous|adjacent|next)_post() to be used on attachment and !single templates. props jobjorn, fixes #10867
git-svn-id: https://develop.svn.wordpress.org/trunk@13475 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user