mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Add self parent check
git-svn-id: http://svn.automattic.com/wordpress/trunk@9360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
63d66e8d75
commit
cca9311267
@ -62,6 +62,9 @@ function get_category_link( $category_id ) {
|
|||||||
return $category;
|
return $category;
|
||||||
$category_nicename = $category->slug;
|
$category_nicename = $category->slug;
|
||||||
|
|
||||||
|
if ( $parent == $category_id ) // recursive recursion
|
||||||
|
$category->parent = 0;
|
||||||
|
|
||||||
if ( $parent = $category->parent )
|
if ( $parent = $category->parent )
|
||||||
$category_nicename = get_category_parents( $parent, false, '/', true ) . $category_nicename;
|
$category_nicename = get_category_parents( $parent, false, '/', true ) . $category_nicename;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user