[wp-trac] [WordPress Trac] #22801: Update documentation on wp_insert_term to state that it will return an error if inserting an existing term.

WordPress Trac noreply at wordpress.org
Thu Sep 19 09:41:47 UTC 2013


#22801: Update documentation on wp_insert_term to state that it will return an
error if inserting an existing term.
--------------------------+-----------------------------
 Reporter:  lgedeon       |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  3.7
Component:  Inline Docs   |     Version:  2.3
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |
--------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Looks like I used [attachment:22801.diff] instead of
 [attachment:22801.2.diff].

 [attachment:22801.4.diff] is a partial refresh of
 [attachment:22801.2.diff] and [attachment:22801.3.diff], and is my take on
 further clarifying the error handling.

 * A numeric `$term` is allowed, as long as it's not empty.
 * A non-unique slug is also allowed (it will be regenerated), as long as
 the name is different.

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


More information about the wp-trac mailing list