From 4743ee9326832da122db73f34726db4e602b32f4 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 6 Nov 2014 20:12:22 +0000 Subject: [PATCH] In `get_adjacent_post()`, `$excluded_terms` should check term_id rather than term_taxonom_id. See #29663, #22112. Built from https://develop.svn.wordpress.org/trunk@30263 git-svn-id: http://core.svn.wordpress.org/trunk@30263 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 8d6830ca5f..c603eddbd5 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -1513,7 +1513,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo } if ( ! empty( $excluded_terms ) ) { - $where .= " AND p.ID NOT IN ( SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id IN (" . implode( $excluded_terms, ',' ) . ') )'; + $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, ',' ) . ') )'; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 7728257c0f..d548e5ccc7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30247'; +$wp_version = '4.1-alpha-30263'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.