[wp-trac] [WordPress Trac] #62574: Move default template types and template part areas to REST API

WordPress Trac noreply at wordpress.org
Wed Feb 12 04:30:06 UTC 2025


#62574: Move default template types and template part areas to REST API
---------------------------------------+-----------------------
 Reporter:  gigitux                    |       Owner:  gigitux
     Type:  enhancement                |      Status:  assigned
 Priority:  normal                     |   Milestone:  6.8
Component:  Editor                     |     Version:
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch gutenberg-merge  |     Focuses:
---------------------------------------+-----------------------
Changes (by peterwilsoncc):

 * keywords:  has-patch, gutenberg-merge => has-patch gutenberg-merge


Comment:

 The associated PR doesn't make the fields available to the endpoint by
 default which is a little counter intuitive. In order to access them, a
 developer must include the usually optional `?_fields` parameter. `/wp-
 json/?_fields=default_template_part_areas,default_template_types`

 By requiring the additional parameters, it seems like it's adding a new
 endpoint by other means.

 I'm also not convinced the site index is the best place for these, even if
 loaded by default, template parts and areas are very theme orientated so
 the themes controller seems a better place for them.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62574#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list