[wp-trac] [WordPress Trac] #44443: WP_Term_Query::__construct()
WordPress Trac
noreply at wordpress.org
Sun Jun 24 02:06:15 UTC 2018
#44443: WP_Term_Query::__construct()
--------------------------+-----------------------------
Reporter: jeremyescott | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version:
Severity: normal | Keywords:
Focuses: docs |
--------------------------+-----------------------------
So I'm working on a pesky issue around a get_terms() call that, of course,
uses WP_Term_Query::__construct() and, while I fixed the issue (it was my
fault) I spent some time in docs and in fact I got quite confused by an
aspect of documentation, which I fully believe is an error.
from wp-includes/class-wp-term-query.php: 99
{{{
/* [...]
* @type string $orderby Field(s) to order terms
by. Accepts term fields ('name',
* 'slug', 'term_group',
'term_id', 'id', 'description', 'parent'),
* 'count' for term
taxonomy count, 'include' to match the
* 'order' of the $include
param, 'slug__in' to match the
* 'order' of the $slug
param, 'meta_value', 'meta_value_num',
* the value of
`$meta_key`, the array keys of `$meta_query`, or
* 'none' to omit the ORDER
BY clause. Defaults to 'name'.
* [...]
*/
}}}
My problem is with this bit:
> 'count' for term taxonomy count,
A term doesn't have taxonomy, right? A taxonomy has terms, but not terms
taxonomy. I personally believe this should read (because it matches
behavior):
> 'count' for number of posts in term count
Or something like that.
Is this correct? I don't think I'm crazy, but I'd love a second opinion.
If I get some agreement, I'll either happily write a patch or let this one
be a "good-first-patch" for a newbie!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44443>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list