From 80078c388210088b4bd71708a292034ae4d469e6 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 11 May 2009 05:01:12 +0000 Subject: [PATCH] Allow use of _pad_term_counts for all hierarhcical taxonomies. Props mgsisk, Denis-de-Bernardy. fixes #8350 git-svn-id: http://svn.automattic.com/wordpress/trunk@11260 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index ccb03bc66..3120faa86 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2077,8 +2077,8 @@ function &_get_term_children($term_id, $terms, $taxonomy) { function _pad_term_counts(&$terms, $taxonomy) { global $wpdb; - // This function only works for post categories. - if ( 'category' != $taxonomy ) + // This function only works for hierarchical taxonomies like post categories. + if ( !is_taxonomy_hierarchical( $taxonomy ) ) return; $term_hier = _get_term_hierarchy($taxonomy);