[wp-trac] [WordPress Trac] #17140: get_terms() after wp_update_term() gives old list

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 29 23:27:25 UTC 2011


#17140: get_terms() after wp_update_term() gives old list
--------------------------+-----------------------
 Reporter:  mastermind    |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  close         |
--------------------------+-----------------------
Changes (by SergeyBiryukov):

 * status:  closed => reopened


Comment:

 Didn't mean to close without a resolution.

 Actually, can't reproduce on current trunk:
 {{{
 $category = get_term(1, 'category');
 $category->slug = 'uncategorized' . current_time('timestamp');

 wp_update_term( $category->term_id, 'category', array( 'slug' =>
 $category->slug ) );

 var_dump( $category );
 var_dump( get_terms('category') );
 }}}
 `get_terms()` returns the updated term as well. Looks like fixed in 3.2.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17140#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list