[wp-trac] [WordPress Trac] #29839: Enhance get_terms to return only bottom child terms (terms without children) when taxonomy is heirarchical

WordPress Trac noreply at wordpress.org
Sun Nov 16 19:42:09 UTC 2014


#29839: Enhance get_terms to return only bottom child terms (terms without
children) when taxonomy is heirarchical
------------------------------------------------+--------------------------
 Reporter:  theMikeD                            |       Owner:
     Type:  enhancement                         |      Status:  new
 Priority:  normal                              |   Milestone:  Future
Component:  Taxonomy                            |  Release
 Severity:  normal                              |     Version:  4.0
 Keywords:  4.2-early good-first-bug has-patch  |  Resolution:
                                                |     Focuses:
------------------------------------------------+--------------------------

Comment (by theMikeD):

 I've attached the updated working unit test. Is there an option on
 `$this->factory->term->create` to return the term object rather than the
 id? `wp_set_post_terms()` expects parameter 2 to be a string when the
 taxonomy is flat and it would be nice to avoid the three calls to
 `get_term()`

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


More information about the wp-trac mailing list