From f19167fbca077b91a0377ed56c51bca51b5ba239 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 5 Dec 2008 04:08:20 +0000 Subject: [PATCH] User term IDs returned from wp_update_term() in case a plugin that remaps IDs is in use git-svn-id: https://develop.svn.wordpress.org/trunk@10055 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/admin-ajax.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 1df123b68b..235a248682 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -935,7 +935,7 @@ case 'inline-save-tax': $updated = wp_update_category($data); if ( $updated && !is_wp_error($updated) ) - echo _cat_row( $id, 0 ); + echo _cat_row( $updated, 0 ); else die( __('Category not updated.') ); @@ -944,16 +944,15 @@ case 'inline-save-tax': $updated = wp_update_term($id, 'link_category', $_POST); if ( $updated && !is_wp_error($updated) ) - echo link_cat_row($id); + echo link_cat_row($updated['term_id']); else die( __('Category not updated.') ); break; case 'tag' : $updated = wp_update_term($id, 'post_tag', $_POST); - if ( $updated && !is_wp_error($updated) ) { - $tag = get_term( $id, 'post_tag' ); + $tag = get_term( $updated['term_id'], 'post_tag' ); if ( !$tag || is_wp_error( $tag ) ) die( __('Tag not updated.') );