[wp-trac] [WordPress Trac] #30620: get_term_by( 'term_taxonomy_id' ) should NOT require $taxonomy param

WordPress Trac noreply at wordpress.org
Tue Oct 13 03:36:53 UTC 2015


#30620: get_term_by( 'term_taxonomy_id' ) should NOT require $taxonomy param
-------------------------+---------------------------
 Reporter:  joehoyle     |       Owner:  boonebgorges
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  4.4
Component:  Taxonomy     |     Version:  3.7
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:
-------------------------+---------------------------

Comment (by boonebgorges):

 Replying to [comment:8 rmccue]:
 > FYI, this change to `get_term_by` [https://github.com/WP-API/WP-
 API/pull/1644 broke the REST API], since we relying on the check. We've
 fixed it, but might be worth noting in a field notes post for others that
 it might break.
 >
 > (Accidentally commented on #14162, but that's unrelated.)

 Thanks for the note. I'll note the change in the taxonomy field notes for
 4.4. But the new behavior is probably the correct one: if you are passing
 a 'term_taxonomy_id', you're likely doing it for the explicit reason that
 you want to avoid the 'taxonomy' table join, which means that you've
 already done your homework.

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


More information about the wp-trac mailing list