2.0.1
版本发布时间: 2020-09-04 08:33:50
ampproject/amp-wp最新发布版本:2.5.4(2024-07-16 02:45:13)
This release follows up on 2.0.0, fixing a few issues reported in that release as well as making a few other enhancements.
For the full list of issues and pull requests in this release, please see the 2.0.1 milestone, with 9 closed issues and 14 merged pull requests. See full diff of changes.
Changelog
- Disable AMP Developer Tools by default when a site is in Reader mode; add
amp_dev_tools_user_default_enabled
filter to override whether DevTools enabled by default. https://github.com/ampproject/amp-wp/issues/5286, https://github.com/ampproject/amp-wp/pull/5333 - Fix enabling AMP-to-AMP linking when mobile redirection is active. https://github.com/ampproject/amp-wp/pull/5323
- Catch exceptions thrown during AMP post-processing and show WordPress error screen with
500 Internal Server Error
response. Show the exception details including stacktrace whenWP_DEBUG_DISPLAY
is enabled; emit to PHP error log if fatal error logging is enabled. Also provide link to go to non-AMP version when in Transitional or Reader mode. https://github.com/ampproject/amp-wp/issues/5315, https://github.com/ampproject/amp-wp/pull/5320 - Let "Review issues" link in block editor warning notice for AMP validation error open in new tab. https://github.com/ampproject/amp-wp/pull/5319
- Prevent excessive regular expression backtracking when purging obsolete
data-amp-*
attributes when editing very long posts in the block editor. https://github.com/ampproject/amp-wp/issues/5308, https://github.com/ampproject/amp-wp/pull/5313 - Apply post-processing if
html
tag containsamp
attribute, not only if templates fire head/footer template actions. https://github.com/ampproject/amp-wp/issues/5314, https://github.com/ampproject/amp-wp/pull/5316 - Accept removal of AMP-invalid
@-moz-document
CSS at-rules in Twenty Nineteen which were added in WP 5.5. This is a temporary workaround while waiting for https://github.com/ampproject/amphtml/issues/26406. https://github.com/ampproject/amp-wp/issues/5302, https://github.com/ampproject/amp-wp/pull/5305 - Expand regular expression matching for Pinterest oEmbed URLs. https://github.com/ampproject/amp-wp/issues/5291, https://github.com/ampproject/amp-wp/pull/5299
- Ensure
AMP_QUERY_VAR
is defined for plugins that expect it (e.g. to sniff for presence of AMP plugin). https://github.com/ampproject/amp-wp/issues/5290, https://github.com/ampproject/amp-wp/pull/5294 - Fix supplying schema for AMP options REST API endpoint. https://github.com/ampproject/amp-wp/issues/5281, https://github.com/ampproject/amp-wp/pull/5283
- Hide label for "Hide Controls" button in Customizer, and improve positioning of legacy AMP toggle. https://github.com/ampproject/amp-wp/issues/5252, https://github.com/ampproject/amp-wp/pull/5284
- Docs: Fix filtering of internal and deprecated elements during file parsing. https://github.com/ampproject/amp-wp/pull/5301
- Make detection of invalid sizes/media attributes stricter. https://github.com/ampproject/amp-wp/pull/5287
- Print
amp-default.css
viaamp_post_template_css
action instead of in overridablestyle.php
AMP legacy template. https://github.com/ampproject/amp-wp/pull/5282
Props
Thanks to the many contributors who made this release possible through work on development, design, testing, project management, and more:
Alain Schlesser (schlessera), Alberto Medina (amedina), Brandon Payton (brandonpayton), Daniele Scasciafratte (Mte90), Fellyph Cintra (fellyph), James Osborne (jamesozzie), Jaroslav Polakovič (dero), John Watkins (johnwatkins0), Joshua Wold (jwold), Kasper Myram (kmyram), Pascal Birchler (swissspidy), Pierre Gordon (pierlon), Renee Johnson (ernee), roo2, 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.0.1-built.
1、 amp.zip 1.51MB