WordPress.org

Make WordPress Core

#35799 closed enhancement (fixed)

Update class header for WP_REST_Request to communicate parameter priorities

Reported by: danielbachhuber Owned by: DrewAPicture
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: REST API Keywords: needs-docs
Focuses: docs Cc:

Description

We should summarize https://github.com/WP-API/WP-API/issues/2114#issuecomment-182873506 in the class header so endpoint developers know what they're getting into.

Attachments (2)

35799.1.diff (785 bytes) - added by danielbachhuber 19 months ago.
35799.diff (932 bytes) - added by DrewAPicture 19 months ago.

Download all attachments as: .zip

Change History (8)

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


19 months ago

#2 @chriscct7
19 months ago

@danielbachhuber You're proposing a docbloc that summarizes that comment correct? Or like a codex doc

This ticket was mentioned in Slack in #core-restapi by danielbachhuber. View the logs.


19 months ago

@DrewAPicture
19 months ago

#4 @DrewAPicture
19 months ago

  • Owner set to DrewAPicture
  • Status changed from new to reviewing

@danielbachhuber Based on the comment on GitHub, I've adjusted your patch a little bit to try to be more clear about what's expected. Would you mind reviewing 35799.diff for accuracy?

#5 @danielbachhuber
19 months ago

@DrewAPicture works for me — :shipit:

#6 @DrewAPicture
19 months ago

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

In 36636:

Docs: Improve documentation for WP_REST_Request to highlight a caveat of ArrayAccess when it comes to passing similar arguments for multiple request methods.

Props danielbachhuber, DrewAPicture.
Fixes #35799.

Note: See TracTickets for help on using tickets.