AMP for WordPress - Version 2.0.3

Version Description

Download this release

Release Info

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

Code changes from version 2.0.2 to 2.0.3

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: 2.0.2
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', '2.0.2' );
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: 2.0.3
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', '2.0.3' );
21
 
22
  /**
23
  * Errors encountered while loading the plugin.
includes/sanitizers/class-amp-style-sanitizer.php CHANGED
@@ -538,7 +538,10 @@ class AMP_Style_Sanitizer extends AMP_Base_Sanitizer {
538
  // Find all [class] attributes and capture the contents of any single- or double-quoted strings.
539
  foreach ( $this->dom->xpath->query( '//*/@' . Document::AMP_BIND_DATA_ATTR_PREFIX . 'class' ) as $bound_class_attribute ) {
540
  if ( preg_match_all( '/([\'"])([^\1]*?)\1/', $bound_class_attribute->nodeValue, $matches ) ) {
541
- $classes = array_merge( $classes, $matches[2] );
 
 
 
542
  }
543
  }
544
 
538
  // Find all [class] attributes and capture the contents of any single- or double-quoted strings.
539
  foreach ( $this->dom->xpath->query( '//*/@' . Document::AMP_BIND_DATA_ATTR_PREFIX . 'class' ) as $bound_class_attribute ) {
540
  if ( preg_match_all( '/([\'"])([^\1]*?)\1/', $bound_class_attribute->nodeValue, $matches ) ) {
541
+ $classes = array_merge(
542
+ $classes,
543
+ preg_split( '/\s+/', trim( implode( ' ', $matches[2] ) ) )
544
+ );
545
  }
546
  }
547
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: google, xwp, automattic, westonruter, albertomedina, schlessera, s
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: 2.0.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires PHP: 5.6
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: 2.0.3
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 ComposerAutoloaderInit880b5dc4bf7f53dbeb23446ddff5e429::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitd061898e66f01c516f51a6aa8955d0b7::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit880b5dc4bf7f53dbeb23446ddff5e429
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit880b5dc4bf7f53dbeb23446ddff5e429
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit880b5dc4bf7f53dbeb23446ddff5e429', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit880b5dc4bf7f53dbeb23446ddff5e429', '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\ComposerStaticInit880b5dc4bf7f53dbeb23446ddff5e429::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit880b5dc4bf7f53dbeb23446ddff5e429
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit880b5dc4bf7f53dbeb23446ddff5e429::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire880b5dc4bf7f53dbeb23446ddff5e429($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire880b5dc4bf7f53dbeb23446ddff5e429($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 ComposerAutoloaderInitd061898e66f01c516f51a6aa8955d0b7
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitd061898e66f01c516f51a6aa8955d0b7', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitd061898e66f01c516f51a6aa8955d0b7', '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\ComposerStaticInitd061898e66f01c516f51a6aa8955d0b7::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\ComposerStaticInitd061898e66f01c516f51a6aa8955d0b7::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequired061898e66f01c516f51a6aa8955d0b7($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequired061898e66f01c516f51a6aa8955d0b7($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 ComposerStaticInit880b5dc4bf7f53dbeb23446ddff5e429
8
  {
9
  public static $files = array (
10
  '6f5653f9af3eab04254ad2c7f20515c8' => __DIR__ . '/../..' . '/back-compat/back-compat.php',
@@ -338,9 +338,9 @@ class ComposerStaticInit880b5dc4bf7f53dbeb23446ddff5e429
338
  public static function getInitializer(ClassLoader $loader)
339
  {
340
  return \Closure::bind(function () use ($loader) {
341
- $loader->prefixLengthsPsr4 = ComposerStaticInit880b5dc4bf7f53dbeb23446ddff5e429::$prefixLengthsPsr4;
342
- $loader->prefixDirsPsr4 = ComposerStaticInit880b5dc4bf7f53dbeb23446ddff5e429::$prefixDirsPsr4;
343
- $loader->classMap = ComposerStaticInit880b5dc4bf7f53dbeb23446ddff5e429::$classMap;
344
 
345
  }, null, ClassLoader::class);
346
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitd061898e66f01c516f51a6aa8955d0b7
8
  {
9
  public static $files = array (
10
  '6f5653f9af3eab04254ad2c7f20515c8' => __DIR__ . '/../..' . '/back-compat/back-compat.php',
338
  public static function getInitializer(ClassLoader $loader)
339
  {
340
  return \Closure::bind(function () use ($loader) {
341
+ $loader->prefixLengthsPsr4 = ComposerStaticInitd061898e66f01c516f51a6aa8955d0b7::$prefixLengthsPsr4;
342
+ $loader->prefixDirsPsr4 = ComposerStaticInitd061898e66f01c516f51a6aa8955d0b7::$prefixDirsPsr4;
343
+ $loader->classMap = ComposerStaticInitd061898e66f01c516f51a6aa8955d0b7::$classMap;
344
 
345
  }, null, ClassLoader::class);
346
  }