Opened 7 years ago
Closed 4 years ago
#42762 closed enhancement (fixed)
rest_{$this->post_type}_query filter wrong place
Reported by: | Krstarica | Owned by: | TimothyBlynJacobs |
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | REST API | Keywords: | has-patch early |
Focuses: | Cc: |
Description
Taxonomies are added after rest_{$this->post_type}_query
filter takes place, making impossible to alter the query completely.
It would be better to apply filter right before new WP_Query()
in class-wp-rest-posts-controller.php:290.
Attachments (1)
Change History (8)
#1
@
5 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to Future Release
- Version changed from 4.9.1 to 4.7
#2
@
4 years ago
- Keywords early added
- Milestone changed from Future Release to 5.7
- Owner set to TimothyBlynJacobs
- Status changed from new to assigned
This ticket was mentioned in Slack in #core by metalandcoffee. View the logs.
4 years ago
This ticket was mentioned in PR #849 on WordPress/wordpress-develop by TimothyBJacobs.
4 years ago
#6
- Keywords needs-refresh removed
Trac ticket: https://core.trac.wordpress.org/ticket/42762
Note: See
TracTickets for help on using
tickets.
AFAICT, this was introduced like that in https://github.com/WP-API/WP-API/pull/2287
I think this can be fixed safely.