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.
Following the PHP conversation at WordCamp US, a group of WordPress and PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher contributors met on November 18th for a call to keep that discussion going. The aim was both to get to know each other better and to talk about important topics impacting our respective communities. What follows is a summary of the discussion. The call was held under the Chatham House Rule, so points are summarized without attribution, and nothing below should be read as a decision by either project.
Attendees
Names listed with consent. Anne McCarthy, Jason Adams, Eric Mann, Benjamin Eberlei, Jonathan Desrosiers, Elizabeth Barron, Sebastian Bergmann, Mike Auteri, Konstantin Obenland, Volker Dusch, Dennis Snell, Lynn Griffith, Jake Spurlock, Weston Ruter.
PHP 8.6 readiness
WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. is in good shape for 8.6. Two issues surfaced during testing:
TrueType fonts were being reported with the wrong file type. That was fixed upstream in RC7.
Confidence in PHP 8.6 compatibility in the upcoming WordPress 7.2 release is high. The 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. ecosystem remains the big unknown, and a developer note for 8.6 is being drafted for the Make WordPress Core blog to help extenders prepare.
A faster path between the projects
A recurring theme across meetings is that WordPress needs a way to say “we’ve noticed X, and it potentially could affect a lot of real sites” and have that land somewhere it will be seen. The PHP team is currently dealing with a large influx in AI generated 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 with hard to understand real world impact, which makes it genuinely hard to spot the issues affecting people. When talking about a way for the WordPress project to escalate without special treatment, it was made clear that if something impacts real users, the PHP team wants to know.
What was agreed in principle:
Bugs still go to the PHP 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 by the repository owner. https://github.com/ issue tracker. That remains the right front door to send things.
On top of that, the PHP Foundation advisory board channel can act as a trusted path for WordPress to flag reports with demonstrated real-world impact, so they rise above the noise.
WordPress will name one or two liaisons for a channel in the PHP Foundation’s slackSlackSlack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/, and PHP contributors are invited into #core-php and the hosting channels in WordPress Slack. Existing PHP spaces include the PHP Foundation Slack and the PHP community Discord.
There was also interest in a shared space spanning WordPress, Drupal, Joomla, and other large projects that rely on PHP for support issues, and in a similar line of communication with related projects, such as PHPUnit.
To make it easier to know “here is something that affects real people”, an idea was thrown out to point to an automated test that passes with current stable versions but fails with Alpha/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). of PHP-next. This makes it easy to both track the problem and understand clear impact.
Testing earlier and showing up in internals
WordPress core used to test against PHP nightly builds and stopped. The plan is to bring that back so regressions get reported well before beta rather than during it. Beyond testing, the clearest path to influence is participation in the PHP internals mailing list. The model to copy is Symfony who tests continuously against PHP’s main 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"., reports regressions immediately, and takes part in the yearly deprecation discussions. Sustained participation is how a project earns a voice, and eventually how individual contributors earn RFC voting rights. Worth noting that this happens through individuals, and the PHP Foundation supports the health and funding of the project rather than setting technical direction.
There’s also a data gap worth closing. PHP’s backward compatibility checks typically run against the top 2,000–5,000 package repositories, which misses nearly all WordPress ecosystem code. WordPress can supply function usage data from the plugin directory, plus usage statistics from hosts, to inform deprecation decisions. Tooling for this already exists on the WordPress side (veloria.dev) and can be pointed at specific functions on request.
Getting sites off old PHP
To set the stage first, here’s some context around PHP versions:
∼14.5% of WordPress sites are still on PHP 7.4.
∼3% of WordPress sites are on PHP 8.0.
∼9% of WordPress sites are on PHP 8.1.
PHP 8.2 is approaching the end of its security support.
WordPress does the work to support each new PHP release on day one, but its long support window means Core rarely gets to use new language features, and plugin developers feel the same squeeze. This results in friction both ways in adopting the latest and maintaining older versions. As one member said, “The ‘cool feature, I can’t wait to use it in 2-3 years’ is real.”
Part of the discussion centered around encouraging plugin developers to raise their own minimum PHP versions, which pulls site owners and hosts along behind them. A parallel problem exists in the 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 ecosystem, where the lack of a modern baseline across hosts blocks things like vector search and newer commerce protocols.
Security is the strongest and most salient message available right now. Recent vulnerabilities have made it clear that infrastructure management is no longer optional, and public awareness of security updates has never been higher with patching becoming an accepted fact of life across phones, devices, and appliances. The messaging is fairly simple around “if you’re on a supported version, you’re safer”.
In discussing what would be compelling to hosts, it was discussed how they tend to weigh risk against reward. Historically that meant downtime risk, licensing and control panel costs, and support ticketticketCreated for both bug reports and feature development on the bug tracker. volume against the benefit of upgrading. The current climate lets hosts lead with security as the primary driver. Automated verification that a site will survive an upgrade remains hard because of the long tail of web applications but there might be a path to explore via WordPress Playground and site cloning approaches. For example, someone could use Reprint to clone their site into a WordPress Playground version running a more up to date version of PHP.
The topic came up of having a cross community interest group via the PHP Foundation centered on PHP upgrades that could cut across WordPress, Drupal, Joomla, Symfony, Laravel, etc. The PHP Foundation is seeing a steady influx of support requests for versions that are already unsupported which reflects how this is an ecosystem wide inertia problem rather than just a WordPress one.
PHP has no direct lever with hosts the way WordPress does with varying hosting channels. The PHP Foundation talks to sponsors and hosts mostly when issues come up on the mailing lists and hosts running old versions rarely engage upstream at all. Historically, it has helped to have built in pressure with the predictable support cycle (was every three years and now every four) which has forced hosts to either keep up to date or pay for extended support.
The plugin ecosystem
A few folks who had run large 7.4 → 8.x migrationMigrationMoving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. said the same thing that outdated plugins were the bottleneck. Unfortunately, it tends to be the case that the authors behind them are precisely the ones nobody can reach. Developers who are active in the community already tend to keep their code current.
A range of ideas were thrown out for how to possible address this, along with concerns:
More targeted outreach to plugin authors specific to PHP, using the same mailing list that’s used ahead of Core releases. Ideally, there could be a dedicated community manager that could surface what’s actually blocking authors (funding, contributors, time).
Better static analysis feedback that tells an author “you need only X to be compatible with these newer versions”. Tide was meant to do this but it never reached its potential. Today, the Plugin Check tool covers some of it. Currently, failed compatibility checks 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. theme updates, but only severe security failures block plugin updates.
Telling site owners what’s happening if a plugin is closed/removed as today the dashboard doesn’t tell the people running it.
Exploring AI-assisted upgrades since for many plugins, compatibility is probably a small code change rather than a big refactor. This would be a tricky thing to do right without being too heavy handed.
Plugin slugs are reserved permanently, so removal carries hijacking risk. Separately, registry operators in Europe may be liable for distributing known security problems.
Finally, it was noted how compatibility is a spectrum. A parse error is one thing and calling a function that no longer exists is another. Without comprehensive test suites, automated checks can only go so far.
Exploratory: sandboxing and required extensions
Two longer-horizon ideas came up for reducing what Core has to reimplement.
Adding a WebAssembly sandbox directly into PHP core. The argument made was that this belongs in core rather than as an optional extension, because frameworks can’t reliably build against something that may not be there. The payoff would be the ability to ship isolated, fast implementations of foundational standards handling (text encoding, HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers./XML parsing, image processing, URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org parsing) without waiting on platform upgrades, and to gate or isolate abandoned code. The mbstring case is illustrative: early versions have UTF-8 bugs, so WordPress polyfills multibyte functions in PHP, which is significantly slower than native execution.
The open question is cost under PHP’s shared-nothing model: binaries would need loading on every request, which could hurt on shared hosting. On the other hand, WordPress Playground already packages PHP itself into WebAssembly in a few megabytes, and a precompiled format loads fewer bytes and skips parsing stages compared to the equivalent userland code. Then again, it was wondered whether PHP polyfill implementations might be just as fast as the WASM module. Nothing was decided.
Making common extensions required was discussed since roughly 5% of hosts don’t have XML or Zip enabled, which forces WordPress to reimplement them. Bundling these as mandatory core dependencies in a future release (8.7 was floated) would remove that burden, which would give WordPress a concrete reason to raise its minimum supported version more aggressively.
AI
AI came up repeatedly, cutting both ways. It’s flooding the PHP tracker with low impact reports and making it harder to see real issues. It raises real concerns about chained vulnerabilities in generated code. And at the same time, it’s now capable of modernizing very large legacy codebases to current PHP in hours, which may be the single biggest practical lever on the upgrade problem. Both communities are working out what helpful versus unhelpful AI contribution looks like, and there was clear interest in comparing notes rather than each solving it alone.
Next steps
Names listed with consent.
Add PHP nightly back to the WordPress core test suite (@desrosj)
Share a short list of WordPress folks to join the appropriate PHP channels, and connect PHP contributors into WordPress Slack (@annezazu)
Publish the WordPress developer note for PHP 8.6 (@desrosj)
Explore a cross-project interest group on PHP upgrades with PHP Foundation support (Elizabeth Barron/@annezazu)
Explore ways to flag incompatible plugins, reach plugin authors more proactively, and add more to the plugin checker to help folks.
Props to everyone who joined and to @desrosj and @westonruter for reviewing these notes.
This guide outlines major developer features and breaking changes in 7.2 and is published during 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). phase to help inform WordPress extenders, CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. developers, and everyone else interested in the latest WordPress development.
A quick search of the diff between 7.1.4 and the current trunktrunkA directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision. (7.2-RC1) reveals 21 new 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. (16 filters and 5 actions), 2,947 total files changed with 246,673 insertions and 51,993 deletions. Kudos to everyone who contributed to the 7.2 release!.
Below is a breakdown of the most important developer-related changes included in WordPress 7.2.
Media
WordPress 7.2 expands the client-side media processing capabilitiescapabilityA capability is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on their role. For example, users who have the Author role usually have permission to edit their own posts (the “edit_posts” capability), but not permission to edit other users’ posts (the “edit_others_posts” capability). introduced in WordPress 7.1, bringing support to additional media upload interfaces and improving the handling of animated images.
Client-side media processing
Client-side media processing is now available in the Media Library grid, Add New Media File screen, and media modal, in addition to the 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. This allows supported image operations, including resizing, format conversion, and sub-size generation, to take place in the browser rather than on the server.
Client-side processing is supported in Chromium-based browsers, including Chrome 137 and later and Edge 137 and later. Firefox and Safari do not currently support the required Document-Isolation-Policy and automatically fall back to server-side processing. Even in supported browsers, client-side processing requires more than 2 GB of device memory, sufficient processing capabilities, and compatible security settings. When these requirements are not met, WordPress uses the existing server-side upload process.
WordPress 7.2 updates cross-origin isolation handling and deprecates wp_start_cross_origin_isolation_output_buffer() and wp_add_crossorigin_attributes().
The new wp_send_document_isolation_policy_header() function replaces the former, while the latter has no direct replacement. Developers who customize cross-origin isolation behavior or modify script attributes should review these changes.
SVG icons in the adminadmin(and super admin) bar and menu
WordPress 7.2 continues the modernization of administration interfaces by replacing Core Dashicons font glyphs in the admin menu and admin bar with inline SVG icons.
This builds on the SVG Icon 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. introduced in WordPress 7.1, providing a more consistent icon system throughout the administration interface.
Most existing plugins and themes will continue working without modification. However, custom admin color schemes, icon replacements, and CSSCSSCascading Style Sheets. targeting Dashicons pseudo-elements may require updates to accommodate the new SVG markup.
Developers can use registered, namespaced SVG icon names in administration menus and toolbar nodes. The new icon argument for WP_Admin_Bar::add_node() provides a standardized way to specify toolbar icons.
The developer note includes detailed compatibility guidance for custom admin color schemes, CSS selectors, icon replacements, and modifications to Core admin bar nodes.
Building on the text shadow styling capabilities introduced in WordPress 7.1, WordPress 7.2 adds textShadow typography block support, text shadow presets, and editor controls.
The Paragraph and Heading blocks support text shadows by default. Custom blocks can opt into the feature by declaring supports.typography.textShadow in their block.json metadata.
Theme authors can define custom text shadow presets through settings.typography.textShadowPresets in theme.json. These presets are available through Global Styles and the Typography panel of supported blocks.
WordPress includes two default presets, Light and Strong. Themes can customize or disable the defaults, and preset values are exposed through generated CSS custom properties and utility classes.
The styles.typography.textShadow property introduced in WordPress 7.1 also supports preset references in 7.2, allowing themes and blocks to use shared text shadow definitions.
WordPress 7.2 introduces changes to editor interfaces and component libraries, improving consistency with the WordPress Design System while providing new functionality and migrationMigrationMoving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. paths for 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. developers.
Options and View menus
The Options and View menus in the post and site editors now use the Menu component from @wordpress/ui.
The updated menus provide improved keyboard navigation, 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) semantics, and more consistent interactions with other WordPress interface components.
Existing integrations using PluginMoreMenuItem, PluginSidebarMoreMenuItem, and PluginPreviewMenuItem remain supported. However, plugin menu items now appear in a Panels submenu, and the previously undocumented as prop is deprecated and ignored.
Developers with custom menu styling or automated tests targeting the previous component markup should review their implementations, particularly selectors that depend on @wordpress/components classes.
WordPress 7.2 completes the migration of @wordpress/components from Emotion to SCSS Modules, reducing styling runtime and build overhead.
Most integrations using documented component properties and className will not require changes. However, developers relying on Emotion-specific behavior, generated class names, or custom styling implementations should review the migration guidance.
The release also introduces changes to FontFamilyControl styling and adds a presentation prop to ColorPalette, GradientPicker, and DuotonePicker, providing more explicit control over swatch interaction and accessibility semantics.
The existing asButtons prop is deprecated in favor of presentation.
Several components are also deprecated, with removal scheduled for WordPress 7.4:
Animate
Divider
Elevation
ResponsiveWrapper
Scrollable
Surface
Tip
ZStack
Developers should review the recommended alternatives and begin migrating existing implementations.
WordPress 7.2 includes changes to the build process for several @wordpress/* packages to prevent CSS module class name collisions when different versions of the same package are loaded on a page.
Previously, bundled copies of packages could generate identical CSS class names despite containing different styles. This could cause styles from one package version to affect components from another.
The updated build process ensures CSS module class names change when their corresponding CSS changes.
Plugin developers bundling their own copies of affected packages should update to the fixed versions or later:
@wordpress/ui — 0.26.0
@wordpress/dataviews — 22.0.0
@wordpress/admin-ui — 3.1.0
@wordpress/grid — 0.11.0
@wordpress/components — 44.0.0
Plugins compiling CSS modules using @wordpress/build should update to version 0.27.0 or later and rebuild their assets.
Plugins loading @wordpress/components through the shared wp-components script will receive the corrected version included with WordPress 7.2.
WordPress 7.2 introduces a public API for custom block styling controls to read and update styles for the currently selected viewport or pseudo state in the block editor.
The @wordpress/block-editor package provides the getSelectedBlockStyleState and hasSelectedBlockStyleState selectors to determine the selected state, along with the getStyleForState() and setStyleForState() helpers for reading and updating the corresponding block styles.
Developers can use the new style-state group in InspectorControls to display custom controls when a viewport or pseudo state is selected. The same group is also available in BlockControls for displaying toolbar controls when a viewport state is active.
For integrations requiring viewport media queries, the @wordpress/global-styles-engine package exports getViewportMediaQueries(), while PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher developers can use the corresponding wp_get_viewport_media_queries() function. Both support custom breakpoints and use Core defaults of 480px for mobile and 782px for tablet when no values are supplied.
These additions allow custom block controls to integrate with responsive and state-aware styling without implementing separate mechanisms for managing style attributes.
Permissions, input handling, and JSONJSONJSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. output
WordPress 7.2 introduces several improvements to the Abilities API, making permission checks, input handling, and JSON responses more consistent across execution paths.
The new required_capabilities registration argument allows developers to declare capabilities that must be satisfied for every execution of an ability. These are checked before the permission_callback, which can now be omitted when the declared capabilities fully cover the ability’s permission requirements. The new has_required_capabilities query argument also allows abilities to be filtered during discovery based on the current user’s capabilities.
Input handling is now standardized through WP_Ability::prepare_input(), which normalizes, validates, and sanitizes input according to the registered schema. Both direct PHP execution and REST requests use this preparation process, ensuring callbacks receive consistent values. Developers calling check_permissions() directly must prepare input first, while sanitization failures now return an ability_invalid_input error rather than falling back to unsanitized values.
WordPress 7.2 also introduces wp_prepare_json_value_for_client() and updates wp_prepare_json_schema_for_client() to preserve the distinction between JSON objects and arrays. Empty values declared as objects are serialized as {} rather than [], including nested values. Developers implementing custom transports should use these helpers when preparing ability results for JSON output.
Plugin developers should review existing permission callbacks, input type assumptions, and JSON response handling, particularly when maintaining compatibility with earlier WordPress versions.
New HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. rendering and navigation capabilities
WordPress 7.2 introduces several improvements to the Interactivity API, including a new directive for rendering HTML, additional client-side navigation state, and the removal of previously deprecated behaviors.
The new data-wp-html directive allows developers to render HTML from the Interactivity API store. Values must be explicitly marked using asDangerousHTML() in JavaScriptJavaScriptJavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser.
https://www.javascript.com or wp_interactivity_as_dangerous_html() in PHP.
These functions do not sanitize HTML, so developers must ensure that content is trusted and appropriately sanitized before rendering it.
The core/router store also introduces state.navigating and state.initiator, allowing blocks to determine when client-side navigation is occurring and identify the region that initiated it.
Several previously deprecated behaviors have been removed, including data-wp-ignore, two-hyphen unique directive identifiers, and negation of function references in directives.
Developers relying on these behaviors should update their implementations to maintain compatibility.
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/
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., comments, and CORS handling
WordPress 7.2 introduces three REST API changes affecting revision metadata, comment status parameters, and Cross-Origin Resource Sharing (CORS) headers.
Revision and autosave responses now include only metadata registered for revisions. This prevents metadata that is not revisioned from being inadvertently overwritten when restoring content.
Developers can enable revision support for registered metadata using revisions_enabled or the wp_post_revision_meta_keysfilterFilterFilters 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..
The comments endpoint now handles the status parameter as an array rather than a string. Plugins and integrations that inspect or modify this parameter should review their implementations.
Additionally, the new rest_allowed_cors_methods filter allows developers to customize the Access-Control-Allow-Methods response headerHeaderThe header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes.. REST responses that explicitly set this header will retain their specified value.
These changes are particularly relevant to plugins that interact directly with revision metadata, customize REST API requests, or manage cross-origin requests.
WordPress 7.2 introduces a new /random/ endpoint that redirects visitors to a randomly selected published post.
The feature integrates with existing rewrite rules and query APIs, supporting random content discovery across eligible post types, taxonomies, and author archives.
Custom post types can control participation through the new randomable argument in register_post_type().
Developers can customize random content queries using existing query hooks and the new wp_is_random_content_query() helper. The wp_enable_random_content_redirect filter can disable the feature entirely.
The random URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org base is configurable through Permalink Settings, providing flexibility for sites with different URL structures.
WordPress 7.2 adds NO_BACKSLASH_ESCAPES to the list of incompatible SQL modes disabled when WordPress establishes a database connection.
WordPress relies on backslashes when escaping special characters in SQL queries. Enabling NO_BACKSLASH_ESCAPES can cause queries to fail or produce unexpected results, particularly on hosting environments that enable this mode by default.
The change is applied to the WordPress database session through wpdb::set_sql_mode() and does not modify server-wide SQL settings.
Developers who explicitly require this mode can modify the existing incompatible_sql_modes filter through a db.php drop-in, although doing so may introduce compatibility issues with Core.
WordPress 7.2 updates jQuery Migrate to version 3.6.0 as part of ongoing preparations for a future upgrade to jQuery 4.
The updated jQuery Migrate library helps developers identify deprecated functionality and compatibility issues in plugins and themes before the eventual transition.
The current roadmap tentatively targets WordPress 7.3 for updating jQuery and related dependencies, subject to testing.
Disabling jQuery Migrate by default is planned for a later release, potentially WordPress 7.5 or 7.6, depending on testing and the impact on the ecosystem.
Plugin and theme developers are encouraged to test their JavaScript against the updated library and address deprecation notices in preparation for these changes.
WordPress 7.2 also includes numerous smaller enhancements, 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 improvements across Core and the block editor.
WordPress 7.2 includes a number of smaller developer-facing changes across administration, metadata, application passwords, permalinks, script loading, and automatic updates.
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. covers changes that may affect plugins, themes, custom integrations, and development workflows but do not require separate developer notes.
WordPress 7.2 includes several smaller changes to the Block Editor and Core Data packages, including the removal of deprecated properties, adjustments to stylesheet locations, improved handling of block-level custom CSS, and more efficient data store subscriptions.
The __experimentalGroup prop has been removed from InspectorControls and InspectorControls.Slot. Developers should use the stable group prop instead, which has been available since WordPress 6.2. Existing implementations using __experimentalGroup will now render controls in the default settings group rather than their intended panel.
The deprecated __experimentalImageEditor component has also had its stylesheet moved from @wordpress/block-library to @wordpress/block-editor. Developers still using this component should update their stylesheet imports.
Additional CSS defined in a block’s Advanced panel now applies to blocks rendered by their parent, such as Navigation Link blocks within a Navigation block. No code changes are required, but previously ignored CSS rules may now take effect.
Finally, registry.subscribe( listener, storeName ) now handles subscriptions to unregistered stores more efficiently. Listeners are connected to their specified store when it becomes available, rather than receiving updates from every registered store.
Thank you to everyone who contributed to this version of WordPress, whether through code, testing, or something else – your contributions matter and help Make WordPress.
WordPress 7.2 includes a number of smaller developer-facing changes that are not covered by a dedicated developer note. This post collects them, along with any compatibility considerations for plugins, themes, and hosting environments.
Users and Application Passwords
Email notification when an application password is created
When an application password is added to a user account, WordPress 7.2 sends an email to that user. The new wp_application_password_created_notification() function is hooked to the existing wp_create_application_password action. The email is sent whenever WP_Application_Passwords::create_new_application_password() succeeds, whether the password was created from the profile screen, the Authorize Application screen, the 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/, or by a direct call to the method.
No email is sent when the user does not exist, when the user’s email address is not valid, or when the application password has no name.
Two filters control the notification:
wp_send_application_password_created_email (bool $send, WP_User $user, array $new_item) decides whether the email is sent.
wp_application_password_created_email (array $email, WP_User $user, array $new_item) filters the to, subject, message, and headers values passed to wp_mail().
The message supports these placeholders, which are replaced after 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. runs: ###USERNAME### (display name), ###APPLICATION_PASSWORD_NAME###, ###ADMIN_EMAIL###, ###EMAIL### (the user’s email address), ###SITENAME###, and ###SITEURL###. The subject is passed through sprintf() with the site title, so a filtered subject should keep its %s placeholder and escape any literal percent sign as %%.
$new_item holds the stored details of the new password: uuid, app_id, name, password (a hash, not the plain-text password), created, last_used, and last_ip.
// Skip the notification for passwords created by a specific application.
add_filter(
'wp_send_application_password_created_email',
static function ( $send, $user, $new_item ) {
if ( 'b1c4a7e2-5f3d-4e8a-9c21-7d6f0e3b2a14' === $new_item['app_id'] ) {
return false;
}
return $send;
},
10,
3
);
// Add a line to the notification.
add_filter(
'wp_application_password_created_email',
static function ( $email, $user, $new_item ) {
$email['message'] .= "\n\n" . sprintf(
/* translators: %s: Profile screen URL. */
__( 'Review application passwords: %s', 'my-plugin' ),
admin_url( 'profile.php' )
);
return $email;
},
10,
3
);
To turn the notification off completely, return false from wp_send_application_password_created_email, or remove the callback:
Application password data passed to 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. is now unslashed
WP_Application_Passwords::create_new_application_password() and WP_Application_Passwords::update_application_password() expect slashed data. CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. callers have always passed it: the REST API controller wraps its input in wp_slash(), and the Authorize Application screen passes values from $_POST. Before 7.2, the methods passed that slashed data to their actions unchanged, so a name such as Bob's App reached callbacks as Bob\'s App. It also appeared that way in the new notification email.
In WordPress 7.2:
Both methods call wp_unslash() on their input before using it.
The wp_create_application_password action receives unslashed $new_item and $args values.
The wp_update_application_password action receives unslashed $item and $update values.
The $new_item array returned by create_new_application_password() is unslashed.
The protected set_user_application_passwords() method now slashes the passwords before calling update_user_meta(). Backslashes in stored names are kept when another application password on the same account is created, updated, used, or deleted. Previously they could be stripped by any later save.
Compatibility considerations:
Callbacks on wp_create_application_password or wp_update_application_password that call wp_unslash() themselves should stop doing so. Otherwise they will strip real backslashes from the values.
Code that calls create_new_application_password() or update_application_password() with raw, unslashed values should wrap them in wp_slash(). This matches the documented contract (Expected to be slashed) and is unchanged from earlier versions, where update_user_meta() unslashed the stored values. Unslashed input containing backslashes loses them either way.
WP_DEBUG is enabled by default for the local environment type
When WP_DEBUG is not defined, wp_initial_constants() now sets it to true when the environment type is local, as it already did for development. The defaults are now:
Environment type
Default WP_DEBUG
local
true (previously false)
development
true
staging
false
production
false
As before, WP_DEBUG is also true whenever a development mode is set through WP_DEVELOPMENT_MODE.
This only affects sites where WP_ENVIRONMENT_TYPE is set to local, as a constant or an environment variable, and WP_DEBUG is not defined. A value defined in wp-config.php still takes precedence.
WP_DEBUG_DISPLAY still defaults to true, so these sites will now display PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher notices, warnings, and deprecation messages. As before, wp_debug_mode() turns off display_errors for REST API, Ajax, XML-RPC, and JSONJSONJSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. requests. To log errors instead of displaying them, or to keep the previous behavior, define the constants explicitly:
// Keep debugging on but log instead of display.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
// Or restore the pre-7.2 default.
define( 'WP_DEBUG', false );
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 and Metadata
New register_site_meta() and unregister_site_meta() functions
Site 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. (the blog meta type, stored in the blogmeta table) can now be registered with a wrapper function, as post, term, comment, and user meta already could:
get_object_subtype() now supports the blog object type. For an existing site on a multisite install it returns 'blog'. For an invalidinvalidA resolution on the bug tracker (and generally common in software development, sometimes also notabug) that indicates the ticket is not a bug, is a support request, or is generally invalid. site ID, or on a single-site install, it returns an empty string. Site meta registered with 'object_subtype' => 'blog' is therefore resolved by get_registered_metadata(), sanitize_meta(), and the registered default value handling. Before 7.2, only site meta registered without an object subtype took effect. Callbacks on the get_object_subtype_blog filter now receive 'blog' instead of an empty string for existing sites.
Both functions are defined in wp-includes/ms-site.php, which is loaded only on multisite, in the same way as add_site_meta() and the other site meta functions. Code shared with single-site installs should check is_multisite() first. Site meta also requires the blogmeta table; is_site_meta_supported() reports whether it exists.
As with register_term_meta() and register_post_meta(), register_site_meta() registers the key for the whole object type unless object_subtype is passed in $args. WordPress core does not include a REST API endpoint for sites, so the show_in_rest argument has no effect in core.
To free up space in the toolbar, the top-level my-account item now shows only the user’s display name and avatarAvatarAn avatar is an image or illustration that specifically refers to a character that represents an online user. It’s usually a square box that appears next to the user’s name.. The “Howdy, %s” greeting now appears in the user-info item inside the user menu.
Top-level my-account node title, before and after:
When a user’s display name is empty, both items fall back to the user login.
The menu_title meta value of the my-account node, used as the accessible name of the user menu, is now the display name without the greeting.
The .username span is now always output. It has the hidden attribute when the display name and the user login are the same, so it can be shown or hidden while the display name is edited on the profile screen.
The new user-display-name class marks every element that contains the display name. The profile screen uses it to update the toolbar when the “Display name publicly as” field changes.
The greeting wrapper keeps the display-name class, so adminadmin(and super admin) color schemes that style #wp-admin-bar-user-info .display-name continue to apply.
Compatibility considerations:
The Howdy, %s string and its translator comment are unchanged. Plugins that change the greeting through the gettext filter will now change the text in the user menu, not the top-level toolbar item.
Code that edits the my-account node title, for example with str_replace() on “Howdy”, will no longer find the greeting there. Such code can target the user-info node instead, or set the my-account title after core adds it. Core adds that node at priority 9991 of admin_bar_menu:
Stylesheets that change the display value of #wp-admin-bar-user-info .username should make sure .username[hidden] stays hidden. Core includes a display: none rule for it.
On single-site installs, Appearance > Add Theme is a submenu item again, linking to theme-install.php. It requires the install_themescapabilitycapabilityA capability is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on their role. For example, users who have the Author role usually have permission to edit their own posts (the “edit_posts” capability), but not permission to edit other users’ posts (the “edit_others_posts” capability). and has the hide-if-no-js class. The theme installer and the theme upload screen now set $submenu_file to theme-install.php, so Add Theme is highlighted on those screens instead of Themes. The Networknetwork(versus site, blog) Admin Themes menu is unchanged.
The new item takes position 6 in $submenu['themes.php'], and the core items after it move down by one:
Item
7.1 key
7.2 key
Themes
5
5
Add Theme
n/a
6
Editor / Design / Patterns
6
7
Customize
7
8
Widgets (classic themes)
8
9
Fonts
9
10
Menus
10
11
HeaderHeaderThe header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. / Background
15 / 20
15 / 20 (unchanged)
Code that reads, replaces, or unsets $submenu['themes.php'] entries by numeric key may now affect a different item. Removing or finding items by slug is not affected by position changes:
add_action(
'admin_menu',
static function () {
// Remove the Add Theme item.
remove_submenu_page( 'themes.php', 'theme-install.php' );
},
999
);
Plugins that add a submenu item at a fixed position in Appearance may want to check its placement.
New .delete-linkCSSCSSCascading Style Sheets. class
A new .delete-link class is available for links that perform a destructive action. It uses the same colors as .button-link-delete in each admin color scheme, including the darker color on hover and focus. Unlike .button-link-delete, it does not need to be combined with .button-link, so it can be added to a plain <a> element. The rules are scoped to .wp-core-ui.
The class is defined in the admin color scheme stylesheets. The Fresh color scheme does not load a color scheme stylesheet, so the class has no effect when Fresh is selected.
Obsolete script compression constants and compression test removed
load-scripts.php and load-styles.php have not compressed their output since WordPress 4.9.9 (r43580). The code that configured and tested that compression was still present. WordPress 7.2 removes it:
The COMPRESS_SCRIPTS, COMPRESS_CSS, and ENFORCE_GZIP constants are no longer read or documented. Defining them has no effect. COMPRESS_SCRIPTS and COMPRESS_CSS are also no longer listed on the Site Health Info tab (r64321).
The $compress_scripts and $compress_css globals are kept for code that reads them, but now default to false. A value already set by a 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. is left unchanged.
compression_test() and wp_ajax_wp_compression_test() are deprecated and do nothing. The compression test no longer runs in the admin footer.
The wp-compression-test Ajax action is no longer registered.
The can_compress_scripts option is no longer set or primed. Single sites already delete it on a database upgrade, as it is in the list of unused options. On multisite, where it is a network option, upgrade_network() now deletes it.
Code that defines the constants can remove them. Code that calls compression_test() will trigger a deprecation notice when WP_DEBUG is enabled.
These changes are part of the wider retirement of script and style concatenation in WordPress 7.2 (#57548, r64585). With that change, script_concat_settings(), which sets the globals above, is itself deprecated.
A .git file is now detected as a version-control checkout
WP_Automatic_Updater::is_vcs_checkout() decides whether automatic updates are skipped because a site is under version controlversion controlA version control system keeps track of the source code and revisions to the source code. WordPress uses Subversion (SVN) for version control, with Git mirrors for most repositories.. It previously checked for a .git directory with is_dir(). In a GitGitGit is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system.
https://git-scm.com/ worktree or submodule, .git is a plain file that points to the repository, so such sites were treated as not under version control, and automatic updates ran.
is_vcs_checkout() and the Site Health check WP_Site_Health_Auto_Updates::test_vcs_abspath() now use file_exists(). A .svn, .git, .hg, or .bzr entry of either type, in the checked directory or any directory above it, marks the site as a checkout. The contents of a .git file are not read.
Sites that run from a Git worktree or submodule will therefore no longer receive automatic core, plugin, theme, or translationtranslationThe process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. updates. Site Health and the update screens report the reason. The automatic_updates_is_vcs_checkout filter still decides the final result:
WordPress 7.2 updates the Abilities 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. to make permissions, input handling, and JSONJSONJSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. output more predictable. Abilities can declare capabilitiescapabilityA capability is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on their role. For example, users who have the Author role usually have permission to edit their own posts (the “edit_posts” capability), but not permission to edit other users’ posts (the “edit_others_posts” capability). required for every call. Direct PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher calls and REST requests sanitize input according to the ability’s schema, and JSON results preserve the object or array shape that the schema declares. The examples below show what ability authors and integration developers need to change.
Declare required capabilities
The new required_capabilities registration argument accepts a list of non-empty capabilitycapabilityA capability is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on their role. For example, users who have the Author role usually have permission to edit their own posts (the “edit_posts” capability), but not permission to edit other users’ posts (the “edit_others_posts” capability). strings. During permission checking, WordPress checks each capability with current_user_can(). All listed capabilities must pass before the permission callback runs.
Use this list for requirements that apply to every invocation. For example, core/settings-get always requires manage_options. Its registration declares that capability and omits permission_callback. This excerptExcerptAn excerpt is the description of the blog post or page that will by default show on the blog archive page, in search results (SERPs), and on social media. With an SEO plugin, the excerpt may also be in that plugin’s metabox. shows its permission arguments:
array(
'required_capabilities' => array( 'manage_options' ),
// No permission_callback: the capability covers every call.
);
When permissions also depend on the input, keep that check in permission_callback. The following ability requires edit_posts for every call, then checks whether the user can edit the requested post. The example assumes that the my-plugincategoryCategoryThe 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging. is already registered:
add_action(
'wp_abilities_api_init',
static function () {
wp_register_ability(
'my-plugin/get-post-title',
array(
'label' => __( 'Get post title', 'my-plugin' ),
'description' => __( 'Read the title of a post you can edit.', 'my-plugin' ),
'category' => 'my-plugin',
'required_capabilities' => array( 'edit_posts' ),
'input_schema' => array(
'type' => 'integer',
'minimum' => 1,
),
'output_schema' => array( 'type' => 'string' ),
'permission_callback' => static function ( int $post_id ): bool {
return current_user_can( 'edit_post', $post_id );
},
'execute_callback' => static function ( int $post_id ): string {
return get_post_field( 'post_title', $post_id, 'raw' );
},
'meta' => array(
'show_in_rest' => true,
'annotations' => array( 'readonly' => true ),
),
)
);
}
);
Choose the permission arguments according to the ability’s requirements:
If a non-empty required_capabilities list covers every permission check, omit permission_callback. You do not need __return_true.
If a call needs additional checks, such as access to a particular post, provide a callback. The declared capabilities are checked first.
If required_capabilities is empty or omitted, a valid permission_callback is required. Use __return_true only when the ability is intentionally executable by everyone; otherwise, provide the appropriate permission check.
The existing wp_ability_permission_resultfilterFilterFilters 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. still receives the result and can override it, including a denial caused by a missing capability.
Filter discovery by capabilities
Integrations can read the declaration with $ability->get_required_capabilities(). It is also included in REST discovery responses.
To request abilities whose declared requirements the current user meets:
The REST collection supports the same opt-in filter:
GET /wp-json/wp-abilities/v1/abilities?has_required_capabilities=true
This filter does not run permission callbacks or the wp_ability_permission_result filter. Abilities without declared capabilities pass this filter (other discovery filters can still exclude them), and an ability that passes discovery can still deny execution for a particular input. In the example above, an author may discover the ability while lacking permission to read another author’s draft through it.
Declare only the capabilities needed for every invocation. Putting an input-specific requirement in the static list can hide an ability from users who are allowed to execute it with other inputs.
Related ticketticketCreated for both bug reports and feature development on the bug tracker.: #66325.
Prepare input consistently across execution paths
WP_Ability::prepare_input() now handles the input preparation used by execute():
Normalize the input, including applying a top-level schema default when the input is null.
Validate it against the input schema.
Sanitize the validated value using the schema.
The permission and execute callbacks receive the prepared value. For the example above, $ability->execute( '123' ) passes the integer 123 to both callbacks. Schema formats also matter: a string declared with format: text-field has its tags stripped during sanitization.
Validation runs before sanitization. InvalidinvalidA resolution on the bug tracker (and generally common in software development, sometimes also notabug) that indicates the ticket is not a bug, is a support request, or is generally invalid. values are rejected before casting or property removal can hide the error. A failure during preparation returns a WP_Error and stops execution.
The REST execution controller prepares the original request input independently for its permission check and for execution. Custom integrations that call execute() can pass the raw input and let the ability prepare it.
Number inputs become floats
A number schema converts an integer such as 10 to the float 10.0 in direct PHP calls, matching REST behavior. Use an integer schema when a callback needs integers. Callbacks using number should accept floats and avoid checks such as is_int( $input ) or $input === 10.
Other schema conversions include the string "false" becoming the boolean false, and "1,2" becoming array( 1, 2 ) for an array-of-integers schema.
Sanitization failures stop execution
Input can pass validation and still fail sanitization. For example, array( '1', '01' ) contains distinct strings, but both become the integer 1. That fails an array-of-integers schema with uniqueItems: true.
In 7.2, this failure returns ability_invalid_input, including when it occurs in a nested field, before permission or execute callbacks run. The REST endpoint returns 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. 400. It no longer falls back to the original unsanitized input when one field fails; such a fallback could otherwise leave a permission callback with the string "false", which is truthy in PHP.
Direct permission checks need prepared input
check_permissions() does not prepare its input. If an integration calls it directly, it must first call prepare_input() and stop on an error:
$ability = wp_get_ability( 'my-plugin/get-post-title' );
if ( null === $ability ) {
return new WP_Error( 'example_missing_ability', 'The ability is not registered.' );
}
$input = $ability->prepare_input( '123' );
if ( is_wp_error( $input ) ) {
return $input;
}
// $input is now the integer 123.
$permission = $ability->check_permissions( $input );
if ( is_wp_error( $permission ) ) {
return $permission;
}
if ( true !== $permission ) {
return new WP_Error( 'example_forbidden', 'You cannot edit this post.' );
}
// This checks permission only. To run the ability, use execute().
A direct permission check does not execute the ability. For execution, call execute(); it performs preparation and checks permissions as part of the normal lifecycle.
Calling normalize_input() alone is insufficient: it does not include schema validation and sanitization. Likewise, validate_input() returns a validation result, not a prepared value.
A custom permission-check path that already normalizes and validates input can replace those steps with prepare_input(). Keep the error check before calling check_permissions():
This adds schema sanitization to the custom path. Continue to handle the permission result as shown above.
The REST controller’s sanitize_input_for_ability() method is deprecated in 7.2 and is no longer registered as the input sanitizer. Its compatibility implementation returns the input unchanged.
An empty PHP array encodes as [], even when the schema describes an object. That can leave a client expecting an object with an array instead.
The shared wp_prepare_json_schema_for_client() function prepares schemas for use outside WordPress’s server-side validation. It removes unsupported keywords and prepares nested schemas and their existing defaults, so it is useful wherever a 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. exposes a schema to a REST client or frontend. In 7.2, its default-value handling preserves empty objects according to the schema:
The Abilities 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/ applies these helpers when preparing schemas and execution results, including root empty objects and objects inside top-level lists. The WordPress AI Client also prepares ability results using the output schema. A direct PHP call to $ability->execute() still returns the callback’s result without this JSON representation step. Custom transports that serialize the result should prepare it with the ability’s output schema before encoding it.
This preparation does not perform full schema validation or fill in missing defaults. It changes the representation of existing values. An empty array stays [] when the matching schema permits an array; a schema that permits both objects and arrays does not force it to become {}.
Plugins supporting earlier WordPress versions must use version-appropriate registration arguments, retain their existing permission callbacks, and guard use of the new methods and functions. Omitting a permission callback in favor of required_capabilities requires WordPress 7.2.
Review callbacks that depend on the original PHP type or unsanitized input. Check custom permission-check paths for missing preparation, and apply JSON preparation at serialization boundaries when using a custom transport.
Ability authors should declare type: object or type: array explicitly in the output schema, including nested properties whose empty values matter. A client consuming an object schema should expect {} for an empty result. Update code that depended on receiving [] in that case. Results declared as arrays continue to use [].
For a custom transport, prepare a successful result immediately before JSON encoding. Here, $ability is an already resolved WP_Ability, and $raw_input is the caller’s input:
The helper preserves the schema’s JSON shape. It does not grant permission or replace execution. Keep errors on the transport’s normal error path instead of preparing them as successful results.
Please test these changes against your abilities and share any compatibility concerns on the related tickets.
For as long as the WordPress project has used SlackSlackSlack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/, wordpress.org has fed notifications for every new ticketticketCreated for both bug reports and feature development on the bug tracker. from TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. and every commit to develop.svn.wordpress.org into the #core channel to keep contributors aware of contributor activity. This practice also extends to the individual component channels (for example, #core-media) using the Component ticket field and a list of relevant file paths, and some channels even subscribe to activity on relevant 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 by the repository owner. https://github.com/ repositories.
This has worked well for over a decade. But recently it’s become clear that the volume of activity is untenable. Channels meant for discussions now function as pseudo-firehose channels. Important discussions become difficult to find and easy to miss entirely, and many contributors have expressed that they are unable to keep up or follow along.
Given this, it’s time to rethink how Trac & GitHub notifications are posted in Slack.
What has changed?
As of r15625-meta, the following changes have been made to Trac notifications in Slack:
Individual #core-{component} channels no longer receive commit notifications. These are now fed into #core-{component}-commits.
Individual #core-{component} channels no longer receive new ticket notifications. These are now fed into #core-{component}-newtickets.
New #core-{component}-firehose channels have been created and serve as a true firehose for all activity directly belonging to the component (new tickets, commits, and all comments on tickets with Component set to the matching value).
Commit notifications in #core remain, but now only show the first line (short description) of each commit message.
New ticket notifications in #core are unchanged.
New #core-gutenberg-firehose, #core-gutenberg-commits, and #core-gutenberg-newtickets channels have been created and are subscribed to the corresponding activity from the WordPress/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/ repository on GitHub.
With the new #core-gutenberg-* channels, #core has been unsubscribed from WordPress/gutenberg commit notifications.
#core-editor-commits has also been unsubscribed from WordPress/gutenberg commit notifications and will now only show Editor component commits from develop.svn.wordpress.org. Join the #core-gutenberg-commits channel for the activity previously found here.
The behavior for individual focuses that do not overlap with a component (for example, rest-api focus and REST API component) is unchanged:
Focuses that double as components continue to post new ticket notifications to the main channels (multisite, privacy, and rest-api), but commits now only appear in the new -commits and -firehose channels.
The goal of these changes is to create targeted feeds that give contributors more control, allowing someone to follow or subscribe only to the specific activity streams that are relevant to them without drowning out discussion-based activity.
Were these channels created for every component?
Yes. -firehose, -newtickets, and -commits channels were created for every component, including those where the main channel had never existed. Main #core-{component} channels that didn’t already exist were not created. These channels were also created for components with an archived #core-{component} channel, which was left as archived.
What about subcomponents?
The notifications for each subcomponent have been configured to flow into the three channels belonging to the parent component, unless the subcomponent has its own channel. For example, the Notes subcomponent has #core-notes, so #core-notes-newtickets, #core-notes-commits, and #core-notes-firehose have been created.
What about other #core-name channels that do not map to a component?
Channels such as #core-test and #docs are not a part of this effort; only channels that explicitly belong to a component have been updated. More channels can be updated to follow the same pattern in the future wherever it makes sense. If a non-component-mapped channel has a need for a -newtickets, -commits, and -firehose channel, then please comment below for further assistance.
What about GitHub Activity?
These new channels are meant to only contain Trac/SVNSVNSubversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase. activity. As noted above, #core has been unsubscribed from the WordPress/gutenberg commit notifications because commits from that repository were drowning out important discussions.
Should component maintainers decide that a GitHub repository’s activity is important for their contributor group to follow, new notification channels can be considered. If a component you maintain would benefit from this, please comment below with the changes needed.
Why does #core-gutenberg-newtickets show open and close activity for issues?
The GitHub Slack integration does not currently support filtering issues notifications by action (opening or closing), so the channel has been subscribed to both for now. This could be set up using GitHub Actions, but that can be a follow up item if necessary.
AI is a Trac component. Why does #core-ai-firehose contain GitHub Activity?
Currently, a large amount of the AI-related work merged into Core is built out in several different repositories maintained on GitHub. The pre-existing subscriptions in this channel have been left as is for the time being.
Can I follow several components at once?
Yes! Because these are Slack channels, you are able to follow as many as you’d like. You can even follow new tickets for one component and commits for another.
Feedback
As always, none of these changes are permanent and adjustments can be made based on community feedback. Please share any you may have below!
A full list of channels created as a part of this change can be found in the collapsed details 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. below.
Props @jeffpaul, @jorbin, @westonruter for pre-publish review, and @obenland for help on the 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. side.
In this post, you will find 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. for smaller changes to the editor in WordPress 7.2.
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
Removed __experimentalGroup prop from InspectorControls
WordPress 7.2 removes the __experimentalGroup prop from InspectorControls and InspectorControls.Slot. Use the group prop instead. (#83171)
The prop was stabilized as group in WordPress 6.2 (#47105). Since then, passing __experimentalGroup logged a deprecation warning that named WordPress 6.4 as the removal version. WordPress 7.2 completes that removal.
Code that still passes __experimentalGroup now renders its controls in the default group, with the block’s other settings. For example, controls meant for the Advanced panel now appear outside it. A ToolsPanelItem meant for a panel such as Typography renders without that panel around it.
To update, rename the prop. The group prop works in WordPress 6.2 and later, so no version check is needed:
// Before
<InspectorControls __experimentalGroup="advanced">
<TextControl label={ __( 'Custom ID' ) } value={ id } onChange={ setId } />
</InspectorControls>
// After
<InspectorControls group="advanced">
<TextControl label={ __( 'Custom ID' ) } value={ id } onChange={ setId } />
</InspectorControls>
For the Advanced panel, InspectorAdvancedControls is also available and sets group="advanced" for you.
Deprecated __experimentalImageEditor component: stylesheet moved
The @wordpress/block-editor npm package and the wp.blockEditor global export an __experimentalImageEditor component for building image cropping and editing interfaces. The component was deprecated in WordPress 7.1, so avoid using it.
If your code still uses it, note a CSSCSSCascading Style Sheets. change in WordPress 7.2. The component’s stylesheet was incorrectly defined in the @wordpress/block-library package. In 7.2 it moves to @wordpress/block-editor. Update any imports of the stylesheet to the new location.
Additional CSS now applies to blocks rendered by a parent block
Starting in WordPress 7.2, Additional CSS (set in a block’s Advanced panel) works for blocks that a parent block renders itself, such as a Navigation Link inside a Navigation block.
Before, that CSS was missing on the front end. CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. generated it only for blocks in a parent’s regular inner content. The Navigation block loads its inner blocks from a navigation menuNavigation MenuA theme feature introduced with Version 3.0. WordPress includes an easy to use mechanism for giving various control options to get users to click from one place to another on a site. post, so those blocks skipped that step.
Now the CSS is generated when each block renders, however its parent loaded it. Blocks that already worked are unaffected, and their CSS is not duplicated.
No code changes are needed. Rules that were previously ignored will now apply, so check for any you don’t want.
Mobile multi-selection and event handler compatibility
From WordPress 7.2, the Paragraph block supports native iOSiOSThe operating system used on iPhones and iPads. and Android multi-selection. To achieve this, the block opts in to moving the contenteditable wrapper from the block to the canvas wrapper.
The consequence is that editing event handlers (key, input, and composition events) no longer fire on the block but on the canvas element. This only affects the Paragraph block for now, which has been adapted. It will also affect other text blocks in the future, such as Heading and List Item. It will not affect non-core blocks unless they opt in when 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. becomes available.
It will, however, affect filters that add props to the Paragraph block. For example:
Such cases are covered by calling the listeners with a pseudo-SyntheticEvent. Any handler added this way should still be called, but there might be very subtle changes, such as the native event target pointing to the canvas rather than the block element. The target of the synthetic event has been adjusted to be the block.
registry.subscribe no longer listens to all stores when the store is not registered yet
Starting in WordPress 7.2, registry.subscribe( listener, storeName ) is more efficient when storeName isn’t registered at the time of the call.
Previously, the listener was attached to the registry-wide listener list, so it ran on every update from every store, both before and after the target store was registered. Now the registry keeps it as a pending listener and connects it to the store once it is registered, so the listener only runs for updates from that store.
Subscribing before a store is registered works as before, and the returned unsubscribe function still works. No code changes are needed. Code that relied on such a listener firing for unrelated stores will see fewer calls, but this was never documented behavior.
Custom 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. controls can now make use of the responsive and pseudo state styling system in the block editor. To implement this, controls for editing styles need to read and update the block’s style attribute for the state selected in the editor. 7.2 exposes a public 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. for this.
The following 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. and selectors from @wordpress/block-editor work with both viewport and pseudo states:
getSelectedBlockStyleState reads the selected state; hasSelectedBlockStyleState checks whether a non-default state is selected;
getStyleForState Returns the style object for the selected state; setStyleForState Sets the new style on the selected state.
By default inspector controls are hidden when a style state is selected. To display custom controls in the inspector when a viewport or a pseudo state is enabled, the style-state slot is available:
Calling getViewportMediaQueries with no parameters will return the default coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. media queries (with 480px for mobile and 782px for tablet).
PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher code can use the corresponding wp_get_viewport_media_queries helper:
Calling wp_get_viewport_media_queries with no parameters will return the default core media queries (with 480px for mobile and 782px for tablet). include_desktop defaults to false.
See the block editor data reference and 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/PR #82741.
The live meeting focuses on upcoming releases and CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development, with time for discussions and open floor.
If you have requests for help with a ticketticketCreated for both bug reports and feature development on the bug tracker. or another discussion topic, please post details in the comments section at the end of this agenda, or bring it up in Dev Chat during open floor.
New 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.:
The discussion section of the agenda is for discussing important topics affecting the upcoming release or larger initiatives that impact the Core Team. To nominate a topic for discussion, please leave a comment on this agenda with a summary of the topic, any relevant links that will help people get context for the discussion, and what kind of feedback you are looking for from others participating in the discussion.
Open floor 🎙️
Any topic can be raised for discussion in the comments, as well as requests for assistance on tickets. Tickets in the milestone for the next major or maintenance release will be prioritized.
Please include details of tickets / PRs and the links in the comments, and indicate whether you intend to be available during the meeting for discussion or will be async.
The last major jQuery update in WordPress was to version 3 back in 2020, and was a process carried out over multiple releases, with the final step culminating in the disabling of jQuery Migrate by default (this final step was never finalized at the time).
WordPress 7.2 will ship with jQuery Migrate 3.6.0 to prepare for updating to jQuery 4 in coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Doing so will help extenders catch deprecation notices in their code for features that may no longer be available in jQuery 4.
The planned process is currently:
Update jQuery Migrate in WordPress 7.2
Update to the latest release of jQuery and jQuery Migrate tentatively planned for WordPress 7.3 depending on test results. Updating to the latest jQuery UIUIUser interface and other libraries dependent on jQuery is also planned for 7.3.
Disable jQuery Migrate by default at the end of 2027 (WordPress 7.5 or 7.6, depending on the release cadence for next year), this is also dependent on testing and research into the potential impact on the ecosystem.
You can follow the progress of updating to jQuery 4 in #60478
The next release of the Contributor Toolkit adds step debugging with Xdebug. Set a breakpoint, load the page, and walk through CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. one line at a time. It’s in 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. now, and it needs your help before it ships.
The plan is for the WP Credits program to recommend the Contributor Toolkit as the primary way to contribute to WordPress. That isn’t in place yet, but its developer track already asks students to set up Xdebug. If the toolkit is going to be the tool those students use, it has to handle that step too. Both official environments, wordpress-develop’s Docker setup and wp-env, already offer Xdebug as an option, so this brings the toolkit in line with them.
Grab 2.1.0-beta.1 from its release page, turn on Xdebug, and try to hit a breakpoint. It has to work on macOS (Apple Silicon), Windows and Linux, in every editor the Xdebug setup covers, before it goes into a stable release. That’s a lot of combinations for a handful of maintainers to cover, so the more people who try it, the better. Testing runs until Friday, December 4. Anything reported after that will still be read, but it may not make it into the stable release.
While you’re in there, try the new code editor setting too. The editor you pick changes what the Xdebug setup shows you, so the two are worth testing together.
Step debugging with Xdebug
PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher in a Contributor Toolkit site runs inside WordPress Playground, so there’s no php.ini to edit and no extension to install. Instead, there’s a setting.
Turn it on: Settings → Sites → Step debugging (Xdebug). It’s off by default because it slows down every request, and like the PHP version setting, it takes effect the next time you start the server.
Set up your editor: once the server is running with Xdebug, the site’s Debugging row offers a setup for VS Code, Cursor, PhpStorm or Zed. Each one has the steps and the config to copy, such as a launch.jsonJSONJSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. for VS Code or the host, port and path mapping for PhpStorm. If you already picked an editor in Settings, the button goes straight to that editor’s setup instead (more on that below).
One site at a time: Playground always uses port 9003, so only one running site can have Xdebug. If you start a second one, the app tells you which site has it and what to do.
You can cancel a start now: while the server starts, the button reads Cancel instead of a grayed-out “Starting…”. With Xdebug on, a breakpoint can catch Playground’s own startup requests, so you’ll want this.
The full walkthrough is in the new Step debugging with Xdebug guide. It goes live on the documentation site with the stable release so images may appear broken in 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 by the repository owner. https://github.com/.
Pick your code editor
You can now pick the code editor you use and save it as a setting, under Settings → General → Applications → Code editor. Once it’s set, the site menu’s Open in uses that editor, and clicking a file under Changed files opens it there too. If you haven’t picked one, or leave it on Ask each time (the default), the app asks you to choose from the editors installed on your computer.
The same setting changes the Xdebug setup. With VS Code, Cursor, PhpStorm or Zed chosen, the site’s Debugging row shows a single Set up Xdebug for Zed button (or whichever editor you picked) that opens that editor’s setup directly. With Ask each time, or an editor that has no Xdebug setup, such as Sublime Text, you get a menu of the editors the app finds instead.
What to test
Xdebug is the big one. Try whatever combination you have: macOS, Windows or Linux, with VS Code, Cursor, PhpStorm or Zed, on a Core or a 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/ site. If you’re on Windows, your test is especially useful, since paths there are handled differently from macOS and Linux.
Xdebug: turn on the setting, restart the server, follow the setup for your editor, and set a breakpoint in a Core file (say wp-login.php). Make sure that the editor stops on it. Try it on a Gutenberg site too, and try starting two sites at once.
Code editor: pick your editor in Settings and click a file under Changed files. Check that the Debugging row’s Xdebug button names your editor. Then set the setting back to Ask each time and try both again.
If something breaks, or works but confuses you, please open an issue on GitHub. Include your platform and what you clicked, and attach the app log (Help → Open App Log) if you can.
If it just works, say so in the comments, with your platform and editor. A report that it worked on your setup helps too, because it shows which combinations are covered.
Problems found during the beta get fixed before WP Credits starts sending students to the toolkit. The user guide on trunk covers every feature here if you want more detail before you start.