Make WordPress Core

#56348 closed defect (bug) (fixed)

Correct and clarify inline docs for excluded_terms in get_adjacent_post()

Reported by: grapplerulrich's profile grapplerulrich Owned by: ocean90's profile ocean90
Milestone: 6.1 Priority: normal
Severity: normal Version: 3.9
Component: Posts, Post Types Keywords: has-patch
Focuses: docs Cc:

Description

The variable $excluded_terms is an array of excluded term IDs. Empty string if none were provided.

It is documented incorrectly in `get_{$adjacent}_post_where` and `get_{$adjacent}_post_join`.

Change History (3)

This ticket was mentioned in PR #3073 on WordPress/wordpress-develop by grappler.


22 months ago
#1

  • Keywords has-patch added

Correctly document $excluded_terms is an array of excluded term IDs or an empty string is none provided.

Trac ticket: https://core.trac.wordpress.org/ticket/56348

#2 @costdev
22 months ago

  • Milestone changed from Awaiting Review to 6.1

Thanks @grapplerulrich, and nicely spotted! $excluded_terms is indeed documented as int[]|string everywhere but in these two locations.

PR 3073 Looks good to me! Milestoning for 6.1.

Last edited 22 months ago by costdev (previous) (diff)

#3 @ocean90
22 months ago

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

In 53870:

Docs: Consistently document the $excluded_terms variable in get_adjacent_post().

The variable $excluded_terms is an array of excluded term IDs or empty string if none were provided.

Props grapplerulrich, costdev.
Fixes #56348.

Note: See TracTickets for help on using tickets.