mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-19 21:15:23 +00:00
User term IDs returned from wp_update_term() in case a plugin that remaps IDs is in use
git-svn-id: http://svn.automattic.com/wordpress/trunk@10055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
10fef332d6
commit
75a6579d2b
@ -935,7 +935,7 @@ case 'inline-save-tax':
|
|||||||
$updated = wp_update_category($data);
|
$updated = wp_update_category($data);
|
||||||
|
|
||||||
if ( $updated && !is_wp_error($updated) )
|
if ( $updated && !is_wp_error($updated) )
|
||||||
echo _cat_row( $id, 0 );
|
echo _cat_row( $updated, 0 );
|
||||||
else
|
else
|
||||||
die( __('Category not updated.') );
|
die( __('Category not updated.') );
|
||||||
|
|
||||||
@ -944,16 +944,15 @@ case 'inline-save-tax':
|
|||||||
$updated = wp_update_term($id, 'link_category', $_POST);
|
$updated = wp_update_term($id, 'link_category', $_POST);
|
||||||
|
|
||||||
if ( $updated && !is_wp_error($updated) )
|
if ( $updated && !is_wp_error($updated) )
|
||||||
echo link_cat_row($id);
|
echo link_cat_row($updated['term_id']);
|
||||||
else
|
else
|
||||||
die( __('Category not updated.') );
|
die( __('Category not updated.') );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'tag' :
|
case 'tag' :
|
||||||
$updated = wp_update_term($id, 'post_tag', $_POST);
|
$updated = wp_update_term($id, 'post_tag', $_POST);
|
||||||
|
|
||||||
if ( $updated && !is_wp_error($updated) ) {
|
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 ) )
|
if ( !$tag || is_wp_error( $tag ) )
|
||||||
die( __('Tag not updated.') );
|
die( __('Tag not updated.') );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user