Opened 5 years ago
Closed 3 years ago
#48638 closed enhancement (fixed)
Pass WP_REST_Request object to the rest_index filter
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | REST API | Keywords: | good-first-bug has-patch commit |
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.
Commits (1)
- [52796] REST API: Pass
WP_REST_Request
object to the rest_index filter. … by @spacedmonkey 3 years ago
Pull Requests
- Loading…
Change History (12)
#2
follow-up:
↓ 3
@ Core Committer
3 years ago
@johnregan3 Thanks for the patch! Any chance you could also update the comment on the filter?
#3
in reply to:
↑ 2
@
3 years 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?
#4
@
3 years ago
Patch looks good from my side, I think updating the long description of filter hook and a since tag with new params will be perfect.
#5
@
3 years ago
@hasanuzzamanshamim Thanks for the feedback! Patch updated.
#6
@
3 years ago
Polite bump notifying @spacedmonkey as they're the component maintainer.
#7
@ Core Committer
3 years ago
- Keywords has-patch commit added; needs-patch removed
- Milestone changed from Awaiting Review to 6.0
- Owner set to spacedmonkey
- Status changed from new to assigned
#8
@ Core Committer
3 years ago
@TimothyBlynJacobs Are you happy for me to commit this?
#9
@ Core Committer
3 years ago
@spacedmonkey Go for it!
We can remove this comment: Additionally, the Request is included so the Response can be modified based on input provided by the client.
Initial patch