WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11835 closed defect (bug) (fixed)

get_objects_in_term source documentation mentions term not term_id

Reported by: Warll Owned by: nacin
Milestone: 3.0 Priority: low
Severity: normal Version: 2.9.1
Component: Inline Docs Keywords:
Focuses: Cc:

Description

After trying to pass get_objects_in_term a full term, an object, and then trying to pass it a term slug I dug a bit deeper and came across $terms = array_map('intval', $terms);

That lead me to try and feed get_objects_in_term an integer, which worked. I feel a bit cheated that the source documentation didn't mention this rather critical clause.

Change History (2)

comment:1 nacin4 years ago

  • Component changed from Taxonomy to Inline Docs
  • Milestone changed from Unassigned to 3.0
  • Owner changed from filosofo to nacin

comment:2 nacin4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13821]) Correct inline docs and parameter names for get_objects_in_term() to reflect that it uses term ids, not term slugs. fixes #11835

Note: See TracTickets for help on using tickets.