only append parent term slug until unique slug found, see #10712
git-svn-id: http://svn.automattic.com/wordpress/trunk@14234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
84887d6386
commit
98c3888a06
|
@ -1732,6 +1732,9 @@ function wp_unique_term_slug($slug, $term) {
|
|||
if ( is_wp_error($parent_term) || empty($parent_term) )
|
||||
break;
|
||||
$slug .= '-' . $parent_term->slug;
|
||||
if ( ! is_term( $slug ) )
|
||||
return $slug;
|
||||
|
||||
if ( empty($parent_term->parent) )
|
||||
break;
|
||||
$the_parent = $parent_term->parent;
|
||||
|
|
Loading…
Reference in New Issue