From 220c0589da3b2bc1388dec16e892f3e1c7d213bc Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Tue, 11 Oct 2016 04:06:28 +0000 Subject: [PATCH] Taxonomy: Specify taxonomy when populating cached object terms. [38776] introduced a call to `get_term()` using only the term ID. This causes problems in cases where shared terms have not been split. Since we have the taxonomy available, there's no harm in passing it along to `get_term()`. Props dd32. See #37291. Built from https://develop.svn.wordpress.org/trunk@38779 git-svn-id: http://core.svn.wordpress.org/trunk@38722 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 1995c3b321..461eda0c6e 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -3042,7 +3042,7 @@ function get_object_term_cache( $id, $taxonomy ) { $terms = array(); foreach ( $term_ids as $term_id ) { - $term = get_term( $term_id ); + $term = get_term( $term_id, $taxonomy ); if ( is_wp_error( $term ) ) { return $term; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 206f643524..c161faa253 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38778'; +$wp_version = '4.7-alpha-38779'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.