From 68d0d5b2bafcd8fd33c301ba8aa0e0e5b681e7ed Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Mon, 10 Nov 2008 21:57:26 +0000 Subject: [PATCH] Improve code style. git-svn-id: https://develop.svn.wordpress.org/trunk@9599 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/category-template.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index cae7b6330d..a6d7cb30cd 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -64,9 +64,8 @@ function get_category_link( $category_id ) { if ( $category->parent == $category_id ) // recursive recursion $category->parent = 0; - - if ( $parent = $category->parent ) - $category_nicename = get_category_parents( $parent, false, '/', true ) . $category_nicename; + elseif ($category->parent != 0 ) + $category_nicename = get_category_parents( $category->parent, false, '/', true ) . $category_nicename; $catlink = str_replace( '%category%', $category_nicename, $catlink ); $catlink = get_option( 'home' ) . user_trailingslashit( $catlink, 'category' );