
Security News
Open VSX Begins Implementing Pre-Publish Security Checks After Repeated Supply Chain Incidents
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.
@wordpress/fields
Advanced tools
DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).
This package provides core elements for the DataView library, designed to simplify the creation and management of data display elements in WordPress.
Install the module
npm install @wordpress/fields --save
Author field for BasePost.
Undocumented declaration.
Undocumented declaration.
Comment status field for BasePost.
A React component that renders a modal for creating a template part. The modal displays a title and the contents for creating the template part. This component should not live in this package, it should be moved to a dedicated package responsible for managing template.
Parameters
{ modalTitle?: string; } & CreateTemplatePartModalContentsProps: The component props.{ modalTitle?: string; } & CreateTemplatePartModalContentsProps[ 'modalTitle' ]:Date field for BasePost.
Delete action for Templates, Patterns and Template Parts.
Discussion field for BasePost with custom render logic.
Duplicate action for Pattern.
Duplicate action for BasePost.
Duplicate action for TemplatePart.
Export action as JSON for Pattern.
Featured Image field for BasePostWithEmbeddedFeaturedMedia.
A media edit control component that provides a media picker UI with upload functionality for selecting WordPress media attachments. Supports both the traditional WordPress media library and the experimental DataViews media modal.
This component is intended to be used as the Edit property of a field definition when registering fields with registerEntityField from @wordpress/editor.
Usage
import { MediaEdit } from '@wordpress/fields';
import type { DataFormControlProps } from '@wordpress/dataviews';
const featuredImageField = {
id: 'featured_media',
type: 'media',
label: 'Featured Image',
Edit: ( props: DataFormControlProps< MyPostType > ) => (
<MediaEdit { ...props } allowedTypes={ [ 'image' ] } />
),
};
Parameters
MediaEditProps<Item>: - The component props.Item: - The item being edited.Object: - The field configuration with getValue and setValue methods.Function: - Callback function when the media selection changes.[string[]]: - Array of allowed media types. Default ['image'].[boolean]: - Whether to allow multiple media selections. Default false.[boolean]: - Whether the label should be hidden from vision.[boolean]: - Whether to render in an expanded form. Default false.Returns
JSX.Element: The media edit control component.Undocumented declaration.
Notes count field for post types that support editor.notes.
Order field for BasePost.
Title for the page entity.
Parent field for BasePost.
Password field for BasePost.
Undocumented declaration.
Title for the pattern entity.
Delete action for PostWithPermissions.
Ping status field for BasePost.
Undocumented declaration.
Rename action for PostWithPermissions.
Reorder action for BasePost.
Reset action for Template and TemplatePart.
Restore action for PostWithPermissions.
Slug field for BasePost.
Status field for BasePost.
Template field for BasePost.
Title for the template entity.
Title for the any entity with a title property. For patterns, pages or templates you should use the respective field because there are some differences in the rendering, labels, etc.
Trash action for PostWithPermissions.
View post action for BasePost.
View post revisions action for Post.
This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by WordPress as well as other software projects.
To find out more about contributing to this package or Gutenberg as a whole, please read the project's main contributor guide.

FAQs
DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).
The npm package @wordpress/fields receives a total of 14,419 weekly downloads. As such, @wordpress/fields popularity was classified as popular.
We found that @wordpress/fields demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 23 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.