Opened 7 weeks ago
Last modified 7 weeks ago
#62574 assigned enhancement
Move default template types and template part areas to REST API
Reported by: | gigitux | Owned by: | gigitux |
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
The default template types and template part areas are currently preloaded via the settings object when the site editor is loaded (see https://github.com/WordPress/wordpress-develop/blob/1aa41dea3345c57cffce9059bbad728c86d1471a/src/wp-admin/site-editor.php#L64-L65). To make these variables accessible to other components, even when the site editor isn’t loaded, they should be moved to the REST API.
Change History (6)
This ticket was mentioned in PR #7895 on WordPress/wordpress-develop by @gigitux.
7 weeks ago
#1
- Keywords has-patch added
#2
in reply to:
↑ description
@
7 weeks ago
This work has already been merged in Gutenberg: https://github.com/WordPress/gutenberg/pull/66459
#3
@
7 weeks ago
This PR (https://github.com/WordPress/wordpress-develop/pull/7895) introduces the following changes:
- Adds default template types and template part areas to the index REST endpoint (https://github.com/WordPress/wordpress-develop/pull/7895/commits/b175fb545586a97ae9eb4145f85e3bd9af85e54f)
- Removes default template types and template part areas from the settings object (https://github.com/WordPress/wordpress-develop/pull/7895/commits/d38449f624bd1efa08bf12220ceda6f5883f123c)
Note:
The second change might be a breaking change. Should we reconsider its inclusion?
@youknowriad commented on PR #7895:
7 weeks ago
#5
How do you feel about adding some assertions to tests/phpunit/tests/rest-api/rest-server.php
test_get_index
test?
Trac ticket: https://core.trac.wordpress.org/ticket/62574