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.
A fourth and final 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). for WordPress 5.9 is packaged to mark the code freeze before release tomorrow, January 25, 2022.
The following fixes are included since Release Candidate 3 (RC3) last week:
Classic menus are not selectable in the existing Navigation 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. – PR38168
Remove CustomizerCustomizerTool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.’s Menus section when the block theme is active – #54888
Block Editor: Mark last change as persistent on save – PR36887
Issue in clicking “Edit styles” link in the Welcome panel – #54859 / PR38123
Fix for the pattern preview expanding issue – PR38175
Allow to install/activate themes/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 which require the next WordPress version – #54882
Testing the release
You can test the WordPress 5.9 release candidate in three ways:
Option 1: Install and activate the WordPress Beta Tester plugin (select the “Bleeding edgebleeding edgeThe latest revision of the software, generally in development and often unstable. Also known as trunk.” channel and “BetaBetaA 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./RCrelease 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). Only” stream).
Option 3: When using WP-CLIWP-CLIWP-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/ to upgrade from Beta 1, 2, 3, 4, RC1, RC2, or RC3 on a case-insensitive filesystem, please use the following command sequence:
Command One:
wp core update --version=5.9-RC4
Command Two:
wp core update --version=5.9-RC4 --force
Happy testing! All welcome in the #core channel on the WordPress SlackSlackSlack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. for the 5.9 release party on January 25! You can follow along for exact timings by watching the #5.9-release-leads channel too.
WordPress 5.9 adds three new 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/. endpoints to manage menus and menu locations. These menus endpoints are used the in new navigation block.
Before discussing menu endpoints, it’s worth noting how menus are currently stored. Navigation menus are stored using the nav_menutaxonomyTaxonomyA 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. and the nav_menu_item post type. A menu is stored as a term and acts like a container for a number of menu items. Menu items are stored as posts. Menus and menu items also have custom fields stored in metaMetaMeta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. and in various options.
Menus
Accessible via /wp/v2/menus, the menus endpoint allows for performing CRUDCRUDCreate, read, update and delete, the four basic functions of storing data. (More on Wikipedia.) operations on menu data. This endpoint extends the WP_REST_Terms_Controller class, mapping fields to the menus and adding functionality like auto_add, that automatically adds new pages to menus when created. A GET request includes the list of menus, but does not contain the list of menu items. To get this data, the menu items endpoint can be used.
Accessible via /wp/v2/menu-items, the menu items endpoint allows for performing CRUD operations on menu items and assigning them to menus. This endpoint extends the WP_REST_Posts_Controller class, mapping fields and adding custom functionality. Menu items can only be assigned to one menu at a time unlike other taxonomies.
Many menu items have an associated object that the menu item links to. For instance, a link to a page will have the object set to page and the object_id set to the WordPress Post ID of that page. When using this endpoint, it may be useful to get information about that linked object. For example the page’s title. This information is not included in the response by default, but the REST API has a feature to embed this information by using the _embed query parameter. For example, making a GET request to /wp/v2/menu-item/8874?_embed=true will result in the following response:
Accessible via /wp/v2/menu-locations, the menu locations endpoint returns a list of menu locations registered with the register_nav_menus function. To assign a menu to a particular location, use the menus endpoint, by passing an array of menu location keys.
Both the menu and menu item endpoints, both support the batching of requests, introduced in WordPress 5.6. This means that more than one menu / menu item can be updates / created in a simple request to the 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..
Access Control
To access data from any of the menus endpoints, requests must be made by a logged in user with the edit_theme_options capability. By default, only users with the Administrator role have this capability. This means that menu data is not publically exposed via the REST API. TicketticketCreated for both bug reports and feature development on the bug tracker.#54304 provides a means for developers to opt-in to exposing this data publicly. The REST API team hopes to implement this feature in a near future release of WordPress.
These endpoints were first developed as a feature pluginFeature PluginA plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins. on GitHub. For those using this 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, after upgrading to WordPress 5.9, the plugin can be deactivated and removed as all of it’s functionality is now included in WordPress CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress..
The Dry Run is a key event to determine readiness for the final release. As noted above, the current plan is to start it on 2022-01-24 15:00. You are invited to observe and/or participate. It’ll happen in the #core Slack channel.
What happens during the dry run?
Review 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. reports to determine if any are critical to warrant another RCrelease 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). (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).).
Checks and updates are done in the src/wp-admin/includes/update-core.php file.
Pre-release scripts are run to ensure test suites, coding standards, and checks pass.
If the results are acceptable, the release goes into a 24-hour code freeze period.
24 Hour Code Freeze
Update: The 24-hour code freeze is in effect 🕜
After the dry run and before the release party starts, a 24-hour code freeze goes into effect.
What does this mean? No source code for 5.9.0 (i.e., in the 5.9 branchbranchA directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch".) can be changed during these 24 hours.
What happens if a critical bug is reported during this period? The release squad will meet with committers and maintainers to determine if the issue is a blockerblockerA bug which is so severe that it blocks a release..
If yes, another RC release happens, and the release process restarts (meaning the dry run is repeated and then the 24-hour code freeze clock restarts).
If no, then the bug is targeted for 5.9.1.
The Release Party 🎉
WooHoo, you’ve made it to release day 🎉!
As noted above, the current plan is to start the release party on 2022-01-25 19:20. You are invited to observe and/or participate. It’ll happen in the #core Slack channel.
The release party walks through the steps in the Major Version Release process for anyone who wants to follow along.
Please note releasing a major version requires more time than releasing a betaBetaA 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. or release candidate. There are more steps in the process. If there are any last-minute issues that need addressing, more time will be needed.
How You Can Help
A key part of the release process is checking that the ZIP packages work on all the different server configurations available. If you have some of the less commonly used servers available for testing (IIS, in particular), that would be super helpful. Servers running older versions of PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher and MySQLMySQLMySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. will also need testing.
You can even start this early, by running the WordPress 5.9 RC3 packages, which are built using the same method as the final packages.
During the release party, options will be provided on how to help test the release package.
Tips on What to Test
In particular, testing the following types of installs and updates would be much appreciated:
Does a new WordPress install work correctly? This includes running through the manual install process, as well as WP-CLIWP-CLIWP-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/ or one-click installers.
Test upgrading from 4.0.33, 4.9.18, 5.7.2, 5.8.3, and 5.9 RC 3, as well as any other versions possible.
Remove wp-config.php file and test a fresh install.
Test single site and multisitemultisiteUsed 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/networknetwork(versus site, blog) (both subdirectory and subdomain) installs.
Testing the following user flows, on both desktop and mobile, would be great to validate each function as expected:
Publish a post, including a variety of different blocks.
Comment on the post.
Install a new 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/theme, or upgrade an existing one.
Change the site language.
If you’re a plugin developer, or if there are complex plugins you depend upon, test that they’re working correctly.
CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.Team RepTeam RepA Team Rep is a person who represents the Make WordPress team to the rest of the project, make sure issues are raised and addressed as needed, and coordinates cross-team efforts.@marybaum and @webcommsat led the meeting.
5.9 final will land next week on 25 Jan 2022. RC3 yesterday was the last planned release before the final. If blockers or regressions are reported before 5.9 starts its 24 hour code freeze (which starts on 24 Jan), then another RCrelease 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). may happen. As of right now, there are not any reports that warrant another RC. But will keep on on it.
@jeffpaul: You’re almost there @hellofromtonya, we’re all in support of you and the team, thanks again for everyone’s amazing work!
The release squad is discussing the start time for the release party on the 25th. Stay tuned.
The code freeze will start exactly 24 hours before that time.
Dry run will be on the 24th and end before that code freeze starts.
A post on Make Core will appear in advance to outline the release processes and how you can help.
Thank you to all contributors who made this happen!
How can you help?
Test
TriagetriageThe act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. any reports that come into TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. or 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/ to help teams figure out if a report needs immediate attention. Then come join the 5.9 Release Party to help prep and test the package and get it out into the world! Celebrate.
@webcommsat: please share the posts about the release and the RC3 post.
5.9.1 early discussions
@jeffpaul: wait until we see how the forum responses come in post 5.9 since it sounds like nothing needing another RC as of now.
@marybaum shared she and @estelaris would be helping with the release-coordination for the minors, in in the interregnum before 6.0.
@hellofromtonya: I agree with @jeffpaul and points @desroj raised in the release leads channel. Though there are fixes ready for 5.9.1, good to give a week or so for reports to come in within the forums, Gutenberg 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/, and Trac. Why? There may be things hadn’t yet surfaced that need priority attention.
@costdev: For reporting issues when testing RC, reproducing reported issues during/triage, and for when reports land in the forums and make their way to Trac, a test report template is available to help narrow down the steps and environments where issues may occur.
Open Floor
a) Request for core agenda to be published 24 hours ahead of a meeting to allow items and links o be more easily added for the discussion. It has not been published this far in advance in the last two weeks. Confirmed.
b)FSE @annezazu: Join me for a hallway hangout on Thursday 20 January 2022 at 9:00pm UTC to talk about 5.9. It will be held in #fse-outreach-experiment and is meant to be a casual place to chat with other folks in the WordPress space. Bring your questions, pop in and out, etc. It will be recorded and recapped. Previous editions
@audrasjb: relating to 5.9: should we consider #54859 as a blockerblockerA bug which is so severe that it blocks a release.? any thought about this small (but annoying) issue? Can probably be skipped to a minor unless there is a RC4.
@hellofromtonya: That issue needs testing and more discussion to determine what should happen and if reproducible. But does not seem to be a blocker for the major releasemajor releaseA 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..
If it’s merely a bad link, that’s one thing and easily fixable. If it’s something else, then discussion needs to happen about resolution.
@audrasjb: The expected behavior would be to open the Global Styles panel.
For now, the two links in the welcome panel both lead to the same screen (*), which is, indeed, annoying. (* on 5.9 + TT2)
ironprogrammer: The first time you open Styles, it has the nifty tutorial, so it’s a shame to miss that when you come here the first time…
@hellofromtonya: The question is: What should the link be to open the panel (this would be fixable in Core)? Or is the panel not wired to a link (this would be a Gutenberg issue)?
@audrasjb: I don’t think it’s a blocker. But I think it’s annoying and it’s not a super user experience when associated to the Welcome panel which is supposed to show all the amazing stuff we shipped in this release. What I try to say is that it’s more a “communication issue” than a technical one. @jeffpaul agreed not a blocker.
Then if there are other issues that pop, it can be bundled into a RC4.
I agree it has to be fixed upstream in Gutenberg and then packages released and backported to Core.
@hellofromtonya: Depends upon if the URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org is correct or not. If not correct, then it can be fixed in Core. Else, yes, I agree it has to be fixed upstream in Gutenberg and then packages released and backported to Core.
@audrasjb: I’m currently opening an issue upstream, and also, I’m searching for any Gutenberg behavior that would open the panel based on the URL hash.
@desrosj: I think we should be worried about making the right decisions for our users and not to avoid publications writing unfavorable pieces about us.
@marybaum: A thing that seems like not-a-blocker to us can affect UXUXUser experience profoundly, which in turn can damage perception.
@hellofromtonya: For now, it’s prioritized and in the 5.9 milestone. I’ll take ownership of this issue with priority to fix it. Once fixed, then a decision can be made as to whether to do another RC or release it in.
@hellofromtonya: There are known bugs that do impact UX that are in 5.9.1. Yes, the release seeks to ship a solid experience. And yes, it would be great to have a perfect UX across the board. In this case, the link does take the user to the Site Editor where the Styles can be opened with another click. The experience is not broken nor perfect. But I don’t see it as a major blocker to the final release. But let’s see if it can be fixed quickly and if other issues come in to warrant another RC.
@audrasjb pinged the editor team An issue has been reported that is a good to get fixed in case there’s a 5.9 RC4. Clicking wp-admin/site-editor.php?styles=open in the Welcome panel is expected to automatically open the Styles panel in the Site Editor. It is not. Is this the right link? Or is this 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. that needs to be fixed? https://github.com/WordPress/gutenberg/issues/38090 https://core.trac.wordpress.org/ticket/54859Posted in core-editor
d) Dev notesdev 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.
WordPress 5.9 Release Candidate 3 has landed. Please download and test! Also, please feel free to share the package and invite your friends to test the 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). for themselves.
Do you have other posts that should get attention? Please add them in the comments.
Upcoming releases
@hellofromtonya will update the group on the 5.9 release. It’s due in six days, on January 25, 2022.
Component Maintainers
From now until 5.9 launch, devchat will skip a formal check-in so the group can have a longer Open Floor. If you’re a maintainer who would like to get help with a blockerblockerA bug which is so severe that it blocks a release. or share success/ collaboration, please feel free to either comment on this post or in the meeting.
Welcome back to a new issue of Week in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between January 10 and January 17, 2022.
TicketticketCreated for both bug reports and feature development on the bug tracker. numbers are based on the Trac timeline for the period above. The following is a summary of commits, organized by component and/or focus.
Code changes
Administration
Ensure an integer is used for menu priority in add_menu_page() – #54798, #48249
Fix an erroneous translators comment after changeset [52569] – #54798
Replace “Current theme” with “Active theme” in user facing strings – #54770
Update design of the Dashboard welcome panel – #54489
Build/Test Tools
Re-enable E2E tests for the 5.8 branchbranchA directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". – #54749
Avoid duplicate queries in some WP_Query tests – #54822
Trac ticket number correction after changeset [52569] – #54798
Bundled Themes
Twenty Twenty-Two: Sync updates from 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/ for RCrelease 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). 2
Twenty Twenty-Two: Sync updates from GitHub from RC3 – #54318
Coding Standards
Correct alignment in get_block_editor_settings() – #54728
Remove an extra variable in get_author_posts_url() – #54728
Rename the $val variable to $site for clarity in WP_MS_Users_List_Table::column_blogs() – #54728
Use strict comparison in wp-admin/includes/class-wp-ms-users-list-table.php – #54728
Use strict comparison in wp-admin/includes/class-wp-users-list-table.php – #54728
Database
Add missing AS after INNER JOIN in some queries – #54769
Docs
Correct description for two 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.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. functions: – #54796
Miscellaneous docblockdocblock(phpdoc, xref, inline docs) corrections in 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/. and Sitemaps API – #54729
Typo correction in WP_REST_Response class docblocks – #54823
Editor
Explicitly load remote 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. patterns in the block and site editor screens – #54806
Fix enqueueing additional styles in wp_enqueue_block_style() to print only when blocks render – #54787
Update some default presets in use by default themes to the new format – #54782
WordPress default presets aren’t loaded for all themes – #54781
Site Editor: Fix typo in home template translatable description – #54787
Update packages to include these 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 from 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/: – #54487
Help/About
Correction in “Managing Themes” HelpHub Docs link – #54707
Contextualize “light” color translationtranslationThe process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. strings – #54804
Media
Add a missing / in post thumbnail lazy loading regex – #54815
Typo correction in wp_image_maybe_exif_rotate docblock – #54816
Script Loader
Fix a variable typo in wp_enqueue_block_style – #54786
Upgrade/Install
Check if the disk_free_space() function exists before calling it – #54826, #54730
Typo correction in a Core_Upgrader class inline comment – #54821
XML-RPC
Fix typos in some XMLRPC related docblocks – #54820
WordPress 5.9 Release Candidate 2 has landed. Please download and test! Also, please feel free to share the package and invite your friends to test the 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). for themselves.
Do you have other posts that should get attention? Please add them in the comments.
4. Upcoming releases
@hellofromtonya will update the group on the 5.9 release, slated for January 25, 2022.
Component Maintainers
From now until 5.9 launch, devchat will skip a formal check-in so the group can have a longer Open Floor. If you’re a maintainer who would like to get help with a blockerblockerA bug which is so severe that it blocks a release. or share success/ collaboration, please feel free to either comment on this post or in the meeting.
Welcome back to a new issue of Week in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between January 3 and January 10, 2022.
TicketticketCreated for both bug reports and feature development on the bug tracker. numbers are based on the Trac timeline for the period above. The following is a summary of commits, organized by component and/or focus.
Code changes
Administration
Add missing texture image for Welcome panel & About page – #54489, #54270
Add the 5.9 branchbranchA directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". to the workflow for testing branches
Fix: WordPress default presets aren’t loaded for all themes – #54781
Update some default presets in use by default themes to the new format – #54782
Twenty Twenty-Two: Sync updates from 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/ for RCrelease 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 – #54318
Coding Standards
Remove empty space at end of inline comment in _add_default_theme_supports() – #54731
Correct alignment in get_block_editor_settings() – #54728
Use strict comparison in wp-admin/options.php – #53359
Use strict comparison in wp-admin/plugin-install.php – #54728
Use strict comparison in wp-admin/revision.php – #54728
Use strict comparison in wp-admin/themes.php – #54728
Editor
Update wordpress packages for WP 5.9 RC 1 – #54487
Embeds
Fix oEmbed host script enqueueing on 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.-based themes – #44632
External Libraries
Update jQuery hoverIntent to version 1.10.2 – #54722, #51812
Formatting
Correctly encode ASCII characters in post slugs
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.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.
Improve docs for wp_remote_retrieve_header function return value – #51736
Help/About
Change the HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers.title of Themes Screen and add related HelpHub Docs link – #54707
Change the Learn WP link in the about page – #54755
Correction in “Managing Themes” HelpHub Docs link – #54707
Correction on the documentation link about adding new themes – #54709
Use “refactoring” noun form in WordPress 5.9 About Page – #54270
WordPress 5.9 About Page
Login and Registration
Remove aria-expanded from “Generate Password” button – #54538
Rename login_language_switcher_args to login_language_dropdown_args – #54696
Rename two filters related to language dropdown for better consistency – #54696
Query
Improve sanitization within WP_Meta_Query
Improve sanitization within WP_Tax_Query
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/.
Add unit tests for the 404 template slug handler – #54680
Typo correction in a link description object – #54745
RevisionsRevisionsThe 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.
Improve _set_preview for case when autosave is missing – #54708
WordPress 5.9 unlocks the ability to build with blocks across all parts of your site, bringing advanced design tools to build your templates, themes, and style your sites in new and exciting ways.
Let’s take a look at what to expect in WordPress 5.9.
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
WordPress 5.9 might be the largest release of 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/ features since the initial Gutenberg launch in WordPress 5.0. The latest version includes a full suite of site editing tools bringing the block editor to the full screen. This includes a new way to build themes, new ways to create templates, and style your site. Plus a dozen new theme blocks to load dynamic content.
All of this is shown off in the beautiful new Twenty Twenty-Two default theme.
Review the block theme 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. for more information around block themes and how to get started building your own.
Here are the dev notesdev 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. related to block editor updates:
Performance
CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.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.
Internationalization
Themes & CustomizerCustomizerTool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.
PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 8.0 and 8.1
PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 8.1 was released on 25 November 2021. PHP 8.1 contains new features, performance improvements, deprecations, and backward compatibility breaks. For more information, see the PHP 8.1 release page, changelog, and migration guide.
WordPress is not fully compatible with PHP 8.0 or 8.1. All remaining known PHP 8.1 issues are deprecation notices.
Please note, a deprecation notice is not an error, but rather an indicator of where additional work is needed for compatibility before PHP 9 (i.e. when the notices become fatal errors). With a deprecation notice, the PHP code will continue to work and nothing is broken.
The following is a breakdown of changes in WordPress CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. that 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 and theme developers need to be aware of and accommodate in their code.
PHP 8.1 Remaining known deprecation notices
Deprecation notices remain in WordPress 5.9 and work will continue in the 6.0 cycle.
What is required to resolve each?
Resolution requires a more structural and all-encompassing solution for input validation (i.e. validating the data type and, in some cases, value passed to a function/method) to be architected and implemented to properly fix the underlying 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. rather than introducing buggy unexpected behavior by haphazardly silencing the deprecation notice.
Each notice needs investigation to determine the impact of such changes.
Each change requires thorough testing including full coverage happy and unhappy unit/integration tests.
The remaining known deprecation notices include:
Functions in the wp-includes/formatting.php file.
parse_url() or wp_parse_url() passed directly to a non-nullable in PHP native function without validating a string type is returned (i.e. both will return null when the requested component doesn’t exist within the given URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org (see the PHP manual)).
wp_xmlrpc_server::mw_newPost(): changing content structure default values from null to an empty string. This change requires a review from XMLRPC domain expert and more testing.
Upgrade to Requests 2.0.0: Originally planned for WordPress 5.9, but reverted due to issues with WordPress Core’s updater. Currently planned for 6.0 (TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.#54504).
Using named parameters when calling WordPress functions and class methods is explicitly not supported and highly discouraged until this audit can be completed, as during the audit, parameter names are subject to change without notice. When this audit has been completed, it will be announced in a future developer note.
In 5.9, WordPress Core’s parent and child class method signatures were changed. The parameter names match in the parent and child methods.
If you extend Core classes and choose to support named parameters, you’ll need to audit and change each method being overloaded to ensure the method signatures match the Core class being extended.
To follow or contribute to this review, see Trac #51553, and #50531.
PHP 8.1 readonly() renamed to wp_readonly()
Though originally planned as a reserved keyword, PHP 8.1 changed readonly keyword to a (limited) contextual keyword with potential future plans to deprecate.
WordPress 5.9 renames the readonly() function to wp_readonly(). For PHP 8.0 or earlier, the original readonly() function is loaded into memory but deprecated.
PHP 8.1 return type enforcement and new #[ReturnTypeWillChange] attribute
PHP 8.1 introduces a new #[ReturnTypeWillChange] attribute to silence the deprecation notice for each PHP native interface method where the overloaded method’s return type is incompatible. WordPress Core adds the attribute to each of its instances.
When overloading a PHP native interface method, you should either have the return type declared (in a covariant compatible manner with the PHP native interface method declaration), or add the #[ReturnTypeWillChange] attribute to silence the deprecation notice.
For example, when implementing the ArrayAccess interface, ensure the required methods are compatible or add the attribute as follows:
/**
* @param mixed $offset The offset to check for.
*
* @return bool True on success or false on failure.
*/
#[ReturnTypeWillChange]
public function offsetExists( $offset ) {
// the code
}
/**
* @param mixed $offset The offset to retrieve.
*
* @return mixed The offset’s value.
*/
#[ReturnTypeWillChange]
public function offsetGet( $offset ) {
// the code
}
/**
* @param mixed $offset The offset to assign the value to.
* @param mixed $value The value to set.
*/
#[ReturnTypeWillChange]
public function offsetSet( $offset, $value ) {
// the code
}
/**
* @param mixed $offset The offset to unset.
*/
#[ReturnTypeWillChange]
public function offsetUnset( $offset ) {
// the code
}
PHP 8.1 changed the default mysqli error mode from silent to fatal error.
Prior to PHP 8.1, the default error handling mode of MySQLi was silent (i.e. MYSQLI_REPORT_OFF). An error in the extension, database, query, or the database connection returned false and emitted a PHP warning.
PHP 8.1 changed the default error mode to MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT. An error in the extension, database, query, or the database connection throws a fatal error exception.
WordPress Core has its own error reporting and gracefully handles the database errors by inspecting the error codes. In 5.9, Core sets MySQLi error reporting to off to avoid fatal errors due to uncaught exceptions and maintains the current behavior (see Trac #52825).
If you are using wpdb, 5.9 takes care of this for you. However, if you are not using wpdb, you will need to make changes in your theme or plugins. It is recommended to switch to wpdb.
A deprecation notice is thrown when passing a null value to a PHP native function’s parameter that is not declared nullable. The value will continue to be coerced, meaning the PHP behavior has not (yet) changed. However, in PHP 9, a TypeError will be thrown.
For example, passing null to strlen() (which expects a string type) will throw the following notice:
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in .. on line ..
The deprecation notice identifies where an underlying bug exists in the code base. Rather than merely silencing the deprecation, the approach taken in WordPress Core is to fix each underlying bug notice through input validation (i.e. validating what is passed to the function) or targeted guarding to skip processing for type mismatches.
As noted previously, deprecation notices remain in WordPress Core. These remaining deprecation notices will require a more structural and all-encompassing architectural solution and tests to avoid haphazardly silencing the deprecation notice while potentially introducing buggy, unexpected behavior.
To follow or contribute to this effort, see Trac #54730.
What do you need to do?
Analyze each deprecation notice in your theme or plugin and craft a solution that resolves the bug.
For example, skip the trim() operation when the value to trimmed is not scalar:
Check that a string type is returned from the following function before passing the returned value to a PHP native function:
parse_url() or wp_parse_url() will return null when the requested component doesn’t exist within the given URL (see the PHP manual).
filter_input() will return null if the var_name to get is not set or if using FILTER_NULL_ON_FAILURE flag but the 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. fails.
Autovivification is the automatic creation of an array. When a variable is defined as a boolean false and then used as an array as shown,
$arr = false;
$arr[] = 2;
PHP 8.1 throws a deprecation notice:
Deprecated: Automatic conversion of false to array is deprecated in .. on line ..
In PHP 8.1, this code will continue to work; however, in PHP 9.0, it will result in a fatal error.
There are multiple ways to fix your code to not only resolve the deprecation notice but to also avoid a fatal error in the future when PHP 9 is released. Some of ways include:
Declare an array before using it, i.e. $arr = array();.
Check the returned value to ensure it is an array or at minimum not false before using.
When getting an option with get_option(), if an array type is expected, set the default to an empty array.
Date functions: date_sunrise(), date_sunset(), gmstrftime(), strftime(), strptime().
Hash functions: mhash(), mhash_keygen_s2k(), mhash_count(), mhash_get_block_size(), and mhash_get_hash_name() .
Calling key(), current(), next(), prev(), reset(), or end() on objects is deprecated.
The following functions changed:
The default of ENT_COMPAT changed to ENT_QUOTES | ENT_SUBSTITUTE in these functions htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode(), and get_html_translation_table() (Trac #53465).
Undocumented operation abbreviations can no longer be passed to version_compare().
WordPress 5.9 includes the following updated external libraries:
GetID3 1.9.21 which includes preliminary PHP 8.1 support (Trac #54162).
SimplePie 1.5.7 which includes significant PHP 8.0 and 8.1 compatibility improvements ( Trac #54659).
PHPMailer 6.5.1 which includes preliminary PHP 8.1 support (Trac #53953).
The Requests 2.0.0 library was originally planned for WordPress 5.9. However, due to issues with WordPress Core’s upgrader, it was reverted and planned for 6.0 (Trac #54504).
Test Suites and Tooling
Changes to the WordPress Core PHP Test Suite
What about static tooling? Can it identify incompatibilities?
PHPCompatibility can only find a limited amount of these issues. PHPStan/Psalm/Exakat may find more, but are prone to false positives for non-typed code bases.
A Good Test Suite is the first line of defense
Most of the incompatibilities can be found through a good test suite, which includes full test coverage of both happy and unhappy paths.
Theme and plugin developers are encouraged to extend your test suites.
WordPress Core’s test coverage is currently less than 10%. You are invited and encouraged to contribute tests to grow test coverage in WordPress.
PHPUnit deprecation notices
In PHPUnit < 9.5.10/8.5.21, if a PHP native deprecation notice was encountered, PHPUnit would:
Show a test which causes a deprecation notice to be thrown as “errored”;
Show the first deprecation notice it encountered;
Exit with a non-0 exit code (2), which will fail a CI build.
As of PHPUnit 9.5.10/8.5.21, if a PHP native deprecation notice is encountered, PHPUnit will:
Show a test which causes a PHP deprecation notice to be thrown as “risky”;
Show all deprecation notices it encountered;
Exit with a 0 exit code, which will pass a CI build.
To follow or contribute to this review, see Trac #54183.
Why is this a problem?
These deprecations will become errors in the next PHP major and they will still need to be fixed. As CI builds pass, the deprecations go unnoticed. This means more deprecations remaining in WordPress Core, and would lead to more reports of deprecation notices from end-users.
What’s changing in WordPress Core?
The single site and multisitemultisiteUsed 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 PHPUnit configuration files for WordPress Core now include the following attributes:
This will cause CI builds to fail when a native PHP deprecation notice is encountered, meaning that deprecation notices can not go unnoticed.
Are there any negatives?
Only the first deprecation notice will be shown for a test, and there may be more issues hiding behind a deprecation.
What’s coming in PHP 8.2
A significant change is coming in PHP 8.2 which could impact your themes and plugins. The RFC to deprecate dynamic properties was approved. See the RFC for more information.
Props to @costdev and @jrf for contributing to this 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., and to @costdev, @antonvlasenko, @javiercasares, and @andraganescu for reviewing.
You must be logged in to post a comment.