Miscellaneous Block Editor Changes in WordPress 6.8

WordPress 6.8 brings a range of smaller yet meaningful updates to the blockBlock Block 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. editor that enhance consistency, improve developer experience, and refine default behaviors.  These changes include refinements to the Navigation block’s class and markup handling, a new filterFilter Filters 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. for customizing visible post statuses, and updates to the behavior of the iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the user’s browser. and LinkControl components.  You will also notice stabilization of previously experimental features, improved block registration requirements, and changes that prepare the block editor for broader extensibility and UIUI User interface consistency moving forward.  This post highlights these miscellaneous updates that don’t warrant individual dev notesdev note Each 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. but are still important to be aware of when building with or extending the block editor.

Table of Contents

Customizable Post Status Visibility in Navigation Block Links

The Navigation block now supports filtering of the post statuses of Posts shown in the Navigation on the front of the site. The new filter render_block_core_navigation_link_allowed_post_status defaults to publish but that list can be extended via the hook:

add_filter( 
    'render_block_core_navigation_link_allowed_post_status', 
    static function(array $post_status): array {
        $post_status[] = 'private'; // append statuses to the array of default statuses.
        return $post_status;
} );

For more information, visit #63181.

Consistent Class Application for Navigation Block Menu Items

The Navigation block’s handling of the current-menu-ancestor CSSCSS Cascading Style Sheets. class has been updated for improved consistency.  Previously, the current-menu-item class was applied to the <li> element of the current menu item, while the current-menu-ancestor class was applied to the <a> element of ancestor items.  This inconsistency posed challenges for developers aiming to style navigation menus uniformly.  With the changes introduced in #67169, both classes are now applied to their respective <li> elements, ensuring a consistent and predictable structure for styling purposes.

Key Change:

  • The current-menu-ancestor class is now applied to the <li> element of ancestor menu items, aligning its behavior with that of the current-menu-item class.

Implications for Developers:

  • This update standardizes the application of CSS classes within the Navigation block, simplifying the process of targeting and styling current and ancestor menu items.
  • Developers should review and adjust any custom styles or scripts that rely on the previous application of the current-menu-ancestor class to ensure compatibility with this change.

By implementing this adjustment, WordPress 6.8 enhances the consistency and reliability of its Navigation block, facilitating more intuitive and maintainable menu styling for developers.

Consistent Markup for Navigation Item Labels

The Navigation block has been updated to enhance consistency between navigation items and submenu items.  Previously, navigation items containing submenus lacked the <span class="wp-block-navigation-item__label"> wrapper around the navigation item text, which was present in standard navigation items.  This inconsistency made styling and scripting more challenging for developers.  With the changes introduced in #67198, both navigation items and submenu items now include this <span> wrapper, ensuring uniform markup structure across all navigation elements.

Key Changes:

  • Consistent Markup: All navigation items, including those with submenus, now wrap the item text within a <span class="wp-block-navigation-item__label"> element.

Implications for Developers:

  • Simplified Styling: The uniform use of the <span> wrapper allows for more straightforward and consistent CSS targeting of navigation item labels.
  • Enhanced Scripting: Developers can now reliably select and manipulate navigation item labels using JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com, regardless of whether the item contains a submenu.

By standardizing the markup structure of navigation items, WordPress 6.8 improves the developer experience when customizing and extending navigation menus.

Stabilize the isPreviewMode settings flag

The isPreviewMode settings flag is now stable, and using select( ‘core/block-editor’ ).getSettings().__unstableIsPreviewMode will now log a deprecation warning.

This public flag is commonly used to disable behaviors that cannot be used when rendering block or template previews. A good example is keyboard shortcuts.

For more information, visit #66149.

Iframed Content: Always enable for block themes

Continuing the effort to use iframed content in the post editor initiated in WP 5.9. Starting from WP 6.8, the editor will always render iframed content for block themes. This behavior was only enabled when using the GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party..

Edited April 1, 2025: This changeset was reverted #69778.

Block registration: Normalize blockType.parent to an array

The block registration APIAPI An 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. now enforces the parent setting to be an array. The editor will now display a warning if it’s a different type, such as a `string`.

For more information, visit #66250.

Stabilized LinkControl component

The LinkControl component, which has been in an experimental state for several years, is being stabilized in WordPress 6.8. This change affects plugin developers who are using the __experimentalLinkControl component in their custom blocks or extensions.

For backwards compatibility, the __experimentalLinkControl import will continue to work but will display deprecation warnings.

In addition, the following sub components have been deprecated:

  • __experimentalLinkControlSearchInput
  • __experimentalLinkControlSearchResults
  • __experimentalLinkControlSearchItem

For more information, visit #56384.

Changes to the Iframe Component

WordPress 6.8 changed the behavior of the scale prop on the Iframe component. This change may affect existing code.

Code using the following pattern may be affected:

import { __unstableIframe as Iframe } from '@wordpress/block-editor';

<Iframe scale="default" />

If you want to use autoscaling, change scale="default" to scale="auto-scaled".

For more information, visit #66280.

Co-authored by @jeffpaul

Props to @jeffpaul @mamaduka @fabiankaegy for review.

#6-8, #dev-notes, #dev-notes-6-8

Updates to user-interface components in WordPress 6.8

This post lists notable changes to the @wordpress/components package for the WordPress 6.8 release.

Table of Contents

RadioGroup: Log deprecation warning

The RadioGroup component has been deprecated. To be consistent with the current WordPress design system, use RadioControl or ToggleGroupControl instead.

For more information visit #68067.

The Navigation component (and all its subcomponents) are deprecated, planned for hard removal in WordPress 7.1. Use the Navigator component instead.

For more information, visit #68158.

SearchControl: Deprecated onClose prop

This prop was originally intended for adding a custom click handler to the suffix button to close the search field entirely, rather than just clear the input value.

The pattern of repurposing the search clear button as a search close button is no longer used in WordPress, and is no longer recommended as a UIUI User interface pattern since it can be confusing to users.

If you were relying on this prop, we recommend adding a separate close button to your UI.

For more information, visit #65988.

Soft deprecate the ButtonGroup component

The ButtonGroup component has been deprecated, as it can easily lead to accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) issues. For simpler adherence to accessibility best practices and to be consistent with the current WordPress design system, use ToggleGroupControl instead.

For more information, visit #65429.

Default 36px sizes are now deprecated

UI components across the editor (input fields, buttons, etc.) are currently rendering in a range of heights between 30px and 40px. To add consistency and visual polish to the editor’s UI, we started working on standardizing components toward a default height of 40px.

Continuing the standardization effort started in previous releases, for the WordPress 6.8 release, we will start logging deprecation warnings for the following components if they are not yet opting into the new default size:

  • BorderBoxControl
  • BorderControl
  • BoxControl
  • ComboboxControl
  • CustomSelectControl
  • DimensionControl
  • FontAppearanceControl
  • FontFamilyControl
  • FontSizePicker
  • FormFileUpload
  • FormTokenField
  • InputControl
  • LineHeightControl
  • NumberControl
  • Radio
  • RangeControl
  • SelectControl
  • TextControl
  • ToggleGroupControl
  • TreeSelect
  • UnitControl

To start opting into the new 40px default height, set the __next40pxDefaultSize prop.

<SelectControl
	options={ selectOptions }
	value={ selectValue }
	label={ __( 'Label' ) }
	onChange={ onSelectChange }
	__next40pxDefaultSize
/>

For more information, visit #65751.

The close button in the Modal component has been enlarged from the “small” button size (24px) to use the “compact” button size (32px).

If you are using the headerActions prop to inject buttons beside the close button, we recommend you also use the “compact” button size variant to match.

<Modal
	headerActions={ <Button icon={ fullscreen } label="Fullscreen mode" size="compact" /> }
/>

For more information, visit #66792.

Reducing experimental APIs

Stabilized BorderBoxControl

The __experimentalBorderBoxControl component can now be imported as BorderBoxControl.

The legacy __experimentalBorderBoxControl export is marked as deprecated.

For more information, visit #65586.

Stabilized BorderControl

The __experimentalBorderControl component can now be imported as BorderControl.

The legacy __experimentalBorderControl export is marked as deprecated.

For more information, visit #65475.

Stabilized BoxControl

The __experimentalBoxControl component can now be imported as BoxControl.

The legacy __experimentalBoxControl export is marked as deprecated.

For more information, visit #65469.

Stabilized Navigator

The legacy set of __experimentalNavigator* APIs is deprecated and should instead be imported as Navigator. All of the sub-components are also available via the Navigator namespace.

Moreover, the __experimentalNavigatorToParentButton component and the goToParent method available via the __experimentalUseNavigator hook are now deprecated, and they now behave identically to the __experimentalNavigatorBackButton and the goBack method.

To recap:

  • __experimentalNavigatorProvider => Navigator
  • __experimentalNavigatorScreen => Navigator.Screen
  • __experimentalNavigatorButton => Navigator.Button
  • __experimentalNavigatorBackButton => Navigator.BackButton
  • __experimentalNavigatorToParentButton => Navigator.BackButton
  • __experimentalUseNavigator => useNavigator

Co-authored by @mamaduka, @mciampini.

Props @mirka @jeffpaul @mamaduka for review.

#6-8, #dev-notes, #dev-notes-6-8

Interactivity API best practices in 6.8

WordPress 6.8 comes with a few new best practices and requirements in the Interactivity APIAPI An 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. that are part of a longer-term continuous-improvement effort. Some of the relevant changes in 6.8 are an intermediary step: They do not include these enhancements themselves, but they prepare the project to add them in a future release by adding two new deprecation warnings.

If you have been using the Interactivity API in your project, especially if you have been writing your own stores, please read on to learn how you can prepare your changes for the latest and future behavior of the API.

How to apply the latest best practices (and avoid deprecation warnings)

To help the Interactivity API speed up WordPress, the project is working towards running most store actions asynchronously by default, as a better foundation for achieving good INP (“Interaction to Next Paint”) performance. Right now, browsers invoke all synchronous Interactivity API event handlers as part of the same task—this means they stack up. This can make the user wait for longer than 50 milliseconds (also called a “long task”) for the site to reactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org to some interaction, like clicking a button.

Starting with 6.8, and going forward, the Interactivity API’s push towards asynchronous handlers as the default will make those long tasks less likely. The 6.8 release only prepares for the transition. In the following WordPress release, the API will automatically yield to the main thread in between handlers, so ideally there’s nothing to stack up, and nothing to make the user wait. (Also refer to async actions and the splitTask() function.)

This performance enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. also helps with cross-pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. compatibility, as handlers for the same event may come from different plugins. The new requirements outlined below are an important step to prepare the Interactivity API for that future.

Wrap certain action callbacks in withSyncEvent()

Pay attention to any store action that is attached to an event listener (like data-wp-on--click) and accesses the event object: If the action callback uses any of the event properties or methods below, you need to wrap it in a newly added utility function called withSyncEvent():

  • Property: event.currentTarget
  • Method: event.preventDefault()
  • Method: event.stopImmediatePropagation()
  • Method: event.stopPropagation()

Starting in WordPress 6.8, if any action callback uses the above event properties or methods and is not wrapped in withSyncEvent(), that action callback will trigger a deprecation warning. For now, the logic will continue to work as before. But in a future WordPress release it will break if you do not migrate. For example, event.preventDefault() will not prevent the default action since the action will be asynchronous by default. As such, please make sure to resolve any deprecation warnings you see.

This correct (✅) code example illustrates how to use withSyncEvent():

import { store, withSyncEvent } from '@wordpress/interactivity';

store( 'myPlugin', {
	actions: {
		// `event.preventDefault()` requires synchronous event access.
		preventNavigation: withSyncEvent( ( event ) => {
			event.preventDefault();
		} ),

		// `event.target` does not require synchronous event access.
		logTarget: ( event ) => {
			console.log( 'event target => ', event.target );
		},

		// Not using `event` at all does not require synchronous event access.
		logSomething: () => {
			console.log( 'something' );
		},
	},
} );

This bad (❌) example will, going forward, emit a deprecation warning:

import { store } from '@wordpress/interactivity';

store( 'myPlugin', {
	actions: {
		// Missing `withSyncEvent()` around synchronous event access.
		preventNavigation: ( event ) => {
			event.preventDefault();
		},
	},
} );

Do not use actions to determine HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. attribute values

If you have been relying on Interactivity API store functions (like actions or callbacks) to determine HTML attribute values (e.g. via data-wp-bind--attr), please revise these attributes now. Instead, use global state, local context, or derived state. And please do not combine these function calls with directive logic like the ! operator.

Starting in WordPress 6.8, any directive using a store function in combination with the ! operator will emit a deprecation warning. The logic will continue to work as before for now, but in a future WordPress release it will break if you do not migrate. More broadly, if you are using store functions in directives that determine HTML attribute values, please migrate to using global state, local context, or derived state instead. More deprecation warnings around incorrect usage of store functions are expected soon, and eventually unmigrated code is going to break.

Please refer to the following correct (✅) code example to illustrate how to use derived state:

import { store } from '@wordpress/interactivity';

store( 'myPlugin', {
	state: {
		get isOpen() {
			const ctx = getContext();
			return !! ctx.open;
		},
	},
} );
<div
	data-wp-interactive="myPlugin"
	data-wp-bind--hidden="!state.isOpen"
>
	Content.
</div>

This bad (❌) example will, going forward, emit a deprecation warning:

import { store } from '@wordpress/interactivity';

store( 'myPlugin', {
	actions: {
		isOpen() {
			const ctx = getContext();
			return !! ctx.open;
		},
	},
} );
<div
	data-wp-interactive="myPlugin"
	data-wp-bind--hidden="!actions.isOpen"
>
	Content.
</div>

To provide context on why this new requirement is relevant: Using store functions for anything other than the “on”, “init”, or “watch” groups of directives has always been an anti-pattern. It is now being more formally discouraged, and will in the future be made impossible.

Support for the .length property in directives

An additional Interactivity API enhancement in WordPress 6.8 is support for the .length property on strings and numeric arrays in directives, ensuring consistency between server and client rendering.

Previously, the .length property was unavailable on the server, requiring workarounds. This update allows developers to use .length within all directives that reference global state, local context, or derived state, aligning behavior across environments.

This code example illustrates using the .length property:

<div data-wp-interactive="example">
  <div data-wp-bind--hidden="!state.list.length">
    <input type="range" min="1" data-wp-bind--max="state.list.length">
  </div>
  <div data-wp-bind--hidden="!state.string.length">
    <h1 data-wp-text="state.string"></h1>
  </div>
</div>

This improvement streamlines logic and improves developer experience.

Summary and further reading

Please refer to the following links for further reading:

  • GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ pull request #68097 for the withSyncEvent and new directive requirement enhancements
  • Gutenberg issues #64944 and #69552 with additional context on the long-term plans to run Interactivity API actions asynchronously by default.
  • Gutenberg issue #69269 with additional context on the long-term plans to more clearly separate directives that do something vs that determine a value.
  • TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticketticket Created for both bug reports and feature development on the bug tracker. #62582 for support of the .length property.
  • Documentation for understanding global state, local context, or derived state.

Co-authored by @gziolo.
Props to @westonruter, @jonsurrell, @webcommsat, @marybaum for review and proofreading.

#6-8, #dev-notes, #dev-notes-6-8, #interactivity-api, #performance

Editor Weekly Updates – March 10th – 23rd

Last week, there were some exciting developments in the GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ Editor. Below, you’ll find an overview of the key changes and improvements.

  1. Need AccessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) Feedback
  2. Enhancements
  3. Need Design Feedback
  4. Bugs

Need Accessibility Feedback:

Enhancements:

Needs Design Feedback:

Bugs:

Thank you @benjamin_zekavica for helping in posting and adding details

#core, #editor-update, #gutenberg

New filter should_load_block_assets_on_demand in 6.8

WordPress 6.8 introduces a new filterFilter Filters 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. should_load_block_assets_on_demand, which runs as part of a new function wp_should_load_block_assets_on_demand(). The filter complements the existing should_load_separate_core_block_assets filter by more clearly separating concerns of both filters.

Until now the should_load_separate_core_block_assets filter had two different purposes:

  1. Loading separate stylesheets for CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. blocks, instead of a combined wp-block-library stylesheet (as the name indicates).
  2. Loading blockBlock Block 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. scripts and stylesheets on demand only if the blocks are included in the page (not indicated by the name).

Now the new filter (and its surrounding function) handles only the second purpose. To maintain backward compatibility, the existing filter still works for both purposes. But going forward, please use it only for the first purpose.

Having the two separate filters for these purposes lets you control them separately. For example, as a site owner who wants to opt in to loading block scripts and stylesheets on demand, but keep loading the combined wp-block-library stylesheet with your classic theme, now you can:

add_filter( 'should_load_separate_core_block_assets', '__return_false' );
add_filter( 'should_load_block_assets_on_demand', '__return_true' );

Block themes now opt in by default to both features, similar to how they were already doing before via just the one filter.

Refer to TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticketticket Created for both bug reports and feature development on the bug tracker. #61965 for more context.

Props to @jeffpaul, @michelleames, @marybaum, @webcommsat for review and proofreading.

#6-8, #dev-notes, #dev-notes-6-8

Changes to the .screen-reader-text class in WordPress 6.8

The screen-reader-text CSSCSS Cascading Style Sheets. class is a small bit of CSS used in WordPress to hide text visually but still make it available to assistive technologies, screen readers, and any other software reading a page.

Given poor browser support for the clip-path property, the class has supported the deprecated clip property longer than it probably needed to. WordPress 4.9 did finally add support for clip-path, which now has wide support without prefixes across browsers.

WordPress 6.8 takes two more steps to modernize the class: it removes the clip property and the prefixed -webkit-clip-path property. Worth noting this change applies to the CSS class used in the WordPress adminadmin (and super admin) pages and across all bundled themes.

Here’s the CSS class from WordPress 4.9:

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	-webkit-clip-path: inset(50%);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

And here’s the new CSS class for WordPress 6.8:

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

The only changes are the removal of the clip property and -webkit-clip-path.

In most cases this small change shouldn’t require any update to plugins and themes. But be aware of one case: when the screen-reader-text CSS class is used to dynamically reveal text. In a few cases, WordPress itself reveals some visually hidden text. For example, when there’s no JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com support or on small screens, screen-reader-text gets reset to make the visually hidden text visible again:

.no-js .some-element .screen-reader-text {
	position: static;
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
}

If you make an update to a similar CSS technique in your pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. or theme admin pages, don’t forget to remove the clip property from the associated reset CSS.

For more details, see the related changeset and Trac ticket.

Thanks to @marybaum and @audrasjb for proofreading.

#6-8, #dev-notes, #dev-notes-6-8

Summary, Dev Chat, Mar 19, 2025

Start of the meeting in SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/, facilitated by @benjamin_zekavica. 🔗 Agenda post.

Announcements 📢

WordPress 6.8 | BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 3 is now available 🥳

The Beta 3 release of WordPress 6.8 is now available! A heartfelt thank you to everyone who joined the Release Party. We appreciate your testing and feedback.

Help Test 6.8 Beta version 🧪

The Test-Team has written two helpful guides for people interested in testing:

Forthcoming releases 🚀

Next GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ version: 20.5

Gutenberg 20.5 is scheduled for release on Wednesday, March 19th.
This will be the first version of Gutenberg to be merged into WordPress 6.9.

Release Candidaterelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 1 of 6.8: March 25th

The Release Candidate 1 release of WordPress 6.8 will be available on Tuesday, March 25th.

A detailed overview of the release schedule for WordPress 6.8 can be found here. The article also includes information about the individuals assigned to each release party.

Next major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope.: 6.8

We are currently in the WordPress 6.8 release cycle. Read more about the release squad, timeline and focus for this release.

Discussion 🤔

To avoid listing the topics here twice, all the necessary links and information can be found in the agenda. This section now includes a few additions.

Release Support Needed

@jeffpaul provided an update: only a few dev notesdev note Each 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. remain to be drafted and will be published this week. A Miscellaneous Dev Notedev note Each 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. will be updated and released by RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 1. The Field GuideField guide The field guide is a type of blogpost published on Make/Core during the release candidate phase of the WordPress release cycle. The field guide generally lists all the dev notes published during the beta cycle. This guide is linked in the about page of the corresponding version of WordPress, in the release post and in the HelpHub version page. draft will be shared later this week as more dev notes are completed. The PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. Author email will likely go out next week due to current priorities.

Critical Issues Before RC 1

@joemcgill stated it’s the last week of beta and critical issues need prioritizing. @audrasjb mentioned 17 tickets are left before RC1, with no major issues, though #63122 is annoying. @joemcgill is tracking new tickets and ensuring regressions in 6.8 are added to the milestone. He also requested non-release prep tasks be resolved this week for a clean RC.

Open Floor 💬

There were no significant topics that we would list in the summary.

#6-8, #core, #dev-chat, #summary

Agenda, Dev Chat, Mar 19, 2025

The next WordPress Developers Chat will take place on Wednesday at 15:00 UTC in the core channel on Make WordPress Slack.

The live meeting will focus on the discussion for upcoming releases, and have an open floor section.

Additional items will be referred to in the various curated agenda sections below. If you have ticketticket Created for both bug reports and feature development on the bug tracker. requests for help, please continue to post details in the comments section at the end of this agenda.

Announcements 📢

WordPress 6.8 | BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 3 is now available 🥳

The Beta 3 release of WordPress 6.8 is now available! A heartfelt thank you to everyone who joined the Release Party. We appreciate your testing and feedback.

Help Test 6.8 Beta version 🧪

The Test-Team has written two helpful guides for people interested in testing:

Forthcoming releases 🚀

Next GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ version: 20.5

Gutenberg 20.5 is scheduled for release on Wednesday, March 19th.
This will be the first version of Gutenberg to be merged into WordPress 6.9.

Release Candidaterelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 1 of 6.8: March 25th

The Release Candidate 1 release of WordPress 6.8 will be available on Tuesday, March 25th.

A detailed overview of the release schedule for WordPress 6.8 can be found here. The article also includes information about the individuals assigned to each release party.

Next major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope.: 6.8

We are currently in the WordPress 6.8 release cycle. Read more about the release squad, timeline and focus for this release.

Discussions 🤔

The discussion section of the agenda is to provide a place to discuss important topics affecting the upcoming release or larger initiatives that impact the CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Team. To nominate a topic for discussion, please leave a comment on this agenda with a summary of the topic, any relevant links that will help people get context for the discussion, and what kind of feedback you are looking for from others participating in the discussion.

Release Support Needed

  • Assistance with drafting, reviewing, and publishing developer notes
    Assistance is requested for the drafting, review, and final publication of the developer notes.
  • Field GuideField guide The field guide is a type of blogpost published on Make/Core during the release candidate phase of the WordPress release cycle. The field guide generally lists all the dev notes published during the beta cycle. This guide is linked in the about page of the corresponding version of WordPress, in the release post and in the HelpHub version page. draft coming Thursday, please be ready for review
    The Field Guide draft will be available on Thursday. Please be prepared to review it promptly.
  • Review of the “About” page and potential issues
    The “About” page should be reviewed to identify any potential issues in the text or content. See more here: #63025
  • Reminder of the string freeze next week before RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 1
    Please remember that the string freeze will take place next week before the release of RC 1.
  • Assistance with reviewing the email to PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. Authors about major changes
    Assistance is needed to review the email to be sent to Plugin Authors, informing them of the key changes.

Critical Issues Before RC 1

  • Discussion of critical issues before RC 1
    It’s suggested to discuss any critical or new issues before the release of RC 1 to ensure all problems are addressed in time.

Open floor  💬

Any topic can be raised for discussion in the comments, as well as requests for assistance on tickets. Tickets in the milestone for the next major or maintenance release will be prioritized.

Please include details of tickets / PRs and the links in the comments, and indicate whether you intend to be available during the meeting for discussion or will be async.

#6-8, #agenda, #dev-chat

More efficient block type registration in 6.8

WordPress 6.8 introduces a new function wp_register_block_types_from_metadata_collection(), which allows plugins to register multiple blockBlock Block 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. types with a single function call.

This function expands on the foundational capabilitiescapability 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). of the wp_register_block_metadata_collection() function, which was introduced in WordPress 6.7 to improve performance.

Context

To recap the relevant functionality added in WordPress 6.7:

Plugins can now optionally register a PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher “manifest” file, which includes all the metadata for their block types. For any block type that is being registered, WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. will now check whether such a manifest file is present covering the block type, and if so, it will use the data from the manifest file instead of reading and parsing the block type’s block.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. file directly.

Since the blocks manifest file includes all the block type names, a logical next step after adding support for such a file is to make the requirement for individual block type registration calls obsolete. This is what the new  wp_register_block_types_from_metadata_collection() function implements.

Benefits

By using the new function, you no longer need to add individual register_block_type() calls for every block type that you include in your pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party.. This improves developer experience, especially when using the latest block development best practices where the block.json file is used as the sole entrypoint for both PHP (server-side) and JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com (client-side). Adding a new block type to an existing plugin is now possible by creating the block’s directory and working exclusively within that directory. You no longer need to remember to register the block type somewhere else in the PHP codebase of the surrounding plugin.

Example

Let’s say you have a plugin with 5 custom block types: “accordion”, “carousel”, “carousel-slide”, “dialog”, and “icon-button”. At the present, this means your plugin’s PHP code may look like this:

$block_types = array( 'accordion', 'carousel', 'carousel-slide', 'dialog', 'icon-button' );
foreach ( $block_types as $block_type ) {
	register_block_type( __DIR__ . "/build/{$block_type}" );
}

With WordPress 6.8, you can now use the wp_register_block_types_from_metadata_collection() function to eliminate the need for the list of block types in the PHP code so that all block types are recognized and registered automatically.

To do that, you need to generate a manifest file for your block types. You can use the build-blocks-manifest command or the --blocks-manifest argument of the build command from the @wordpress/scripts NPM package, which was also explained in the relevant WordPress 6.7 dev note. It can be easily integrated into your build process by changing the scripts in your package.json file as follows:

  • Change the “build” script from wp-scripts build to wp-scripts build --blocks-manifest.
  • Change the “start” script from wp-scripts start to wp-scripts start --blocks-manifest.

With the generated manifest in place, the PHP code above can be simplified to no longer require a hard-coded list of block types:

wp_register_block_types_from_metadata_collection(
	__DIR__ . '/build',
	__DIR__ . '/build/blocks-manifest.php'
);

Backward compatibility with older WordPress versions

As the wp_register_block_types_from_metadata_collection() function is only available in the latest WordPress 6.8 release, you may still want to support older WordPress versions. Fortunately, the function can be easily replaced by a few lines of codeLines of Code Lines of code. This is sometimes used as a poor metric for developer productivity, but can also have other uses., as long as you have a generated blocks manifest in place as described above.

Here is a code example that uses the respective best practices for WordPress 6.8, WordPress 6.7, and older versions:

if ( function_exists( 'wp_register_block_types_from_metadata_collection' ) ) {
	wp_register_block_types_from_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' );
} else {
	if ( function_exists( 'wp_register_block_metadata_collection' ) ) {
		wp_register_block_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' );
	}
	$manifest_data = require __DIR__ . '/build/blocks-manifest.php';
	foreach ( array_keys( $manifest_data ) as $block_type ) {
		register_block_type( __DIR__ . "/build/{$block_type}" );
	}
}

The @wordpress/create-block NPM package has been enhanced to use the new functions conditionally, using a similar code snippet as shown above.

Summary and further reading

The new wp_register_block_types_from_metadata_collection() function is a very simple but neat way to eliminate individual block type registration calls from your PHP code, allowing you to focus exclusively on working on the block types in your plugin without having to modify anything else in the plugin.

Please see the following links for further reading:

  • TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticketticket Created for both bug reports and feature development on the bug tracker. #62267
  • Relevant WordPress 6.7 dev note about the previous block type registration enhancements

Props to @gziolo, @stevenlinx for review and proofreading.

Update (2025-04-16): As of @wordpress/scripts version 30.14.0, a bug regarding blocks manifest generation was fixed. This post was updated accordingly to recommend the --blocks-manifest argument of the build command in the NPM scripts to use instead of the build-blocks-manifest command in combination with other commands.

#6-8, #dev-notes, #dev-notes-6-8

Summary, Dev Chat, Mar 12, 2025

Start of the meeting in SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/, facilitated by @francina. 🔗 Agenda post.

Announcements 📢

WordPress 6.8 | BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 2 is now available 🥳

The Beta 2 release of WordPress 6.8 is now available! A heartfelt thank you to everyone who joined the Release Party. We appreciate your testing and feedback.

Help Test 6.8 Beta version 🧪

The Test-Team has written two helpful guides for people interested in testing:

Thanks @ankit-k-gupt and @krupajnanda for your contribution!

Forthcoming releases 🚀

Next GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ version: 20.5

Gutenberg 20.5 is scheduled for release on Wednesday, March 19th.
This will be the first version of Gutenberg to be merged into WordPress 6.9.

Next Beta 3 of 6.8: March 18th

The Beta 3 release of WordPress 6.8 will be available on Tuesday, March 18th.

A detailed overview of the release schedule for WordPress 6.8 can be found here. The article also includes information about the individuals assigned to each release party.

Next major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope.: 6.8

We are currently in the WordPress 6.8 release cycle. Read more about the release squad, timeline and focus for this release.

Reminder

We have only two weeks until RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 1. Dev notes should be in progress. Please check @jeffpaul‘s message on Slack for details.

Editor Updates 🔄

Stay tuned for weekly updates to keep you informed about the latest in WordPress editor development. Whether you’re a developer, designer, or content creator, these updates will keep you in the loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop on all the key changes.

Don’t miss out — check out the weekly update and get ready for more!

Discussion 🤔

Finalizing the About Page for WordPress 6.8

  • Jeff Paul requested help reviewing and finalizing the About page text.
  • Deadline: March 25 (RC1), but earlier completion is preferred.

“Source of Truth” Document

@poena asked for updates on the “Source of Truth” document, which provides extenders with details about the WordPress 6.8 release. Currently, no one is actively working on it due to limited capacity. @joemcgill suggested prioritizing the Field GuideField guide The field guide is a type of blogpost published on Make/Core during the release candidate phase of the WordPress release cycle. The field guide generally lists all the dev notes published during the beta cycle. This guide is linked in the about page of the corresponding version of WordPress, in the release post and in the HelpHub version page. instead, as it serves a similar purpose and is officially published. Stevenlinx may have a draft of the Field Guide, and a request was made to share it for collaboration. If no one takes on the “Source of Truth” document, it will likely not be created for this release.

Unused Code in WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.

@zodiac1978 reported unused constants in WordPress Core and created TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticketticket Created for both bug reports and feature development on the bug tracker. #63017 to address the issue. He asked whether their deprecation had been officially documented. @joemcgill suggested verifying if their removal was intentional or if they are still needed. @desrosj pointed out that some plugins might still rely on these constants, making their removal risky. @joedolson agreed, emphasizing that plugins could use them in ways not immediately visible in Core. @zodiac1978 plans to investigate further in the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. directory and update the ticket with his findings.

Open Floor 💬

There were no further topics to discuss today.

Thanks to @francina for helping review this summary.

#6-8, #core, #dev-chat, #summary