Make sure taxonomy args are set before using. Props Sam_a. fixes #6960 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@7952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9e4e87d975
commit
96c73cc917
|
@ -1057,14 +1057,14 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
|
||||||
if ( count($taxonomies) > 1 ) {
|
if ( count($taxonomies) > 1 ) {
|
||||||
foreach ( $taxonomies as $index => $taxonomy ) {
|
foreach ( $taxonomies as $index => $taxonomy ) {
|
||||||
$t = get_taxonomy($taxonomy);
|
$t = get_taxonomy($taxonomy);
|
||||||
if ( is_array($t->args) && $args != array_merge($args, $t->args) ) {
|
if ( isset($t->args) && is_array($t->args) && $args != array_merge($args, $t->args) ) {
|
||||||
unset($taxonomies[$index]);
|
unset($taxonomies[$index]);
|
||||||
$terms = array_merge($terms, wp_get_object_terms($object_ids, $taxonomy, array_merge($args, $t->args)));
|
$terms = array_merge($terms, wp_get_object_terms($object_ids, $taxonomy, array_merge($args, $t->args)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$t = get_taxonomy($taxonomies[0]);
|
$t = get_taxonomy($taxonomies[0]);
|
||||||
if ( is_array($t->args) )
|
if ( isset($t->args) && is_array($t->args) )
|
||||||
$args = array_merge($args, $t->args);
|
$args = array_merge($args, $t->args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue