[wp-trac] [WordPress Trac] #38280: Make term count for a specific object type available
WordPress Trac
noreply at wordpress.org
Thu Dec 8 01:27:03 UTC 2016
#38280: Make term count for a specific object type available
-------------------------+------------------------------
Reporter: desrosj | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.7
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by johnbillion):
This is looking good. Some feedback:
* This function will return `0` for terms that haven't yet had their post
count cache populated (ie. all terms that already exist when the site gets
upgraded to WP 4.8, for example). Should the term count its posts if the
term meta cache doesn't yet exist?
* The `$wpdb->prepare()` call added on line `3427` of `src/wp-
includes/taxonomy.php` should properly prepare `$type` instead of
concatenating it into the SQL.
* There should be a test that asserts that the count is correctly updated
when terms are removed from an object with `wp_remove_object_terms()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38280#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list