The WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
Found a bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority.?Create a ticket in the bug tracker.
Edit: +11 bundled controls that support validation
filterBy: +16 filterFilterFilters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. operators and user-input filters
getElements: fetch elements async to improve performance
Field APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.
For more information, consult the two reference documents:
The field type has been expanded to describe the default field’s behaviors for sorting, validation, filtering, editing, and rendering. The field author can still override those defaults, but they don’t need to, they can have a working field by just providing the type.
Validation has been completely overhauled to leverage a rule-base system. All field types support the required and elements rule, as well as defining custom validation via the custom function — that supports both sync and async modes. We plan to expand the available rules in future versions, follow-up this issue for updates.
The introduction of setValue, alongside the existing getValue, has added a few capabilitiescapabilityA capability is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on their role. For example, users who have the Author role usually have permission to edit their own posts (the “edit_posts” capability), but not permission to edit other users’ posts (the “edit_others_posts” capability). to the framework. See the related story: live, code.
Working with nested data
By using the dot notation in the field.id (e.g., user.profile.name), the getValue and setValue methods will automatically read and write the data from the corresponding object property — though field authors can still override getValue and setValue methods.
Field authors can define how a field behaves when it’s edited. They can provide a custom edit control, but also select one of bundled ones — which have been expanded from 5 to 16:
Control
Description
6.8
6.9
datetime
Date time picker
✓
✓
integer
Number input
✓
✓
radio
Radio buttons
✓
✓
select
Dropdown select
✓
✓
text
Text input
✓
✓
array
Multi-select
✓
checkbox
Checkbox control
✓
color
Color picker
✓
date
Date picker
✓
email
Email input
✓
password
Password input
✓
telephone
Phone input
✓
textarea
Multi-line text
✓
toggle
Toggle switch
✓
toggleGroup
Button group
✓
url
URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org input
✓
Additionally, some bundled edit controls now support a configuration option to control its behavior or look-and-feel.
// Control the rows in a textarea
{
type: 'text',
Edit: {
control: 'textarea',
rows: 5
}
}
// Add prefixes/suffixes to control
{
type: 'text',
Edit: {
control: 'text',
prefix: DollarPrefix, // React component
suffix: USDSuffix, // React component
}
}
Filters have gained more operators (from 6 to 22) and they are now bound to the field type.
The initial 6 operators available (is, isNot, isAny, isNone, isAll, isNotAll) have been expanded into 22 total:
for integer and number: lessThan, greaterThan, lessThanOrEqual, greaterThanOrEqual, between
for date and datetime: before, after, beforeInc, afterInc, on, notOn, inThePast, over, between
for text: contains, notContains, startsWith
The addition of new field types and edit controls has also expanded the filters available, that are now dependent on the field type, and they include support for user input as well:
We’ve introduced a getElements async function that fetches elements on demand, only when they are needed. This is a new API that will continue to evolve, follow-up changes at 70834.
This API can be seen in use in the Pages screen of the Site Editor. The author filter and edit control won’t fetch the authors until the user interacts with those controls.
readOnly
We’ve added a readOnly property (boolean) to mark fields that cannot be edited. In edit contexts, they’ll be displayed using the render property. For example, this can be useful when displaying non-editable metadata (file size, etc.).
DataViews
For more information, consult the two reference documents:
All the bundled layouts –table, grid, and list– support now grouping the items by a given field by declaring a groupByField in the view. Follow issue for updates, and take a look at the storybook.
{
groupByField: 'fieldId'
}
grid
list
table
Locked filters
Locked filters are filters that cannot be edited or removed by the user. They appear in the filters UI but are marked as read-only, ensuring certain filtering conditions are always applied.
align is a new property to control the horizontal alignment of content within the cells. It’s specificied per field in the layout.
enableMoving: boolean to control whether the fields can be moved around. True by default. If false, it removes the moving controls in the table headerHeaderThe header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. and disables moving the fields via the view config as well.
All bundled layouts -table, list, and grid- now support infinite scroll. It’s enabled per view type, and DataViews takes a infiniteScrollHandler function that listens to scroll events and handles the data retrieval. See storybook live and implementation for details.
The renderItemLink prop lets you provide a custom component that wraps clickable fields. It can render regular links, but also allows integration with routing libraries (like TanStack Router or ReactReactReact is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/. Router).
The component receives the following props:
item: The data item that was clicked
Additional standard HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. anchor props (className, style, etc.)
A new package for managing DataViews view state with persistence using WordPress preferences.
The @wordpress/views package provides:
Persistence: Automatically saves and restores DataViews state using @wordpress/preferences
View Modification Detection: Tracks when views differ from their default state
Reset Functionality: Simple reset to default view capabilitycapabilityA capability is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on their role. For example, users who have the Author role usually have permission to edit their own posts (the “edit_posts” capability), but not permission to edit other users’ posts (the “edit_others_posts” capability).
Clean Integration: Drop-in replacement for manual view state management
DataViewsPicker is a selection-focused variant of DataViews designed for building item picker interfaces. Use cases include a media picker for selecting images (#71944), or a generalised post picker for selecting posts or page parents (#71128). It currently only supports a grid layout view.
Selection Management: Track which items users have selected via selection state and onChangeSelection callbacks
Action Buttons: Include action buttons (like “Confirm” or “Cancel”) that operate on selected items via the actions prop
Familiar DataViews API: Same field definitions, filtering, pagination, and view configuration as DataViews
Customizable Layouts: Supports DataViews picker-specific layouts (to begin with, there is just a grid picker view available)
Default UI: Like DataViews, uses a pre-built interface including search, filters, layout switcher, and action toolbar—or use custom children to build your own
There are two new properties, openAs and summary, to configure the behavior of the layout. openAs determines how the panel opens, either as a dropdown (default) or a modal. summary controls what fields summarize the panel, while before the first children was used.
Validation has been revamped in 6.9: it’s now controlled (DataForm has a validity prop), and supports asynchronous validation. All the DataForm controls gained support for all validation rules (required, elements, and custom). See related Field API updates and the Field API validation issue.
There’s a new useFormValidity hook to compute the validity prop, and the isItemValid utility has been removed.
const fields = [
{
id: 'title',
type: 'text',
label: 'Text',
isValid: {
required: true,
custom: ( item: Item, field: NormalizedField< Item > ) => {
// returns a validation message if field is invalid
}
}
},
// other fields
];
/*
* validity: object, represents the validation state of the form
* isValid: boolean, whether the form is valid or not
*/
const { validity, isValid } = useFormValidity( data, fields, form );
return (
<form>
<VStack alignment="left">
<DataForm< Item >
data={ data }
fields={ fields }
form={ form }
validity={ validity }
onChange={ onChange }
/>
<Button disabled={ ! isValid } >
Submit
</Button>
</VStack>
</form>
);