[wp-trac] [WordPress Trac] #23378: wp_(insert|update)_term() should accept term slug as 'parent' argument

WordPress Trac noreply at wordpress.org
Sat Jan 17 19:46:03 UTC 2015


#23378: wp_(insert|update)_term() should accept term slug as 'parent' argument
-----------------------------+----------------------
 Reporter:  danielbachhuber  |       Owner:
     Type:  enhancement      |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Taxonomy         |     Version:
 Severity:  normal           |  Resolution:  wontfix
 Keywords:  has-patch        |     Focuses:
-----------------------------+----------------------
Changes (by boonebgorges):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 As of WP 4.1, it's possible for terms in different taxonomies to have the
 same slug, and it's possible that at some point we'll allow terms in the
 same taxonomy to share slugs as long as the taxonomy is hierarchical and
 the terms are not siblings. This introduces the possibility of ambiguity
 when identifying a parent merely by slug. Forcing the plugin author to
 fetch the term ID (using `get_term_by( 'slug' )` or whatever) and then
 passing the ID to 'parent' makes it so that WP doesn't have to make
 educated guesses in ambiguous cases. For this reason, I'm marking wontfix.

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


More information about the wp-trac mailing list