Opened 4 months ago
Last modified 3 months ago
#61308 assigned enhancement
Return `post_types` field in templates REST API
Reported by: | oandregal | Owned by: | oandregal |
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | REST API | Keywords: | has-patch needs-unit-tests |
Focuses: | Cc: |
Description
While working on the site editor templates screen, I realized we don't expose the post_types
field through the templates endpoint https://developer.wordpress.org/rest-api/reference/wp_templates/, though it's one of the parameters consumers can use to query it.
In the dataviews-powered page, we want to expose this information so the user can filter templates that are intended to work with a given post type.
My suggestion is to expose this new field through the existing templates REST API endpoint.
Change History (4)
This ticket was mentioned in PR #6660 on WordPress/wordpress-develop by @oandregal.
4 months ago
#1
- Keywords has-patch added
#4
@
3 months ago
- Keywords needs-unit-tests added
- Milestone changed from 6.6 to 6.7
We have 3 hours until the commit freeze before Beta 1 release and no Unit tests. I am rescheduling it to the next milestone. Let's make it when Trunk will be open for enhancements again, without waiting for the last moment. Thank you 😅
@spacedmonkey can you, please, take a look. I have doubts that we will be able to make in into 6.6, but it looks simple enough and quite reasonable to have. Thank you!