[wp-trac] [WordPress Trac] #36949: Term exists should use get_terms internally
WordPress Trac
noreply at wordpress.org
Tue Jan 8 19:19:55 UTC 2019
#36949: Term exists should use get_terms internally
--------------------------------------------+-----------------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Taxonomy | Version: 2.3
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests close | Focuses: performance
--------------------------------------------+-----------------------------
Comment (by boonebgorges):
Agreed that we're never going to be able to get rid of `term_exists()`
altogether.
The original goal in this ticket - if I understand it correctly - is to
improve performance in `term_exists()`. If we force caching to be
disabled, we're not accomplishing this goal, and we may actually be making
it worse, since `WP_Term_Query` does some other cache warming. So the
motivation is not clear to me. There is, of course, some value - in terms
of aesthetics and maintenance - in consolidating on the use of
`WP_Term_Query`. But the possibility of bugs makes it seem not worth the
effort to me.
As you can tell, I personally feel very squeamish about touching this
function, especially in the absence of really substantial benefits.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36949#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list