Changeset 30263
- Timestamp:
- 11/06/2014 08:11:34 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r30226 r30263 1514 1514 1515 1515 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, ',' ) . ') )'; 1517 1517 } 1518 1518 } -
trunk/tests/phpunit/tests/link.php
r29248 r30263 191 191 192 192 /** 193 * @ticket 22112194 */193 * @ticket 22112 194 */ 195 195 function test_get_adjacent_post_exclude_self_term() { 196 $include = $this->factory->category->create(); 196 // Bump term_taxonomy to mimic shared term offsets. 197 global $wpdb; 198 $wpdb->insert( $wpdb->term_taxonomy, array( 'taxonomy' => 'foo', 'term_id' => 12345 ) ); 199 200 $include = $this->factory->term->create( array( 201 'taxonomy' => 'category', 202 'name' => 'Include', 203 ) ); 197 204 $exclude = $this->factory->category->create(); 198 205
Note: See TracChangeset
for help on using the changeset viewer.