[wp-trac] [WordPress Trac] #36949: Term exists should use get_terms internally

WordPress Trac noreply at wordpress.org
Thu Feb 17 19:53:44 UTC 2022


#36949: Term exists should use get_terms internally
--------------------------------------------+---------------------------
 Reporter:  spacedmonkey                    |       Owner:  spacedmonkey
     Type:  enhancement                     |      Status:  assigned
 Priority:  normal                          |   Milestone:  6.0
Component:  Taxonomy                        |     Version:  2.3
 Severity:  normal                          |  Resolution:
 Keywords:  has-patch has-unit-tests close  |     Focuses:  performance
--------------------------------------------+---------------------------

Comment (by flixos90):

 @spacedmonkey Your latest PR looks solid to me from a technical
 perspective, awesome work!

 However, I also acknowledge @boonebgorges's concerns from before that this
 change may subvert some (to be fair, quite obscure) expectations from
 developers that the queries here would be uncached, not go through any
 filtering etc.

 I personally am not opposed to this being committed to core, but I'm also
 not confident enough to commit this myself. I agree that for sure the
 safer change would be to replace `term_exists()` calls with something like
 `!! get_term()` throughout core, and we could potentially even deprecate
 `term_exists()` at some point then.

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


More information about the wp-trac mailing list