[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
Fri Dec 7 04:51:53 UTC 2012


#22801: Update documentation on wp_insert_term to state that it will return an
error if inserting an existing term.
-----------------------------+--------------------------
 Reporter:  lgedeon          |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Inline Docs
  Version:                   |   Severity:  normal
 Keywords:                   |
-----------------------------+--------------------------
 phpdoc for wp_insert_term() states:

 If both the term id and taxonomy exist previously, then an array will be
 returned that contains the term id and the contents of what is returned.

 However it returns an error object instead. That may have changed with
 #13481. Anyway, returning an error seems to be an acceptable solution.
 Although, #16567 might change that a bit.

 Should we just adjust the docs to fit the current behavior?

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


More information about the wp-trac mailing list