[wp-trac] [WordPress Trac] #36399: Change function signature of `wp_count_terms()` to be compliant with recent `get_terms()` changes
WordPress Trac
noreply at wordpress.org
Fri Jul 31 22:45:13 UTC 2020
#36399: Change function signature of `wp_count_terms()` to be compliant with recent
`get_terms()` changes
--------------------------------------+-----------------------
Reporter: flixos90 | Owner: flixos90
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.6
Component: Taxonomy | Version: 4.6
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------
Changes (by flixos90):
* owner: (none) => flixos90
* status: new => assigned
* milestone: => 5.6
Comment:
I've opened a [https://github.com/WordPress/wordpress-develop/pull/450
pull-request] with an updated version of this change. It also includes:
* tests to cover both new and legacy usage of `wp_count_terms()`
* all references in core code have been updated to use new signature
As originally planned, because this function is widely used and there is
no actual drawback to use the old signature, legacy usage shouldn't
trigger a deprecated notice (similar like with `get_terms()`). Yet,
proceeding with this change makes sense for consistency and to make it
obvious that `wp_count_terms()` can also count ''all'' terms, not only
terms of certain taxonomies.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36399#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list