[wp-trac] [WordPress Trac] #29899: wp_insert_term should return an object instead of an array

WordPress Trac noreply at wordpress.org
Fri Oct 10 10:56:37 UTC 2014


#29899: wp_insert_term should return an object instead of an array
-------------------------+----------------------
 Reporter:  andyexeter   |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Taxonomy     |     Version:  2.3
 Severity:  normal       |  Resolution:  wontfix
 Keywords:               |     Focuses:
-------------------------+----------------------

Comment (by andyexeter):

 Thank you for the reply. Not sure if this is the correct place to be
 posting this but I ended up casting the returned array to an object with
 `(object)wp_insert_term('my-term', 'my-taxonomy')` to get the desired
 result

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29899#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list