WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/05/2008 04:08:20 AM (12 years ago)
Author:
ryan
Message:

User term IDs returned from wp_update_term() in case a plugin that remaps IDs is in use

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r9963 r10055  
    936936
    937937            if ( $updated && !is_wp_error($updated) )
    938                 echo _cat_row( $id, 0 );
     938                echo _cat_row( $updated, 0 );
    939939            else
    940940                die( __('Category not updated.') );
     
    945945
    946946            if ( $updated && !is_wp_error($updated) )
    947                 echo link_cat_row($id);
     947                echo link_cat_row($updated['term_id']);
    948948            else
    949949                die( __('Category not updated.') );
     
    952952        case 'tag' :
    953953            $updated = wp_update_term($id, 'post_tag', $_POST);
    954 
    955954            if ( $updated && !is_wp_error($updated) ) {
    956                 $tag = get_term( $id, 'post_tag' );
     955                $tag = get_term( $updated['term_id'], 'post_tag' );
    957956                if ( !$tag || is_wp_error( $tag ) )
    958957                    die( __('Tag not updated.') );
Note: See TracChangeset for help on using the changeset viewer.