[wp-trac] [WordPress Trac] #37825: Introduce functions to check whether there are multiple taxonomy terms
WordPress Trac
noreply at wordpress.org
Thu Aug 25 12:36:11 UTC 2016
#37825: Introduce functions to check whether there are multiple taxonomy terms
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Themes | Review
Severity: normal | Version:
Keywords: has-patch 2nd-opinion needs-unit- | Resolution:
tests | Focuses:
-------------------------------------------------+-------------------------
Changes (by flixos90):
* keywords: needs-patch => has-patch 2nd-opinion needs-unit-tests
Comment:
[attachment:37825.diff] introduces a function `is_multi_taxonomy()` that
checks whether there exist more than one term with assigned posts for a
given taxonomy. It uses transients to store the results, and these
transients are automatically invalidated when necessary.
The patch also includes `is_multi_category()` and `is_multi_tag()` which
are wrappers for `is_multi_taxonomy()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37825#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list