Make WordPress Core


Ignore:
Timestamp:
11/06/2014 08:11:34 PM (11 years ago)
Author:
boonebgorges
Message:

In get_adjacent_post(), $excluded_terms should check term_id rather than term_taxonom_id.

See #29663, #22112.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r30226 r30263  
    15141514
    15151515        if ( ! empty( $excluded_terms ) ) {
    1516             $where .= " AND p.ID NOT IN ( SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id IN (" . implode( $excluded_terms, ',' ) . ') )';
     1516            $where .= " AND p.ID NOT IN ( SELECT tr.object_id FROM $wpdb->term_relationships tr LEFT JOIN $wpdb->term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE tt.term_id IN (" . implode( $excluded_terms, ',' ) . ') )';
    15171517        }
    15181518    }
Note: See TracChangeset for help on using the changeset viewer.