Don't get children for cat 0. fixes #2123

git-svn-id: http://svn.automattic.com/wordpress/trunk@3338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-22 04:31:48 +00:00
parent 17707c8a55
commit 3a3d3f6aee
1 changed files with 3 additions and 0 deletions

View File

@ -126,6 +126,9 @@ function get_category_parents($id, $link = FALSE, $separator = '/', $nicename =
} }
function get_category_children($id, $before = '/', $after = '') { function get_category_children($id, $before = '/', $after = '') {
if ( 0 == $id )
return '';
$cat_ids = get_all_category_ids(); $cat_ids = get_all_category_ids();
foreach ( $cat_ids as $cat_id ) { foreach ( $cat_ids as $cat_id ) {
if ( $cat_id == $id) if ( $cat_id == $id)