Misinformation in the inline code comment documentation for get_term_children
|Reported by:||simonwheatley||Owned by:|
The inline documentation around get_term_children suggests that it will take a term name, the function argument $term suggests it would take a Term object; neither is true, it takes a term ID and returns an array of term IDs.
I propose the attached patch which changes the function arg name to $term_id, and amends the inline documentation.
The only addition, potentially mildly contentious I suppose, is that the diff uses absint to ensure the term ID passed is definitely an integer.
Change History (7)
- Component changed from Taxonomy to Inline Docs
- Owner ryan deleted