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
This commit is contained in:
Boone Gorges 2016-10-11 04:06:28 +00:00
parent 0bdfa2ab1e
commit 220c0589da
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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.