The WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
Found a bugbugA 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.?Create a ticket in the bug tracker.
This guide shares more of the in-depth changes that you will find in 6.2 and is published with Release Candidaterelease candidateOne 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 TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress., there are almost 300 tickets: 110 of which are enhancements and feature requests, 166 bug fixes, and 20 other blessed tasks. This time there are 28 tickets with a focus on performance, 15 for accessibility, and 18 for modernizing code and applying coding standards. GutenbergGutenbergThe 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/’s GitHubGitHubGitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ repo brings 1645 pull requests: 292 enhancements, 354 bugbugA 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 30 accessibilityAccessibilityAccessibility (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.2 is spread across 44 coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. components. Below is the breakdown of the most important ones.
BlockBlockBlock 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
Twenty Twelve to Twenty Seventeen now includes font files in the theme folder instead of loading fonts from a remote source (Google Fonts). This update ensures that the themes follow current recommendations for fonts from a privacy perspective.
Internationalization
In WordPress 6.2, the I18ni18nInternationalization, 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. component gets a new wrapper function and it will, also, be easier to switch to a user’s localeLocaleA locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil). Other examples of locales include Canadian English and U.S. English., to name just a couple of improvements. Find the rest in the dedicated dev notedev noteEach 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, and 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..
Filesystem APIAPIAn 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.
If you’ve been using the copy_dir() function for moving directories, you will be happy to find a new, move_dir(), function that comes with WordPress 6.2.
New function wp_opcache_invalidate_directory()
wp_opcache_invalidate() invalidates the OPcache for individual PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher files after overwriting. In #57375wp_opcache_invalidate_directory() was added to recursively invalidate the OPcache for PHP files after overwriting. The function accepts a single argument, (string) $dir, pointing to the directory containing PHP files for which OPcache is to be invalidated.
Changes in WP_Filesystem_Direct::move() function
In #57375WP_Filesystem_Direct::move() had directory support added to make it consistent with ::move() methods in WP_Filesystem_FTPext, WP_Filesystem_ftpsockets and WP_Filesystem_SSH2.
Database
Posts, Post types
To make sure you get the proper results when searching for a page, or any other post type, by the title, WordPress 6.2 is deprecating the get_page_by_title() function in favour of WP_Query.
Performance
WordPress 6.2 brings some major performance wins to WordPress core, visible in the benchmarks for both Web Vitals and Server Timing metrics. Performance is further improved for block themes performance with ~20% faster TTFB and ~14% faster LCP. On pages with hero images, the LCP improvements are even greater at ~19%.
The new filterFilterFilters 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.pre_wp_load_alloptions allows short-circuiting the loading of WordPress’s autoloaded options with custom logic. View ticketticketCreated for both bug reports and feature development on the bug tracker.#56045.
The results of the get_adjacent_post() function are now being cached. View ticket #41131.
Cache keys for WP_Term_Query are now based on SQL without placeholders so that they can actually result in cache hits. View ticket #57298.
WP_Query is now no longer priming post caches twice. View ticket #57373.
Lazy-loading term metadata from the cache is now faster due to using wp_cache_get_multiple(). View ticket #57150.
The results of wp_get_global_settings() are now cached within a single request, resulting in a faster response time of ~8% for WordPress core. View ticket #57502.
Themes
The Themes component brings some new options for theme authors, performance improvements as well as feature removals.
The “Style Variations” tagtagA 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.) is added to the list of WordPress theme features. View ticket #56869.
theme.json supports additional link-related pseudo classes, such as :link and :any-link. View ticket #57053.
Account for a numeric theme directory in WP_Theme::__construct() to allow a numeric theme name. View ticket #54645.
Improve performance of _add_block_template_part_area_info and _add_block_template_info functions which result in hitting an existing cache and in much fewer calls to get_option. View ticket #57077.
Caching is added to WP_Theme::is_block_theme(). View ticket #57114.
External libraries
Significant and long-time-awaited changes come in the Requests library: namespaces, minimum PHP version, PHP 8.x compatibility, stricter input validation and others.
Other developer updates
More hooksHooksIn 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 and renamed, and other notable changes can be found in miscellaneous dev note.
But wait, there is more!
Application Passwords
Allow HTTPHTTPHTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. URLs for application password responses when using a local environment type. View ticket #52617.
Bootstrap/Load
Check that either mysqli_connect() or mysql_connect() is available. This resolves a fatal error and displays an actionable message if the mysqli PHP extension is missing. View ticket #51988.
Comments
Allow passing $comment_ID parameter to get_comment_time() and comment_time(). This brings consistency with get_comment_date() and comment_date(). View ticket #52322.
External libraries
The following libraries were updated to the latest versions:
By optimizing the low-level function wp_kses_bad_protocol() for the by far most common scenarios, the performance of esc_url() is improved. View ticket #22951.
General
If you’ve been following the progress of improvements to allow for named parameters, massive work has been done on that field in 6.2. View ticket #56788.
Mail
Allow custom attachment filenames in wp_mail() by passing an associative $attachments array, where the key strings will be used as filenames instead. View ticket #28407.
Media
It is now possible to explicitly provide a decoding value of e.g. boolean false in the $attr parameter of the wp_get_attachment_image() function, to ensure the attribute decoding is omitted. View ticket #57086.
Enhance logic to determine LCP image in block themes and avoid lazy-loading it. Additionally, this changeset uses the benefits of block template parts to avoid lazy-loading images in the header block template part, making the lazy-loading heuristics even more accurate for sites using a block theme. A test with a block theme page with an image shows a notable ~19% LCP improvement in 6.2. View tickets #56930 and #57490.
REST APIREST APIThe 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/.
Support non-Latin characters in template route regex. Non-Latin characters are URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org-encoded (e.g. %cf%84%ce%b5%cf%83%cf%84). Matching % in the route ensures templates with non-Latin titles can be properly saved. View ticket #57329.
Users
Add the new wp_set_password action hook, triggered after a password is set for a given user. As several plugins are calling wp_set_password() directly, adding an action to the end of the function will help pluginPluginA 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 authors to catch all instances of password setting. View ticket #57436.
Thanks to @flixos90, @poena, @costdev, @bph for collaborating on this field guideField guideThe 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. and @webcommsat, @audrasjb, @annezazu, @mukesh27, and @sabernhardt for peer review.