WordPress Release: 6.6.0

Tag Name: 6.6.0

Release Date: 7/16/2024

WordPress LogoWordPress

World's most popular open-source content management system powering over 40% of all websites. Offers extensive plugin ecosystem, themes, and robust community support for blogs, e-commerce, and corporate websites. Highly customizable and scalable platform suitable for beginners and advanced developers.

TL;DR

WordPress 6.6 introduces significant enhancements to the block editor experience with section styling capabilities, improved block style variations, and better theme.json support. Performance improvements make the editor up to 20% faster, while developers benefit from HTML API enhancements and better REST API support. The release also includes numerous accessibility improvements, bug fixes, and developer-focused updates across the platform.

Highlight of the Release

    • Section styling via extended block style variations allows styling entire sections of a page
    • Performance improvements make the editor up to 20% faster
    • Enhanced HTML API with improved HTML processing capabilities
    • Improved accessibility across the admin interface
    • Patterns page now accessible in classic themes via Appearance > Patterns
    • Better REST API support with batch operations for Users API
    • Improved Site Health checks including autoloaded options size monitoring
    • Restored pre-6.5 behavior for plugin activation buttons

Migration Guide

Block Style Variations

If you've been using custom block style variations in your themes or plugins, you should review how they interact with the new section styling capabilities. The implementation has changed to improve performance and conceptual consistency:

  • Shared variation definitions have moved from styles.blocks.variations to styles.variations
  • blockTypes has been removed from styles.variations
  • Shared variations are no longer registered from theme style variation or primary theme.json files

Plugin Activation

If your plugin relied on the AJAX activation behavior introduced in WordPress 6.5.0, you'll need to update your code to handle the restored pre-6.5 behavior where clicking the "Activate" button navigates to the plugins.php UI.

HTML API Changes

If you're using the HTML API in your plugins or themes:

  • The WP_HTML_Processor::create_fragment() method now returns the subclass type instead of always returning a WP_HTML_Processor instance
  • Virtual nodes are now exposed when scanning with WP_HTML_Processor::next_token()
  • URL attributes are now run through esc_url() automatically

Theme.json Version 3

If you're developing block themes, be aware that WordPress 6.6 adds theme.json v3 migrations. Review your theme.json files to ensure compatibility with the new version.

Upgrade Recommendations

General Recommendation

WordPress 6.6 is a recommended upgrade for all users. The performance improvements to the editor, enhanced block styling capabilities, and numerous bug fixes make this a valuable update for most sites.

For Site Administrators

This is a standard major release with no known critical issues. As always, it's recommended to:

  1. Back up your site before upgrading
  2. Test the update on a staging environment if possible
  3. Update all themes and plugins to their latest versions after upgrading

For Developers

If you maintain plugins or themes that interact with the block editor, the HTML API, or use theme.json, you should thoroughly test your code with WordPress 6.6 to ensure compatibility with the changes to block style variations, HTML processing, and theme.json handling.

For Agencies and Hosts

The improvements to Site Health checks, particularly the new autoloaded options size monitoring, may help identify performance issues on client sites. Consider reviewing this data after upgrading.

Bug Fixes

Plugin Activation Button Behavior

Restored the pre-6.5 behavior of the plugin "Activate" button, which now navigates the user to the button's href (i.e., to the plugins.php UI) instead of using AJAX activation. This addresses feedback from plugin developers whose users valued the onboarding/configuration experiences.

Plugin Dependencies

Fixed a bug in plugin dependencies detection by ensuring initialization in the AJAX callback before checking dependencies. This prevents false positives that would allow users to click Activate only to see a failure message.

Media Handling Improvements

  • Fixed an issue where the GD image library falsely reported supporting the AVIF format when support was actually missing.
  • Fixed issues with media titles when inserting via REST API to match the naming behavior for uploaded media in the media library.
  • Fixed implicit conversion from float to int in image cropping when using ImageMagick.

Theme-related Fixes

  • Fixed an issue where the attachment thumbnail would be rendered as the site logo on attachment single templates if no site logo is set.
  • Fixed various CSS issues in bundled themes, including Twenty Fourteen, Twenty Fifteen, Twenty Seventeen, and others.
  • Fixed the Twenty Twenty-One sub-menu toggle button to only apply to the primary menu.

Editor Fixes

  • Fixed duotone filter for aligned images on classic themes.
  • Fixed block template files query for a post-type.
  • Fixed specificity of core block style variations.
  • Fixed root padding for children of alignfull flow layouts.

Security Fixes

  • Fixed a Path Traversal issue on Windows in Template-Part Block.
  • Added sanitization for Template Part HTML tag on save.
  • Enhanced URL attribute handling in the HTML API.

New Features

Section Styling via Extended Block Style Variations

WordPress 6.6 introduces the ability to style entire sections of a page without having to tediously reapply the same sets of styles. This is achieved by extending block style variations to apply to nested blocks, giving users more control over the visual appearance of their content.

Patterns Page for Classic Themes

The Site Editor Patterns page is now officially exposed for classic themes. Users can access it via the Appearance > Patterns submenu, which links to the Site Editor Patterns page located at wp-admin/site-editor.php?path=/patterns.

Relative URLs in Theme.json

Block themes now support using relative file: URLs in top-level theme.json properties such as styles.background. The REST API has been modified to provide clients with absolute URLs via a 'https://api.w.org/theme-file' attribute in the _links array.

Block Bindings Enhancements

Added support for a __default block binding attribute for pattern overrides that dynamically adds support for all supported block binding attributes.

New Site Health Checks

A new Site Health check has been added that will alert site owners if they are autoloading a large amount of data from the options table (greater than 800 KB by default), which could result in poor performance.

Fonts Upload Location in Site Health

The Site Health report now includes information about the fonts directory path and its size, similar to how it lists the paths to plugins, themes, and uploads directories.

REST API Improvements

  • Added batch support to the Users API, allowing developers to include /wp/v2/users routes when making a batch API request.
  • Added stylesheet and template URI fields to the Themes API.
  • Added template and template_lock properties to the post types REST API endpoint.
  • Added post class list field to the REST API.

Security Updates

Template Part Block Security

Fixed a Path Traversal issue on Windows in the Template-Part Block that could potentially allow unauthorized access to files.

HTML Tag Sanitization

Added sanitization for Template Part HTML tag on save to prevent potential security issues with unsanitized HTML.

URL Attribute Handling

Enhanced the HTML API to run URL attributes through esc_url() to ensure proper sanitization of URLs in HTML content.

KSES Improvements

  • Expanded the allowable set of custom data attribute names to include those containing leading, trailing, and double - characters, which are used in the Interactivity API.
  • Improved preservation of certain invalid HTML comment syntaxes in wp_kses_split to better align with browser behavior.

Performance Improvements

Editor Performance

The editor has been optimized to be up to 20% faster, providing a smoother experience when creating and editing content.

Theme.json Processing

Several improvements have been made to the processing of theme.json data:

  • Improved performance and conceptual consistency of section styles by moving shared variation definitions and optimizing the merging of theme.json data.
  • Prevented duplicate CSS generation for block style variations.
  • Avoided unnecessary processing of theme.json variation partials.
  • Optimized reading of theme.json files stored in the styles/ folder to only read them once.

HTML API Optimizations

The HTML API has been enhanced with a custom text decoder that provides better performance for string decoding operations. This decoder addresses deficiencies in PHP's html_entity_decode() function and provides conveniences such as making single-pass and interruptable decode operations possible.

Impact Summary

WordPress 6.6 delivers significant improvements to the block editor experience with the introduction of section styling capabilities, allowing users to style entire sections of a page without tedious repetition. Performance enhancements make the editor up to 20% faster, providing a smoother content creation experience.

For theme developers, the release brings better support for theme.json with relative URL support and improved block style variation handling. Plugin developers benefit from an enhanced HTML API with better HTML processing capabilities and expanded REST API functionality, including batch support for the Users API.

Accessibility improvements are prominent throughout the release, with better screen reader support, improved control proximity in the media uploader, and visible labels added to theme UI elements. The admin experience is also enhanced with the Patterns page now accessible in classic themes and improved Site Health checks.

Security has been strengthened with fixes for path traversal issues and better HTML sanitization. The release also restores the pre-6.5 behavior for plugin activation buttons, addressing feedback from plugin developers whose users valued onboarding experiences.

Overall, WordPress 6.6 represents a solid improvement in both user experience and developer capabilities, with a strong focus on performance, accessibility, and security.

Statistics:

File Changed300
Line Additions11,810
Line Deletions9,579
Line Changes21,389
Total Commits250

User Affected:

  • Can now style entire sections of a page with extended block style variations
  • Benefit from improved block editor performance (up to 20% faster)
  • Experience better UI for media uploads with improved accessibility
  • Can access the Patterns page in classic themes via Appearance > Patterns

Contributors:

tellthemachinesswissspidyjoedolsonhellofromtonyadesrosjSergeyBiryukovnoisysocksellatrixaudrasjbdmsnellTimothyBJacobskarmatosedockhamjoemcgilladamsilversteincostdevgziolooandregalpeterwilsonccwestonruteraaronjorbinantpbjorgefilipecostaryelledream-encode