mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-03 20:09:40 +00:00
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
@ -1731,7 +1731,10 @@ function wp_unique_term_slug($slug, $term) {
|
||||
$parent_term = get_term($the_parent, $term->taxonomy);
|
||||
if ( is_wp_error($parent_term) || empty($parent_term) )
|
||||
break;
|
||||
$slug .= '-' . $parent_term->slug;
|
||||
$slug .= '-' . $parent_term->slug;
|
||||
if ( ! is_term( $slug ) )
|
||||
return $slug;
|
||||
|
||||
if ( empty($parent_term->parent) )
|
||||
break;
|
||||
$the_parent = $parent_term->parent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user