Opened 5 years ago
Closed 5 years ago
#54065 closed defect (bug) (fixed)
Docs: clarify that `term_id` is a valid value of the `field` parameter of `get_term_by()`
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.9 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Taxonomy | Keywords: | has-patch |
| Focuses: | docs | Cc: |
Description
In the Parameters section, the text for the first parameter ($field) says:
Either 'slug', 'name', 'id' or 'ID' (term_id), or 'term_taxonomy_id'.
The function accepts ‘term_id’ and it's the actual property name of the WP_Term object, so I guess it should appear first and we should make it more clear that id and ID are aliases.
I’d propose to replace the current docs with something like:
Either 'slug', 'name', 'term_id' (or 'id', 'ID'), or 'term_taxonomy_id'.
(thanks @gazchap for catching this in a DevHub user note)
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
In 51731: