We’re now well into the WordPress 6.4 development cycle. With Beta 1 just a few weeks away on September 26, 2023, the pace of collaborating on new features, bug fixes, and other changes is picking up.
WordPress 6.4 is planned for release on November 7, 2023 and is being led by an underrepresented gender release squad. Check out the Roadmap to 6.4 to get all the details.
WordPress 6.3.1 was released on August 29, 2023. It was a maintenance release that fixed several bugs. If you haven’t updated yet, now’s the time to do it!
Lots of changes have landed in WordPress trunk and the Gutenberg plugin over the last month. Before trying any of the new features or changes below, make sure you’re running the latest version of each to avoid errors.
Table of Contents
Block hooks (auto-inserted blocks)
In version 16.4, the Gutenberg plugin added an experimental API for plugins to automatically insert blocks. This feature is now starting to take shape and is getting some UI love. Its inclusion in core is planned for WordPress 6.4, but it needs your help with testing and feedback.
Gutenberg 16.6 added a new post settings panel (currently labeled Plugins) to let users toggle the insertion on or off. Building off this UI update, another pull request added the block icons next to the toggles.
This feature was originally known as “auto-inserted blocks” but was renamed after some discussion.
Block design tool and support updates
Contributors continue to expand design tool support for existing blocks in the block library. The latest blocks and their supported options are:
- Footnotes: typography, dimensions, and border.
- File: spacing
- Post Content: color
- Details: layout and block spacing
A few blocks have also gained some noteworthy settings:
- The vertical alignment control for Column blocks has a new option named Stretch to fill, which lets nested blocks fill the full space of their parent.
- Aspect ratio is now supported for the experimental lightbox feature for the Image block.
- The Query Pagination block has an extra control for setting the mid-size parameter.
Standardized admin notices
WordPress trunk added a dedicated function for adding admin notices:
The function standardizes how themes and plugins register custom admin notices. It supports all the usual types of notices: error, success, warning, and info. It also handles outputting the dismissible “x” button, but you still have to roll your own functionality for persistently storing whether a user dismissed the notice.
Plugins and tools
Node.js and npm minimum version requirements
Both WordPress and Gutenberg now require Node.js 16.x and npm 8.x to contribute. This doesn’t necessarily affect your custom plugins since it’s specifically for the core codebase, it is generally good practice to stay on track with what the core project uses. Find out more about this change on the Make Core blog.
Command Palette API updates
The Command Palette API launched with WordPress 6.3, and contributors are already adding some nice touches to the interface, such as improved rendering on smaller viewports. But for extenders, you can now register custom commands without icons.
New public APIs
useBlockEditingMode() hook is now public, which means you can begin using it in your custom blocks. This change also makes the
getBlockEditingMode selector along with the
unsetBlockEditingMode actions public.
The HTML API adds <button> support
Last month, a minimal HTML Processor landed in WordPress trunk as part of a larger effort to create a full HTML API. It supported a subset of HTML elements. The latest work on this project adds support for the
Better performance for block_has_support() and string-based feature check
block_has_support() function now lets you use a string for its
$feature parameter. Previously, only an array was allowed, but since most checks are for a single feature, it makes sense to allow for strings too. Plus, there is a minor performance boost when using a string check.
Modernized wp-embed script update
wp-embed script has now dropped obsolete browser support, particularly for IE10/11. Neither of these are officially supported in WordPress anymore, so this should have no impact. The changeset included a few other updates to modernize the
wp-embed script code that are worth checking out in the rare case that you have a custom script that extends it.
Improvements for third-party editors
If you are building a custom block editor, a few changes just landed in the Gutenberg plugin that should make development a little easier:
- Editor keyboard shortcuts get registered automatically when using
SlotFillProvideris now bundled within
- Popover components work without a defined
Interactivity API updates
In August, there was an official status update on the Interactivity API. The post outlines the current state of the API, the roadmap, learning resources, and more. Its inclusion within core WordPress will likely be version 6.5 or later, depending on how work progresses.
In the meantime, several updates landed in the Gutenberg plugin and are available for you to test:
- You can pass an optional
afterLoadcallback to store calls.
- Slot and Fill directives were recently added, and the
data-wp-binddirective’s logic was updated.
- Another PR added support for region-based client-side navigation.
New Options API functions for improved performance
prime_options()loads multiple specific options with a single database request if they have not already been loaded and cached.
prime_options_by_group()is a wrapper to prime all options of a specific option group.
wp_set_option_autoload()sets the autoload value for a single option.
wp_set_options_autoload()sets multiple options to the same autoload value.
Available post mime types hook
get_available_post_mime_types hook was added to WordPress trunk. Its primary goal is to let developers filter it to improve performance, especially on sites with many posts. Any filters you add could skip the database query altogether or cache the results.
Note that this function could be renamed to
pre_get_available_post_mime_types before the WordPress 6.4 release. Check out the Trac ticket to follow the discussion.
WordPressCS 3.0.0 released
Version 3.0.0 of the WordPress Coding Standards package was released, which should be a more accurate, performant, and stable tool. The package now requires that you install it with Composer, so you may need to update your workflow if you were not using Composer before.
Configure min and max viewport widths for fluid typography
You can now configure the minimum and maximum viewport widths for the
theme.json fluid typography feature. The two new properties act as boundaries for fluid font sizes. Any viewport size between the min and max is fluid, but outside of the boundaries, font sizes are static.
Layout UI control in theme.json
You can now configure whether the Layout controls appear in the editor. When you set the
settings.layout.allowEditing property to
theme.json, it disables the controls for all blocks. But you can also configure this setting for individual blocks.
Main query triggered for block theme single templates
Because most block themes do not use the Query or Post Template blocks, they never trigger the main query. This has had a ripple effect throughout the ecosystem where plugins and core WordPress expect the post query to run.
A recent update in WordPress trunk ensures that the main query loop runs for singular content in block themes. You should test this with your block themes and plugins that rely on the main query to see if it corrects any known issues or creates any new ones.
Theme stylesheet value added as template part attribute
Gutenberg now automatically injects the
theme attribute when rendering a template part in the editor or on the front end. This is to fix an issue where template parts are not correctly rendered when referenced from a pattern.
New functions for getting templates and parts
Two new functions were added to WordPress trunk for accessing
theme.json data related to templates and parts:
Experimental: client-side Query Loop pagination
The Query Loop block now supports native client-side pagination thanks to continued experimentation with the Interactivity API in Gutenberg. This is an early solution and likely to change, but you can begin testing it now.
The setting to enable this feature is located under User Experience > Enhanced pagination in the Query Loop block’s inspector controls.
Image block updates
The Image block has received several updates in the last couple of Gutenberg releases. Most of them are user-facing changes that address issues with how aspect ratios work. Two of these changes could impact how you build templates or patterns.
Bug fixes…lots of ‘em
Having trouble getting fluid typography to work in WordPress 6.3.0 or 6.3.1? This is a known issue when using a fluid or variable size for wide layouts, and a fix is already lined up for 6.3.2. If you cannot wait until then, you can set a static value for
theme.json as a temporary fix.
Contributors have addressed several theming-related issues in the past month:
- Container queries are now supported in editor CSS.
- Center-aligned social icons should work with all themes.
- Unnecessary space removed between arrows and label in the Post Navigation Link block.
- Line height removed from the anchor element in the Site Logo block.
- Block spacing for galleries re-enabled at the block level.
- Element styles and
<svg>elements should always be appended to the end of the document to avoid breaking theme styles.
Post prefix removed from blocks
The “Post” prefix was removed from several block titles. This is primarily a user-facing change to clean up the UI, but it may take some adjustment when searching for blocks in the inserter. The updated blocks are:
- Author Biography
- Author Name
- Comments Count
- Comments Form
- Comments Link
- Featured Image
Events and resources
Two new developer tutorials landed on Learn WordPress in the last month:
The latest Developer Hours session introduced the HTML API. The first part of that API, the Tag Processor shipped with WordPress 6.3, but contributors are still fleshing it out to make it a more robust set of tools for plugin and theme development.
Four new posts were published here on the Developer Blog over the past few weeks:
- The anatomy of a letterform
- Adding and using custom settings in theme.json
- Exploring the future of web development with WebAssembly and PHP
- An introduction to block variations