4.8.0
Core Forms now ships minified CSS and JavaScript, and only loads them where a form actually renders.
Changed
- All first-party stylesheets and scripts are served minified on the front end and in the admin. Across the library that is 716 KB of CSS/JS down to 553 KB.
forms.cssdrops 48%,forms.js48%,smart-forms.js52%. - Readable sources still ship alongside the minified files. Define
SCRIPT_DEBUGor use the newcf_use_minified_assetsfilter to serve them instead. - Assets that arrive already minified (the webpack admin bundle, vendored Prism) are served as-is rather than duplicated in the package.
Added
Core_Forms\Assetsresolves an asset path to the file that should be served, withcf_use_minified_assetsas the escape hatch.npm run build:assetsregenerates the minified files;build.shfails the build when they are stale.
Fixed
- Page-level form detection now also inspects reusable blocks, widget areas, and block-theme template parts, so a form placed outside post content gets its stylesheets in
<head>instead of after first paint. The template-part scan is cached and flushed on part save, delete, or theme switch.
Full changelog: