Skip to content

View Config: Add the form of the root/site entity - #13462

Open
oandregal wants to merge 1 commit into
WordPress:trunkfrom
oandregal:add/root-site-view-config
Open

View Config: Add the form of the root/site entity#13462
oandregal wants to merge 1 commit into
WordPress:trunkfrom
oandregal:add/root-site-view-config

Conversation

@oandregal

Copy link
Copy Markdown
Member

Trac ticket: https://core.trac.wordpress.org/ticket/65981

Adds a base view configuration for the root/site entity, served by GET /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 the form is 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-site package is updated, so plugins can adjust it through the get_entity_view_config_root_site filter.

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.

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.
Copilot AI lite review requested due to automatic review settings September 9, 2026 17:19
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props oandregal.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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/site view config that defines the form layout + fields for site identity settings.
  • Registers the new provider on the get_entity_view_config_root_site filter at base priority (5).
  • Adds a REST API PHPUnit test asserting the root/site endpoint returns the expected form structure.
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.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants