Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#34156 closed enhancement (fixed)

Clarify parameters in get_posts() docblock

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

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 11 years ago.

Download all attachments as: .zip

Change History (4)

#1 @johnbillion
11 years ago

  • Keywords has-patch added

#2 @DrewAPicture
11 years ago

  • Owner set to DrewAPicture
  • Status new → reviewing

Absolutely. I like this.

#3 @DrewAPicture
11 years ago

  • Resolution → fixed
  • Status reviewing → 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.