[wp-trac] [WordPress Trac] #36949: Term exists should use get_terms internally
WordPress Trac
noreply at wordpress.org
Fri Feb 18 17:59:24 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 needs-dev- | Focuses:
note commit | performance
-------------------------------------------------+-------------------------
Comment (by spacedmonkey):
In [38677] get_term_by is changed to use WP_Term_Query. A very similar
change to this one. There are other examples were we made function return
caches, where they did not before, another example is [37479] and [40921].
Expecting functions internals not to change, is not reasonable IMO. As
long as the return values stay the same.
I believe we should leave this function and `post_exists()` as is.
The fact it uses the filters, is a benefit and not a downside. For those
using something like elastic search to offload database queries, this
would be seen as massive upside. CC @adamsilverstein as he as experience
with ES.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36949#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list