Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#34156 closed enhancement (fixed)

Clarify parameters in get_posts() docblock

Reported by: johnbillion's profile johnbillion Owned by: drewapicture's profile DrewAPicture
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: Query Keywords: has-patch
Focuses: docs Cc:

Description

The parameters listed in the docblock for get_posts() are confusing because it includes a subset of the arguments inherited from WP_Query in addition to its own parameters.

The parameters which are inherited from WP_Query and which do not have a different default value shouldn't be listed.

Attachments (1)

34156.diff (1.8 KB) - added by johnbillion 10 years ago.

Download all attachments as: .zip

Change History (4)

@johnbillion
10 years ago

#1 @johnbillion
10 years ago

  • Keywords has-patch added

#2 @DrewAPicture
10 years ago

  • Owner set to DrewAPicture
  • Status changed from new to reviewing

Absolutely. I like this.

#3 @DrewAPicture
10 years ago

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

In 34886:

Docs: Only document get_posts() argument defaults that differ from, or aren't present in the defaults offered by WP_Query::parse_query().

Props johnbillion.
Fixes #34156.

Note: See TracTickets for help on using tickets.