Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#33907 closed defect (bug) (fixed)

is_single/singular/page @param inline docs don't list type

Reported by: shelob9's profile Shelob9 Owned by: drewapicture's profile DrewAPicture
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch commit
Focuses: docs Cc:


is_single/singular/page and the WP_Query methods they wrap use mixed for type of the argument they accept. This is not useful. They accept string or array.

Attachments (2)

33907.diff (1.9 KB) - added by Shelob9 8 years ago.
33907.2.diff (2.6 KB) - added by DrewAPicture 8 years ago.

Download all attachments as: .zip

Change History (6)

8 years ago

#1 @Shelob9
8 years ago

  • Keywords has-patch added

#2 @wonderboymusic
8 years ago

  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to Future Release

or int

8 years ago

#3 @DrewAPicture
8 years ago

  • Keywords commit added; needs-refresh removed
  • Milestone changed from Future Release to 4.4

Hi @Shelob9, thanks for the patch!

#4 @DrewAPicture
8 years ago

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

In 34502:

Docs: Add more explicit optional parameter types and return descriptions in the DocBlocks for is_page(), is_single(), is_singular().

Also adds explicit types and return descriptions to the corresponding WP_Query methods: WP_Query::is_page(), WP_Query::is_single(), and WP_Query::is_singular().

Props Shelob9 for the initial patch.
Fixes #33907.

Note: See TracTickets for help on using tickets.