Bail in wp_unique_term_slug if the slug is unique and we don't need to come up with a new one. fixes #10712.
git-svn-id: https://develop.svn.wordpress.org/trunk@13845 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
11dfbcba06
commit
280b71b5e2
@ -1719,6 +1719,9 @@ function wp_set_object_terms($object_id, $terms, $taxonomy, $append = false) {
|
||||
function wp_unique_term_slug($slug, $term) {
|
||||
global $wpdb;
|
||||
|
||||
if ( ! is_term( $slug ) )
|
||||
return $slug;
|
||||
|
||||
// If the taxonomy supports hierarchy and the term has a parent, make the slug unique
|
||||
// by incorporating parent slugs.
|
||||
if ( is_taxonomy_hierarchical($term->taxonomy) && !empty($term->parent) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user