
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
@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.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 25,265 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
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.