[wp-trac] [WordPress Trac] #32942: Taxomony term list counts do not respect post_type parameter
WordPress Trac
noreply at wordpress.org
Mon Jul 20 03:34:30 UTC 2015
#32942: Taxomony term list counts do not respect post_type parameter
-------------------------------------+-----------------------------
Reporter: stueynet | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Taxonomy | Version: 3.1
Severity: normal | Resolution:
Keywords: ux-feedback needs-patch | Focuses: administration
-------------------------------------+-----------------------------
Changes (by stueynet):
* keywords: ux-feedback => ux-feedback needs-patch
Comment:
Just thought I would follow up a bit on this one. After examining the code
the issue is that the $tag object which is used to display the count in
the Count column of the terms table, uses get_terms. get_terms does not
care about post_type. So this could never have worked.
In wp-admin/includes/class-wp-terms-list-table.php on line 200 the
display_rows_or_placeholder() method calls get_terms on line 224.
So the solution is to add the ability to set a post_type parameter to the
get_terms() function. Then updated the call to get_terms above to include
that parameter.
I will have a look at how to do that next.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32942#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list