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:
parent
f9abbced91
commit
e23582cd09
|
@ -1188,11 +1188,9 @@ function get_terms($taxonomies, $args = '') {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$empty_array = array();
|
$empty_array = array();
|
||||||
|
|
||||||
$single_taxonomy = false;
|
$single_taxonomy = ! is_array( $taxonomies ) || 1 === count( $taxonomies );
|
||||||
if ( !is_array($taxonomies) ) {
|
if ( ! is_array( $taxonomies ) )
|
||||||
$single_taxonomy = true;
|
|
||||||
$taxonomies = array( $taxonomies );
|
$taxonomies = array( $taxonomies );
|
||||||
}
|
|
||||||
|
|
||||||
foreach ( $taxonomies as $taxonomy ) {
|
foreach ( $taxonomies as $taxonomy ) {
|
||||||
if ( ! taxonomy_exists($taxonomy) ) {
|
if ( ! taxonomy_exists($taxonomy) ) {
|
||||||
|
|
Loading…
Reference in New Issue