WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#38241 closed defect (bug) (duplicate)

Correct the docblock description for is_single()

Reported by: johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Themes Keywords:
Focuses: docs, template Cc:

Description

The docblock description for is_single() states:

Is the query for an existing single post?

Works for any post type, except attachments and pages

It appears that the "Works for" phrase is incorrect and has been for the last six years (since [16830]) because is_single() returns true for attachment views. Either that, or the function's behaviour changed at some point before its tests were introduced.

Tests for is_single() on an attachment view have been in place for at least three years (since [25002]).

Originally reported by @danburzo in Slack.

Change History (1)

#1 @ocean90
5 years ago

  • Keywords needs-patch needs-testing removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #38225.

Note: See TracTickets for help on using tickets.