AMP for WordPress - Version 1.5.5

Version Description

Download this release

Release Info

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

Code changes from version 1.5.4 to 1.5.5

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.5.4
9
  * Text Domain: amp
10
  * Domain Path: /languages/
11
  * License: GPLv2 or later
@@ -17,7 +17,7 @@
17
 
18
  define( 'AMP__FILE__', __FILE__ );
19
  define( 'AMP__DIR__', dirname( __FILE__ ) );
20
- define( 'AMP__VERSION', '1.5.4' );
21
 
22
  /**
23
  * 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.5.5
9
  * Text Domain: amp
10
  * Domain Path: /languages/
11
  * License: GPLv2 or later
17
 
18
  define( 'AMP__FILE__', __FILE__ );
19
  define( 'AMP__DIR__', dirname( __FILE__ ) );
20
+ define( 'AMP__VERSION', '1.5.5' );
21
 
22
  /**
23
  * Errors encountered while loading the plugin.
includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -4070,6 +4070,7 @@ class AMP_Allowed_Tags_Generated {
4070
  'allow_relative' => true,
4071
  'protocol' => array(
4072
  'https',
 
4073
  ),
4074
  ),
4075
  ),
4070
  'allow_relative' => true,
4071
  'protocol' => array(
4072
  'https',
4073
+ 'amp-state',
4074
  ),
4075
  ),
4076
  ),
includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php CHANGED
@@ -889,14 +889,21 @@ class AMP_Tag_And_Attribute_Sanitizer extends AMP_Base_Sanitizer {
889
  */
890
  private function get_missing_mandatory_attributes( $attr_spec, DOMElement $node ) {
891
  $missing_attributes = [];
 
892
  foreach ( $attr_spec as $attr_name => $attr_spec_rule_value ) {
 
 
 
 
893
  if ( '\u' === substr( $attr_name, 0, 2 ) ) {
894
  $attr_name = html_entity_decode( '&#x' . substr( $attr_name, 2 ) . ';' ); // Probably ⚡.
895
  }
 
896
  if ( ! $node->hasAttribute( $attr_name ) && AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_mandatory( $node, $attr_name, $attr_spec_rule_value ) ) {
897
  $missing_attributes[] = $attr_name;
898
  }
899
  }
 
900
  return $missing_attributes;
901
  }
902
 
889
  */
890
  private function get_missing_mandatory_attributes( $attr_spec, DOMElement $node ) {
891
  $missing_attributes = [];
892
+
893
  foreach ( $attr_spec as $attr_name => $attr_spec_rule_value ) {
894
+ if ( empty( $attr_spec_rule_value[ AMP_Rule_Spec::MANDATORY ] ) ) {
895
+ continue;
896
+ }
897
+
898
  if ( '\u' === substr( $attr_name, 0, 2 ) ) {
899
  $attr_name = html_entity_decode( '&#x' . substr( $attr_name, 2 ) . ';' ); // Probably ⚡.
900
  }
901
+
902
  if ( ! $node->hasAttribute( $attr_name ) && AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_mandatory( $node, $attr_name, $attr_spec_rule_value ) ) {
903
  $missing_attributes[] = $attr_name;
904
  }
905
  }
906
+
907
  return $missing_attributes;
908
  }
909
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: google, xwp, automattic, westonruter, albertomedina, schlessera, swissspidy, pierlo, ryankienstra
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.4
6
- Stable tag: 1.5.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires PHP: 5.6
2
  Contributors: google, xwp, automattic, westonruter, albertomedina, schlessera, swissspidy, pierlo, ryankienstra
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.5
6
+ Stable tag: 1.5.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires PHP: 5.6
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitd9baa440e9e56e97be99543689d7a8f5::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit8f292972ddd7d0d38f5352cc4d3b9aa1::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitd9baa440e9e56e97be99543689d7a8f5
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitd9baa440e9e56e97be99543689d7a8f5
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInitd9baa440e9e56e97be99543689d7a8f5', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInitd9baa440e9e56e97be99543689d7a8f5', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInitd9baa440e9e56e97be99543689d7a8f5::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInitd9baa440e9e56e97be99543689d7a8f5
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInitd9baa440e9e56e97be99543689d7a8f5::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequired9baa440e9e56e97be99543689d7a8f5($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequired9baa440e9e56e97be99543689d7a8f5($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit8f292972ddd7d0d38f5352cc4d3b9aa1
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit8f292972ddd7d0d38f5352cc4d3b9aa1', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit8f292972ddd7d0d38f5352cc4d3b9aa1', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit8f292972ddd7d0d38f5352cc4d3b9aa1::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit8f292972ddd7d0d38f5352cc4d3b9aa1::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire8f292972ddd7d0d38f5352cc4d3b9aa1($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire8f292972ddd7d0d38f5352cc4d3b9aa1($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitd9baa440e9e56e97be99543689d7a8f5
8
  {
9
  public static $files = array (
10
  '6f5653f9af3eab04254ad2c7f20515c8' => __DIR__ . '/../..' . '/back-compat/back-compat.php',
@@ -256,10 +256,10 @@ class ComposerStaticInitd9baa440e9e56e97be99543689d7a8f5
256
  public static function getInitializer(ClassLoader $loader)
257
  {
258
  return \Closure::bind(function () use ($loader) {
259
- $loader->prefixLengthsPsr4 = ComposerStaticInitd9baa440e9e56e97be99543689d7a8f5::$prefixLengthsPsr4;
260
- $loader->prefixDirsPsr4 = ComposerStaticInitd9baa440e9e56e97be99543689d7a8f5::$prefixDirsPsr4;
261
- $loader->prefixesPsr0 = ComposerStaticInitd9baa440e9e56e97be99543689d7a8f5::$prefixesPsr0;
262
- $loader->classMap = ComposerStaticInitd9baa440e9e56e97be99543689d7a8f5::$classMap;
263
 
264
  }, null, ClassLoader::class);
265
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit8f292972ddd7d0d38f5352cc4d3b9aa1
8
  {
9
  public static $files = array (
10
  '6f5653f9af3eab04254ad2c7f20515c8' => __DIR__ . '/../..' . '/back-compat/back-compat.php',
256
  public static function getInitializer(ClassLoader $loader)
257
  {
258
  return \Closure::bind(function () use ($loader) {
259
+ $loader->prefixLengthsPsr4 = ComposerStaticInit8f292972ddd7d0d38f5352cc4d3b9aa1::$prefixLengthsPsr4;
260
+ $loader->prefixDirsPsr4 = ComposerStaticInit8f292972ddd7d0d38f5352cc4d3b9aa1::$prefixDirsPsr4;
261
+ $loader->prefixesPsr0 = ComposerStaticInit8f292972ddd7d0d38f5352cc4d3b9aa1::$prefixesPsr0;
262
+ $loader->classMap = ComposerStaticInit8f292972ddd7d0d38f5352cc4d3b9aa1::$classMap;
263
 
264
  }, null, ClassLoader::class);
265
  }