Treat a single taxonomy passed as an array the same as when passed as a string in get_terms(). props wonderboymusic, fixes #17955.

git-svn-id: https://develop.svn.wordpress.org/trunk@22417 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-11-07 09:03:40 +00:00
parent f9abbced91
commit e23582cd09
1 changed files with 3 additions and 5 deletions

View File

@ -1188,11 +1188,9 @@ function get_terms($taxonomies, $args = '') {
global $wpdb;
$empty_array = array();
$single_taxonomy = false;
if ( !is_array($taxonomies) ) {
$single_taxonomy = true;
$taxonomies = array($taxonomies);
}
$single_taxonomy = ! is_array( $taxonomies ) || 1 === count( $taxonomies );
if ( ! is_array( $taxonomies ) )
$taxonomies = array( $taxonomies );
foreach ( $taxonomies as $taxonomy ) {
if ( ! taxonomy_exists($taxonomy) ) {