We’re getting closer to WordPress 6.6 and there have been lots of updates as we move toward the planned release date on July 16, 2024.
The release teams have been busy with the WordPress 6.6 Beta 1 on June 4 and the WordPress 6.5.4 maintenance release a day later. If you haven’t already, be sure to update to the latest version of WordPress.
Let’s take a look at the changes for June. As usual, make sure to test the below changes against WordPress trunk and the latest version of the Gutenberg plugin. The main goals of these monthly roundups are to help you stay updated and prepare for the next WordPress release.
Table of Contents
Highlights
Block bindings
There have been some very exciting updates to the Block Bindings API in the past few weeks that make working the block bindings more intuitive.
- A new Block Bindings panel has been added to the Block Inspector that displays all of the bindings for the block.
- It’s now possible to edit the values of bound post meta directly in the block. This is a very exciting feature, but be sure to test it as it may affect your existing UI solutions.
React and JSX changes in WordPress 6.6
WordPress 6.6 will ship with React 18.3, which is identical to 18.2 but adds warnings for deprecations and other changes to help developers prepare for the React 19 upgrade once it becomes stable. Additionally, WordPress 6.6 will allow developers to use the new React JSX transform that was first released in React 17. This change has some potential to break some existing build processes, so be sure to read the full dev note and test thoroughly before updating dependencies.
Plugins and tools
Data Views
The work on Data Views is moving forward and there is conversation on how to handle extensibility. This is the perfect time to get involved with how you will be able to extend and use this feature so be sure to stay up to date on this!
Block variations
Work has been done to improve how to determine if a block variation is active.
getActiveBlockVariation
now returns the variation with the highest specificity.- The
isActive
property now supports using dot notation when passing a string array. This change will allow extenders to simplify how they can determine if a given variation is active.
Interactivity API updates
The Interactivity API has seen some really nice developer-focused updates that will be available with WordPress 6.6.
- The Interactivity API is automatically available in wp-admin and is now available to power all of your custom admin screen needs.
- It is possible to opt out of processing directives via the new
interactivity_process_directives
filter. - Debug warnings are now printed whenever server directives processing encounters an error to provide a better developer experience.
New components and block supports
- The newly stabilized BlockPopover component is available for extenders looking for more customizability than the BlockToolbar.
Replicating rich text pasting behavior in custom blocks is now easier via the new supports.splitting
block setting. When it is enabled and content is pasted inside the block, it will split your block in two, insert the content, and then merge the ends together.
REST API
- Users with the capability of
edit_post
now have view access to thetemplate
endpoint.
Extenders can now include /wp/v2/users
routes when making a batch API request allowing batch changes to users.
Other noteworthy changes
- It’s now possible to disable autosave on a per post type basis for post types that support it.
- The
register_setting
function now supports alabel
field allowing extenders to no longer have to hard code labels for their custom admin screens. - Studio by WordPress.com is now available for Windows (external tool)
Themes
Consistent root padding for patterns
Historically, theme patterns needed to have hard-coded values for left and right padding to ensure they render correctly no matter where they were used. With Gutenberg 18.5, the root padding implementation has been updated to no longer need this and make padding more consistent across the board. This change has the potential to break some existing designs, so be sure to test your patterns.
Block changes
There have been some nice updates to a few blocks in the last few versions of Gutenberg:
- Gutenberg 18.4 added the
wp-block-list
class to the List block. This change will make targeting this block much easier for extenders. - Gutenberg 18.5 added shadow support for the Cover block.
Theme.json updates
- It’s now possible to define custom image aspect ratios in theme.json.
- Two new properties have been added that require theme.json to set
version
to3
:- Disable showing the default font sizes by setting the new
settings.typography.defaultFontSizes
property tofalse
. - Disable default spacing sizes by setting the
settings.spacing.defaultSpacingSizes
property tofalse
.
- Disable showing the default font sizes by setting the new
Background image updates
Some more updates to this feature have been completed as part of the Gutenberg 18.5 release:
- Image paths can be defined as a URL or as a relative path using
file:./
in the same way local fonts are defined. - Images that have been set via
theme.json
can be removed or changed in the Site Editor in the Styles > Layout area. - Background images set from the media library and set to
Tile
are given some defaultposition
values to increase the chance the image’s focal point is seen.
Manage shadows from global styles
Gutenberg 18.5 adds the ability to create and edit shadows from the Global styles panel.
Moving towards section styling
As part of the effort to add section styling to WordPress 6.6, Gutenberg 18.4 introduced a new global function that allows extenders to pass a list of blocks to associate the registered style with. Similarly, block style variations were also extended in Gutenberg 18.5 as a mechanism for achieving section styling.
Other notable changes
- A Bluesky embed block variation was introduced to allow users to embed Bluesky messages on their site.
- The site editor received an “Add new pattern” button in the patterns page.
- When switching between theme variations any custom CSS is now copied.
Resources
WordPress News
The main WordPress News blog published a single article that is great for anyone trying to improve their WordPress skills.
Developer Hours
There were two new Developer Hours this past month that covered some interesting topics: using alternatives for custom meta boxes and WordPress Playground blueprints. Both are available on YouTube,
- Developer Hours: Alternatives to Custom Meta Boxes in the WordPress Block Editor
- Developer Hours: Creating WordPress Playground Blueprints for Testing and Demos
Developer Blog
The Developer Blog saw two new articles this month with more on the way. Be sure to check these out when you can!
- Setting up a multi-block plugin using InnerBlocks and post meta
- Building a book review site with Block Bindings, part 2: Queries, patterns, and templates
Props to @greenshady, @ndiego, and @juanmaguitar for reviewing this post.
Leave a Reply