WordPress 6.0 Field Guide


Update on 5 May 2022: Updates to the @wordpress/create-block templating system and Block Locking Settings in WordPress 6.0 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 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. were added 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 section.


With the 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 officially shipped, it’s time to explore the 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., WordPress 6.0. This release introduces Style variations, the Block Locking UIUI User interface, various writing improvements, more design tools, new hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same., updated external libraries, and more! At a high level, there are 97 enhancements and feature requests131 bug fixes and 13 Gutenberg bug fixes23 other blessed tasks, which brings us to 251 Trac tickets in total.

The new performance team has been working hard to improve various parts of WordPress. A lot of queries have been optimized and some removed, cache improved, multiple translations of the same strings removed, just to mention a few.

Let’s take a deeper look at what to expect in 6.0.

Note: Note: some of the changes will require 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-partyPlugin 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 and theme authors to adapt or change their code. Please, read these Dev notesdev 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 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. Each important change in WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. 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 a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blogblog (versus network, site) during the 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. 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 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. at the beginning of the release candidate phase. carefully to make sure your code is ready for WordPress 6.0 on May 24, 2022.

Accessibility

Along with performance, lots of work has focused on improving accessibility in various parts of the WordPress software.

Block Editor

The Block Editor updates bring new functionality, fixes, and more:

  • The ability to bundle multiple Style variations for block themes.
  • The option to create page content patterns that users can choose from to create their pages.
  • New ancestor property in block.json letting one restrict where users can place their blocks.
  • A new block locking UI with a lock attribute for every block.
  • Registration of blocks from within themes.
  • Improved support for preserving unrecognized content in the editor.
  • More robust block theme export feature in the Site Editor.
  • Block markup updates for image, quote, list, and group blocks.
  • New set of Post Comments blocks, No Results block, and more.
  • & more!

Of note, if you currently have the Gutenberg plugin active on your website and are upgrading to WordPress 6.0, please make sure Gutenberg is updated to its latest version. This helps ensure the best experience possible.

Let’s dig in.

Bootstrap/Load

Amongst other performance improvements, in this release you’ll be able to skip not needed queries with do_parse_request filter.

Cache API

In WordPress 6.0 wp_cache_*_multiple API becomes a full CRUD. Also, option to flush the runtime cache without flushing the entire persistent cache is being enabled.

Media

Media has new filters and a few UI additions:

  • Enable edits to custom image sizes. Adds a filter edit_custom_thumbnail_sizes to allow users to enable editing individual custom image sizes. (#28277)
  •  Add a “Copy URL to clipboard” function to the list table view. (#54426)

We’ll find performance improvements in Media component as well.

Posts, Post types/Taxonomies

WordPress 6.0 introduces more dynamic hooks for custom post types and taxonomies.

Taxonomy

Taxonomies received a lot of performance improvements, from term query caching and adding limits to taxonomy queries, through navigation menu items to changing term_exists to use get_terms().

Themes

This new release offers a streamlined way for theme authors to work with patterns, support for multiple theme.json files AKA style variations, better export themes with Site Editor, and a few more goodies.

Allow block themes to be activated without index.php

This change removes the requirement for block themes to have an unused index.php template just for activation, as they use a templates/index.html file instead. (#54272)

Correct the logic for displaying a _doing_it_wrong() notice for add_theme_support( ‘html5’ )

  • Calling add_theme_support( 'html5' ) without passing an array of supported types should throw a _doing_it_wrong() notice: “You need to pass an array of types”.
  • If the second parameter is not specified, it should fall back to an array of comment-listcomment-form, and search-form for backward compatibility.
  • If the second parameter is not an array, the function should return false.

For more info see #51657.

Users

With 6.0 WordPress installs with more than 10,000 users, so called “large sites”, will receive performance improvements for querying and counting users.

Other Developer Updates

WordPress 6.0 also brings:

  • Option for plugin authors to edit plugin description on the Plugins > Add New and/or Network Admin > Plugins > Add New screens.
  • Ability to filter whole notification email in retrieve_password.
  • Possibility to remove site icons in multisite networks.

But Wait, There is More!

More than 131 bugs, 97 enhancements and feature requests, and 23 blessed tasks have been marked as fixed in WordPress 6.0.

Here are a few that haven’t been highlighted:

  • Administration: Add a media_date_column_time filter to the media list table date column. Similar to the existing post_date_column_time filter in the posts list table, this change adds a new hook to filter the “Date” column output in the media list view. (#42942)
  • Build: Update webpack to v5.x. This aligns closer with how the Gutenberg plugin handles WordPress packages. Enable React Fast Refresh support to WordPress core for block development with @wordpress/scripts. Bring caniuse-lite to the latest version which ensures that build tools target the most recent version of browsers supported by WordPress. (#51750, see #55505)
  • Build/Test Tools:
    • A .git-blame-ignore-revs file has been added to the repository with a curated list of “pinking shear” commits (ones only applying stylistic changes), making the blame feature on GitHub much more useful (#55422)
    • Webpack and all related build processes/scripts have been updated to version 5 (#51750).
    • The npm install command has been fixed for contributors using an Apple M series silicone by updating the grunt-contrib-qunit dev dependency (#52690).
  • Bundled Theme: If you’ve been having problems with order of elements in comment form in Twenty Nineteen theme, there’s a good news for you in #46600. It’s fixed!
  • Canonical: Function redirect_guess_404_permalink() includes all public statuses, rather than just publish, in 404 redirects in its search. (#47911)
  • Comments: Speeding up Dashboard and Comment moderation SQL load – (#19901)
  • Emoji: Update the Twemoji to version 14.0.2. This version introduces support for the latest Emoji added in Emoji 14. (#55395)
  • External Libraries:
  • Formatting:
    • Add support for formatting sizes as PB, EB, ZB, and YB. (#40875)
    • KSES: Add support for <ruby> and related elements. This is especially commonly used in Japanese content, but it can also been seen in content of other languages like Chinese. The set of elements to enable such functionality consists of <ruby><rt>, and <rp> in the HTML Standard, while some browsers (like Firefox) additionally support <rb> and <rtc> for more advanced formatting. (#54698)
    • KSES: Allow langxml:langdir attributes globally. Globally permit the langxml:lang, and dir attributes on all elements rather than a subset in accordance with the HTML specification. (#54699)
    • Function get_the_author_link() is going to be pluggable in WordPress 6.0. A new filter, get_the_author_link, is added for altering author link output. (#51859)
  • I18n:
    • List item separator should be a WP_Locale property (#39733)
    • Allow languages path in register_block_type (#54797)
  • Media:
    • Remove attachment_fields_to_save filter and deprecate image_attachment_fields_to_save(). This filter prevented removing attachment titles. This changeset removes the filter and deprecates the related function since it is no longer used. (#39108)
    • Enable edits to custom image sizes. With a new filter edit_custom_thumbnail_sizes users will be able to apply media edits to individual custom image sizes. (#28277)
  • Network/Sites: Improve cache key generation in WP_Site_Query (#55462)
  • Plugins:
    • Introduce the plugin_install_description filter. This allows for modification of the plugin card description on the Add Plugins screen. (#55480)
    • Convert apply_filters() into a proper variadic function. (#53218)
  • Posts, Post Types: Pass the $update parameter to wp_insert_post_data and wp_insert_attachment_data filters. This makes it easier to determine in a callback function whether this is an existing post being updated or not. (#46228)
  • Posts, Post Types; Taxonomy: Translate default labels once. Improve the translation of post type and taxonomy labels by caching the translations during runtime. (#26746)

Please, test your code. You can use the Beta Tester plugin on a test site to validate how your plugin or theme functions with WordPress 6.0 RC1.  Fixing issues that your code has with WordPress core helps you and millions of WordPress sites.

Props to @desrosj, @imath, @spacedmonkey, @swissspidy, @annezazu, @webcommsat, @jeffpaul, @costdev, @bph for contributing to this guide.

#6-0, #dev-notes-6-0, #field-guide