[wp-trac] [WordPress Trac] #37825: Introduce functions to check whether there are multiple taxonomy terms
WordPress Trac
noreply at wordpress.org
Sun Sep 11 02:29:36 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:
-------------------------------------------------+-------------------------
Comment (by boonebgorges):
Idea seems OK to me, if it is in fact true that theme authors would find
it useful. I don't fully grasp the utility of it, but I also don't fully
grasp the utility of `is_multi_author()` :) Do you have examples of themes
that are implementing this logic on their own?
A couple notes on the patch:
- `is_multi_taxonomy()` does not feel like the right name for this
proposed function. `is_multi_author()` is checking to see whether the site
has multiple authors. By extension, `is_multi_taxonomy()` would check to
see whether the site has multiple taxonomies. But this is not right.
`wp_taxonomy_has_multiple_terms( $taxonomy )` seems more semantically
correct.
- I don't think we need to have the underscore prefix for
`_clear_multi_taxonomy_cache()`. We're moving away from this kind of
naming convention.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37825#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list