From 2b641b0c173d504e6d121684c8889579cdad1af1 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Tue, 11 Oct 2016 04:05:34 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@38779 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 1995c3b321..461eda0c6e 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/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; }