WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 5 weeks ago

#48638 new enhancement

Pass WP_REST_Request object to the rest_index filter

Reported by: TimothyBlynJacobs Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.4
Component: REST API Keywords: needs-patch good-first-bug
Focuses: Cc:

Description

The rest_index filter does not have access to the WP_REST_Request object which means we can't easily modify the response depending on the request data provided.

Attachments (1)

48638.diff (567 bytes) - added by johnregan3 5 weeks ago.
Initial patch

Download all attachments as: .zip

Change History (4)

#1 @spacedmonkey
7 weeks ago

  • Keywords good-first-bug added

@johnregan3
5 weeks ago

Initial patch

#2 follow-up: @spacedmonkey
5 weeks ago

@johnregan3 Thanks for the patch! Any chance you could also update the comment on the filter?

#3 in reply to: ↑ 2 @johnregan3
5 weeks ago

Replying to spacedmonkey:

@johnregan3 Thanks for the patch! Any chance you could also update the comment on the filter?

@spacedmonkey Gladly. What would you like me to add? Documentation in the long description?

Note: See TracTickets for help on using tickets.