[wp-trac] [WordPress Trac] #11825: wp_create_category() in Taxonomy Administration API ignoring the "parent" ID param

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 8 17:04:00 UTC 2010


#11825: wp_create_category() in Taxonomy Administration API ignoring the "parent"
ID param
--------------------------+-------------------------------------------------
 Reporter:  thetoine      |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:  2.9.1     
 Severity:  normal        |    Keywords:  taxonomy  
--------------------------+-------------------------------------------------
 http://core.trac.wordpress.org/browser/trunk/wp-
 admin/includes/taxonomy.php#L51

 Function is checking if the category exist, but without sending the
 "parent" categoryID parameter :

 if ( $id = category_exists($cat_name) )

 Should be :

 if ( $id = category_exists($cat_name, $parent) )

 The code works fine unless 2 sub-categories shares the same name.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11825>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list