mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-21 22:15:28 +00:00
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:
parent
0bdfa2ab1e
commit
220c0589da
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user