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
This commit is contained in:
parent
eb12311afb
commit
2b641b0c17
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue