[wp-trac] [WordPress Trac] #37198: Use `WP_Term_Query` for `wp_get_object_terms()`

WordPress Trac noreply at wordpress.org
Mon Jun 27 11:09:31 UTC 2016


#37198: Use `WP_Term_Query` for `wp_get_object_terms()`
-------------------------+-------------------------------
 Reporter:  flixos90     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Taxonomy     |    Version:  trunk
 Severity:  normal       |   Keywords:  needs-patch early
  Focuses:               |
-------------------------+-------------------------------
 As discussed in #35381, `WP_Term_Query` should be used for
 `wp_get_object_terms()` as well. It works almost similar, except for that
 it requires to pass object IDs and make an additional SQL JOIN with the
 `term_relationships` table. In addition to a better structured code, this
 would also provide significant cache benefits.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37198>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list