Overview of Site Editor Screen Customization in WordPress 7.1
WordPress 7.1 expands the programmatic flexibility of the Site Editor by introducing dedicated filter hooks for configuring entity screens. Built as part of the ongoing DataViews and DataForm infrastructure developments, these additions allow developers to control default visual presentation, available layouts, sidebar filtering lists, and Quick Edit forms directly through PHP callbacks.
Context and Tracking Under Issue #76544
This iteration is tracked in the core repository under issue #76544, as part of the broader work surrounding DataViews, DataForm, and associated component integrations in WordPress 7.1. The complete specification and updated hook details are documented in the WordPress developer handbook. Reviewed by core contributors @ntsekouras and @priethor, this feature lays the foundation for a unified configuration API across block-based administrative interfaces.
The Four Dedicated Entity Filters
WordPress 7.1 adds four specific filter hooks targeting individual post types within the Site Editor. Each hook corresponds to a core entity screen:
- Pages:
get_entity_view_config_postType_page - Templates:
get_entity_view_config_postType_wp_template - Parts:
get_entity_view_config_postType_wp_template_part - Patterns:
get_entity_view_config_postType_wp_block
By targeting these post-type-specific hooks, developers can apply custom view definitions precisely to the relevant entity section without affecting other areas of the Site Editor.
Customizable Components: default_view, default_layouts, view_list, and form
Each filter provides access to a configuration structure governing four key administrative components:
default_view: Defines the default DataViews setup upon screen load, including default field visibility, active sorting criteria, and initial layout type.default_layouts: Specifies the set of DataViews layout options available for selection by the user (such as grid or table views).view_list: Configures the precalculated or filtered view items listed in the sidebar navigation (e.g., "All", "Published", or "Drafts").form: Configures theDataFormsetup utilized in the Quick Edit panel, controlling which fields are editable and their structural sequence inside the interface.
Understanding the Callback Object and Method Execution
Filter callbacks attached to these hooks do not receive standard primitive arrays. Instead, they receive a data object containing the entity configuration alongside built-in methods designed to manipulate data state safely through an internal API.
To alter configuration options, developers construct a modification array (patch) and invoke the object’s merge() method. The callback must then return the updated data object back to the filter sequence.
Practical Implementation: Configuring the Pages Entity View
Below is a functional example demonstrating how to register a callback using the get_entity_view_config_postType_page hook. In this snippet, the default layout for the Pages screen is switched to a grid layout, sorted by post title in ascending order, and customized to render the post date field:
function example_filter_page_view_config( $data ) {
$patch = array(
'default_view' => array(
'type' => 'grid',
'sort' => array(
'field' => 'title',
'direction' => 'asc',
),
'fields' => array( 'date' ),
),
);
$data->merge( $patch, 1 );
return $data;
}
add_filter( 'get_entity_view_config_postType_page', 'example_filter_page_view_config' );
Current Scope and Architectural Design
The implementation introduced in WordPress 7.1 establishes a centralized location for controlling entity behavior across components. Rather than requiring distinct hooks for layout configuration, sorting parameters, and form layouts, a single filter controls the unified data structure for that entity screen.
While powerful, the current iteration is restricted to four specific post type screens (pages, templates, template parts, and patterns). Developers modifying these screens must work strictly with the method signatures provided by the passed configuration object, such as calling $data->merge() to apply updates cleanly.
Future Roadmap and Planned Enhancements
The introducing of entity view filters in WordPress 7.1 forms the initial baseline for a broader architectural consolidation strategy. Planned future developments include:
- Expanding the filter system to cover additional administrative entities across core.
- Consolidating the Site Editor Quick Edit panels and the editor block inspector by powering inspector controls (built via
DataForm) using data supplied directly from these entity filters. - Implementing cross-component field registration APIs that function seamlessly across both
DataViewsandDataFormcomponents.
Frequently asked questions
What four filters are introduced in WordPress 7.1 for Site Editor screens?
WordPress 7.1 introduces get_entity_view_config_postType_page (Pages), get_entity_view_config_postType_wp_template (Templates), get_entity_view_config_postType_wp_template_part (Parts), and get_entity_view_config_postType_wp_block (Patterns).
Which configuration areas can be modified using these filters?
Each filter allows modification of four main areas: default_view (visible fields and default sorting), default_layouts (available layouts for users), view_list (sidebar navigation views like Published or Drafts), and form (DataForm fields and field order for Quick Edit).
How are changes applied inside the filter callback?
The callback receives an object containing entity config data and API methods. Developers define a patch array and apply changes by calling $data->merge( $patch, 1 ); before returning $data.
What future capabilities are planned for this API?
Future development aims to create filters for additional entities, register fields across DataViews and DataForm, and power the editor inspector using these filters to consolidate Quick Edit and editor inspectors.
Primary reference: Review the original announcement for exact release details. This article is an independent explanation and does not reproduce the source text.