From 6ffa9e31d3dea2512e33367bcab71c8348cec019 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 13 Oct 2010 20:12:20 +0000 Subject: [PATCH] Don't hide empty terms when determing exclude trees. Props layotte. fixes #14446 git-svn-id: http://svn.automattic.com/wordpress/trunk@15797 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 43d1a158a..04699f177 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1004,7 +1004,7 @@ function &get_terms($taxonomies, $args = '') { if ( !empty( $exclude_tree ) ) { $excluded_trunks = wp_parse_id_list($exclude_tree); foreach ( $excluded_trunks as $extrunk ) { - $excluded_children = (array) get_terms($taxonomies[0], array('child_of' => intval($extrunk), 'fields' => 'ids')); + $excluded_children = (array) get_terms($taxonomies[0], array('child_of' => intval($extrunk), 'fields' => 'ids', 'hide_empty' => 0)); $excluded_children[] = $extrunk; foreach( $excluded_children as $exterm ) { if ( empty($exclusions) )