Make sure taxonomy args are set before using. Props Sam_a. fixes #6960 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@7952 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f8f373d171
commit
a150c4d549
@ -1057,14 +1057,14 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
|
||||
if ( count($taxonomies) > 1 ) {
|
||||
foreach ( $taxonomies as $index => $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]);
|
||||
$terms = array_merge($terms, wp_get_object_terms($object_ids, $taxonomy, array_merge($args, $t->args)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$t = get_taxonomy($taxonomies[0]);
|
||||
if ( is_array($t->args) )
|
||||
if ( isset($t->args) && is_array($t->args) )
|
||||
$args = array_merge($args, $t->args);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user