WordPress 7.2 for developers: what changes and what to check
WordPress 7.2 is due on 8 December 2026. The changes that can break themes and plugins, the new APIs, PHP 8.6 support, and how to test before you update.
9 min read
WordPress 7.2 is at the release candidate stage, the last step before release, when the work is bug fixing and the interface text is frozen. The final release is planned for 8 December 2026. According to the 7.2 Field Guide, it includes more than 440 Core Trac tickets, with "21 new hooks (16 filters and 5 actions)".
I build custom WordPress themes and plugins, so this is the order I'd check things in: what can break first, then what's new. Everything here comes from the official developer notes and release posts, linked in each section. I'll update this post once 7.2 is released.
Check these before you update
Admin icons are now SVG, not Dashicons
The icons in the admin menu and admin bar are now inline SVGs instead of the Dashicons font. The note says "most plugins and themes need no changes", but CSS that colored or hid the core icons through ::before no longer works on them. That affects custom admin color schemes (core adds best-effort rules to keep their colors), admin themes, and rules that hid a core icon or swapped it for a background image. Replacing an icon with content on ::before still works for menu items.
There's something new as well: add_menu_page() and the menu_icon argument of register_post_type() now accept the name of a registered icon, such as 'core-admin/pin'. If your plugin still supports older WordPress versions, check function_exists( 'wp_is_valid_icon_name' ) before you use an icon name.
Three old Interactivity API behaviors stop working
Three behaviors that were deprecated in earlier versions are gone:
- Unique IDs written after two hyphens.
data-wp-on--click--counternow listens for an event calledclick--counter, so the handler simply never fires, anddata-wp-watch,data-wp-initordata-wp-runwith a two-hyphen suffix is skipped. Write the ID after three hyphens instead:data-wp-on--click---counter. - Negating a function, as in
!actions.isEmpty. The function is no longer called. Use derived state, such as!state.isEmpty, instead. data-wp-ignorehas been removed, so directives inside that element now run.
The event directives fail silently in production, so search for them rather than waiting for a warning. The note suggests these commands, run from the root of your project:
# Lifecycle directives with a suffix.
grep -rnE 'data-wp-(watch|init|run)--[^-]' .
# Event directives with a unique ID after two hyphens.
grep -rnE 'data-wp-on(-window|-document)?--[^ "=]*[^- "=]--[^-]' .
The REST comments endpoint takes several statuses
/wp/v2/comments now accepts several statuses in one request, so after sanitization $request['status'] is always an array. Code that compares it to a string needs a small change, and this version works on 7.1 and 7.2:
// Before: only matches in 7.1 and earlier.
if ( 'hold' === $request['status'] ) {
// ...
}
// After: works in 7.1 and in 7.2.
if ( in_array( 'hold', (array) $request['status'], true ) ) {
// ...
}
Revision and autosave responses also stop including meta keys that aren't revisioned. The permission rules for comments haven't changed.
Media uploads take a new path in supported browsers
Image uploads from the Media Library grid, the Add New Media File screen and the media modal now go through client-side processing in Chromium 137 or newer. Firefox and Safari fall back to the server, as before, and so do files that aren't images, JPEG and PNG files while the "Scale images" resizing is on, and screens such as the Customizer and the classic editor's media modal. Three things to check:
- Code that spots media uploads by looking for
$_POST['action']set toupload-attachment, or forDOING_AJAX, will miss these uploads. - On the client-side path, every sub-size of an animated GIF or WebP keeps its animation. If your theme expects static thumbnails, turn it off with
add_filter( 'wp_generate_animated_image_subsizes', '__return_false' );. wp_start_cross_origin_isolation_output_buffer()andwp_add_crossorigin_attributes()are deprecated.
Abilities API input handling is stricter
If you've registered abilities, the input handling has changed. Input that passes validation but then fails sanitization is now rejected (ability_invalid_input, an HTTP 400 from the REST endpoint) instead of falling back to the unsanitized value. In direct PHP calls, a number schema now turns an integer such as 10 into the float 10.0, matching the REST behavior, so avoid checks like is_int( $input ). sanitize_input_for_ability() is deprecated.
Smaller changes that can catch you out
These come from the note on miscellaneous developer changes:
- Sites that run from a Git worktree or submodule no longer receive automatic core, plugin, theme or translation updates. If that's how you deploy, plan your own updates.
- The "Howdy" greeting has moved into the
user-infoitem of the user menu. Code that edits themy-accountnode title, for example by replacing "Howdy", won't find it any more. - Add Theme is back under Appearance on single-site installs. Code that reads or unsets
$submenu['themes.php']entries by number may now hit a different item. - Application password hooks now get unslashed data. Callbacks on
wp_create_application_passwordorwp_update_application_passwordthat callwp_unslash()themselves should stop.
What's new
- Read-only core abilities. Three new abilities,
core/content-query,core/users-queryandcore/settings-get, let code and AI tools read content, users and settings through the Abilities API, limited to what the current user can see. Posts, pages and a set of core settings are exposed by default. Custom post types and plugin settings have to opt in withshow_in_abilities, which is off by default. The note's advice: "Don't enable show_in_abilities for settings that store secrets, like API keys." required_capabilitiesfor abilities. List the capabilities an ability needs, and you can leave out the permission callback when they cover every check. That requires WordPress 7.2.data-wp-htmlsets an element's inner HTML in the Interactivity API, but only from values marked with the newasDangerousHTML()(orwp_interactivity_as_dangerous_html()in PHP). As the name says, nothing is sanitized, so only pass HTML you trust.- A
/random/URL.example.com/random/redirects to a random published post, and it works on archives too. It's on by default. To turn it off:add_filter( 'wp_enable_random_content_redirect', '__return_false' );. - Text shadow as a typography block support, on the Paragraph and Heading blocks, with Light and Strong presets. The control is hidden by default.
WP_DEBUGis on by default for local sites, when the environment type islocal. A value set inwp-config.phpstill wins.- An email to the user by default when an application password is added to their account. The
wp_send_application_password_created_emailfilter turns it off. register_site_meta()andunregister_site_meta()for multisite.
PHP 8.6 and the database
WordPress 7.2 is "fully compatible with PHP 8.6", which was released on 19 November 2026. The minimum stays at PHP 7.4. If you maintain a plugin, the note lists a few changes to make for PHP 8.6:
- Replace
spl_object_hash()withspl_object_id(), which returns an integer, not a string. - Accept
font/ttfas well asfont/sfntfor TrueType files. - If your plugin registers a stream wrapper, give it a
stream_flush()method. - Use
imageflip()to flip images, notimagecopyresampled()with negative dimensions.
On the database side, WordPress 7.2 turns off the NO_BACKSLASH_ESCAPES SQL mode for its own connection, because queries with escaped values can fail or return the wrong data with it on. "Most sites won't notice any difference." If you really need the mode, the incompatible_sql_modes filter keeps it, but it has to go in a db.php drop-in, because a plugin loads too late.
What isn't in 7.2
- The Secrets API. A developer note described a new API for storing API keys encrypted, but it was updated on 17 November: "The Secrets API will no longer be shipping with WordPress 7.2." Don't build on it yet.
- jQuery 4. WordPress 7.2 ships jQuery Migrate 3.6.0 so you can catch deprecation notices now. The jQuery 4 update itself is tentatively planned for 7.3, and jQuery Migrate is planned to be off by default from the end of 2027.
How to test before 8 December
- Use a staging copy, never the live site.
- Install the latest release candidate, with the WordPress Beta Tester plugin ("Bleeding edge" channel, "Beta/RC Only" stream) or with WP-CLI, swapping in the newest RC number:
wp core update --version=7.2-RC1
- Turn on debugging on staging and log rather than display, so PHP deprecation notices end up in
wp-content/debug.log. jQuery Migrate's warnings are JavaScript, so look for those in the browser console.SCRIPT_DEBUGloads the unminified scripts, which makes them easier to trace:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', true );
- Run through the checks above: admin CSS, Interactivity directives, REST code that reads the comments status, and upload handling.
- Plugin authors: when your tests pass, update "Tested up to" in your readme to 7.2.
Common questions
Will WordPress 7.2 break my site?
For most sites, no. The risk is in custom code: admin CSS on Dashicons, older Interactivity API patterns, REST integrations, and media upload hooks. Test on staging first, as with any major release.
Do I need PHP 8.6 for WordPress 7.2?
No. PHP 8.6 is supported, and the minimum is still PHP 7.4.
When is WordPress 7.2 released?
It's planned for 8 December 2026. Release dates can move, so check the official release schedule.
What happened to the Secrets API?
It was announced for 7.2, then removed from the release on 17 November. The developer note doesn't say when it will ship.
More on how I work
Keeping sites updated safely is part of my WordPress work. See the WordPress security hardening checklist, which tracks flaws being exploited right now, and the custom WordPress themes case study. Hiring for a WordPress role? Get in touch.

Written by Devang Patel
Full-stack product engineer in Vadodara, India. I build the things I write about.