Ticket #15959: get_adjacent_post.patch
File get_adjacent_post.patch, 637 bytes (added by , 14 years ago) |
---|
-
wp-includes/link-template.php
1110 1110 1111 1111 if ( $in_same_cat ) { 1112 1112 $cat_array = wp_get_object_terms($post->ID, 'category', array('fields' => 'ids')); 1113 $join .= " AND tt.taxonomy = 'category' AND tt.term_id IN (" . implode(',', $cat_array) . ")"; 1113 if( !empty( $cat_array ) ) 1114 $join .= " AND tt.taxonomy = 'category' AND tt.term_id IN (" . implode(',', $cat_array) . ")"; 1114 1115 } 1115 1116 1116 1117 $posts_in_ex_cats_sql = "AND tt.taxonomy = 'category'";