From cf28ff22d52efa99ebe92b66de854605818dc032 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 26 Oct 2008 18:26:45 +0000 Subject: [PATCH] Add self parent check git-svn-id: https://develop.svn.wordpress.org/trunk@9360 602fd350-edb4-49c9-b593-d223f7449a82 --- 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;