Opened 4 years ago
Last modified 6 months ago
#36399 new enhancement
Change function signature of `wp_count_terms()` to be compliant with recent `get_terms()` changes
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6 |
Component: | Taxonomy | Keywords: | has-patch |
Focuses: | Cc: | ||
PR Number: |
Description
In #35495 the $taxonomy
parameter of get_terms()
was made optional, thus changing the function signature to the first parameter being the $args
array where the taxonomy (if needed) could then be added to.
This ticket is about changing the signature of wp_count_terms()
in a similar manner. This will bring more consistency and it will also allow to count all terms entirely (if no taxonomy is provided).
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
36399.diff is a patch for this. Specifically we need to determine if the check for
$do_legacy_args
is safe enough here. As an alternative, we could create a new internal function like_get_terms_defaults()
which would allow us to do the same kind of verification as inget_terms()
.