Four new filters let developers configure Site Editor screens
v7.1
This work is part of the iteration issue DataViews, DataForm, et. al. in WordPress 7.1 and it has been tracked at #76544. Check the full details of the API in the handbook.
WordPress 7.1 introduces four new filters to configure Site Editor screens:
Page
Filter name
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
Each filter can configure the DataViews and DataForm components that power those screens:
default_view: the default DataViews configuration (e.g., what fields are visible, what is the default sort order, etc.)default_layouts: the default DataViews layouts (e.g., what layouts are available for the user to choose from)view_list: the preconfigured views displayed in the sidebar (e.g. “All”, “Published”, “Drafts”, etc.)form: the DataForm configuration used for the Quick Edit form (e.g. which fields are displayed in the form and their order)
Filter callbacks receive an object with the config for the given entity with a set of methods to work with data (API). For example, this code will update the Pages screen by setting grid as the default layout, sort it by ascending title, and add a new visible field date:
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' );
Next steps
This mechanism is designed to grow in the future by creating filters for other entities and updating screens to use them. The goal is to have a single place of configuration for an entity that works across screens and components. An example of this work is the experiment to power the editor inspector (built with DataForm) with the data coming from these filters, consolidating Site Editor’s QuickEdit and the editor inspectors.
Future work also includes registration of fields that work across DataViews and DataForm.
Props to @ntsekouras and @priethor for review.
Fetched July 31, 2026



