Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#48354 closed enhancement (fixed)

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

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

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

Download all attachments as: .zip

Change History (14)

#1 @johnbillion
7 years ago

  • Keywords needs-patch good-first-bug added

#2 @desrosj
7 years ago

  • Milestone Awaiting Review → 5.4

#3 @SergeyBiryukov
7 years ago

  • Component General → Query

#4 @shaampk1
7 years ago

  • Keywords has-patch added; needs-patch removed

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


7 years ago

#7 @davidbaumwald
7 years ago

  • Milestone 5.4 → 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
7 years ago

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

#9 in reply to: ↑ 5 @SergeyBiryukov
7 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
7 years ago

In 47401:

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

See #48354, #48303.

#11 @SergeyBiryukov
7 years ago

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

  • Milestone 5.5 → 5.4
Note: See TracTickets for help on using tickets.