Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#48354 closed enhancement (fixed)

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

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

Description

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 5 years ago.
Stricter docs for WP_Query::is_page()
48354.diff (612 bytes) - added by shaampk1 5 years ago.

Download all attachments as: .zip

Change History (14)

#1 @johnbillion
5 years ago

  • Keywords needs-patch good-first-bug added

#2 @desrosj
5 years ago

  • Milestone changed from Awaiting Review to 5.4

#3 @SergeyBiryukov
5 years ago

  • Component changed from General to Query

@shaharia.azam
5 years ago

Stricter docs for WP_Query::is_page()

#4 @shaampk1
5 years ago

  • Keywords has-patch added; needs-patch removed

@shaampk1
5 years ago

#5 follow-up: @SergeyBiryukov
4 years 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.


4 years ago

#7 @davidbaumwald
4 years 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
4 years 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
4 years 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
4 years ago

In 47401:

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

See #48354, #48303.

#11 @SergeyBiryukov
4 years 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
4 years ago

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