Miscellaneous Developer-focused Changes in 6.9

In WordPress 6.9, a handful of small, developer-focused changes were made that deserve to be called out. Let’s take a look!

PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher 8.5 New Function Polyfills

The upcoming 8.5 release of PHP includes 2 new functions that can be used to retrieve values from an array:

To encourage more modern PHP practices, polyfills of these functions have been added to WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. so that they can be used safely without needing to include function_exists() checks.

For more information, see #63853.

Improved Feed Caching on Multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site Installs

When RSS feeds are fetched using fetch_feed(), they are currently cached using the (get|set|delete)_transient() functions. On multisite installs, single site transients cannot be shared between sites, but site transients managed through (get|set|delete)_site_transient() can.

In WordPress 6.9, fetch_feed() will now store feeds as site transients instead. This allows a feed to be fetched and stored once for all sites on a multisite install, which improves the overall performance of feeds and reduces the amount of data cached in the database (or persistent object cache, if configured). One example where this is beneficial is the WordPress News blogblog (versus network, site) feed, which is fetched and displayed in a widgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. on the dashboard for every user.

See #63719 for more details.

External Library Updates

The following external libraries bundled in WordPress are being updated in the 6.9 release:

  • ID3 has been updated to include two changes from the upstream repository that address PHP 8.5 compatibility issues (see #64051). Once a new version containing these two changes has officially been tagged, the library will be updated in full (see #64253).
  • PHPMailer has been updated from 6.9.1 to 6.11.1 (see #63811, #64052, #64055).
  • SimplePie has been updated from 1.8.0 to 1.9.0 (see #63717, #63961).
  • Sodium Compat has been updated from 1.21.1 to 1.23.0 (see #64008, #64079).

New Classic Themes Template for TaxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies. Terms

In classic themes, you can now use term IDs when creating taxonomy templates. With taxonomy-$taxonomy-{$term->term_id}.php templates, you don’t need to worry about templates breaking if you rename the Oakland Athletics term to Athletics the way you do if you use slug based template names. 

See #35326 for more information.

Better Handling of Transparent PNGs

WordPress 6.8 introduced a regressionregression A software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5. that could degrade the quality of PNG images with transparency when processed with Imagick. This was fixed in [60667] by improving the detection of the various types of transparent PNG files and handles them each appropriately.

See #63448 for more information.

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.

WordPress 6.9 will see 21 new action and filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. hooks added. Some will be detailed in a separate developer note, but they’re all listed below for easy reference.

New Action Hooks

There are 8 new action hooks being introduced in 6.9: 

New Filter Hooks

There are 13 new filters being introduced in 6.9:

A Final Farewell to Flash

While Flash was officially retired at the end of 2020, there were a few artifacts remaining within WordPress in the form of SWFObject and SWFUpload. These were removed in [60281] and will no longer ship in new versions of WordPress going forward.

For more information, see #52699 on TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress..

Props @adamsilverstein for helping to draft the post, and @jorbin for peer-review.

#6-9, #dev-notes, #dev-notes-6-9