AMP for WordPress - Version 1.4.4

Version Description

Download this release

Release Info

Developer westonruter
Plugin Icon 128x128 AMP for WordPress
Version 1.4.4
Comparing to
See all releases

Code changes from version 1.4.3 to 1.4.4

amp.php CHANGED
@@ -5,7 +5,7 @@
5
* Plugin URI: https://amp-wp.org
6
* Author: AMP Project Contributors
7
* Author URI: https://github.com/ampproject/amp-wp/graphs/contributors
8
- * Version: 1.4.3
9
* Text Domain: amp
10
* Domain Path: /languages/
11
* License: GPLv2 or later
@@ -15,7 +15,7 @@
15
16
define( 'AMP__FILE__', __FILE__ );
17
define( 'AMP__DIR__', dirname( __FILE__ ) );
18
- define( 'AMP__VERSION', '1.4.3' );
19
20
/**
21
* Errors encountered while loading the plugin.
5
* Plugin URI: https://amp-wp.org
6
* Author: AMP Project Contributors
7
* Author URI: https://github.com/ampproject/amp-wp/graphs/contributors
8
+ * Version: 1.4.4
9
* Text Domain: amp
10
* Domain Path: /languages/
11
* License: GPLv2 or later
15
16
define( 'AMP__FILE__', __FILE__ );
17
define( 'AMP__DIR__', dirname( __FILE__ ) );
18
+ define( 'AMP__VERSION', '1.4.4' );
19
20
/**
21
* Errors encountered while loading the plugin.
includes/admin/class-amp-admin-pointers.php CHANGED
@@ -82,7 +82,7 @@ class AMP_Admin_Pointers {
82
'description' => implode(
83
' ',
84
[
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' ),
86
sprintf(
87
'<a href="%s" target="_blank">%s</a>',
88
esc_url( 'https://amp-wp.org/documentation/amp-stories/exporting-stories/' ),
82
'description' => implode(
83
' ',
84
[
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' ),
86
sprintf(
87
'<a href="%s" target="_blank">%s</a>',
88
esc_url( 'https://amp-wp.org/documentation/amp-stories/exporting-stories/' ),
includes/options/class-amp-options-manager.php CHANGED
@@ -595,7 +595,7 @@ class AMP_Options_Manager {
595
) {
596
printf(
597
'<div class="notice notice-warning"><p>%s %s</p></div>',
598
- 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' ),
599
sprintf(
600
'<a href="%s" target="_blank">%s</a>',
601
esc_url( 'https://amp-wp.org/documentation/amp-stories/exporting-stories/' ),
@@ -605,7 +605,7 @@ class AMP_Options_Manager {
605
} elseif ( ! self::is_stories_experience_enabled() && 'toplevel_page_' . self::OPTION_NAME === get_current_screen()->id ) {
606
printf(
607
'<div class="notice notice-info"><p>%s</p></div>',
608
- 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' )
609
);
610
}
611
}
@@ -630,7 +630,7 @@ class AMP_Options_Manager {
630
}
631
);
632
} )( window.wp );",
633
- 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' ) ),
634
wp_json_encode( __( 'View how to export your Stories', 'amp' ) )
635
);
636
595
) {
596
printf(
597
'<div class="notice notice-warning"><p>%s %s</p></div>',
598
+ 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' ),
599
sprintf(
600
'<a href="%s" target="_blank">%s</a>',
601
esc_url( 'https://amp-wp.org/documentation/amp-stories/exporting-stories/' ),
605
} elseif ( ! self::is_stories_experience_enabled() && 'toplevel_page_' . self::OPTION_NAME === get_current_screen()->id ) {
606
printf(
607
'<div class="notice notice-info"><p>%s</p></div>',
608
+ esc_html__( 'The Stories experience is being extracted into a standalone plugin which will be available soon.', 'amp' )
609
);
610
}
611
}
630
}
631
);
632
} )( window.wp );",
633
+ 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' ) ),
634
wp_json_encode( __( 'View how to export your Stories', 'amp' ) )
635
);
636
includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -15479,7 +15479,7 @@ class AMP_Allowed_Tags_Generated {
15479
),
15480
'validate_keyframes' => false,
15481
),
15482
- 'max_bytes' => 50000,
15483
'max_bytes_spec_url' => 'https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml#maximum-size',
15484
),
15485
'tag_spec' => array(
15479
),
15480
'validate_keyframes' => false,
15481
),
15482
+ 'max_bytes' => 75000,
15483
'max_bytes_spec_url' => 'https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml#maximum-size',
15484
),
15485
'tag_spec' => array(
includes/sanitizers/class-amp-style-sanitizer.php CHANGED
@@ -884,7 +884,7 @@ class AMP_Style_Sanitizer extends AMP_Base_Sanitizer {
884
* As with hooks, lower priorities mean they should be included first.
885
* The higher the priority value, the more likely it will be that the
886
* stylesheet will be among those excluded due to 'excessive_css' when
887
- * concatenated CSS reaches 50KB.
888
*
889
* @todo This will eventually need to be abstracted to not be CMS-specific, allowing for the prioritization scheme to be defined by configuration.
890
*
884
* As with hooks, lower priorities mean they should be included first.
885
* The higher the priority value, the more likely it will be that the
886
* stylesheet will be among those excluded due to 'excessive_css' when
887
+ * concatenated CSS reaches 75KB.
888
*
889
* @todo This will eventually need to be abstracted to not be CMS-specific, allowing for the prioritization scheme to be defined by configuration.
890
*
includes/validation/class-amp-validation-error-taxonomy.php CHANGED
@@ -2070,7 +2070,7 @@ class AMP_Validation_Error_Taxonomy {
2070
echo wp_kses_post(
2071
sprintf(
2072
/* translators: 1: Documentation URL, 2: Documentation URL, 3: !important */
2073
- __( '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' ),
2074
'https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/',
2075
'https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/',
2076
'<code>!important</code>'
2070
echo wp_kses_post(
2071
sprintf(
2072
/* translators: 1: Documentation URL, 2: Documentation URL, 3: !important */
2073
+ __( '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' ),
2074
'https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/',
2075
'https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/',
2076
'<code>!important</code>'
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: google, xwp, automattic, westonruter, swissspidy, miinasikk, ryank
3
Tags: amp, mobile, optimization, accelerated mobile pages, framework, components, blocks, performance, ux, seo, official
4
Requires at least: 4.9
5
Tested up to: 5.3.2
6
- Stable tag: 1.4.3
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
Requires PHP: 5.4
@@ -19,7 +19,7 @@ Features and capabilities provided by the plugin include:
19
- **AMP-first Experiences**: enabling [full-site AMP experiences](https://amp.dev/about/websites) without sacrificing the flexibility of the platform or the fidelity of content.
20
- **Core Theme Support**: enabling AMP compatibility for all core themes, from Twenty Ten all the way through Twenty Twenty.
21
- **Compatibility Tool**: when automatic conversion of markup to AMP is not possible, debug AMP validation errors with detailed information including the invalid markup and the specific components responsible on site (e.g theme, plugin, embed); validation errors are shown contextually with their respective blocks in the editor.
22
- - **CSS Tree Shaking**: automatically remove the majority of unused CSS to bring the total under AMP's 50KB limit; when the total after tree shaking is still over this limit, prioritization is used so that the all-important theme stylesheet important is retained, leaving less important ones to be excluded (e.g. print styles).
23
24
Please note that the [Stories](https://amp.dev/about/stories) experience is being removed from the AMP plugin in favor of the feature being released as a standalone plugin. It will be available soon!
25
@@ -56,7 +56,7 @@ If you are a developer, we encourage you to [follow along](https://github.com/am
56
9. The editor will surface validation issues during content authoring. The specific blocks with validation errors are indicated.
57
10. Each Validated URL shows the list of validation errors encountered, giving control over whether invalid markup is removed or kept. Keeping invalid markup disables AMP.
58
11. Each validation error provides a stack trace to identify which code is responsible for the invalid markup, whether a theme, plugin, embed, content block, and so on.
59
- 12. Styles added by themes and plugins are automatically concatenated, minified, and tree-shaken to try to keep the total under 50KB of inline CSS.
60
13. A WP-CLI command is provided to check the URLs on a site for AMP validity. Results are available in the admin for inspection.
61
62
== Changelog ==
3
Tags: amp, mobile, optimization, accelerated mobile pages, framework, components, blocks, performance, ux, seo, official
4
Requires at least: 4.9
5
Tested up to: 5.3.2
6
+ Stable tag: 1.4.4
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
Requires PHP: 5.4
19
- **AMP-first Experiences**: enabling [full-site AMP experiences](https://amp.dev/about/websites) without sacrificing the flexibility of the platform or the fidelity of content.
20
- **Core Theme Support**: enabling AMP compatibility for all core themes, from Twenty Ten all the way through Twenty Twenty.
21
- **Compatibility Tool**: when automatic conversion of markup to AMP is not possible, debug AMP validation errors with detailed information including the invalid markup and the specific components responsible on site (e.g theme, plugin, embed); validation errors are shown contextually with their respective blocks in the editor.
22
+ - **CSS Tree Shaking**: automatically remove the majority of unused CSS to bring the total under AMP's 75KB limit; when the total after tree shaking is still over this limit, prioritization is used so that the all-important theme stylesheet important is retained, leaving less important ones to be excluded (e.g. print styles).
23
24
Please note that the [Stories](https://amp.dev/about/stories) experience is being removed from the AMP plugin in favor of the feature being released as a standalone plugin. It will be available soon!
25
56
9. The editor will surface validation issues during content authoring. The specific blocks with validation errors are indicated.
57
10. Each Validated URL shows the list of validation errors encountered, giving control over whether invalid markup is removed or kept. Keeping invalid markup disables AMP.
58
11. Each validation error provides a stack trace to identify which code is responsible for the invalid markup, whether a theme, plugin, embed, content block, and so on.
59
+ 12. Styles added by themes and plugins are automatically concatenated, minified, and tree-shaken to try to keep the total under 75KB of inline CSS.
60
13. A WP-CLI command is provided to check the URLs on a site for AMP validity. Results are available in the admin for inspection.
61
62
== Changelog ==
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
5
require_once __DIR__ . '/composer/autoload_real.php';
6
7
- return ComposerAutoloaderInitebb5645c12770c55500ceb765fc622fb::getLoader();
4
5
require_once __DIR__ . '/composer/autoload_real.php';
6
7
+ return ComposerAutoloaderInit89d25d6c150c693f89f827879baa004d::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
3
// autoload_real.php @generated by Composer
4
5
- class ComposerAutoloaderInitebb5645c12770c55500ceb765fc622fb
6
{
7
private static $loader;
8
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitebb5645c12770c55500ceb765fc622fb
19
return self::$loader;
20
}
21
22
- spl_autoload_register(array('ComposerAutoloaderInitebb5645c12770c55500ceb765fc622fb', 'loadClassLoader'), true, true);
23
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitebb5645c12770c55500ceb765fc622fb', 'loadClassLoader'));
25
26
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
if ($useStaticLoader) {
28
require_once __DIR__ . '/autoload_static.php';
29
30
- call_user_func(\Composer\Autoload\ComposerStaticInitebb5645c12770c55500ceb765fc622fb::getInitializer($loader));
31
} else {
32
$map = require __DIR__ . '/autoload_namespaces.php';
33
foreach ($map as $namespace => $path) {
2
3
// autoload_real.php @generated by Composer
4
5
+ class ComposerAutoloaderInit89d25d6c150c693f89f827879baa004d
6
{
7
private static $loader;
8
19
return self::$loader;
20
}
21
22
+ spl_autoload_register(array('ComposerAutoloaderInit89d25d6c150c693f89f827879baa004d', 'loadClassLoader'), true, true);
23
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit89d25d6c150c693f89f827879baa004d', 'loadClassLoader'));
25
26
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
if ($useStaticLoader) {
28
require_once __DIR__ . '/autoload_static.php';
29
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit89d25d6c150c693f89f827879baa004d::getInitializer($loader));
31
} else {
32
$map = require __DIR__ . '/autoload_namespaces.php';
33
foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
5
namespace Composer\Autoload;
6
7
- class ComposerStaticInitebb5645c12770c55500ceb765fc622fb
8
{
9
public static $prefixLengthsPsr4 = array (
10
'W' =>
@@ -80,10 +80,10 @@ class ComposerStaticInitebb5645c12770c55500ceb765fc622fb
80
public static function getInitializer(ClassLoader $loader)
81
{
82
return \Closure::bind(function () use ($loader) {
83
- $loader->prefixLengthsPsr4 = ComposerStaticInitebb5645c12770c55500ceb765fc622fb::$prefixLengthsPsr4;
84
- $loader->prefixDirsPsr4 = ComposerStaticInitebb5645c12770c55500ceb765fc622fb::$prefixDirsPsr4;
85
- $loader->prefixesPsr0 = ComposerStaticInitebb5645c12770c55500ceb765fc622fb::$prefixesPsr0;
86
- $loader->classMap = ComposerStaticInitebb5645c12770c55500ceb765fc622fb::$classMap;
87
88
}, null, ClassLoader::class);
89
}
4
5
namespace Composer\Autoload;
6
7
+ class ComposerStaticInit89d25d6c150c693f89f827879baa004d
8
{
9
public static $prefixLengthsPsr4 = array (
10
'W' =>
80
public static function getInitializer(ClassLoader $loader)
81
{
82
return \Closure::bind(function () use ($loader) {
83
+ $loader->prefixLengthsPsr4 = ComposerStaticInit89d25d6c150c693f89f827879baa004d::$prefixLengthsPsr4;
84
+ $loader->prefixDirsPsr4 = ComposerStaticInit89d25d6c150c693f89f827879baa004d::$prefixDirsPsr4;
85
+ $loader->prefixesPsr0 = ComposerStaticInit89d25d6c150c693f89f827879baa004d::$prefixesPsr0;
86
+ $loader->classMap = ComposerStaticInit89d25d6c150c693f89f827879baa004d::$classMap;
87
88
}, null, ClassLoader::class);
89
}