Make WordPress Core

Opened 2 years ago

Closed 21 months ago

Last modified 21 months ago

#48354 closed enhancement (fixed)

Stricter docs for is_page() and WP_Query::is_page()

Reported by: marekdedic Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: minor Version: 5.2
Component: Query Keywords: good-first-bug has-patch
Focuses: docs Cc:


Both could have the $page parameter narrowed from int|string|array to int|string|int[]|string[].

Attachments (2)

Stricter_docs_for_WP_Query__is_page().patch (702 bytes) - added by shaharia.azam 2 years ago.
Stricter docs for WP_Query::is_page()
48354.diff (612 bytes) - added by shaampk1 2 years ago.

Download all attachments as: .zip

Change History (14)

#1 @johnbillion
2 years ago

  • Keywords needs-patch good-first-bug added

#2 @desrosj
2 years ago

  • Milestone changed from Awaiting Review to 5.4

#3 @SergeyBiryukov
2 years ago

  • Component changed from General to Query

2 years ago

Stricter docs for WP_Query::is_page()

#4 @shaampk1
2 years ago

  • Keywords has-patch added; needs-patch removed

2 years ago

#5 follow-up: @SergeyBiryukov
22 months ago

Just noting the same should also be done for these functions:

  • is_post_type_archive()
  • is_attachment()
  • is_author()
  • is_category()
  • is_tag()
  • is_tax()
  • is_single()
  • is_singular()

and their WP_Query counterpart methods.

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.

22 months ago

#7 @davidbaumwald
22 months ago

  • Milestone changed from 5.4 to Future Release

With 5.4 Beta 1 approaching and this ticket needing more work, this is being moved to Future Release. If any maintainer or committer feels this can be resolved in time, or wishes to assume ownership during a specific cycle, feel free to update the milestone.

#8 @SergeyBiryukov
21 months ago

  • Milestone changed from Future Release to 5.5
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#9 in reply to: ↑ 5 @SergeyBiryukov
21 months ago

Replying to SergeyBiryukov:

Just noting the same should also be done for these functions

is_author(), is_category(), is_tag(), is_tax() were addressed in [47397].

#10 @SergeyBiryukov
21 months ago

In 47401:

Docs: Synchronize parameter descriptions for conditional tags with their WP_Query counterpart methods.

See #48354, #48303.

#11 @SergeyBiryukov
21 months ago

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

In 47402:

Docs: Use more specific type in parameter descriptions for is_page(), is_single(), is_singular(), and their WP_Query counterpart methods.

Props marekdedic, shaharia.azam, shaampk1.
Fixes #48354. See #48303.

#12 @SergeyBiryukov
21 months ago

  • Milestone changed from 5.5 to 5.4
Note: See TracTickets for help on using tickets.