$term is an array not object, Fixes Notice on duplicate term checking. See #11838
git-svn-id: http://svn.automattic.com/wordpress/trunk@13010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4149e68076
commit
884a4bca15
|
@ -1743,7 +1743,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
|
|||
if ( $id && ($id != $term_id) ) {
|
||||
// If an empty slug was passed or the parent changed, reset the slug to something unique.
|
||||
// Otherwise, bail.
|
||||
if ( $empty_slug || ( $parent != $term->parent) )
|
||||
if ( $empty_slug || ( $parent != $term['parent']) )
|
||||
$slug = wp_unique_term_slug($slug, (object) $args);
|
||||
else
|
||||
return new WP_Error('duplicate_term_slug', sprintf(__('The slug “%s” is already in use by another term'), $slug));
|
||||
|
|
Loading…
Reference in New Issue