From 8a0cc3b56b6068d6ec36385dd37c9284042dd8fe Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Thu, 31 May 2018 18:41:06 -0500 Subject: [PATCH 01/12] Add PRs and issues from the 1.0 milestone to the changelog. Mainly use PRs, except where there was extensive discussion on an issue. Most entries don't list the corresponding issue for a pull request. This is in reverse-chronological order. And it goes from the bottom up: https://github.com/Automattic/amp-wp/milestone/7?closed=1 --- readme.md | 37 ++++++++++++++++++++++++++++++++++++- readme.txt | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index f9293b8e8ab..5c87cc996bc 100644 --- a/readme.md +++ b/readme.md @@ -63,7 +63,42 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve ## Changelog ## ### 1.0 (unreleased) ### -- Prefer the Custom Logo as the schema.org publisher icon, over the Site Icon. See [#1144](https://github.com/Automattic/amp-wp/pull/1144). Props kienstra, westonruter. +- Discovery to determine support for Gutenberg blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. +- PHPCS fixes, including PHP DocBlocks and strict comparison. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. +- Add AMP-specific functionality to core blocks. See [#1026](https://github.com/Automattic/amp-wp/pull/1026), [#1008](https://github.com/Automattic/amp-wp/issues/1008). Props miina. +- Fix issues in displaying native blocks. See [#1022](https://github.com/Automattic/amp-wp/pull/1022). Props miina. +- Deprecate AMP_WP_Utils, in favor of wp_parse_url(). See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. +- Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. +- Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. +- Add tree shaking, CSS minification, and !important replacement. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. +- Only allow layout attributes on the elements that support them. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. +- Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. +- Correctly handle stylesheets with non-HTTPS scheme, or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. +- Correct width attribute in col tags to equivalent CSS rule. See [#1064](https://github.com/Automattic/amp-wp/pull/1064). Props amedina. +- Refactor storage of validation errors to use taxonomy terms. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1063](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. +- Fix inconsistency between singular and plural. See [#1114](https://github.com/Automattic/amp-wp/pull/1114). Props garrett-eclipse. +- Allow spaces around commas in value property lists. See [#1112](https://github.com/Automattic/amp-wp/pull/1112). Props westonruter. +- Add workaround to preserve CSS calc() functions. See [#1116](https://github.com/Automattic/amp-wp/pull/1116). Props westonruter. +- Fix handling of amp-bind attributes to ensure that “>” can appear inside attribute values. See [#1119](https://github.com/Automattic/amp-wp/pull/1119). Props westonruter. +- Add information about stylesheets included and excluded in style[amp-custom]. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. +- Eliminate amp-wp-enforced-sizes style from theme support stylesheet. See [#1153](https://github.com/Automattic/amp-wp/pull/1153). Props westonruter. +- Add support for extracting (pixel) dimensions from SVG images. See [#1150](https://github.com/Automattic/amp-wp/pull/1150). Props westonruter. +- Add embed handler for gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. +- Prefer the Custom Logo as the publisher icon. See [#1144](https://github.com/Automattic/amp-wp/pull/1144). Props ryankienstra, westonruter. +- Add amp-mathml block. See [#1165](https://github.com/Automattic/amp-wp/pull/1165). Props miina. +- Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. +- Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. +- Add amp-fit-text support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. +- Remove space from 'data: url()' in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver. +- Ensure translatable strings in blocks can actually be translated. See [#1173](https://github.com/Automattic/amp-wp/pull/1173). Props miina, swissspidy, westonruter. +- Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. +- Fetch (local) stylesheets with @import instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. +- Fetch external stylesheets (which aren't from whitelisted font CDNs) to include in amp-custom style. See [#1174](https://github.com/Automattic/amp-wp/pull/1174). Props miina. +- Add Gutenberg amp-timeago block. See [#1168](https://github.com/Automattic/amp-wp/pull/1168). Props miina. +- Gutenberg: Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image. See [#1121](https://github.com/Automattic/amp-wp/pull/1121), [#1065](https://github.com/Automattic/amp-wp/issues/1065), [#1187](https://github.com/Automattic/amp-wp/pull/1187). Props miina, westonruter. +- Transform CSS selectors according to sanitizer HTML element to AMP component conversions. See [#1175](https://github.com/Automattic/amp-wp/pull/1175). Props miina, westonruter. + +For a full list of the closed issues and merged pull requests in this release, see the [1.0 milestone](https://github.com/Automattic/amp-wp/milestone/7?closed=1). ### 0.7.1 (2018-05-23) ### - Limit showing AMP validation warnings to when `amp` theme support is present. See [#1132](https://github.com/Automattic/amp-wp/pull/1132). Props westonruter. diff --git a/readme.txt b/readme.txt index dc03f7d7707..a0f51eab486 100644 --- a/readme.txt +++ b/readme.txt @@ -45,7 +45,42 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve == Changelog == = 1.0 (unreleased) = -- Prefer the Custom Logo as the schema.org publisher icon, over the Site Icon. See [#1144](https://github.com/Automattic/amp-wp/pull/1144). Props kienstra, westonruter. +- Discovery to determine support for Gutenberg blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. +- PHPCS fixes, including PHP DocBlocks and strict comparison. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. +- Add AMP-specific functionality to core blocks. See [#1026](https://github.com/Automattic/amp-wp/pull/1026), [#1008](https://github.com/Automattic/amp-wp/issues/1008). Props miina. +- Fix issues in displaying native blocks. See [#1022](https://github.com/Automattic/amp-wp/pull/1022). Props miina. +- Deprecate AMP_WP_Utils, in favor of wp_parse_url(). See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. +- Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. +- Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. +- Add tree shaking, CSS minification, and !important replacement. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. +- Only allow layout attributes on the elements that support them. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. +- Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. +- Correctly handle stylesheets with non-HTTPS scheme, or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. +- Correct width attribute in col tags to equivalent CSS rule. See [#1064](https://github.com/Automattic/amp-wp/pull/1064). Props amedina. +- Refactor storage of validation errors to use taxonomy terms. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1063](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. +- Fix inconsistency between singular and plural. See [#1114](https://github.com/Automattic/amp-wp/pull/1114). Props garrett-eclipse. +- Allow spaces around commas in value property lists. See [#1112](https://github.com/Automattic/amp-wp/pull/1112). Props westonruter. +- Add workaround to preserve CSS calc() functions. See [#1116](https://github.com/Automattic/amp-wp/pull/1116). Props westonruter. +- Fix handling of amp-bind attributes to ensure that “>” can appear inside attribute values. See [#1119](https://github.com/Automattic/amp-wp/pull/1119). Props westonruter. +- Add information about stylesheets included and excluded in style[amp-custom]. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. +- Eliminate amp-wp-enforced-sizes style from theme support stylesheet. See [#1153](https://github.com/Automattic/amp-wp/pull/1153). Props westonruter. +- Add support for extracting (pixel) dimensions from SVG images. See [#1150](https://github.com/Automattic/amp-wp/pull/1150). Props westonruter. +- Add embed handler for gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. +- Prefer the Custom Logo as the publisher icon. See [#1144](https://github.com/Automattic/amp-wp/pull/1144). Props ryankienstra, westonruter. +- Add amp-mathml block. See [#1165](https://github.com/Automattic/amp-wp/pull/1165). Props miina. +- Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. +- Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. +- Add amp-fit-text support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. +- Remove space from 'data: url()' in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver. +- Ensure translatable strings in blocks can actually be translated. See [#1173](https://github.com/Automattic/amp-wp/pull/1173). Props miina, swissspidy, westonruter. +- Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. +- Fetch (local) stylesheets with @import instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. +- Fetch external stylesheets (which aren't from whitelisted font CDNs) to include in amp-custom style. See [#1174](https://github.com/Automattic/amp-wp/pull/1174). Props miina. +- Add Gutenberg amp-timeago block. See [#1168](https://github.com/Automattic/amp-wp/pull/1168). Props miina. +- Gutenberg: Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image. See [#1121](https://github.com/Automattic/amp-wp/pull/1121), [#1065](https://github.com/Automattic/amp-wp/issues/1065), [#1187](https://github.com/Automattic/amp-wp/pull/1187). Props miina, westonruter. +- Transform CSS selectors according to sanitizer HTML element to AMP component conversions. See [#1175](https://github.com/Automattic/amp-wp/pull/1175). Props miina, westonruter. + +For a full list of the closed issues and merged pull requests in this release, see the [1.0 milestone](https://github.com/Automattic/amp-wp/milestone/7?closed=1). = 0.7.1 (2018-05-23) = From 4e6a25adca102c196df2439348afa7a7c1f0947e Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Thu, 31 May 2018 19:37:38 -0500 Subject: [PATCH 02/12] Minor edits, including verbatim PR titles. Before, I had paraphrased some PR titles in the changelog. Other edits include wrapping HTML elements in ` --- readme.md | 34 +++++++++++++++++----------------- readme.txt | 34 +++++++++++++++++----------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/readme.md b/readme.md index 5c87cc996bc..66c2bbeac0d 100644 --- a/readme.md +++ b/readme.md @@ -63,36 +63,36 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve ## Changelog ## ### 1.0 (unreleased) ### -- Discovery to determine support for Gutenberg blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. -- PHPCS fixes, including PHP DocBlocks and strict comparison. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. +- Add WP-CLI script to test support for Gutenberg blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. +- PHPCS fixes, including PHP DocBlocks and strict comparisons. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. - Add AMP-specific functionality to core blocks. See [#1026](https://github.com/Automattic/amp-wp/pull/1026), [#1008](https://github.com/Automattic/amp-wp/issues/1008). Props miina. - Fix issues in displaying native blocks. See [#1022](https://github.com/Automattic/amp-wp/pull/1022). Props miina. -- Deprecate AMP_WP_Utils, in favor of wp_parse_url(). See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. +- Deprecate `AMP_WP_Utils`, in favor of `wp_parse_url()`. See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. - Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. - Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. -- Add tree shaking, CSS minification, and !important replacement. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. -- Only allow layout attributes on the elements that support them. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. +- Add runtime CSS minification, !important replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. +- Ensure layout attributes are only allowed on supporting elements. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. - Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. -- Correctly handle stylesheets with non-HTTPS scheme, or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. -- Correct width attribute in col tags to equivalent CSS rule. See [#1064](https://github.com/Automattic/amp-wp/pull/1064). Props amedina. -- Refactor storage of validation errors to use taxonomy terms. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1063](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. +- Fix handling of font stylesheets with non-HTTPS scheme or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. +- Correct the width attribute in `col` tags to the equivalent CSS rule. See [#1064](https://github.com/Automattic/amp-wp/pull/1064). Props amedina. +- Add dynamic handling of validation errors. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1087](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. - Fix inconsistency between singular and plural. See [#1114](https://github.com/Automattic/amp-wp/pull/1114). Props garrett-eclipse. - Allow spaces around commas in value property lists. See [#1112](https://github.com/Automattic/amp-wp/pull/1112). Props westonruter. -- Add workaround to preserve CSS calc() functions. See [#1116](https://github.com/Automattic/amp-wp/pull/1116). Props westonruter. -- Fix handling of amp-bind attributes to ensure that “>” can appear inside attribute values. See [#1119](https://github.com/Automattic/amp-wp/pull/1119). Props westonruter. -- Add information about stylesheets included and excluded in style[amp-custom]. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. -- Eliminate amp-wp-enforced-sizes style from theme support stylesheet. See [#1153](https://github.com/Automattic/amp-wp/pull/1153). Props westonruter. +- Add workaround to preserve CSS `calc()` functions. See [#1116](https://github.com/Automattic/amp-wp/pull/1116). Props westonruter. +- Fix handling of amp-bind attributes to ensure that `“>”` can appear inside attribute values. See [#1119](https://github.com/Automattic/amp-wp/pull/1119). Props westonruter. +- Add information about stylesheets included and excluded in `style[amp-custom]`. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. +- Eliminate `amp-wp-enforced-sizes` style from theme support stylesheet. See [#1153](https://github.com/Automattic/amp-wp/pull/1153). Props westonruter. - Add support for extracting (pixel) dimensions from SVG images. See [#1150](https://github.com/Automattic/amp-wp/pull/1150). Props westonruter. -- Add embed handler for gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. -- Prefer the Custom Logo as the publisher icon. See [#1144](https://github.com/Automattic/amp-wp/pull/1144). Props ryankienstra, westonruter. +- Add embed handler for Gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. +- Prefer the Custom Logo as the publisher icon. See [#1144](https://github.com/Automattic/amp-wp/pull/1144). Props kienstra, westonruter. - Add amp-mathml block. See [#1165](https://github.com/Automattic/amp-wp/pull/1165). Props miina. - Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. - Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. -- Add amp-fit-text support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. -- Remove space from 'data: url()' in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver. +- Add `amp-fit-text` support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. +- Remove space from 'data: url()' in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver, Mte90. - Ensure translatable strings in blocks can actually be translated. See [#1173](https://github.com/Automattic/amp-wp/pull/1173). Props miina, swissspidy, westonruter. - Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. -- Fetch (local) stylesheets with @import instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. +- Fetch (local) stylesheets with `@import`, instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. - Fetch external stylesheets (which aren't from whitelisted font CDNs) to include in amp-custom style. See [#1174](https://github.com/Automattic/amp-wp/pull/1174). Props miina. - Add Gutenberg amp-timeago block. See [#1168](https://github.com/Automattic/amp-wp/pull/1168). Props miina. - Gutenberg: Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image. See [#1121](https://github.com/Automattic/amp-wp/pull/1121), [#1065](https://github.com/Automattic/amp-wp/issues/1065), [#1187](https://github.com/Automattic/amp-wp/pull/1187). Props miina, westonruter. diff --git a/readme.txt b/readme.txt index a0f51eab486..aa2bec4023a 100644 --- a/readme.txt +++ b/readme.txt @@ -45,36 +45,36 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve == Changelog == = 1.0 (unreleased) = -- Discovery to determine support for Gutenberg blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. -- PHPCS fixes, including PHP DocBlocks and strict comparison. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. +- Add WP-CLI script to test support for Gutenberg blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. +- PHPCS fixes, including PHP DocBlocks and strict comparisons. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. - Add AMP-specific functionality to core blocks. See [#1026](https://github.com/Automattic/amp-wp/pull/1026), [#1008](https://github.com/Automattic/amp-wp/issues/1008). Props miina. - Fix issues in displaying native blocks. See [#1022](https://github.com/Automattic/amp-wp/pull/1022). Props miina. -- Deprecate AMP_WP_Utils, in favor of wp_parse_url(). See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. +- Deprecate `AMP_WP_Utils`, in favor of `wp_parse_url()`. See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. - Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. - Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. -- Add tree shaking, CSS minification, and !important replacement. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. -- Only allow layout attributes on the elements that support them. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. +- Add runtime CSS minification, !important replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. +- Ensure layout attributes are only allowed on supporting elements. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. - Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. -- Correctly handle stylesheets with non-HTTPS scheme, or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. -- Correct width attribute in col tags to equivalent CSS rule. See [#1064](https://github.com/Automattic/amp-wp/pull/1064). Props amedina. -- Refactor storage of validation errors to use taxonomy terms. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1063](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. +- Fix handling of font stylesheets with non-HTTPS scheme or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. +- Correct the width attribute in `col` tags to the equivalent CSS rule. See [#1064](https://github.com/Automattic/amp-wp/pull/1064). Props amedina. +- Add dynamic handling of validation errors. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1087](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. - Fix inconsistency between singular and plural. See [#1114](https://github.com/Automattic/amp-wp/pull/1114). Props garrett-eclipse. - Allow spaces around commas in value property lists. See [#1112](https://github.com/Automattic/amp-wp/pull/1112). Props westonruter. -- Add workaround to preserve CSS calc() functions. See [#1116](https://github.com/Automattic/amp-wp/pull/1116). Props westonruter. -- Fix handling of amp-bind attributes to ensure that “>” can appear inside attribute values. See [#1119](https://github.com/Automattic/amp-wp/pull/1119). Props westonruter. -- Add information about stylesheets included and excluded in style[amp-custom]. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. -- Eliminate amp-wp-enforced-sizes style from theme support stylesheet. See [#1153](https://github.com/Automattic/amp-wp/pull/1153). Props westonruter. +- Add workaround to preserve CSS `calc()` functions. See [#1116](https://github.com/Automattic/amp-wp/pull/1116). Props westonruter. +- Fix handling of amp-bind attributes to ensure that `“>”` can appear inside attribute values. See [#1119](https://github.com/Automattic/amp-wp/pull/1119). Props westonruter. +- Add information about stylesheets included and excluded in `style[amp-custom]`. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. +- Eliminate `amp-wp-enforced-sizes` style from theme support stylesheet. See [#1153](https://github.com/Automattic/amp-wp/pull/1153). Props westonruter. - Add support for extracting (pixel) dimensions from SVG images. See [#1150](https://github.com/Automattic/amp-wp/pull/1150). Props westonruter. -- Add embed handler for gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. -- Prefer the Custom Logo as the publisher icon. See [#1144](https://github.com/Automattic/amp-wp/pull/1144). Props ryankienstra, westonruter. +- Add embed handler for Gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. +- Prefer the Custom Logo as the publisher icon. See [#1144](https://github.com/Automattic/amp-wp/pull/1144). Props kienstra, westonruter. - Add amp-mathml block. See [#1165](https://github.com/Automattic/amp-wp/pull/1165). Props miina. - Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. - Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. -- Add amp-fit-text support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. -- Remove space from 'data: url()' in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver. +- Add `amp-fit-text` support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. +- Remove space from 'data: url()' in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver, Mte90. - Ensure translatable strings in blocks can actually be translated. See [#1173](https://github.com/Automattic/amp-wp/pull/1173). Props miina, swissspidy, westonruter. - Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. -- Fetch (local) stylesheets with @import instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. +- Fetch (local) stylesheets with `@import`, instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. - Fetch external stylesheets (which aren't from whitelisted font CDNs) to include in amp-custom style. See [#1174](https://github.com/Automattic/amp-wp/pull/1174). Props miina. - Add Gutenberg amp-timeago block. See [#1168](https://github.com/Automattic/amp-wp/pull/1168). Props miina. - Gutenberg: Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image. See [#1121](https://github.com/Automattic/amp-wp/pull/1121), [#1065](https://github.com/Automattic/amp-wp/issues/1065), [#1187](https://github.com/Automattic/amp-wp/pull/1187). Props miina, westonruter. From 5ed773550ebedf346a6ffd98062a885b3e93cf6d Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Thu, 31 May 2018 19:44:20 -0500 Subject: [PATCH 03/12] More minor changelog edits, including backticks. To improve the dispaly in Markdown. Also, remove 'Gutenberg' from 'Gutenberg blocks.' It sounds like that name won't be present once it's merged into Core. --- readme.md | 6 +++--- readme.txt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/readme.md b/readme.md index 66c2bbeac0d..9384ab273a0 100644 --- a/readme.md +++ b/readme.md @@ -63,14 +63,14 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve ## Changelog ## ### 1.0 (unreleased) ### -- Add WP-CLI script to test support for Gutenberg blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. +- Add WP-CLI script to test support for blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. - PHPCS fixes, including PHP DocBlocks and strict comparisons. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. - Add AMP-specific functionality to core blocks. See [#1026](https://github.com/Automattic/amp-wp/pull/1026), [#1008](https://github.com/Automattic/amp-wp/issues/1008). Props miina. - Fix issues in displaying native blocks. See [#1022](https://github.com/Automattic/amp-wp/pull/1022). Props miina. - Deprecate `AMP_WP_Utils`, in favor of `wp_parse_url()`. See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. - Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. - Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. -- Add runtime CSS minification, !important replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. +- Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. - Ensure layout attributes are only allowed on supporting elements. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. - Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. - Fix handling of font stylesheets with non-HTTPS scheme or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. @@ -89,7 +89,7 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve - Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. - Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. - Add `amp-fit-text` support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. -- Remove space from 'data: url()' in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver, Mte90. +- Remove space from `data: url()` in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver, Mte90. - Ensure translatable strings in blocks can actually be translated. See [#1173](https://github.com/Automattic/amp-wp/pull/1173). Props miina, swissspidy, westonruter. - Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. - Fetch (local) stylesheets with `@import`, instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. diff --git a/readme.txt b/readme.txt index aa2bec4023a..ce7702c9f0a 100644 --- a/readme.txt +++ b/readme.txt @@ -45,14 +45,14 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve == Changelog == = 1.0 (unreleased) = -- Add WP-CLI script to test support for Gutenberg blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. +- Add WP-CLI script to test support for blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. - PHPCS fixes, including PHP DocBlocks and strict comparisons. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. - Add AMP-specific functionality to core blocks. See [#1026](https://github.com/Automattic/amp-wp/pull/1026), [#1008](https://github.com/Automattic/amp-wp/issues/1008). Props miina. - Fix issues in displaying native blocks. See [#1022](https://github.com/Automattic/amp-wp/pull/1022). Props miina. - Deprecate `AMP_WP_Utils`, in favor of `wp_parse_url()`. See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. - Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. - Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. -- Add runtime CSS minification, !important replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. +- Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. - Ensure layout attributes are only allowed on supporting elements. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. - Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. - Fix handling of font stylesheets with non-HTTPS scheme or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. @@ -71,7 +71,7 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve - Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. - Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. - Add `amp-fit-text` support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. -- Remove space from 'data: url()' in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver, Mte90. +- Remove space from `data: url()` in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver, Mte90. - Ensure translatable strings in blocks can actually be translated. See [#1173](https://github.com/Automattic/amp-wp/pull/1173). Props miina, swissspidy, westonruter. - Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. - Fetch (local) stylesheets with `@import`, instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. From 3a0c575add40c41779c4fe3c0ab0df6446b92321 Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Thu, 31 May 2018 19:55:05 -0500 Subject: [PATCH 04/12] Add to the props list for Issue 1048. --- readme.md | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 9384ab273a0..73799d1e128 100644 --- a/readme.md +++ b/readme.md @@ -70,7 +70,7 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve - Deprecate `AMP_WP_Utils`, in favor of `wp_parse_url()`. See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. - Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. - Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. -- Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. +- Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter, amedina, pbakaus, igrigorik, camelburrito. - Ensure layout attributes are only allowed on supporting elements. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. - Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. - Fix handling of font stylesheets with non-HTTPS scheme or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. diff --git a/readme.txt b/readme.txt index ce7702c9f0a..4a8847537d6 100644 --- a/readme.txt +++ b/readme.txt @@ -52,7 +52,7 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve - Deprecate `AMP_WP_Utils`, in favor of `wp_parse_url()`. See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. - Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. - Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. -- Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter. +- Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter, amedina, pbakaus, igrigorik, camelburrito. - Ensure layout attributes are only allowed on supporting elements. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. - Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. - Fix handling of font stylesheets with non-HTTPS scheme or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. From 26ca9dc5c850c43b4c7c8653f6cd93057a7059af Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Fri, 1 Jun 2018 16:51:27 -0500 Subject: [PATCH 05/12] Change order of items in Changelog. With their relative importance in mind. Of course, this is subjective. --- readme.md | 43 +++++++++++++++++++++---------------------- readme.txt | 43 +++++++++++++++++++++---------------------- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/readme.md b/readme.md index 73799d1e128..2644d64df02 100644 --- a/readme.md +++ b/readme.md @@ -63,40 +63,39 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve ## Changelog ## ### 1.0 (unreleased) ### -- Add WP-CLI script to test support for blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. -- PHPCS fixes, including PHP DocBlocks and strict comparisons. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. +- Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter, amedina, pbakaus, igrigorik, camelburrito. +- Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. +- Add dynamic handling of validation errors. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1087](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. +- Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. - Add AMP-specific functionality to core blocks. See [#1026](https://github.com/Automattic/amp-wp/pull/1026), [#1008](https://github.com/Automattic/amp-wp/issues/1008). Props miina. +- Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. +- Add embed handler for Gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. +- Add amp-mathml block. See [#1165](https://github.com/Automattic/amp-wp/pull/1165). Props miina. +- Add Gutenberg amp-timeago block. See [#1168](https://github.com/Automattic/amp-wp/pull/1168). Props miina. +- Add `amp-fit-text` support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. +- Fix handling of font stylesheets with non-HTTPS scheme or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. - Fix issues in displaying native blocks. See [#1022](https://github.com/Automattic/amp-wp/pull/1022). Props miina. -- Deprecate `AMP_WP_Utils`, in favor of `wp_parse_url()`. See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. -- Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. +- Gutenberg: Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image. See [#1121](https://github.com/Automattic/amp-wp/pull/1121), [#1065](https://github.com/Automattic/amp-wp/issues/1065), [#1187](https://github.com/Automattic/amp-wp/pull/1187). Props miina, westonruter. +- Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. - Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. -- Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter, amedina, pbakaus, igrigorik, camelburrito. +- Add information about stylesheets included and excluded in `style[amp-custom]`. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. +- Fetch (local) stylesheets with `@import`, instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. +- Fetch external stylesheets (which aren't from whitelisted font CDNs) to include in amp-custom style. See [#1174](https://github.com/Automattic/amp-wp/pull/1174). Props miina. +- Transform CSS selectors according to sanitizer HTML element to AMP component conversions. See [#1175](https://github.com/Automattic/amp-wp/pull/1175). Props miina, westonruter. - Ensure layout attributes are only allowed on supporting elements. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. -- Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. -- Fix handling of font stylesheets with non-HTTPS scheme or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. - Correct the width attribute in `col` tags to the equivalent CSS rule. See [#1064](https://github.com/Automattic/amp-wp/pull/1064). Props amedina. -- Add dynamic handling of validation errors. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1087](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. +- Remove space from `data: url()` in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver, Mte90. - Fix inconsistency between singular and plural. See [#1114](https://github.com/Automattic/amp-wp/pull/1114). Props garrett-eclipse. - Allow spaces around commas in value property lists. See [#1112](https://github.com/Automattic/amp-wp/pull/1112). Props westonruter. +- Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. - Add workaround to preserve CSS `calc()` functions. See [#1116](https://github.com/Automattic/amp-wp/pull/1116). Props westonruter. +- PHPCS fixes, including PHP DocBlocks and strict comparisons. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. - Fix handling of amp-bind attributes to ensure that `“>”` can appear inside attribute values. See [#1119](https://github.com/Automattic/amp-wp/pull/1119). Props westonruter. -- Add information about stylesheets included and excluded in `style[amp-custom]`. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. - Eliminate `amp-wp-enforced-sizes` style from theme support stylesheet. See [#1153](https://github.com/Automattic/amp-wp/pull/1153). Props westonruter. - Add support for extracting (pixel) dimensions from SVG images. See [#1150](https://github.com/Automattic/amp-wp/pull/1150). Props westonruter. -- Add embed handler for Gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. -- Prefer the Custom Logo as the publisher icon. See [#1144](https://github.com/Automattic/amp-wp/pull/1144). Props kienstra, westonruter. -- Add amp-mathml block. See [#1165](https://github.com/Automattic/amp-wp/pull/1165). Props miina. -- Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. -- Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. -- Add `amp-fit-text` support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. -- Remove space from `data: url()` in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver, Mte90. +- Deprecate `AMP_WP_Utils`, in favor of `wp_parse_url()`. See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. +- Add WP-CLI script to test support for blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. - Ensure translatable strings in blocks can actually be translated. See [#1173](https://github.com/Automattic/amp-wp/pull/1173). Props miina, swissspidy, westonruter. -- Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. -- Fetch (local) stylesheets with `@import`, instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. -- Fetch external stylesheets (which aren't from whitelisted font CDNs) to include in amp-custom style. See [#1174](https://github.com/Automattic/amp-wp/pull/1174). Props miina. -- Add Gutenberg amp-timeago block. See [#1168](https://github.com/Automattic/amp-wp/pull/1168). Props miina. -- Gutenberg: Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image. See [#1121](https://github.com/Automattic/amp-wp/pull/1121), [#1065](https://github.com/Automattic/amp-wp/issues/1065), [#1187](https://github.com/Automattic/amp-wp/pull/1187). Props miina, westonruter. -- Transform CSS selectors according to sanitizer HTML element to AMP component conversions. See [#1175](https://github.com/Automattic/amp-wp/pull/1175). Props miina, westonruter. For a full list of the closed issues and merged pull requests in this release, see the [1.0 milestone](https://github.com/Automattic/amp-wp/milestone/7?closed=1). diff --git a/readme.txt b/readme.txt index 4a8847537d6..352b50b6ccd 100644 --- a/readme.txt +++ b/readme.txt @@ -45,40 +45,39 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve == Changelog == = 1.0 (unreleased) = -- Add WP-CLI script to test support for blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. -- PHPCS fixes, including PHP DocBlocks and strict comparisons. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. +- Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter, amedina, pbakaus, igrigorik, camelburrito. +- Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. +- Add dynamic handling of validation errors. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1087](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. +- Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. - Add AMP-specific functionality to core blocks. See [#1026](https://github.com/Automattic/amp-wp/pull/1026), [#1008](https://github.com/Automattic/amp-wp/issues/1008). Props miina. +- Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. +- Add embed handler for Gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. +- Add amp-mathml block. See [#1165](https://github.com/Automattic/amp-wp/pull/1165). Props miina. +- Add Gutenberg amp-timeago block. See [#1168](https://github.com/Automattic/amp-wp/pull/1168). Props miina. +- Add `amp-fit-text` support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. +- Fix handling of font stylesheets with non-HTTPS scheme or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. - Fix issues in displaying native blocks. See [#1022](https://github.com/Automattic/amp-wp/pull/1022). Props miina. -- Deprecate `AMP_WP_Utils`, in favor of `wp_parse_url()`. See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. -- Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. +- Gutenberg: Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image. See [#1121](https://github.com/Automattic/amp-wp/pull/1121), [#1065](https://github.com/Automattic/amp-wp/issues/1065), [#1187](https://github.com/Automattic/amp-wp/pull/1187). Props miina, westonruter. +- Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. - Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. -- Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter, amedina, pbakaus, igrigorik, camelburrito. +- Add information about stylesheets included and excluded in `style[amp-custom]`. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. +- Fetch (local) stylesheets with `@import`, instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. +- Fetch external stylesheets (which aren't from whitelisted font CDNs) to include in amp-custom style. See [#1174](https://github.com/Automattic/amp-wp/pull/1174). Props miina. +- Transform CSS selectors according to sanitizer HTML element to AMP component conversions. See [#1175](https://github.com/Automattic/amp-wp/pull/1175). Props miina, westonruter. - Ensure layout attributes are only allowed on supporting elements. See [#1075](https://github.com/Automattic/amp-wp/pull/1075). Props westonruter. -- Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. -- Fix handling of font stylesheets with non-HTTPS scheme or scheme-less URLs. See [#1077](https://github.com/Automattic/amp-wp/pull/1077). Props westonruter. - Correct the width attribute in `col` tags to the equivalent CSS rule. See [#1064](https://github.com/Automattic/amp-wp/pull/1064). Props amedina. -- Add dynamic handling of validation errors. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1087](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. +- Remove space from `data: url()` in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver, Mte90. - Fix inconsistency between singular and plural. See [#1114](https://github.com/Automattic/amp-wp/pull/1114). Props garrett-eclipse. - Allow spaces around commas in value property lists. See [#1112](https://github.com/Automattic/amp-wp/pull/1112). Props westonruter. +- Display admin notice if there's no persistent object caching. See [#1050](https://github.com/Automattic/amp-wp/pull/1050). Props oscarssanchez. - Add workaround to preserve CSS `calc()` functions. See [#1116](https://github.com/Automattic/amp-wp/pull/1116). Props westonruter. +- PHPCS fixes, including PHP DocBlocks and strict comparisons. See [#1002](https://github.com/Automattic/amp-wp/pull/1002). Props paulschreiber. - Fix handling of amp-bind attributes to ensure that `“>”` can appear inside attribute values. See [#1119](https://github.com/Automattic/amp-wp/pull/1119). Props westonruter. -- Add information about stylesheets included and excluded in `style[amp-custom]`. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. - Eliminate `amp-wp-enforced-sizes` style from theme support stylesheet. See [#1153](https://github.com/Automattic/amp-wp/pull/1153). Props westonruter. - Add support for extracting (pixel) dimensions from SVG images. See [#1150](https://github.com/Automattic/amp-wp/pull/1150). Props westonruter. -- Add embed handler for Gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. -- Prefer the Custom Logo as the publisher icon. See [#1144](https://github.com/Automattic/amp-wp/pull/1144). Props kienstra, westonruter. -- Add amp-mathml block. See [#1165](https://github.com/Automattic/amp-wp/pull/1165). Props miina. -- Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. -- Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. -- Add `amp-fit-text` support to text blocks. See [#1151](https://github.com/Automattic/amp-wp/pull/1151). Props miina. -- Remove space from `data: url()` in stylesheets. See [#1164](https://github.com/Automattic/amp-wp/pull/1164/), [#1089](https://github.com/Automattic/amp-wp/issues/1089). Props amedina, JonHendershot, westonruter, mehigh, davisshaver, Mte90. +- Deprecate `AMP_WP_Utils`, in favor of `wp_parse_url()`. See [#995](https://github.com/Automattic/amp-wp/pull/995). Props paulschreiber. +- Add WP-CLI script to test support for blocks. See [#845](https://github.com/Automattic/amp-wp/issues/845). Props kienstra. - Ensure translatable strings in blocks can actually be translated. See [#1173](https://github.com/Automattic/amp-wp/pull/1173). Props miina, swissspidy, westonruter. -- Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. -- Fetch (local) stylesheets with `@import`, instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. -- Fetch external stylesheets (which aren't from whitelisted font CDNs) to include in amp-custom style. See [#1174](https://github.com/Automattic/amp-wp/pull/1174). Props miina. -- Add Gutenberg amp-timeago block. See [#1168](https://github.com/Automattic/amp-wp/pull/1168). Props miina. -- Gutenberg: Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image. See [#1121](https://github.com/Automattic/amp-wp/pull/1121), [#1065](https://github.com/Automattic/amp-wp/issues/1065), [#1187](https://github.com/Automattic/amp-wp/pull/1187). Props miina, westonruter. -- Transform CSS selectors according to sanitizer HTML element to AMP component conversions. See [#1175](https://github.com/Automattic/amp-wp/pull/1175). Props miina, westonruter. For a full list of the closed issues and merged pull requests in this release, see the [1.0 milestone](https://github.com/Automattic/amp-wp/milestone/7?closed=1). From fca799ae37016b0b5ffb740e62fe63022f20b75b Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 8 Jun 2018 17:03:26 -0700 Subject: [PATCH 06/12] Update changelog with new changes for 1.0 alpha release --- readme.md | 6 +++++- readme.txt | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 2644d64df02..09cba356035 100644 --- a/readme.md +++ b/readme.md @@ -65,10 +65,13 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve ### 1.0 (unreleased) ### - Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter, amedina, pbakaus, igrigorik, camelburrito. - Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. +- Extend admin screen options to add `amp` theme support without any coding required. Toggle between classic, paired, and native. Includes options for whether sanitization should be done by default and whether tree shaking should always be allowed. See [#1199](https://github.com/Automattic/amp-wp/pull/1199). Props westonruter. +- Add support for three core themes (Twenty Fifteen, Twenty Sixteen, Twenty Seventeen) so that they can be used out of the box with AMP theme support added without needing to create a child theme. See [#1074](https://github.com/Automattic/amp-wp/pull/1074). Props westonruter, DavidCramer, kienstra. +- Add AMP menu item to admin bar on frontend with indication of AMP validation status; accessing an AMP URL that has unaccepted validation errors will redirect to the non-AMP page and cause the AMP admin bar item to indicate the failure, along with a link to access the validation results. See [#1199](https://github.com/Automattic/amp-wp/pull/1199). Props westonruter. - Add dynamic handling of validation errors. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1087](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. - Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. - Add AMP-specific functionality to core blocks. See [#1026](https://github.com/Automattic/amp-wp/pull/1026), [#1008](https://github.com/Automattic/amp-wp/issues/1008). Props miina. -- Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. +- Add AMP media blocks (when in native AMP mode). See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. - Add embed handler for Gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. - Add amp-mathml block. See [#1165](https://github.com/Automattic/amp-wp/pull/1165). Props miina. - Add Gutenberg amp-timeago block. See [#1168](https://github.com/Automattic/amp-wp/pull/1168). Props miina. @@ -77,6 +80,7 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve - Fix issues in displaying native blocks. See [#1022](https://github.com/Automattic/amp-wp/pull/1022). Props miina. - Gutenberg: Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image. See [#1121](https://github.com/Automattic/amp-wp/pull/1121), [#1065](https://github.com/Automattic/amp-wp/issues/1065), [#1187](https://github.com/Automattic/amp-wp/pull/1187). Props miina, westonruter. - Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. +- Automatically redirect to `?amp` from `/amp/` URLs when `amp` theme support is present. See [#1203](https://github.com/Automattic/amp-wp/pull/1203), [#1194](https://github.com/Automattic/amp-wp/pull/1194). Props westonruter. - Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. - Add information about stylesheets included and excluded in `style[amp-custom]`. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. - Fetch (local) stylesheets with `@import`, instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. diff --git a/readme.txt b/readme.txt index 352b50b6ccd..09e6652be65 100644 --- a/readme.txt +++ b/readme.txt @@ -45,12 +45,16 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve == Changelog == = 1.0 (unreleased) = + - Add runtime CSS minification, `!important` replacement, and tree shaking. See [#1048](https://github.com/Automattic/amp-wp/pull/1048), [#1111](https://github.com/Automattic/amp-wp/pull/1111), [#1142](https://github.com/Automattic/amp-wp/pull/1142). Props westonruter, amedina, pbakaus, igrigorik, camelburrito. - Add ability to acknowledge and suppress/ignore specific validation errors. See [#1003](https://github.com/Automattic/amp-wp/issues/1003). Props westonruter. +- Extend admin screen options to add `amp` theme support without any coding required. Toggle between classic, paired, and native. Includes options for whether sanitization should be done by default and whether tree shaking should always be allowed. See [#1199](https://github.com/Automattic/amp-wp/pull/1199). Props westonruter. +- Add support for three core themes (Twenty Fifteen, Twenty Sixteen, Twenty Seventeen) so that they can be used out of the box with AMP theme support added without needing to create a child theme. See [#1074](https://github.com/Automattic/amp-wp/pull/1074). Props westonruter, DavidCramer, kienstra. +- Add AMP menu item to admin bar on frontend with indication of AMP validation status; accessing an AMP URL that has unaccepted validation errors will redirect to the non-AMP page and cause the AMP admin bar item to indicate the failure, along with a link to access the validation results. See [#1199](https://github.com/Automattic/amp-wp/pull/1199). Props westonruter. - Add dynamic handling of validation errors. See [#1093](https://github.com/Automattic/amp-wp/pull/1093), [#1063](https://github.com/Automattic/amp-wp/pull/1063), [#1087](https://github.com/Automattic/amp-wp/issues/1087). Props westonruter. - Add AMP validation of blocks. See [#1019](https://github.com/Automattic/amp-wp/pull/1019). Props westonruter. - Add AMP-specific functionality to core blocks. See [#1026](https://github.com/Automattic/amp-wp/pull/1026), [#1008](https://github.com/Automattic/amp-wp/issues/1008). Props miina. -- Add AMP media blocks. See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. +- Add AMP media blocks (when in native AMP mode). See [#1155](https://github.com/Automattic/amp-wp/pull/1155). Props miina. - Add embed handler for Gfycat. See [#1136](https://github.com/Automattic/amp-wp/pull/1136). Props miina. - Add amp-mathml block. See [#1165](https://github.com/Automattic/amp-wp/pull/1165). Props miina. - Add Gutenberg amp-timeago block. See [#1168](https://github.com/Automattic/amp-wp/pull/1168). Props miina. @@ -59,6 +63,7 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve - Fix issues in displaying native blocks. See [#1022](https://github.com/Automattic/amp-wp/pull/1022). Props miina. - Gutenberg: Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image. See [#1121](https://github.com/Automattic/amp-wp/pull/1121), [#1065](https://github.com/Automattic/amp-wp/issues/1065), [#1187](https://github.com/Automattic/amp-wp/pull/1187). Props miina, westonruter. - Cache post processor response. See [#1156](https://github.com/Automattic/amp-wp/pull/1156), [#959](https://github.com/Automattic/amp-wp/issues/959). Props ThierryA. +- Automatically redirect to `?amp` from `/amp/` URLs when `amp` theme support is present. See [#1203](https://github.com/Automattic/amp-wp/pull/1203), [#1194](https://github.com/Automattic/amp-wp/pull/1194). Props westonruter. - Incorporate Server Timing API. See [#990](https://github.com/Automattic/amp-wp/issues/990). Props westonruter. - Add information about stylesheets included and excluded in `style[amp-custom]`. See [#1135](https://github.com/Automattic/amp-wp/pull/1135). Props westonruter. - Fetch (local) stylesheets with `@import`, instead of removing them. See [#1181](https://github.com/Automattic/amp-wp/pull/1181). Props miina. From 5f3599b6a4205732fb9c1c3eb212a39fd686f328 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 8 Jun 2018 17:05:58 -0700 Subject: [PATCH 07/12] Bump version to 1.0-alpha1 --- amp.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amp.php b/amp.php index 0daee30a4b0..ef419328c96 100644 --- a/amp.php +++ b/amp.php @@ -5,7 +5,7 @@ * Plugin URI: https://github.com/automattic/amp-wp * Author: WordPress.com VIP, XWP, Google, and contributors * Author URI: https://github.com/Automattic/amp-wp/graphs/contributors - * Version: 1.0-alpha + * Version: 1.0-alpha1 * Text Domain: amp * Domain Path: /languages/ * License: GPLv2 or later @@ -49,7 +49,7 @@ function _amp_print_composer_install_admin_notice() { define( 'AMP__FILE__', __FILE__ ); define( 'AMP__DIR__', dirname( __FILE__ ) ); -define( 'AMP__VERSION', '1.0-alpha' ); +define( 'AMP__VERSION', '1.0-alpha1' ); require_once AMP__DIR__ . '/includes/class-amp-autoloader.php'; AMP_Autoloader::register(); From 9220bd0c91e961e759f2d5e599c16594265aaeca Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 8 Jun 2018 21:40:38 -0700 Subject: [PATCH 08/12] Prevent showing blocking error for validation errors when sanitization forced by filter Fix notice of trying to get property of non-object --- .../class-amp-invalid-url-post-type.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/includes/validation/class-amp-invalid-url-post-type.php b/includes/validation/class-amp-invalid-url-post-type.php index 93464b8e609..748705cfda3 100644 --- a/includes/validation/class-amp-invalid-url-post-type.php +++ b/includes/validation/class-amp-invalid-url-post-type.php @@ -861,7 +861,7 @@ public static function handle_validate_request() { throw new Exception( esc_html( $validity->get_error_code() ) ); } - $stored = self::store_validation_errors( $validity['validation_errors'], $validity['url'], $post->ID ); + $stored = self::store_validation_errors( $validity['validation_errors'], $validity['url'], $post ); if ( is_wp_error( $stored ) ) { throw new Exception( esc_html( $stored->get_error_code() ) ); } @@ -1010,6 +1010,10 @@ public static function add_meta_boxes() { * @return void */ public static function print_status_meta_box( $post ) { + $is_sanitization_forcibly_accepted_by_filter = AMP_Validation_Error_Taxonomy::is_validation_error_sanitized( array( + 'code' => 'does_not_exist', + ) ); + ?> - +

From 98ab051fc2d7798f4248d8f633c5025d532f27bb Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 8 Jun 2018 22:01:09 -0700 Subject: [PATCH 09/12] Restore emoji for New status; show status before label --- includes/validation/class-amp-invalid-url-post-type.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/validation/class-amp-invalid-url-post-type.php b/includes/validation/class-amp-invalid-url-post-type.php index 748705cfda3..e7b7c31d240 100644 --- a/includes/validation/class-amp-invalid-url-post-type.php +++ b/includes/validation/class-amp-invalid-url-post-type.php @@ -1194,23 +1194,26 @@ public static function print_validation_errors_meta_box( $post ) { From 4eaa0b4f32a09d8e6e808d205b4af95228d70b6f Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 8 Jun 2018 23:05:49 -0700 Subject: [PATCH 10/12] Prevent adding validation error count to URL when user does not have cap --- includes/class-amp-theme-support.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/class-amp-theme-support.php b/includes/class-amp-theme-support.php index a3195b222ff..20174c7c062 100644 --- a/includes/class-amp-theme-support.php +++ b/includes/class-amp-theme-support.php @@ -1227,11 +1227,13 @@ public static function prepare_response( $response, $args = array() ) { } else { $current_url = amp_get_current_url(); $ampless_url = amp_remove_endpoint( $current_url ); - $ampless_url = add_query_arg( - AMP_Validation_Manager::VALIDATION_ERRORS_QUERY_VAR, - $blocking_error_count, - $ampless_url - ); + if ( AMP_Validation_Manager::has_cap() ) { + $ampless_url = add_query_arg( + AMP_Validation_Manager::VALIDATION_ERRORS_QUERY_VAR, + $blocking_error_count, + $ampless_url + ); + } /* * Temporary redirect because AMP URL may return when blocking validation errors From 8128c17f740accce90b6ba9a1cde1b833e0a7b78 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 8 Jun 2018 23:52:05 -0700 Subject: [PATCH 11/12] Remove duplicated acceptance of validation errors; let filter-forced sanitization impact term status --- .../class-amp-invalid-url-post-type.php | 13 +++++++++++++ .../class-amp-validation-error-taxonomy.php | 2 ++ .../validation/class-amp-validation-manager.php | 17 ----------------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/includes/validation/class-amp-invalid-url-post-type.php b/includes/validation/class-amp-invalid-url-post-type.php index e7b7c31d240..49f12844178 100644 --- a/includes/validation/class-amp-invalid-url-post-type.php +++ b/includes/validation/class-amp-invalid-url-post-type.php @@ -373,6 +373,19 @@ public static function store_validation_errors( $validation_errors, $url, $post } $term_id = $r['term_id']; update_term_meta( $term_id, 'created_date_gmt', current_time( 'mysql', true ) ); + + /* + * When sanitization is forced by filter, make sure the term is created with the filtered status. + * For some reason, the wp_insert_term() function doesn't work with the term_group being passed in. + */ + $sanitization = AMP_Validation_Error_Taxonomy::get_validation_error_sanitization( $data ); + if ( 'with_filter' === $sanitization['forced'] ) { + wp_update_term( $term_id, AMP_Validation_Error_Taxonomy::TAXONOMY_SLUG, array( + 'term_group' => $sanitization['status'], + ) ); + $term_data['term_group'] = $sanitization['status']; + } + $term = get_term( $term_id ); } $terms[ $term_slug ] = $term; diff --git a/includes/validation/class-amp-validation-error-taxonomy.php b/includes/validation/class-amp-validation-error-taxonomy.php index f43d5e63c50..795947ffbc2 100644 --- a/includes/validation/class-amp-validation-error-taxonomy.php +++ b/includes/validation/class-amp-validation-error-taxonomy.php @@ -230,6 +230,8 @@ public static function get_validation_error_sanitization( $error ) { } $is_forced_with_option = ( + amp_is_canonical() + || AMP_Style_Sanitizer::TREE_SHAKING_ERROR_CODE === $error['code'] && AMP_Options_Manager::get_option( 'accept_tree_shaking' ) || AMP_Options_Manager::get_option( 'force_sanitization' ) diff --git a/includes/validation/class-amp-validation-manager.php b/includes/validation/class-amp-validation-manager.php index b0f4841092d..bb4199316e3 100644 --- a/includes/validation/class-amp-validation-manager.php +++ b/includes/validation/class-amp-validation-manager.php @@ -174,23 +174,6 @@ public static function init( $args = array() ) { add_action( 'admin_bar_menu', array( __CLASS__, 'add_admin_bar_menu_items' ), 100 ); - /* - * Set sanitization options on the frontend. These filters get added only on the frontend so that - * the user is able to keep track of the errors that they haven't seen before and decide whether - * they need to get fixed (rejected) or not (accepted). - */ - add_action( 'template_redirect', function() { - if ( AMP_Validation_Manager::is_sanitization_forcibly_accepted() ) { - AMP_Validation_Error_Taxonomy::accept_validation_errors( true ); - } elseif ( AMP_Options_Manager::get_option( 'accept_tree_shaking' ) ) { - AMP_Validation_Error_Taxonomy::accept_validation_errors( - array( - AMP_Style_Sanitizer::TREE_SHAKING_ERROR_CODE => true, - ) - ); - } - } ); - if ( self::$should_locate_sources ) { self::add_validation_error_sourcing(); } From 51ace1703dbd2dfd89b01765a37f9c5ff1cb779f Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 9 Jun 2018 00:39:33 -0700 Subject: [PATCH 12/12] Fix being able to set validation error status on term list table --- includes/validation/class-amp-validation-error-taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/validation/class-amp-validation-error-taxonomy.php b/includes/validation/class-amp-validation-error-taxonomy.php index 795947ffbc2..fef4a50f9e6 100644 --- a/includes/validation/class-amp-validation-error-taxonomy.php +++ b/includes/validation/class-amp-validation-error-taxonomy.php @@ -680,7 +680,7 @@ public static function filter_tag_row_actions( $actions, WP_Term $tag ) { unset( $actions['delete'] ); $sanitization = self::get_validation_error_sanitization( json_decode( $term->description, true ) ); - if ( self::VALIDATION_ERROR_REJECTED_STATUS !== $sanitization['status'] ) { + if ( self::VALIDATION_ERROR_REJECTED_STATUS !== $sanitization['term_status'] ) { $actions[ self::VALIDATION_ERROR_REJECT_ACTION ] = sprintf( '%s', wp_nonce_url( @@ -691,7 +691,7 @@ public static function filter_tag_row_actions( $actions, WP_Term $tag ) { esc_html__( 'Reject', 'amp' ) ); } - if ( self::VALIDATION_ERROR_ACCEPTED_STATUS !== $sanitization['status'] ) { + if ( self::VALIDATION_ERROR_ACCEPTED_STATUS !== $sanitization['term_status'] ) { $actions[ self::VALIDATION_ERROR_ACCEPT_ACTION ] = sprintf( '%s', wp_nonce_url(