View Config: Add the form of the root/site entity - #13462
Conversation
Provides the base view configuration for the `root`/`site` entity, with the form the site editor's Identity screen renders over the site settings. Only the `form` is defined: the site settings are a singleton record, so the generic default view, layouts, and view list are left untouched. See #65981.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped, follows existing View Config patterns, and includes targeted PHPUnit coverage for the new root/site form output.
Pull request overview
Adds a base View Config definition for the root/site entity so the Site Editor’s Identity screen can fetch a server-defined form via GET /wp/v2/view-config?kind=root&name=site, and so plugins can customize it via get_entity_view_config_root_site.
Changes:
- Introduces a core provider for
root/siteview config that defines theformlayout + fields for site identity settings. - Registers the new provider on the
get_entity_view_config_root_sitefilter at base priority (5). - Adds a REST API PHPUnit test asserting the
root/siteendpoint returns the expectedformstructure.
File summaries
| File | Description |
|---|---|
| tests/phpunit/tests/rest-api/rest-view-config-controller.php | Adds coverage for GET /wp/v2/view-config when requesting kind=root&name=site, asserting the identity form shape. |
| src/wp-includes/view-config.php | Adds _wp_get_entity_view_config_root_site() defining the form layout and fields for the site identity screen. |
| src/wp-includes/default-filters.php | Registers the get_entity_view_config_root_site base filter callback at priority 5. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Trac ticket: https://core.trac.wordpress.org/ticket/65981
Adds a base view configuration for the
root/siteentity, served byGET /wp/v2/view-config?kind=root&name=site. It provides the form the site editor's Identity screen renders over the site settings: a regular layout with labels on top, and the site title, tagline, logo, and icon fields. Only theformis defined, since the site settings are a singleton record that is never listed in a view. The Identity screen of the site editor reads this form from the endpoint once the@wordpress/edit-sitepackage is updated, so plugins can adjust it through theget_entity_view_config_root_sitefilter.This affects a stable screen of the site editor, so it is separate from the view configuration changes that wait on the site editor v2 experiment.
Backports
Gutenberg PRs:
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Fable
Used for: Porting the server-side change from the Gutenberg PR. Reviewed and edited by me.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.