[wp-trac] [WordPress Trac] #32044: is_object_in_term() leaks DB queries

WordPress Trac noreply at wordpress.org
Mon Apr 27 14:53:20 UTC 2015


#32044: is_object_in_term() leaks DB queries
------------------------------------------+--------------------
 Reporter:  joehoyle                      |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  4.3
Component:  Taxonomy                      |     Version:  4.1.1
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+--------------------

Comment (by boonebgorges):

 There are lots of plugins that use taxonomies for things other than post
 types. 'user' is a common one. (I have written a number that use
 taxonomies for BuddyPress objects.) `is_object_in_term()` currently works
 for these cases (except perhaps in edge cases where an object type not in
 the term shares an ID with a post that is in the term - this needs
 testing). Updating the general relationship caches in
 `is_object_in_term()` is going to cause weird problems if we do it in
 isolation. If we don't have a general solution for 4.3, then we should
 remove the cache check in this function altogether.

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


More information about the wp-trac mailing list