The WordPress 6.2 release is around the corner, and I have been very excited about its release. I wrote recently about how the 6.2 beta needed testers. On March 9th, 2023, WordPress contributor Milana Cap released a field guide to help developers with more in-depth changes that are happening. In this article, I’ll cover some of the interesting ones from the WordPress 6.2 Field Guide.
Block Editor:
Love it or hate it, the block editor is here to stay! Rolling into 6.2 are ten Gutenberg releases: 14.2, 14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 14.9, 15.0, 15.1 that include:
- The Introduction of the HTML API– a tool for block authors to adjust HTML tag attributes in block markup within PHP.
- Upgrading to React 18 and common pitfalls of concurrent mode– WordPress 6.2 ships with React 18. Learn more about new features including a new rendering algorithm, called concurrent mode.
- Customizing settings for any block in WordPress 6.2– WordPress 6.2 introduces a new client-side filter that allows developers to modify block settings before the editor is rendered.
- The Introduction of Block Inspector Tabs– With the release of WordPress 6.2, you’ll find the inspector’s design tools categorized under three tabs: Settings, Appearance, and List View.
- Adding new prop to ServerSideRender component– WordPress 6.2 introduces a new skipBlockSupportAttributes prop to exclude attributes and styles related to block supports in the ServerSideRender component.
- Patterns API expanded to include template_types property– In WordPress 6.2 the Pattern API received an additional property called template types. This is a backend only update.
- Miscellaneous Editor changes in WordPress 6.2- In this dev note, you will find a collection of smaller changes to existing block features, updates to theme.json, and deprecated APIs and components.
Bundled Themes
Due to privacy concerns, WordPress is replacing Google Fonts with locally bundled fonts in themes. Each theme will serve a new stylesheet from the theme directory from Twenty Twelve to Twenty Seventeen. Child themes that have already edited or removed the font stylesheet may need to verify that their site will work properly with this change. Child themes can also include a different set of fonts and their own stylesheet. Developers need to adjust the new font stylesheet URL for the block editor and consider special considerations for Classic Editor.
Posts, Post types
This is one I was working on just a few weeks ago. The get_page_by_title() function has been deprecated in WordPress 6.2 and WP_Query is recommended instead as it provides consistent results across different server setups. To achieve an equivalent database query, developers can use the arguments provided in the WP_Query code snippet. Additionally, the same result can also be achieved via the get_posts() wrapper for WP_Query(). However, due to the database query used by get_page_by_title(), the result returned from the database might not be intended to be accessible by the user, leading to a File Not Found error. Developers can avoid this edge by leaving the post_status parameter out of the code.
Milana goes into more detail in her field guide, but these are the more interesting ones I wanted to highlight. Please take a look at her guide in order to see all of the changes. Along with associated articles that detail them further, there is a breakdown of who handled what. I am ready to see the changes 6.2 brings.