WordPress 7.2 is in beta. RC1 is on November 17 and the final release is planned for December 8.
The WordPress Developer Blog published its October "What's new for developers?" roundup. Most of it is new features. These six items are different: they can change how your existing plugin or block behaves. Only one of them is a plain deprecation.
1. wp_kses() on the HTML API
WordPress is rebuilding its HTML sanitizer on top of the HTML API. The new parser normalizes output, strips the contents of script and style elements, and rejects some malformed SVG, MathML and comments. This is targeted for 7.2 or 7.3.
What to check: any code that stores or compares sanitized HTML, especially SVG and inline markup. The filter wp_kses_force_legacy_parser restores the old behavior, but the Developer Blog calls it a stopgap. Breakage should be reported on Trac ticket 66208.
2. NO_BACKSLASH_ESCAPES is gone from the wpdb session
wpdb now strips NO_BACKSLASH_ESCAPES from WordPress's own database session. Plugins and mu-plugins load too late to change that. To keep the mode, remove it from the incompatible_sql_modes filter inside a db.php drop-in:
// wp-content/db.php
add_filter( 'incompatible_sql_modes', function ( $modes ) {
return array_diff( $modes, array( 'NO_BACKSLASH_ESCAPES' ) );
} );
What to check: raw queries that assume backslashes are literal characters.
3. Core icons are stroke based
About 330 Core icons now use strokes and set fill: none inline on the <svg>. A fill prop or a CSS fill rule no longer recolors them. Use CSS color instead.
What to check: admin styles with svg { fill: ... } rules that hit Core icons. Update @wordpress/icons and @wordpress/components together.
4. Link-color classes on four blocks
Accordion, Tabs, Tab Panel and Post Template now output has-link-color and related classes.
What to check: specificity collisions between your CSS and the new classes.
5. Footnote IDs have an fn- prefix
What to check: code that selects or links footnotes by ID.
6. Deprecated components
Divider, ResponsiveWrapper, Scrollable, ZStack and Elevation from @wordpress/components are deprecated since 7.2, with removal planned for 7.4. The page suggests CSS aspect-ratio for ResponsiveWrapper and the Separator component for Divider. In MediaUpload, unstableFeaturedImageFlow is now featuredImageFlow.
Before you ship
Run your plugin on a staging site with the 7.2 beta and watch the browser console and the PHP error log. If something breaks, report it now. A fix during beta is much cheaper than one after December 8.
Top comments (0)