From 913475ecdf8f4eed207acf722724ddf4ade7da1e Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Tue, 14 Mar 2017 18:43:37 +0000 Subject: [PATCH] Fix the formatting of `$taxonomies` parameter of `'wp_get_object_terms'` filter. [38667] changed the way that the filter parameters are built. That changeset didn't fully account for the pre-4.7 format of `$taxonomies`. Merge of [40290] to the 4.7 branch. Props ig_communitysites. Fixes #40154. Built from https://develop.svn.wordpress.org/branches/4.7@40291 git-svn-id: http://core.svn.wordpress.org/branches/4.7@40198 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index f3ee6218ff..991ebce504 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1892,7 +1892,7 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { $terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomies, $args ); $object_ids = implode( ',', $object_ids ); - $taxonomies = implode( ',', $taxonomies ); + $taxonomies = "'" . implode( "', '", array_map( 'esc_sql', $taxonomies ) ) . "'"; /** * Filters the terms for a given object or objects. diff --git a/wp-includes/version.php b/wp-includes/version.php index f3d553ea27..4f22cdf12d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7.4-alpha-40272'; +$wp_version = '4.7.4-alpha-40291'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.