[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 20:09: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 Release
Component:  Taxonomy             |     Version:  4.0
 Severity:  normal               |  Resolution:
 Keywords:  4.2-early has-patch  |     Focuses:
---------------------------------+-----------------------------

Comment (by boonebgorges):

 Replying to [comment:43 theMikeD]:
 > Replying to [comment:40 boonebgorges]:
 > > >  Is there an option on $this->factory->term->create to return the
 term object rather than the id?
 > >
 > > `$this->factory->term->create_and_get()` should work.
 >
 > Can't find this. I see `$this->factory->post->create_and_get()` though.
 Maybe you were thinking of that?

 All the factory classes inherit `create_and_get()` from
 `WP_UnitTest_Factory_For_Thing`.
 https://core.trac.wordpress.org/browser/tags/4.0/tests/phpunit/includes/factory.php#L299

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


More information about the wp-trac mailing list