WordPress 6.3 Field Guide

This guide shares more of the in-depth changes that you will find in 6.3 and is published with Release Candidate release 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 to help inform WordPress developers, extenders, and others.

In Core Core Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Trac Trac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. , there are almost three hundred and seventy-one tickets: 127 of which are enhancements and feature requests , 208 bug fixes , and 36 other blessed tasks . This time, there are 67 tickets with a focus on performance , 23 for accessibility , and 36 for modernizing code and applying coding standards .

Gutenberg Gutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ included in this release has 1737 pull requests : 307 enhancements, 481 bug bug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. fixes, and 55 accessibility Accessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). ( https://en.wikipedia.org/wiki/Accessibility ) improvements.

Changes in 6.3 are spread across 43 core components. Below is the breakdown of the most important ones.

Block Block 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

WordPress 6.3 is bringing 10 Gutenberg releases into the core – fifteen point two , fifteen point three , fifteen point four , fifteen point five , fifteen point six , fifteen point seven , fifteen point eight , fifteen point nine , sixteen , and sixteen point one . You will find new Block APIs, Block properties, Block editing mode, Block layout support, color classes, Command Palette, Reusable Blocks renamed to Synced Patterns, and many other changes in these 10 plugin Plugin 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 releases.

Bundled Theme

Bundled default themes have dropped support for Internet Explorer scripts and styles, which also removed skip-link focus fix script for navigating by keyboard in Internet Explorer and old versions of Chrome.

In addition, special stylesheets and HTML5 Shiv scripts are not enqueued or included in the header.php template for the following themes: Twenty Thirteen (its conditional code is also removed), Twenty Fifteen, and Twenty Seventeen. ( #56699 )

Theme developers who wish to continue to support IE can add code snippets to their themes that restore the functionalities.

Cache API API An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.

The Cache API has undergone several improvements: introducing new cache groups specific to queries and offering developers greater control over the handling of objects within these groups.

You can now set the expiration time for a cache group, clear specific cache groups, set last changed value for a cache group, and declare specific cache groups as non-persistent. With these changes, you can implement your own custom cache invalidation strategies, allowing you to invalidate an entire cache group programmatically.

Other improvements include improved validation, ensuring that only an array of unique integers are passed as input.

Filesystem API

Hidden ( . prefixed) files can now be included in list_files() with a new optional $include_hidden parameter. Defaults to false for backward compatibility. ( #53659 )

General

A new constant WP_DEVELOPMENT_MODE is introduced to signify context-specific development mode. The constant can have the value “ core “, “ plugin “, “ theme “, “ all “, or an empty string. The latter of which means no development mode, which is also the default.

Two new helper functions wp_is_development_mode( $mode ) and wp_get_development_mode() are introduced as the recommended ways to interact with this new configuration value.

The different development modes affect specific caching functionality; for example, caching is only bypassed during theme development, but not during core development. ( #57487 )

The current value of the WP_DEVELOPMENT_MODE constant is also accessible under Tools > Site Health > Info , in the WordPress Constants section. ( #58646 )

WP_DEVELOPMENT_MODE serves as an addition to existing debugging constants: WP_DEBUG , SCRIPT_DEBUG , and WP_ENVIRONMENT_TYPE .

PHP PHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher Support

Support for PHP 5 has been dropped in WordPress 6.3.

The new minimum supported version of PHP is 7.0.0.

The recommended version of PHP remains at 7.4 or greater. ( #57345 ) ( blog post announcement )

I18N i18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization . Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.

Improvements include the ability to short-circuit load_textdomain filter Filter 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. and reducing loading time for just-in-time translation translation The process (or result) of changing text, words, and display formatting to support another language. Also see localization , internationalization . .

Media

The media component has been updated with several enhancements that improve load time performance for content with images. WordPress now automatically adds the fetchpriority attribute with a value of “ high ” to the image that it determines most likely to be the “LCP (Largest Contentful Paint) image”. Other enhancements have been implemented to improve the automatic handling of lazy-loading via the loading attribute to more reliably detect when to omit the attribute from some images.

Metadata API

Metadata API has undergone significant improvement in the area of lazy loading capabilities for term, comment, and site metadata. Lazy loading refers to a technique where data is loaded only when it is actually needed. This reduces unnecessary database queries or cache lookups and improves overall performance.

Performance

The function get_pages() has been revised to utilize WP_Query internally. This improvement significantly reduces the complexity of the get_pages() function by offloading the burden of querying databases and handling the cache to WP_Query . ( #55806 and #12821 )

Script Loader

Support for HTML HTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. 5 “ async ” and “ defer ” attributes has been added, which allows developers to register scripts with a loading strategy. The loading strategy can be enabled by overloading the $in_footer parameter as an array that contains the loading strategy to the wp_register_script() and wp_enqueue_script() functions. If present, the loading strategy attribute will be added to the script tag tag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) .

The intended loading strategy that you pass via the $args parameter may not be the final (chosen) strategy since the script’s dependency tree (its dependencies and/or dependents) is taken into account, but it will never be detrimental to (or stricter than) the intended strategy.

Upgrade/Install

The rollback feature will automatically restore the previously installed plugin/theme version if the manual update process fails. This enhancement enhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. makes the update process more reliable and ensures that if a plugin or theme update fails, the previous version can be safely restored and the website remains available to its users.

  • When updating a plugin or theme, the old version is moved to a temporary backup directory:
    • wp-content/upgrade-temp-backup/plugins/[plugin-slug] for plugins
    • wp-content/upgrade-temp-backup/themes/[theme-slug] for themes.
  • If the update fails, then the backup kept in the temporary backup directory is restored to its original location.
  • If the update succeeds, the temporary backup is deleted.

To further help troubleshoot plugin and theme updates, two new checks were added to the Site Health screen:

  • Check to make sure the upgrade-temp-backup directory is writable.
  • Check there is enough disk-space available to safely perform updates.

Please take note, the rollback feature cannot be used to “roll back” a plugin/theme to a previous version after a successful update (the feature is only applicable to failed manual updates ).

Users

An enhancement has been made to the caching of database queries in WP_User_Query class, the only remaining query class lacking this caching capability.

All calls to WP_User_Query will be automatically cached by default, unless setting the relevant parameters otherwise. You can also globally disable caching by using a filter.

A new global cache group named ‘ user-queries ‘ is introduced to store the results of queries. Caching will be disabled for user queries that utilize the field parameter and request more than 3 fields.

Finally, plugins utilizing the users_pre_query hook to modify the returned values will bypass caching and the behaviors will remain the same as before.

Other Developer Updates

But wait, there is more!

Cron API

The cron memory limit has been increased to WP_MAX_MEMORY_LIMIT (256MB by default) during cron event processing if the default memory limit is lower than this value. Note that this will not affect external means of processing cron events, such as the wp cron command in WP-CLI WP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ , server-level crontab events, or any other cron event processing mechanism that bypasses wp-cron.php .

A new filter cron_memory_limit has been introduced to adjust this value if necessary. ( #56628 )

Editor

A new source attribute is added to Block patterns allowing them to be filtered by that source. ( #58622 )

Embeds

  • Anghami has been added as a trusted oEmbed provider. ( #49850 )
  • Support for TikTok creator profiles has been added. ( #55784 )

Formatting

  • Added aria content attributes aria-controls , aria-expanded , and aria-current to allowed attributes in KSES. ( #55370 )
  • CSS CSS Cascading Style Sheets. repeat() function support has been added for KSES. ( #58551 )

General

  • In KSES, the safecss_filter_attr() function has been revised to allow the filter property to accept a URL URL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org , as a reference to an SVG filter element. ( #57780 )
  • Replacing strpos() and substr() for code modernization (note: for PHP versions lower than v8.0, the three replacement functions have been polyfilled since WP v5.9):
    • The usage of 0 === strpos() or 0 !== strpos() has been replaced with str_starts_with() .
    • The usage of false === strpos() or false !== strpos() has been replaced with str_contains() .
    • The usage of $needle === substr( $string, 0, $length ) has been replaced with str_starts_with( $haystack, $needle ) . The value of $length should be the length of $needle .
    • The usage of $needle === substr( $string, $offset ) where $offset is negative has been replaced  with str_ends_with( $haystack, $needle ) . The absolute value of $offset should be the length of $needle . ( #58012 , #58206 , #58220 )

Performance

  • In the WP_Comments_List_Table class, when the function get_comments() is called, the parameter update_comment_post_cache is passed with a value of true . This primes all the related posts for the displayed comments and improves performance. ( #57802 )
  • The _wp_array_get() function is the most called function on the front end of a site, up to ~23k times on each page-load when using a block theme. A few minor performance optimizations have been introduced, which adds up to a noticeable improvement. ( #58376 )

Quick/Bulk Edit

A new bulk_edit_posts action hook is introduced, which triggers after processing the post data for bulk edit and before it returns its results. For example, it allows developers to save additional data without having to perform any .ajax() call. ( #28112 )

REST API REST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/ .

  • The Themes REST API can now indicate whether a theme supports the Site Editor by adding an is_block_theme property to each theme in the wp/v2/themes API response. ( #58123 )
  • A revisions Revisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision. endpoint for global styles, /wp/v2/global-styles/revisions , has been added to the REST API. ( #58524 )
  • WP_REST_Templates_Controller has a new modified field for template and template part objects that returns post modified datetime for Templates. ( #58540 )

Revisions

When a post is saved with an unchanged autosave, the existing autosave will be returned, instead of returning an error. ( #58739 )

Themes

A new public function wp_get_remote_theme_patterns() has been added to query the patterns datum from theme.json and substitutes current usage of private APIs. ( #58460 )

New Action Hooks Hooks 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.

New Filter Hooks

Modified Action/Filter Hooks

  • rest_allowed_cors_headers ( #57752 ) and rest_exposed_cors_headers ( #57752 )
  • edit_custom_thumbnail_sizes has been deprecated and replaced with image_edit_thumbnails_separately ( #57685 )

Deprecated Files

  • The wp-admin/media.php file has been deprecated. Users visiting the file will be redirected to the media library wp-admin/upload.php . A user-facing warning will be displayed when the media library is reached via a deprecated link. ( #57612 )

External Library Updates

The following libraries were updated to the latest versions:

  • PHPMailer is being updated to v6.8.0 ( #57873 )
  • Requests library is being updated to v2.0.6 ( #58079 )
  • jQuery is being updated to v3.7.0 ( #58083 )
  • Sodium Compat is being updated v1.20.0 ( #58224 )
  • jQuery Migrate is being updated to v3.4.1 ( #58451 )
  • npm packages is being updated to the latest version ( #58623 )

Props to @ costdev and @ mikeschroder for technical review, to @ milana_cap for review.

# 6-3 , # field-guide