Add self parent check

git-svn-id: https://develop.svn.wordpress.org/trunk@9360 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-10-26 18:26:45 +00:00
parent 9e29d95645
commit cf28ff22d5
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,9 @@ function get_category_link( $category_id ) {
return $category;
$category_nicename = $category->slug;
if ( $parent == $category_id ) // recursive recursion
$category->parent = 0;
if ( $parent = $category->parent )
$category_nicename = get_category_parents( $parent, false, '/', true ) . $category_nicename;