2.2.2
版本发布时间: 2022-04-06 03:55:29
ampproject/amp-wp最新发布版本:2.5.4(2024-07-16 02:45:13)
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 toamp-img
/amp-anim
by default and nativeimg
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 fallbackimg
in conversion toamp-img
; add sanitizer argument to retainpicture
as PX-verified. (#6676, #6896) - Replace
img
withamp-pixel
instead ofamp-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 ofuniqid()
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/
intoassets/
. (#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.
1、 amp.zip 2.74MB