diff --git src/wp-includes/link-template.php src/wp-includes/link-template.php
index 97a5990..2dc8411 100644
|
|
function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo |
1547 | 1547 | * @param bool $in_same_term Whether post should be in a same taxonomy term. |
1548 | 1548 | * @param array $excluded_terms Array of excluded term IDs. |
1549 | 1549 | */ |
1550 | | $where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s AND p.post_status = 'publish' $where", $current_post_date, $post->post_type ), $in_same_term, $excluded_terms ); |
| 1550 | $where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE ( p.post_date $op %s OR ( p.post_date = %s AND p.ID $op %d ) ) AND p.post_type = %s AND p.post_status = 'publish' $where", $current_post_date, $current_post_date, $post->ID, $post->post_type ), $in_same_term, $excluded_terms ); |
1551 | 1551 | |
1552 | 1552 | /** |
1553 | 1553 | * Filter the ORDER BY clause in the SQL for an adjacent post query. |