Small fix to r14479. see #13109.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
90a0883b12
commit
6e33a3ec34
|
@ -117,8 +117,12 @@ function get_object_taxonomies($object, $output = 'names') {
|
|||
|
||||
$taxonomies = array();
|
||||
foreach ( (array) $wp_taxonomies as $tax_name => $tax_obj ) {
|
||||
if ( array_intersect($object, (array) $tax_obj->object_type) )
|
||||
$taxonomies[$tax_name] = ('names' == $output) ? $tax_name : $tax_obj;
|
||||
if ( array_intersect($object, (array) $tax_obj->object_type) ) {
|
||||
if ( 'names' == $output )
|
||||
$taxonomies[] = $tax_name;
|
||||
else
|
||||
$taxonomies[ $tax_name ] = $tax_obj;
|
||||
}
|
||||
}
|
||||
|
||||
return $taxonomies;
|
||||
|
|
Loading…
Reference in New Issue