WordPress 7.2 ignores data-wp-init--, data-wp-watch-- and data-wp-run-- directives
Suffixes for the data-wp-init directive are not supported. Ignoring the directive with suffix "focus".
Short answer: WordPress 7.2 (due 8 December 2026, release candidate 17 November) stops running Interactivity API directives that use two hyphens for a unique ID: data-wp-init--name, data-wp-watch--name and data-wp-run--name are skipped, and data-wp-on--click--name waits for an event called "click--name" that never fires. WordPress 7.1 only warned. On live sites it fails silently. Jetpack's current Forms code uses this syntax. Plugin authors: switch to three hyphens. Site owners: test on 7.2 RC1 before updating.
Why it happens
A directive can carry a unique ID so one tag can have several directives of the same type. It used to be written after two hyphens (data-wp-init--focus); the supported form is three hyphens (data-wp-init---focus). WordPress 7.1's Interactivity runtime still ran the old form and warned that it "will stop working". In WordPress 7.2 (trunk), anything after two hyphens on init, watch, run and router-region is read as a suffix, which these directives don't accept: the init and watch handlers now run an entry only when its suffix is null, and run returns early. The warning exists only in the development build (loaded with SCRIPT_DEBUG); the minified build that live sites load has no warning text at all, so the feature simply stops. Jetpack's stable release on 28 October 2026 has data-wp-init--phone-field-custom-combobox, data-wp-init--focus and data-wp-watch--conditional-focus in jetpack-forms/src/contact-form/class-contact-form-field.php (lines 1731, 2160, 3463).
You may also see
The data-wp-on--click--track directive listens for an event named "click--track". Two-hyphen unique IDs are no longer supported. If you meant to add a unique ID, please use data-wp-on--click---track instead.The usage of data-wp-init--focus (two hyphens for unique ID) is deprecated and will stop working in WordPress 7.1. Please use data-wp-init---focus (three hyphens for unique ID) from now on.
Fix
- Find two-hyphen IDs in your plugins and theme (run from the WordPress folder):
grep -rEn 'data-wp-(init|watch|run)--[A-Za-z0-9_]|data-wp-on(-async)?(-window|-document)?--[A-Za-z0-9_]+--[A-Za-z0-9_]' wp-content/plugins wp-content/themes. Three-hyphen IDs are not matched, so every hit needs a change. - Plugin and theme authors: add one hyphen before the ID.
data-wp-init--focusbecomesdata-wp-init---focus;data-wp-on--click--trackbecomesdata-wp-on--click---track. WordPress 7.1 already asks for this form, so ship the change before 17 November. - Site owners: put a staging copy on WordPress 7.2 RC1 (17 November) with
define( 'SCRIPT_DEBUG', true );in wp-config.php, open pages with forms, search and other interactive blocks, and look for the warnings above in the browser console. - If a plugin you rely on shows them, hold the 7.2 update until that plugin releases a fix (Jetpack: watch its changelog for Forms), then update both.
Watch out
- No PHP error, no visible error and no console message on a live site: the first sign is a form field that no longer focuses, a country picker that doesn't start, or a load-more button that does nothing.
- Directives that do take a suffix, such as data-wp-bind--hidden, data-wp-class--active and data-wp-on--click, are unchanged; only the extra two-hyphen ID is affected.
- Check whether your site or your host updates WordPress to new major versions automatically (Dashboard > Updates, or your host's panel) before 8 December.
Sources
- WordPress 7.2 release page (RC1 17 Nov, release 8 Dec 2026)
- WordPress trunk (7.2): wp-includes/js/dist/script-modules/interactivity/index.js
- WordPress 7.1 branch: the same file, which only warned
- Jetpack on WordPress.org