[wp-trac] [WordPress Trac] #14485: Didn't show up children category when created parent and children categories at the same time.

WordPress Trac wp-trac at lists.automattic.com
Sun Dec 12 06:49:07 UTC 2010


#14485: Didn't show up children category when created parent and children
categories at the same time.
--------------------------+-------------------------------------------------
 Reporter:  thealien      |       Owner:                         
     Type:  defect (bug)  |      Status:  new                    
 Priority:  high          |   Milestone:  3.1                    
Component:  Cache         |     Version:  3.0                    
 Severity:  normal        |    Keywords:  has-patch needs-testing
--------------------------+-------------------------------------------------

Comment(by garyc40):

 In your test case, line 10:

 {{{$child = wp_insert_term('Child', 'category', $parent_id);}}}

 should be:

 {{{$child = wp_insert_term( 'Child', 'category', array( 'parent' =>
 $parent_id ) );}}}

 Otherwise the child term is not created under the parent term.

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


More information about the wp-trac mailing list