From 9e0f434726599b78ed25f248c45c14c825134391 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 23 Dec 2015 20:15:25 +0000 Subject: [PATCH] Improve post-filter sanitization of excluded terms in `get_adjacent_post()`. See [36078], #35211. Built from https://develop.svn.wordpress.org/trunk@36079 git-svn-id: http://core.svn.wordpress.org/trunk@36044 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 5d88bd60c3..ca6ccfcf88 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -1614,7 +1614,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo $excluded_terms = apply_filters( "get_{$adjacent}_post_excluded_terms", $excluded_terms ); if ( ! empty( $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, ',' ) . ') )'; + $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( ',', array_map( 'intval', $excluded_terms ) ) . ') )'; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index d3f8708d7c..4561e005ee 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36078'; +$wp_version = '4.5-alpha-36079'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.