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.
Miscellaneous Block Editor Changes in WordPress 6.7
In this post, you will find dev notesdev noteEach important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. for smaller changes to the editor in WordPress 6.7.
Table of contents
Stabilized Role Property for blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. Attributes
As of WordPress 6.7 the __experimentalRole block attribute property has been stablised as role.
This property is part of the block.json specification and can be applied to any attribute of a block to designate it as being of a particular conceptual type.
Depending on the chosen type, the attribute may then be handled differently at both an 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. level and/or within the Editor’s user interface.
The available types are:
content
this designates the attribute as being user-editable content.
blocks with attributes marked as content may be enabled for privileged editing in special circumstances such as when making edits to content in partially synced Patterns.
local
marks the given attribute as being “temporary” and non-persistable.
for example, the image block utilises a blob attribute marked as local to store a temporary URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org created whilst an image is uploading.
Changes to Selectors and API functions
As part of this effort some selectors and API functions have received changes:
__experimentalHasContentRoleAttribute selector from the @wordpress/block-editor package has been deprecated and made private.
__experimentalGetBlockAttributesNamesByRole API function from the @wordpress/blocks package has been stablized as getBlockAttributesNamesByRole.
Props to @get_dave for writing the dev notedev noteEach important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase..
Heading level curation
In WordPress 6.7, coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. blocks with a heading level dropdown now support the new levelOptions attribute, which includes the Heading, Site Title, Site Tagline, Query Title, Post Title, and Comments Title blocks. The levelOptions attribute accepts an array of numbers corresponding to heading levels, where 1 represents H1, 2 represents H2, and so on.
This attribute allows developers to specify which heading levels should appear in the dropdown UIUIUser interface, providing a lightweight curation method that does not require block deprecations. Any existing heading levels are preserved in the markup, while levelOptions only affects the UI display.
You can apply this attribute directly in the block markup, a technique that will be commonly used in block templates, template parts, and patterns. For example, the following markup disables H1, H2, and H6 in the Heading block by setting "levelOptions":[3,4,5].
You can also use block filters to set the default value of this attribute globally or for specific blocks. The example below disables H1, H2, and H6 for all Heading blocks. You can further customize this by restricting certain heading levels based on conditions like user capabilities.