Skip to content

Commit 4a08b95

Browse files
committed
Merge branch 'develop' of github.com:ampproject/amp-wp into fix/relative-stylesheet-urls
* 'develop' of github.com:ampproject/amp-wp: (23 commits) Bump stable tag to 1.4.4 Simplify notice text for Stories removal (#4314) Update composer.lock Bump amp-custom style limit from 50000 to 75000 bytes Update composer.lock Update wp-cli/wp-cli to v2.4.1 Revert "Ignore wp-cli/wp-cli patch for mustache/mustache" Update dependency svg-inline-loader to v0.8.2 (#4302) Update dependency @wordpress/editor to v9.12.1 (#4306) Update dependency @wordpress/server-side-render to v1.8.1 (#4308) Update dependency @wordpress/nux to v3.12.1 (#4307) Update dependency @wordpress/edit-post to v3.13.1 (#4305) Update dependency @wordpress/components to v9.2.1 (#4304) Update dependency @wordpress/block-editor to v3.7.1 (#4303) Update dependency postcss to v7.0.27 (#4309) Update dependency browserslist to v4.8.7 (#4287) Update dependency terser-webpack-plugin to v2.3.5 (#4291) Update dependency sirbrillig/phpcs-variable-analysis to v2.8.1 Ignore wp-cli/wp-cli patch for mustache/mustache Add test ...
2 parents e6d9ad4 + b059e63 commit 4a08b95

13 files changed

+352
-1010
lines changed

composer.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"ext-spl": "*",
1515
"cweagans/composer-patches": "1.6.7",
1616
"fasterimage/fasterimage": "1.5.0",
17-
"sabberworm/php-css-parser": "8.3.0"
17+
"sabberworm/php-css-parser": "dev-master#134f4e6"
1818
},
1919
"require-dev": {
2020
"dealerdirect/phpcodesniffer-composer-installer": "0.6.2",
2121
"mikey179/vfsstream": "1.6.8",
2222
"phpcompatibility/phpcompatibility-wp": "2.1.0",
2323
"roave/security-advisories": "dev-master",
24-
"sirbrillig/phpcs-variable-analysis": "2.6.2",
25-
"wp-cli/wp-cli": "2.4.0",
24+
"sirbrillig/phpcs-variable-analysis": "2.8.1",
25+
"wp-cli/wp-cli": "2.4.1",
2626
"wp-coding-standards/wpcs": "2.2.1",
2727
"xwp/wp-dev-lib": "1.5.0"
2828
},
@@ -42,6 +42,7 @@
4242
"patches": {
4343
"sabberworm/php-css-parser": {
4444
"Fix parsing CSS selectors which contain commas <https://github.com/sabberworm/PHP-CSS-Parser/pull/138>": "https://github.com/sabberworm/PHP-CSS-Parser/commit/fa139f65c5b098ae652c970b25e6eb03fc495eb4.diff",
45+
"Fix validation of selectors": "patches/php-css-parser-138-extended.patch",
4546
"Validate name-start code points for identifier <https://github.com/sabberworm/PHP-CSS-Parser/pull/185>": "patches/php-css-parser-pull-185.patch"
4647
}
4748
}
@@ -55,5 +56,12 @@
5556
"psr-4": {
5657
"Amp\\AmpWP\\Tests\\": "tests/php/src/"
5758
}
58-
}
59+
},
60+
"repositories": [
61+
{
62+
"type": "vcs",
63+
"url": "https://github.com/sabberworm/PHP-CSS-Parser.git",
64+
"no-api": true
65+
}
66+
]
5967
}

composer.lock

Lines changed: 30 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/admin/class-amp-admin-pointers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private function get_pointers() {
8282
'description' => implode(
8383
' ',
8484
[
85-
esc_html__( 'The Stories experience is being extracted from the AMP plugin into a separate standalone plugin which will be available soon. Please back up or export your existing Stories as they will not be available in the next version of the AMP plugin.', 'amp' ),
85+
esc_html__( 'The Stories experience is being extracted into a standalone plugin which will be available soon. Please back up or export your existing Stories as they will not be available in the next version of the AMP plugin.', 'amp' ),
8686
sprintf(
8787
'<a href="%s" target="_blank">%s</a>',
8888
esc_url( 'https://amp-wp.org/documentation/amp-stories/exporting-stories/' ),

includes/options/class-amp-options-manager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ public static function render_stories_deprecation_notice() {
593593
) {
594594
printf(
595595
'<div class="notice notice-warning"><p>%s %s</p></div>',
596-
esc_html__( 'The Stories experience is being extracted from the AMP plugin into a separate standalone plugin which will be available soon. Please back up or export your existing Stories as they will not be available in the next version of the AMP plugin.', 'amp' ),
596+
esc_html__( 'The Stories experience is being extracted into a standalone plugin which will be available soon. Please back up or export your existing Stories as they will not be available in the next version of the AMP plugin.', 'amp' ),
597597
sprintf(
598598
'<a href="%s" target="_blank">%s</a>',
599599
esc_url( 'https://amp-wp.org/documentation/amp-stories/exporting-stories/' ),
@@ -603,7 +603,7 @@ public static function render_stories_deprecation_notice() {
603603
} elseif ( ! self::is_stories_experience_enabled() && 'toplevel_page_' . self::OPTION_NAME === get_current_screen()->id ) {
604604
printf(
605605
'<div class="notice notice-info"><p>%s</p></div>',
606-
esc_html__( 'The Stories experience has been removed from the AMP plugin. This beta feature is being split into a separate standalone plugin which will be available for installation soon.', 'amp' )
606+
esc_html__( 'The Stories experience is being extracted into a standalone plugin which will be available soon.', 'amp' )
607607
);
608608
}
609609
}
@@ -628,7 +628,7 @@ public static function render_stories_deprecation_editor_notice() {
628628
}
629629
);
630630
} )( window.wp );",
631-
wp_json_encode( __( 'The Stories experience is being extracted from the AMP plugin into a separate standalone plugin which will be available soon. Please back up or export your existing Stories as they will not be available in the next version of the AMP plugin.', 'amp' ) ),
631+
wp_json_encode( __( 'The Stories experience is being extracted into a standalone plugin which will be available soon. Please back up or export your existing Stories as they will not be available in the next version of the AMP plugin.', 'amp' ) ),
632632
wp_json_encode( __( 'View how to export your Stories', 'amp' ) )
633633
);
634634

includes/sanitizers/class-amp-allowed-tags-generated.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15428,7 +15428,7 @@ class AMP_Allowed_Tags_Generated {
1542815428
),
1542915429
'validate_keyframes' => false,
1543015430
),
15431-
'max_bytes' => 50000,
15431+
'max_bytes' => 75000,
1543215432
'max_bytes_spec_url' => 'https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml#maximum-size',
1543315433
),
1543415434
'tag_spec' => array(

includes/sanitizers/class-amp-style-sanitizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ public function sanitize() {
896896
* As with hooks, lower priorities mean they should be included first.
897897
* The higher the priority value, the more likely it will be that the
898898
* stylesheet will be among those excluded due to STYLESHEET_TOO_LONG when
899-
* concatenated CSS reaches 50KB.
899+
* concatenated CSS reaches 75KB.
900900
*
901901
* @todo This will eventually need to be abstracted to not be CMS-specific, allowing for the prioritization scheme to be defined by configuration.
902902
*
@@ -1511,7 +1511,7 @@ private function get_parsed_stylesheet( $stylesheet, $options = [] ) {
15111511
$parsed = null;
15121512
$cache_key = null;
15131513
$cached = true;
1514-
$cache_group = 'amp-parsed-stylesheet-v25'; // This should be bumped whenever the PHP-CSS-Parser is updated or parsed format is updated.
1514+
$cache_group = 'amp-parsed-stylesheet-v26'; // This should be bumped whenever the PHP-CSS-Parser is updated or parsed format is updated.
15151515

15161516
$cache_impacting_options = array_merge(
15171517
wp_array_slice_assoc(

includes/validation/class-amp-validation-error-taxonomy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,7 @@ public static function render_single_url_error_details( $validation_error, $term
20772077
echo wp_kses_post(
20782078
sprintf(
20792079
/* translators: 1: Documentation URL, 2: Documentation URL, 3: !important */
2080-
__( 'AMP allows you to <a href="%1$s">style your pages using CSS</a> in much the same way as regular HTML pages, however there are some <a href="%2$s">restrictions</a>. Nevertheless, the AMP plugin automatically inlines external stylesheets, transforms %3$s qualifiers, and uses tree shaking to remove the majority of CSS rules that do not apply to the current page. Nevertheless, AMP does have a 50KB limit and tree shaking cannot always reduce the amount of CSS under this limit; when this happens an excessive CSS error will result.', 'amp' ),
2080+
__( 'AMP allows you to <a href="%1$s">style your pages using CSS</a> in much the same way as regular HTML pages, however there are some <a href="%2$s">restrictions</a>. Nevertheless, the AMP plugin automatically inlines external stylesheets, transforms %3$s qualifiers, and uses tree shaking to remove the majority of CSS rules that do not apply to the current page. Nevertheless, AMP does have a 75KB limit and tree shaking cannot always reduce the amount of CSS under this limit; when this happens an excessive CSS error will result.', 'amp' ),
20812081
'https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/',
20822082
'https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/',
20832083
'<code>!important</code>'

0 commit comments

Comments
 (0)