[wp-trac] [WordPress Trac] #16567: Can't create categories with different names but similar slugs on Edit Post screen

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 25 21:27:52 UTC 2012


#16567: Can't create categories with different names but similar slugs on Edit Post
screen
----------------------------+--------------------
 Reporter:  jeffreymcmanus  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  3.5
Component:  Administration  |     Version:  3.0.5
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+--------------------

Comment (by SergeyBiryukov):

 Replying to [comment:11 technosailor]:
 > I don't agree that wp_insert_term should be where the checks are
 happening. It adds a potentially unneeded query. We should not be doing
 wp_insert_term if term_exists.

 Quite the contrary, [attachment:16567.2.diff] prevents `term_exists()`
 from being called twice if the term does not exist, since
 `wp_insert_term()` calls it anyway.

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


More information about the wp-trac mailing list