[wp-trac] [WordPress Trac] #61308: Return `post_types` field in templates REST API

WordPress Trac noreply at wordpress.org
Tue May 28 15:40:03 UTC 2024


#61308: Return `post_types` field in templates REST API
-------------------------+-----------------------
 Reporter:  oandregal    |      Owner:  oandregal
     Type:  enhancement  |     Status:  assigned
 Priority:  normal       |  Milestone:  6.6
Component:  REST API     |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61308>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list