Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#36182 closed defect (bug) (fixed)

Incorrect `@return` documentation for `wp_set_object_terms()` and friends

Reported by: boonebgorges's profile boonebgorges Owned by: boonebgorges's profile boonebgorges
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords:
Focuses: docs Cc:

Description

wp_set_object_terms() and its wrappers state in their doc blocks that the return value is an array of term IDs. This is incorrect. The return value is, for better or for worse, term taxonomy IDs. The distinction matters less as shared terms start to go away, but the numbers will be perpetually different for legacy terms (or cases where shared terms have not been split) so the documentation should be fixed.

Change History (1)

#1 @boonebgorges
7 years ago

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

In 36896:

Correct @return annotation for wp_set_object_terms() and related functions.

The return value is an array of term taxonomy IDs, not term IDs.

Fixes #36182.

Note: See TracTickets for help on using tickets.