Commit 712bddd256 for wordpress.org
commit 712bddd256b7acea4a9788ac7d35a22d2d5705f7
Author: oandregal <oandregal@git.wordpress.org>
Date: Thu Sep 10 09:49:53 2026 +0000
View Config: add form info for root/site entity.
Props oandregal, ntsekouras.
Part of #65981.
Built from https://develop.svn.wordpress.org/trunk@63578
git-svn-id: http://core.svn.wordpress.org/trunk@62754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php
index d16979c9c8..a839ef9296 100644
--- a/wp-includes/default-filters.php
+++ b/wp-includes/default-filters.php
@@ -834,5 +834,6 @@ foreach ( array( 'page', 'wp_block', 'wp_template_part', 'wp_template' ) as $pos
5
);
}
+add_filter( 'get_entity_view_config_root_site', '_wp_get_entity_view_config_root_site', 5 );
unset( $filter, $action, $post_type );
diff --git a/wp-includes/version.php b/wp-includes/version.php
index c5be0683ac..ce5a4f8ec0 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-alpha-63577';
+$wp_version = '7.2-alpha-63578';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
diff --git a/wp-includes/view-config.php b/wp-includes/view-config.php
index d972515c12..8765a5d095 100644
--- a/wp-includes/view-config.php
+++ b/wp-includes/view-config.php
@@ -769,3 +769,36 @@ function _wp_get_entity_view_config_posttype_wp_template( $data ) {
return $data;
}
+
+/**
+ * Provides the view configuration for the `root`/`site` entity.
+ *
+ * The site settings are a singleton record edited through a form (the site
+ * editor's Identity screen) rather than listed in a view, so only the `form`
+ * is defined here. The generic `default_view`, `default_layouts`, and
+ * `view_list` built by wp_get_entity_view_config() are left untouched.
+ *
+ * @since 7.2.0
+ *
+ * @param WP_View_Config_Data $data The view configuration container for the entity.
+ * @return WP_View_Config_Data The updated view configuration container.
+ */
+function _wp_get_entity_view_config_root_site( $data ) {
+ return $data->set(
+ array(
+ 'form' => array(
+ 'layout' => array(
+ 'type' => 'regular',
+ 'labelPosition' => 'top',
+ ),
+ 'fields' => array(
+ 'title',
+ 'description',
+ 'site_logo',
+ 'site_icon',
+ ),
+ ),
+ ),
+ 1
+ );
+}