Sponsored Content
The Wayback Machine - https://web.archive.org/web/20240209115728/https://github.com/ampproject/amp-wp/releases
Skip to content

Releases: ampproject/amp-wp

2.5.2

10 Jan 15:53
716c418
Compare
Choose a tag to compare

For the full list of issues and pull requests in this release, please see the 2.5.2 milestone.

Changelog

  • Fix error in block editor when attempting to insert an Image block. This was due to an incompatibility with recent Gutenberg versions. #7710, #7711
  • Update dependencies.

Props

Chuck Grimmett (@cagrimmett), Lovekesh Kumar (@thelovekesh), Maitreyie Chavan (@maitreyie-chavan), Milind More (@milindmore22), Pavan Patil (@pavanpatil1), Weston Ruter (@westonruter)

Installation

Now available to install via WordPress.org.

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

To install as a Git submodule, consider 2.5.2-built.

2.5.1

18 Dec 21:17
273b510
Compare
Choose a tag to compare

This is a maintenance and security release which fixes a reflected XSS vulnerability when mobile redirection is enabled. For prior affected versions, the fix is backported to new patch releases: v2.0.12, v2.1.5, v2.2.5, v2.3.1, and v2.4.3. These are available in the WordPress Plugin Directory but not on GitHub.

For the full list of issues and pull requests in this release, please see the 2.5.1 milestone.

Changelog

  • ⚠️ Fix reflected XSS security vulnerability with mobile redirection is enabled. Props to @anteksiler for responsible disclosure.
  • Prevent validation errors and fix tests caused by the Gutenberg Interactivity API experiment.
  • Fix static analysis errors reported by PHPStan.
  • Improve PHP 8.3 compatibility.

Props

Lovekesh Kumar (@thelovekesh), Maitreyie Chavan (@maitreyie-chavan), Milind More (@milindmore22), Weston Ruter (@westonruter)

Installation

Now available to install via WordPress.org.

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

To install as a Git submodule, consider 2.5.1-built.

2.5.0

06 Nov 20:29
fa29952
Compare
Choose a tag to compare

For the full list of issues and pull requests in this release, please see the 2.5.0 milestone with 10 closed issues and 23 merged pull requests (minus dependency updates).

Changelog

Validation

  • ✨ Add support for fetchpriority which should further improve LCP. #7601, #7644, ampproject/amp-toolbox-php#544
  • Update amphtml spec to 2309011827000 and remove Bento experiment. #7615, #7652, #7029
  • Add amp-story-audio-sticker to spec. #7603
  • Correctly handle siblings_disallowed from spec. #7597
  • Remove obsolete gyfcat embed support. #7612, #7610
  • Update paired browsing script dependencies array to add data-ampdevmode attribute to wp-polyfill-inert. #7596, #7595

Compatibility

  • Bump minimum PHP version to 7.4 and minimum WordPress to 5.3. #7613
  • Omit redundant page caching and object caching tests for Site Health if on WP>=6.1. #7645, #7643
  • Fix deprecated call to _admin_bar_bump_cb in WordPress 6.4. #7619, #7635
  • Fix interactivity API enabled navigation block in WordPress 6.4. #7650, #7647
  • Revert custom GB 16.3 installation steps and add WP_DEBUG support in local-env. #7602
  • Fix deprecation warnings in PHP 8.1. #7604, #7614
  • Fix deprecation warning on AMP validation post edit screen. #7651
  • Update docs generate command to run if PHP <= 7.4. #7594, #7501
  • Update node from 14 to 18. #7605, #7599
  • Fix docs generation command. #7670

Testing

  • Fix navigation timeout errors in E2E tests. #7669
  • Increase navigation timeout in E2E tests. #7611
  • Update Build, test & measure workflow. #7649

Misc

  • Fix multiple typos in PHP comments. #7648
  • Update ecosystem data; Update docs for v2.5.0. #7674

Props

Lovekesh Kumar (@thelovekesh), Maitreyie Chavan (@maitreyie-chavan), Matthew Riley MacPherson (@tofumatt), Milind More (@milindmore22), Parikshit Adhikari (@parikshit-adhikari), Pascal Birchler (@swissspidy), Pavan Patil (@pavanpatil1), Weston Ruter (@westonruter)

Installation

Now available to install via WordPress.org.

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

To install as a Git submodule, consider 2.5.0-built.

2.4.2

18 Jul 18:40
8eeffe4
Compare
Choose a tag to compare

For the full list of issues and pull requests in this release, please see the 2.4.2 milestone with 8 closed issues and 13 merged pull requests (minus dependency updates).

Changelog

Reader Mode

  • Update legacy theme styles to add responsiveness to featured image. (#7560, #7550)
  • Update ReaderThemeSupportFeatures::theme_has_theme_json() with latest changes. (#7582, #7583)

Analytics and Ecosystem

  • Update Google Analytics analytics vendor. (#7580, #7567)
  • Update ecosystem files. (#7581)

Development

  • Remove WP_DEBUG from local-env until WP 6.3 is released. (#7591)
  • Bump phpVersion from 7.4 to 8.0 in .wp-env.json. (#7516, #7517)
  • Fix invalid URL protocol for local development. (#7508, #5402)

Testing

  • Fix test regression due to GB update. (#7588)
  • Fix test:php commands. (#7589, #7590)

Dependencies

  • Update dependabot config to group @wordpress/* package updates. (#7579, #7576)
  • Update dependabot to run monthly instead of weekly. (#7536)
  • Upgrade outdated packages; bump React to v18. (#7548)
  • Remove auto-merge workflow. (#7562)

Props

Andre Esteves Perrone (@artneo7), David Vallejo (@thyngster), Lovekesh Kumar (@thelovekesh), Maitreyie Chavan (@maitreyie-chavan), Milind More (@milindmore22), Pooja Killekar (@pooja-muchandikar), Weston Ruter (@westonruter)

Installation

Now available to install via WordPress.org.

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

To install as a Git submodule, consider 2.4.2-built.

2.4.1

22 Mar 20:54
44fd13d
Compare
Choose a tag to compare

For the full list of issues and pull requests in this release, please see the 2.4.1 milestone with 4 closed issues and 10 merged pull requests (minus dependency updates).

Changelog

  • Add primary theme support features from theme.json for Reader theme. #7471, #7481
  • Fix failure to parse complex CSS values. #7487, #7291
  • Fix margin usage of p.has-background in legacy theme. #7496
  • Improve author avatar resolution and fix a11y issues in legacy theme. #7492, #7491
  • Remove React 17 requirement for AfterActivationSiteScan service. #7490, #7489
  • Add guard to avoid type errors due to null validation sources. #7500
  • Ignore codecov action to be run on @dependabot PRs. #7498
  • Fix flaky e2e tests. #7488
  • Fix PHPStan errors. #7477
  • Update test cases after Gutenberg 15.4.0 release. #7502

Props

Lovekesh Kumar (@thelovekesh), Maitreyie Chavan (@maitreyie-chavan), Milind More (@milindmore22), Pascal Birchler (@swissspidy), Pavan Patil (@pavanpatil1), Weston Ruter (@westonruter)

Installation

Now available to install via WordPress.org.

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

To install as a Git submodule, consider 2.4.1-built.

2.4.0

08 Feb 22:14
e4a11ba
Compare
Choose a tag to compare

For the full list of issues and pull requests in this release, please see the 2.4 milestone with 22 closed issues and 39 merged pull requests (minus dependency updates).

Changelog

Paired AMP

  • Extend Sandboxing experiment to Paired AMP modes. #7268, #7288
  • Fix Incorrect assumption of hex input by ReaderThemeSupportFeatures::get_relative_luminance_from_hex(). #7285, #7286
  • Display mobile switcher link when mobile redirection is disabled. #5293, #7426
  • Update is_frontend_url() to verify passed url path with home_url() to prevent adding paired suffix to other sites. #7329, #7330

Sanitization & Conversion

  • Automatically mark GA4 scripts as being PX-verified when moderate/loose sandboxing is enabled. #7289, #7290
  • Fix validation error due to native img tag when lightbox and carousel are enabled. #7152, #7158
  • Add guard to avoid fatal error in case logo height/width is zero in core theme sanitizer. #7427, #7429
  • Fix lightbox effect if images are aligned. #7154, #7178
  • Disable experimental Bento integration in Sandboxing. #7267, #7269

CLI

  • Add amp option wp cli command to manage plugin options. #5783, #7430

Core Compat

  • Add support of nested AMP navigation for the main menu in twenty nineteen theme. #4400, #6660
  • Fix validation issues in core navigation block. #7322, #7323
  • Add compatibility with PHP 8.1 and 8.2. #7225, #7452
  • Update JS script polyfills service to load unconditionally on plugin's dedicated screens and eliminate when no longer applicable. Fix generation of wp-dom-ready polyfill. #7421, #7457, #7458

Editor

  • Move AMP Settings in Gallery block to Advanced panel. #4989, #7171, #7450

Infrastructure

  • Decouple build process from packaging process. #3302, #7144

Site Scan & DevTools

  • Fix error in site scanner which surfaced when WooCommerce and Twenty Twenty-Two are active. #7380, #7406
  • Fix react unique key prop error in <SiteScanNotice /> component. #7448
  • Improve representation of empty strings on URL validation screen. #5598, #7432

Dependencies

  • Use composer authoritative class maps in production build to reduce needless file lookups. #7337, #7362
  • Remove postcss-loader. #7425, #7273
  • Update dependabot ignore list. #7420
  • Update Git user and add PR body in Gutenberg packages workflow. #7370
  • Update browserslist db. #7363, #7148, #7153
  • Update ecosystem files. #7449, #7319

Testing

  • Add PHPUnit tests workflow for multisite. #5701, #7321
  • Fix failing PHPUnit tests. #7419
  • Fix npm run test:php errors in wp-env package. #7263, #7264
  • Fix failing unit tests after new Gutenberg release. #7198
  • Fix static analysis and trunk unit tests errors. #7255

Code Health

  • Add prettier code formatter. #7274
  • Update mask-type attribute with mask-type mask element css property. #7246

Props

Andy Blackwell (@andyblackwell), Dhaval Parekh (@dhaval-parekh), Edi Amin (@ediamin), Lovekesh Kumar (@thelovekesh), Maitreyie Chavan (@maitreyie-chavan), Milind More (@milindmore22), Pascal Birchler (@swissspidy), Pavan Patil (@pavanpatil1), Weston Ruter (@westonruter)

Installation

Now available to install via WordPress.org.

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

To install as a Git submodule, consider 2.4.0-built.

2.3.0

14 Jun 23:21
4e54b03
Compare
Choose a tag to compare

For the full list of changes in this release, please see the 2.3 milestone, with 12 closed issues and 16 merged pull requests (minus dependency updates). Read on for the full details.

Changelog

  • Add advanced settings toggle to use native img instead of amp-img/amp-anim. #7035, #6805, #7066
  • Pre-fill default configuration for top analytics vendors. #7019, #7034
  • Add Site Health test to warn sites when fallback publisher logo is used for Schema.org metadata. #5120, #7124
  • Update amp-toolbox-php to v0.11.2, including a fix to rendering the heights attribute as well as SSR for amp-audio. #7146, #7121, #7130
  • Update the theme and plugin ecosystem. #7145
  • Add sanitizer for PWA scripts to prevent removal on Offline/Server error template. #7122, #7141
  • Raise PHPStan level for the AmpProject\AmpWP package to 4. #4733, #7096
  • Update sanitizer for auto-lightbox disabling to target root element instead of body, avoiding the unnecessary download of the auto-lightbox script. #7057, #7097
  • Fix desktop menu expansion on the Twenty Twenty theme. #7056, #7094
  • Bump minimum PHP version from 5.6 to 7.0. #7031, #7088
  • Update amphtml spec to 2204221712000. #7078
  • Scroll to selected section in AMP setting page after fetching site scan URLs. #7005, #7051
  • Replace use of dangerouslySetInnerHTML with createInterpolateElement. #6759, #7000
  • Update repo local environment setup and engineering guidelines documentation. #6798, #6802
  • Add Husky. #7115

Props

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

Alberto Medina (@amedina), Dhaval Parekh (@dhaval-parekh), Edi Amin (@ediamin), Fellyph Cintra (@fellyph), Lovekesh Kumar (@thelovekesh), Maitreyie Chavan (@maitreyie-chavan), Milind More (@milindmore22), Pascal Birchler (@swissspidy), Piotr Delawski (@delawski), Pooja Killekar (@pooja-muchandikar), Weston Ruter (@westonruter)

Installation

Now available to install via WordPress.org.

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

To install as a Git submodule, consider 2.3.0-built.

2.2.4

11 Apr 23:13
1f1116b
Compare
Choose a tag to compare

Following up on the 2.2.2 (and 2.2.3) release from last week, this 2.2.4 milestone addresses a regression in the handling of hero images on optimized AMP pages, specifically when the data-hero attribute had been manually-supplied by a theme/plugin author.

  • Restrict collection of attributes allowed on noscript fallback elements. (#7036)
  • Upgrade amp-toolbox-php to 0.11.1 to harden hero image optimization when noscript > img fallbacks are present (#7039, ampproject/amp-toolbox-php#516)

Installation

Now available to install via WordPress.org.

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

To install as a Git submodule, consider 2.2.4-built.

2.2.3

06 Apr 20:44
9fa03eb
Compare
Choose a tag to compare

This is a PHP 5.6 compatibility hotfix for yesterday's 2.2.2 release. There were no code changes other than regenerating the Composer autoload files on PHP 5.6 (see built diff). There was a syntax error being caused in PHP 5.6 due to Composer generating syntax that requires PHP 7+. See #7030.

👉 Note: The next AMP plugin version will likely increase the minimum PHP version to 7 since only 6.6% of WordPress installs are currently on PHP 5.6, which is also a legacy PHP version that is no longer maintained and is much slower than PHP 7 (or PHP 8).

Installation

Now available to install via WordPress.org.

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

To install as a Git submodule, consider 2.2.3-built.

2.2.2

05 Apr 19:55
e1082fe
Compare
Choose a tag to compare

This is a maintenance release, following up on 2.2.1 from 2 months ago. For the full list of issues and pull requests in this release, please see the 2.2.2 milestone with 25 closed issues and 35 merged pull requests (minus dependency updates). See full diff of changes.

Changelog

Sanitization & Conversion

  • Allow native img without any PX-verified exemptions. In the subsequent 2.3 release images will no longer be converted to amp-img/amp-anim by default and native img will be used instead (per #6805). (#6803)
  • Reduce length of specificity-hacked CSS selectors and fix CSS selector conversion to work properly with amp-next-page. (#6909, #6312)
  • Prevent removal of entire picture element tree when sanitizing by promoting child fallback img in conversion to amp-img; add sanitizer argument to retain picture as PX-verified. (#6676, #6896)
  • Replace img with amp-pixel instead of amp-img when sanitizing the Facebook tracking pixel. (#6059, #6965)
  • Disable auto-lightbox by default. (#5122, #6936)
  • Update amphtml validator spec to 2202230359001. (#6956, #6803)
  • Remove obsolete code that strips whitespace around equal signs from meta viewport. (#4742, #6979)

Embeds

  • Improve handling of WordPress post embeds by utilizing amp-wordpress-embed. (#809, #6665)
  • Update gallery shortcode embed handler to account for no shortcode attributes (improving PHP 8 compat). (#6939)

Admin

  • Show validation issues for plugins and themes on AMP setting page after completion of Site Scan; allow copying of issues to clipboard to be shared with theme/plugin authors even when user has DevTools turned off. (#6807, #6835, #7013, #7015)
  • Do async site scanning after theme activation. (#6814, #6859)
  • Add dropdown to select vendors when managing analytics entries. (#6367, #6894)
  • Add plugin suppression indication on plugins list table. (#5340, #6959)
  • Immediately add or remove DevTools-related AMP admin menu items when toggling setting. (#6714, #6878)
  • Improve determination of eligible post types for AMP. (#6883, #6897)
  • Add margins to buttons on Settings screen. (#7001, #7010)
  • Prevent duplication of script for hiding admin bar in onboarding wizard. (#6643, #6877)
  • Parent theme with AMP incompatibilities is greyed-out in the Site Scan results. (#6958, #6859)

Testing

  • Add E2E tests for the nav menu toggles and search UI on core themes. (#5404, #6967, #6933)
  • Bump stable PHP version used in CI and update unit tests to utilize Yoast/wp-test-utils v1.0. (#6466)
  • Fix phpunit tests after postcss update and changes in WP 6.0-alpha. (#6983)

Core Compat

  • Use wp_unique_id()-based block class names instead of uniqid() and reset the disabling of CSS transient caching in affected versions of WordPress/Gutenberg. (#6925, #6949, #7004)
  • Add support for dark mode user toggle in Twenty Twenty-One. (#6783, #6874)
  • Re-insert AMP Preview button whenever editor toolbar changes to ensure button shows up initially in WP 5.6, 5.7, and 5.8. (#6893, #6900)
  • Fix color and position of captions in carousel galleries when links are present. (#6734, #6907)

PHP 8 Compat

  • Harden against possibility of 'Undefined array key url' warning for PHP 8.0. (#6921, #6948)
  • Fix Site Health check for page caching to account for wp_remote_retrieve_header() returning arrays when duplicate response headers are present. (#6937, #6938)
  • Improve checks for image dimensions extraction to avoid possibility of division by zero. (#6968, #6973)

Infrastructure

  • Prevent copying PHP files from src/ into assets/. (#6947, #6952, #6955)
  • Attempt to fix Dependabot auto-merge workflow. (#6975, #6964)

Props

Alain Schlesser (@schlessera), Alberto Medina (@amedina), Bartosz Gadomski (@bartoszgadomski), Daniel Rueda (@danirueda), Dhaval Parekh (@dhaval-parekh), Edi Amin (@ediamin) Fellyph Cintra (@fellyph), James Osborne (@jamesozzie), John Watkins (@johnwatkins0), Lovekesh Kumar (@thelovekesh), Maitreyie Chavan (@maitreyie-chavan), Milind More (@milindmore22), Nikhil Joshua (@NikhilJoshua), Pierre Gordon (@pierlon), Piotr Delawski (@delawski), Pooja Killekar (@pooja-muchandikar), Rutvik Savsani (@rutviksavsani), Ryan Welcher (@ryanwelcher), Weston Ruter (@westonruter)

Installation

Now available to install via WordPress.org.

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

To install as a Git submodule, consider 2.2.2-built.