[wp-trac] [WordPress Trac] #17069: missing get_term_parents() function

WordPress Trac noreply at wordpress.org
Sun Dec 11 14:48:36 UTC 2016


#17069: missing get_term_parents() function
--------------------------------------+---------------------------
 Reporter:  thomask                   |       Owner:  keesiemeijer
     Type:  enhancement               |      Status:  reopened
 Priority:  normal                    |   Milestone:  4.8
Component:  Taxonomy                  |     Version:  3.1
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------------
Changes (by keesiemeijer):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 The function should use `get_term_link()` instead of
 `get_category_link()`.

 The difference between them is that if an error occurred,
 `get_term_link()` returns a WP_Error, where `get_category_link()` would
 return an empty string. Because we use the the term ids found by
 `get_ancestors()` no errors should occur when passing them to
 `get_term_link()`.

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


More information about the wp-trac mailing list