From cca93112675918b52885f93bc033c29cd04a5f51 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 26 Oct 2008 18:26:45 +0000 Subject: [PATCH] Add self parent check git-svn-id: http://svn.automattic.com/wordpress/trunk@9360 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 59c5947cff..9f5031a507 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -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;