Make WordPress Core

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's profile gigitux Owned by: gigitux's profile 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 @gigitux
7 weeks ago

This work has already been merged in Gutenberg: https://github.com/WordPress/gutenberg/pull/66459

#3 @gigitux
7 weeks ago

This PR (https://github.com/WordPress/wordpress-develop/pull/7895) introduces the following changes:

Note:
The second change might be a breaking change. Should we reconsider its inclusion?

Last edited 7 weeks ago by gigitux (previous) (diff)

#4 @youknowriad
7 weeks ago

  • Milestone changed from Awaiting Review to 6.8

@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?

@gigitux commented on PR #7895:


7 weeks ago
#6

Sounds great! Thanks for the review, @youknowriad 🙇

Note: See TracTickets for help on using tickets.