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: http://core.svn.wordpress.org/trunk@22417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
17a387ccb8
commit
711f6f2619
|
@ -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) ) {
|
||||
|
|
Loading…
Reference in New Issue