Improve code style.

git-svn-id: https://develop.svn.wordpress.org/trunk@9599 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2008-11-10 21:57:26 +00:00
parent 111173f543
commit 68d0d5b2ba
1 changed files with 2 additions and 3 deletions

View File

@ -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' );