[wp-trac] [WordPress Trac] #24386: Make _pad_term_counts work for non-post type objects and attachments
WordPress Trac
noreply at wordpress.org
Thu Oct 23 17:05:06 UTC 2014
#24386: Make _pad_term_counts work for non-post type objects and attachments
------------------------------------------+------------------------------
Reporter: TomAuger | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+------------------------------
Changes (by boonebgorges):
* keywords: needs-patch => needs-patch needs-unit-tests
Comment:
> I'm suggesting an alternative approach would be to use $term->count, and
eschew going back to the database altogether.
I agree that it's bad to have this function so closely tied to posts. But
simply incrementing 'count' seems risky, as there'd be no checks to make
sure these numbers stayed in sync.
Some unit tests for this functionality would be hugely helpful, as it'd
give us a better sense of when these counts ought to be changing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24386#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list