Skip to content

1.5.0-RC1

Pre-release
Pre-release
Compare
Choose a tag to compare
@westonruter westonruter released this 24 Mar 06:34
· 11462 commits to develop since this release
3f6e89e

This is the first release candidate for v1.5. For the full list of changes in this release, please see the 1.5 milestone, with 77 closed issues and 99 merged pull requests. Please report any issues you encounter while testing!

The 1.5.0 stable release is due out the before WordPress 5.4 is released; since the WordPress release is scheduled for March 31st, the AMP plugin release is scheduled for March 30th.

Changelog

What follows are the key changes in this release, broken down into categories.

Optimizer

Transitional Mode and Paired Browsing

  • Add paired browsing interface for Transitional mode to aid with checking parity. #3365, #3656, #4127, #4163, #3863, #3932, #3963
  • Allow opting-out of AMP-to-AMP links. #3689, #4146
  • Prevent validation errors on valid mailto: links; restrict AMP-to-AMP linking to HTTP(S) protocol links. #4182, #4251

CSS Handling

  • Add stylesheet information to validated URL screen, eliminating the CSS manifest HTML comment preceding the style[amp-custom] element. #2169, #4026, #4275, #4283, #4294, #4411
  • Show notice on frontend when there is excessive CSS. #1801
  • Detect high cache miss rate for obtaining parsed CSS from variable stylesheets; add ability to prevent storing parsed CSS in transients. #2092, #4177
  • Improve handling of fetching external stylesheets; not enough information given when fetch_external_stylesheet failure happened. #2449, #4257
  • Prioritize inline CSS for theme stylesheets. #3877
  • Preserve styles applied via [style] attribute selectors. #4105
  • Add patch from PHP-CSS-Parser to prevent malformed CSS properties leaking AMP validation error past the sanitizer. Fixes malformed CSS properties leak AMP validation error past the sanitizer. #4113, #4290
  • Automatically extract @viewport CSS at-rules to meta viewport tag. #4118, #4375
  • Semicolon at end of declaration block in media query produces invalid CSS; require unreleased version of PHP-CSS-Parser. #4197, #4300
  • Use Cache-Control directive for external stylesheet caching. #4293, #4404
  • Don't tree-shake allowed child classes of amp-date-picker if it's in the DOM. #4334, #4339
  • Remove extraneous closing brace from AMP_Core_Theme_Sanitizer::add_nav_menu_styles(). Trailing right brace in tree-shaken CSS when using featured image in Twenty Twenty theme. #4335, #4370, #4336
  • Exclude processing style attributes inside of Mustache templates. #4374

Reader Mode

  • Pass entire Reader mode templates through post-processor. #2202, #3781
  • CSS in Reader mode is not minified. #688
  • build_post_featured_image() runs unnecessarily. #732
  • Redirect to non-AMP version when making non-singular AMP request. #4184
  • Avoid entering The Loop when rendering Reader template. #4185
  • Add core block stylesheets to Reader mode template. #4204, #4299
  • Split Reader mode style template part stylesheet from action-supplied styles. #4205
  • Ensure AMP is not available for disabled posts in Reader mode. #4209

Document Parsing

  • Prevent removal of closing table and td tags in script[template="amp-mustache"]. Fixes Mustache templates for tables using script[type=text/plain] are corrupted. #4254, #4333
  • Support content after HTML end tag. Fixes failure to normalize documents with HTML comments after </body>. #4282, #4297
  • Validation broken in Genesis themes by Document::normalize_document_structure(). #4104
  • Fix parsing of malformed meta[charset] tag. #4179, #4181
  • Support WordPress installs without UTF-8 charset (by converting to UTF-8). #855, #3758, #4296

Sanitization and Validation

  • Improve validating sanitizer with context for why element/attribute is invalid. #1420, #3780, #4405
  • Add support for mandatory_oneof and mandatory_anyof attribute constraints. #938, #4285
  • Serve back JSON exclusively in amp_validate requests. This fixes validation requests to prevent the error: “URL validation failed to due to the absence of the expected JSON-containing AMP_VALIDATION comment after the body”. #3887, #3898, #4045
  • Add AMP_DOM_Document & meta tag sanitizer. #3758, #4107
  • Validate height, width & layout attributes to prevent percentage units and bogus values being erroneously permitted for width/height attributes. #2146, #3728
  • Fix invalid layout on non-AMP elements, where height=100% results in invalid layout=fill added. #4111
  • The HTML4 meta[http-equiv=Content-Type] causes validation error to leak and should convert automatically to HTML5 meta[charset]. #3469
  • Show plugin name when listing incompatible plugins. #3881
  • Investigate validation errors that are not sanitized in WordPress.org themes. #4060
  • Add validation of individual properties in meta content attributes. #4070, #4137
  • Prevent validation errors for URLs with leading or trailing spaces. #4117, #4166
  • Add source information for script/style dependencies and inline scripts/styles. Fixes scripts and styles enqueued before wp_enqueue_scripts fail to get sources identified. Identify sources for inline scripts/styles. Ensure core script/style dependencies get enqueueing theme/plugin as source. #4133, #4134, #4135
  • Add validation of JSON to prevent AMP validation errors. #4320, #4340, #4430, #4431
  • Remove source stack comments from script and style elements prior to sanitization to prevent CSS parse errors and validation errors from occurring. #4420, #4428

Conversion

  • Prevent decoding=async from being copied from img to amp-img since invalid (and built-in); raise validation error for loading!=lazy. #3938, #3940
  • Prevent loading=lazy from being copied from iframe to amp-iframe since invalid (and built-in). #3939, #3941
  • Handle sanitization of security, marginwidth & marginheight attributes when converting iframe to amp-iframe. #3950, #3954
  • Automatically convert head[profile] to head > link[rel=profile]. #4131, #4193
  • Conditionally remove html[xmlns], convert html[xml:lang] to html[lang]. #4132, #4194
  • Improve conversion of resizable iframes and those containing placeholder & overflow. #4288, #4292

Embeds

  • Provide a placeholder element for Twitter embeds. #1753
  • Improve handling of YouTube embeds. #3313, #3358
  • Enable captions on Gallery shortcodes. #3658, #3659, #4009
  • For a Gallery block with a lightbox, allow viewing multiple images in the lightbox. #3823
  • Twitter embed in Classic Block is duplicated; prevent wpautop() from modifying Twitter embed. #3865, #3874
  • Remove handling of Jetpack shortcodes. #3309, #3678
  • For a Gallery block with a lightbox, allow viewing multiple images in the lightbox. #2849, #3823
  • Add initial support for embedding TikTok videos. #4326, #4357
  • Fix amp-facebook being wrapped in a <p> tag when it should be in post root like amp-twitter. #4384,

Block Editor

  • Add an 'AMP Preview' button to the block editor. #2934, #3323, #3392, #4368, #4397
  • Improve displaying validation errors' invalid markup in Gutenberg block warning notice. #3664, #4401
  • Copy Change for "Remove Element" Button. #3822, #4398

AMP Spec Updates

  • Update allowed tags/attributes from spec in amphtml 2003031842100. Newly supported components include amp-inline-gallery, amp-mega-menu, amp-nested-menu and more. #4390
  • Stop pinning amp-carousel at v0.1 so that v0.2 can be used. #3700, #3115

Stories Editor

  • Remove AMP Stories and eliminate the obsolete experiences UI. Remember that Stories has been removed from the AMP plugin in favor of the feature being released as a standalone plugin. It will be available soon! #4203, #4315

Other

  • Add AMP support for protected posts. #3428, #3697
  • Integrate with Site Health. #3886, #2199
  • Prevent failed attempts to override the reply-title heading in comment form. #2489, #4388
  • Eliminate post-processor cache. #4178, #4391
  • Add PHP static analysis via PHPStan. #4342, #4373, #4378
  • Fix doubled image margins in Twenty Twenty. #4419, #4421
  • Fix sizing and positioning of custom logo in Twenty Twenty. #4418, #4422

Props

Thanks to the many contributors who made this release possible through work on development, design, testing, project management, and more:

Alain Schlesser, Alberto Medina, Artem Russakovskii, Hendrawan Kuncoro , Hernán Villanueva, Jer Clarke, John Ritterbush, Jonathan Barnett, Kasper Myram, Lofesa, Maciej Mackowiak, Pascal Birchler, Paul Schreiber, Pierre Gordon, Ryan Kienstra, Ryan Smith, spasibych, Thierry Muller, Thomas McMahon, and Weston Ruter.

Installation

You can also install the amp.zip build linked below by uploading it in the WordPress admin.

To install as a Git submodule, consider 1.5.0-RC1-built.