I hope everyone had a wonderful holiday break and is coming back into 2025 with new ideas to continue propelling WordPress forward.
Last year, we saw the introduction of a lot of fun features for extenders. I’m partial to the Block Bindings API, but features like Data Views, section styles, and block hooks are pretty exciting too. There are far too many to list here, so just check out past editions of the monthly roundup to catch up on anything you may have missed.
Just because many of us were on holiday break doesn’t mean that WordPress development completely ground to a halt. Since the last monthly update, contributors released both version 19.9 and 20.0 of the Gutenberg plugin.
Highlights
State of the Word 2024
State of the Word 2024 was held in Tokyo, Japan, celebrating WordPress’s continued growth and global reach. The event highlighted key achievements in the past year. Some of those include nearly half a billion Core downloads each year, an uptick in plugin activity, and the introduction of APIs like Interactivity and Block Bindings. The event also celebrated Japan’s connection to WordPress, including the first person to localize the platform and the history of Wapuu, WordPress’s mascot.
Check out the State of the Word 2024 playlist on YouTube, which includes all sessions and discussions.
New Query Total block
Gutenberg 19.9 introduced a new Query Total block, which has two settings for displaying query results:
- Total results: Outputs the total number of posts found (e.g., “12 results found”).
- Range display: Outputs the current range of the total posts found (e.g., “Displaying 1 – 10 of 12”).
This block will give you more flexibility when displaying query-related information in your theme designs.
Stylebook added for classic themes
A scaled-down stylebook screen for classic themes was introduced in Gutenberg 19.9, continuing to bridge the gap between classic and block themes. The screen is currently static and only shows colors, typography, and block styles, but could offer user interaction in the future, maybe as part of a theme opt-in.
Plugins and tools
Stabilization of experimental block supports keys reverted
Gutenberg 19.8 initially stabilized several experimental block support keys. However, those changes were reverted in Gutenberg 20.0. The reasons cited were that the approach taken to stabilize them also needed time to be stabilized itself and more time was needed to communicate the changes with third-party extenders.
Create Block updates
The Create Block script received two nice feature updates:
- You can now set the
requiresAtLeast
,requiresPHP
, andtestedUpTo
fields in external templates. - The default template was optimized for use cases with multiple blocks.
Multisite support added for wp-env
The wp-env
tool now supports WordPress multisite. You can set env.development.multisite
to true
in your .wp-env.json
file to enable it. Check out the documentation to learn how to set environment variables.
Block Hooks updates
As of Gutenberg 20.0, block hooks are applied in the editor and front end to two new areas:
New filter hook for nav link post statuses
By default, navigation links are only allowed if they have the publish
post status. With the new render_block_core_navigation_link_allowed_post_status
hook, it is now possible to add multiple post statuses to an allowed list for rendering on the front end with a custom filter.
Presets support added to BoxControl component
Support for presets with the BoxControl
component was added in Gutenberg 20.0. When presets are provided, a button to switch between a preset and a custom value is shown. Currently, a range control is always used for presets, but a future iteration should allow for a select dropdown for longer presets.
WordPress Playground
Several major updates landed for Playground in the last month:
- CORS Proxy is enabled for all network requests. This gives WordPress running inside Playground more access to cross-origin resources. However, some limitations still apply to allowed headers and download sizes.
- The experimental Data Liberation importer is now available in the importWxr step when using the
importer.data-liberation
option. The new importer will rewrite links to the imported content, download assets through the CORS proxy, and parallelize downloads while communicating the live progress. - WP-Cron has been re-enabled for Playground, which had been previously disabled.
- The SQLite Database Integration plugin was released for testing the integration of WordPress with SQLite.
- The Playground tester was used to compare the error rate of the top 1,000 WordPress.org plugins. The number has improved from 2023-2024, with the failure rate dropping from 7% to 5%.
- WordPress Playground for developers workshop is now available on WordPress TV.
Themes
Notable block updates
When using the featured image option for the Cover block, Gutenberg 19.9 now lets you also set the resolution of the image. This will allow you to use a resolution that fits your designs.
Also since Gutenberg 19.9, you can set the Separator block to be a <div>
instead of the default <hr>
(horizontal rule) element. <hr>
is a semantic element meant to denote a thematic break in an HTML document, which is read out by screen readers. This is often what you need and was the original intent of the Separator block. But the introduction of the <div>
option lets you use the block as a design token only.
A change in Gutenberg 19.9 moves the CSS variable definition for the Image blocks lightbox overlay from an inline <style>
tag to a data-wp-bind--style
directive. I haven’t noticed any negative effects from my custom lightbox styles, but it’s always worth testing to ensure it works.
Deeply nested Post Template blocks
The Post Template block now defines the Query block as its ancestor
rather than parent
. This allows you to deeply nest Post Template within other blocks, such as Group and Column, for more flexible and unique designs.
Border support added to more blocks
Several blocks now support the border design tools over the last couple of Gutenberg releases:
- Latest Posts
- Post Comments Link
- Post Template (The PR includes spacing support.)
- Query Total
Editor and user-facing updates
A couple of noteworthy user-facing changes landed in Gutenberg 19.9:
- The Replace button for changing a Query block’s pattern has been renamed to Change design. The same PR swaps the popup modal with a dropdown to show the patterns.
- The hardcoded RichText formats list for navigation menu items has been removed. Previously, only bold, italic, image, and strikethrough text were allowed. Now, users can use any non-interactive formats for menu items.
Resources
WordPress News
The WordPress News blog features posts covering the latest WordPress releases and several new articles dropped in the past month:
- State of the Word 2024: Legacy, Innovation, and Community
- WordPress Themes Need More Weird: A Call for Creative Digital Homes
- Write Books With the Block Editor
- Openverse.org: A Sight for Sore Eyes
Developer Hours
Two developer-focused live shows have run since the last monthly roundup. Catch up with them here:
- Developer Hours: Everything you need to know about WordPress Playground
- Developer Hours: Improve your workflows with WordPress development tools
You can catch past recordings of all Developer Hours on WordPress.tv, and there is a wide range of content on the official WordPress.org YouTube channel.
Hallway Hangouts
Two Hallway Hangouts, which are community discussions about WordPress features, occurred over the past month:
Developer Blog
And, of course, some new content landed right here on the Developer Blog in December, including two new code snippets:
- Mastering light and dark mode styling in block themes
- Snippet: How to register a block variation but hide it from the inserter
- Snippet: How to filter the output of a block binding
Props to @bph for co-wrangling these resources and @ndiego and @psykro for reviewing.
Leave a Reply