WebP Express - Version 0.17.3

Version Description

(released: 3 Feb 2020)

  • Fixed critical bug: Fatal error after updating plugin (if one had been postponing updating WebP Express for a while and then updated Wordpress to 5.3 and THEN updated WebP Express)
  • A critical bug was fixed in the webp-convert library (PHP 7.4 related)
  • A critical bug was fixed in dom-util-for-webp library (PHP 7.4 related)
  • Alter HTML now processes the "poster" attribute in Video tags. Thanks to @MikhailRoot from Russia for the PR on github.
  • On some Litespeed hosts, WebP Express reported that mod_headers was not available even though it was. Thanks to @lubieowoce from Poland for the PR on github)

For more info, see the closed issues on the 0.17.3 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/31?closed=1

Download this release

Release Info

Developer rosell.dk
Plugin Icon 128x128 WebP Express
Version 0.17.3
Comparing to
See all releases

Code changes from version 0.17.2 to 0.17.3

Files changed (35) hide show
  1. README.md +16 -0
  2. README.txt +16 -2
  3. changelog.txt +10 -0
  4. composer.json +2 -2
  5. composer.lock +16 -13
  6. htaccess-capability-tests/has-mod-header/.htaccess +3 -1
  7. htaccess-capability-tests/has-mod-header/test.php +4 -4
  8. lib/classes/AdminInit.php +6 -3
  9. lib/classes/AlterHtmlImageUrls.php +1 -1
  10. lib/classes/ConvertHelperIndependent.php +1 -1
  11. lib/migrate/migrate12.php +4 -0
  12. lib/options/enqueue_scripts.php +1 -1
  13. lib/options/js/0.16.0/bulk-convert.js +3 -1
  14. lib/options/js/0.16.0/test-convert.js +1 -0
  15. lib/options/options/alter-html/alter-html-options.inc +1 -1
  16. lib/options/options/conversion-options/bulk-convert.inc +1 -0
  17. lib/options/options/conversion-options/converter-options/wpc.php +3 -3
  18. vendor/composer/autoload_classmap.php +86 -0
  19. vendor/composer/autoload_static.php +90 -0
  20. vendor/composer/installed.json +17 -14
  21. vendor/rosell-dk/dom-util-for-webp/composer.json +3 -0
  22. vendor/rosell-dk/dom-util-for-webp/src/ImageUrlReplacer.php +13 -2
  23. vendor/rosell-dk/dom-util-for-webp/src/PictureTags.php +11 -0
  24. vendor/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php +2 -3
  25. vendor/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/LoggerTrait.php +2 -2
  26. vendor/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/WarningLoggerTrait.php +1 -1
  27. vendor/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/ExecTrait.php +1 -0
  28. vendor/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php +1 -0
  29. vendor/rosell-dk/webp-convert/src/Convert/Converters/Ewww.php +2 -2
  30. vendor/rosell-dk/webp-convert/src/Convert/Converters/Gd.php +24 -24
  31. vendor/rosell-dk/webp-convert/src/Convert/Converters/Stack.php +2 -3
  32. vendor/rosell-dk/webp-convert/src/Helpers/PathChecker.php +1 -1
  33. vendor/rosell-dk/webp-convert/src/Serve/ServeConvertedWebP.php +2 -0
  34. vendor/rosell-dk/webp-convert/src/Serve/ServeConvertedWebPWithErrorHandling.php +1 -1
  35. webp-express.php +1 -1
README.md CHANGED
@@ -644,6 +644,9 @@ RewriteRule . - [L]
644
  ```
645
  If you got any further questions, look at, or comment on [this topic](https://wordpress.org/support/topic/can-i-make-an-exception-for-specific-post-image/)
646
 
 
 
 
647
  ### When is feature X coming? / Roadmap
648
  No schedule. I move forward as time allows. I currently spend a lot of time answering questions in the support forum. If someone would be nice and help out answering questions here, it would allow me to spend that time developing. Also, donations would allow me to turn down some of the more boring requests from my customers, and speed things up here.
649
 
@@ -651,12 +654,25 @@ Here are my current plans ahead: 0.17 will probably be a file manager-like inter
651
 
652
  If you wish to affect priorities, it is certainly possible. You can try to argue your case in the forum or you can simply let the money do the talking. By donating as little as a cup of coffee on [ko-fi.com/rosell](https://ko-fi.com/rosell), you can leave a wish. I shall take these wishes into account when prioritizing between new features.
653
 
 
 
 
 
 
 
 
 
 
 
 
654
  ## Changes in 0.17.2
655
  *(released: 5 Oct 2019)*
656
 
657
  * Fixed bug: Updating plugin failed on some systems (in the unzip phase). Problem was introduced in 0.17.0 with the updated binaries.
658
  * Fixed bug: Alter HTML used the protocol (http/https) for the site for generated links (rather than keeping the protocol for the link). Thanks to Jacob Gullberg from Sweden for discovering this bug.
659
 
 
 
660
  For more info, see the closed issues on the 0.17.2 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/29?closed=1
661
 
662
  ## Changes in 0.17.1
644
  ```
645
  If you got any further questions, look at, or comment on [this topic](https://wordpress.org/support/topic/can-i-make-an-exception-for-specific-post-image/)
646
 
647
+ ### Update failed and cannot reinstall
648
+ The 0.17.0 release contained binaries with dots in their filenames, which caused the unpacking during update to fail on a few systems. This failure could leave an incomplete installation. With important files missing - such as the main plugin file - Wordpress no longer registers that the plugin is there (it is missing from the list). However, the folder is there in the file system and trying to install WebP Express again fails because Wordpress complains about just that. The solution is to remove the "webp-express" folder in "plugins" manually (via ftp or a plugin, such as File Manager) and then install WebP Express anew. The setting will be intact. The filenames that caused the trouble where fixed in 0.17.2.
649
+
650
  ### When is feature X coming? / Roadmap
651
  No schedule. I move forward as time allows. I currently spend a lot of time answering questions in the support forum. If someone would be nice and help out answering questions here, it would allow me to spend that time developing. Also, donations would allow me to turn down some of the more boring requests from my customers, and speed things up here.
652
 
654
 
655
  If you wish to affect priorities, it is certainly possible. You can try to argue your case in the forum or you can simply let the money do the talking. By donating as little as a cup of coffee on [ko-fi.com/rosell](https://ko-fi.com/rosell), you can leave a wish. I shall take these wishes into account when prioritizing between new features.
656
 
657
+ ## 0.17.3
658
+ *(released: 3 Feb 2020)*
659
+
660
+ * Fixed critical bug: Fatal error after updating plugin (if one had been postponing updating WebP Express for a while and then updated Wordpress and THEN updated WebP Express)
661
+ * A critical bug was fixed in the webp-convert library (PHP 7.4 related)
662
+ * A critical bug was fixed in dom-util-for-webp library (PHP 7.4 related)
663
+ * Alter HTML now processes the "poster" attribute in Video tags. Thanks to @MikhailRoot from Russia for the PR on github.
664
+ * On some Litespeed hosts, WebP Express reported that mod_headers was not available even though it was. Thanks to @lubieowoce from Poland for the PR on github)
665
+
666
+ For more info, see the closed issues on the 0.17.3 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/31?closed=1
667
+
668
  ## Changes in 0.17.2
669
  *(released: 5 Oct 2019)*
670
 
671
  * Fixed bug: Updating plugin failed on some systems (in the unzip phase). Problem was introduced in 0.17.0 with the updated binaries.
672
  * Fixed bug: Alter HTML used the protocol (http/https) for the site for generated links (rather than keeping the protocol for the link). Thanks to Jacob Gullberg from Sweden for discovering this bug.
673
 
674
+ If you experienced update problems due to the update bug, you will probably be left with an incomplete installation. Some of the plugin files are there, but not all. Especially, the main plugin file (webp-express.php) is missing, which means that Wordpress don't "see" the plugin (it is missing from the list). Trying to install WebP Express again will probably not work, because the "webp-express" folder is already there. You will then have to remove the "webp-express" folder in "plugins" manually (via ftp or a plugin, such as File Manager).
675
+
676
  For more info, see the closed issues on the 0.17.2 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/29?closed=1
677
 
678
  ## Changes in 0.17.1
README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: rosell.dk
3
  Donate link: https://ko-fi.com/rosell
4
  Tags: webp, images, performance
5
  Requires at least: 4.0
6
- Tested up to: 5.2
7
- Stable tag: 0.17.2
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -662,6 +662,17 @@ Easy enough! - [Go here!](https://ko-fi.com/rosell). Or [here](https://buymeacof
662
 
663
  == Changelog ==
664
 
 
 
 
 
 
 
 
 
 
 
 
665
  = 0.17.2 =
666
  *(released: 5 Oct 2019)*
667
 
@@ -1063,6 +1074,9 @@ For older releases, check out changelog.txt
1063
 
1064
  == Upgrade Notice ==
1065
 
 
 
 
1066
  = 0.17.2 =
1067
  * Fixed bug: Updating plugin failed on a few hosts (in the unzip phase). The problem was introduced in 0.17.0 where the binaries contains dots in their filename.
1068
 
3
  Donate link: https://ko-fi.com/rosell
4
  Tags: webp, images, performance
5
  Requires at least: 4.0
6
+ Tested up to: 5.3
7
+ Stable tag: 0.17.3
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
662
 
663
  == Changelog ==
664
 
665
+ = 0.17.3 =
666
+ *(released: 3 Feb 2020)*
667
+
668
+ * Fixed critical bug: Fatal error after updating plugin (if one had been postponing updating WebP Express for a while and then updated Wordpress to 5.3 and THEN updated WebP Express)
669
+ * A critical bug was fixed in the webp-convert library (PHP 7.4 related)
670
+ * A critical bug was fixed in dom-util-for-webp library (PHP 7.4 related)
671
+ * Alter HTML now processes the "poster" attribute in Video tags. Thanks to @MikhailRoot from Russia for the PR on github.
672
+ * On some Litespeed hosts, WebP Express reported that mod_headers was not available even though it was. Thanks to @lubieowoce from Poland for the PR on github)
673
+
674
+ For more info, see the closed issues on the 0.17.3 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/31?closed=1
675
+
676
  = 0.17.2 =
677
  *(released: 5 Oct 2019)*
678
 
1074
 
1075
  == Upgrade Notice ==
1076
 
1077
+ = 0.17.3 =
1078
+ * Fixed two critical bugs. One occurred on PHP 7.4, the other when updating old WebP Express on Wordpress 5.3
1079
+
1080
  = 0.17.2 =
1081
  * Fixed bug: Updating plugin failed on a few hosts (in the unzip phase). The problem was introduced in 0.17.0 where the binaries contains dots in their filename.
1082
 
changelog.txt CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  = 0.17.2 =
2
  *(released: 5 Oct 2019)*
3
 
1
+ = 0.17.3 =
2
+ *(released: 3 Feb 2020)*
3
+
4
+ * Fixed critical bug: Fatal error after updating plugin (if one had been postponing updating WebP Express for a while and then updated Wordpress and THEN updated WebP Express)
5
+ * A critical bug was fixed in the webp-convert library (PHP 7.4 related)
6
+ * A critical bug was fixed in dom-util-for-webp library (PHP 7.4 related)
7
+ * Alter HTML now processes the "poster" attribute in Video tags. Thanks to @MikhailRoot from Russia for the PR on github.
8
+ * On some Litespeed hosts, WebP Express reported that mod_headers was not available even though it was. Thanks to @lubieowoce from Poland for the PR on github)
9
+
10
+
11
  = 0.17.2 =
12
  *(released: 5 Oct 2019)*
13
 
composer.json CHANGED
@@ -4,9 +4,9 @@
4
  "type": "project",
5
  "license": "MIT",
6
  "require": {
7
- "rosell-dk/webp-convert": "^2.3.0",
8
  "rosell-dk/webp-convert-cloud-service": "^2.0.0",
9
- "rosell-dk/dom-util-for-webp": "^0.3.1"
10
  },
11
  "require-dev": {
12
  },
4
  "type": "project",
5
  "license": "MIT",
6
  "require": {
7
+ "rosell-dk/webp-convert": "^2.3.1",
8
  "rosell-dk/webp-convert-cloud-service": "^2.0.0",
9
+ "rosell-dk/dom-util-for-webp": "^0.4.0"
10
  },
11
  "require-dev": {
12
  },
composer.lock CHANGED
@@ -4,20 +4,20 @@
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
- "content-hash": "66c96d3268a657c647267f5e5eee8ca2",
8
  "packages": [
9
  {
10
  "name": "rosell-dk/dom-util-for-webp",
11
- "version": "0.3.1",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/rosell-dk/dom-util-for-webp.git",
15
- "reference": "bae8f4a9b666726359d28bfb227d886c12f136a9"
16
  },
17
  "dist": {
18
  "type": "zip",
19
- "url": "https://api.github.com/repos/rosell-dk/dom-util-for-webp/zipball/bae8f4a9b666726359d28bfb227d886c12f136a9",
20
- "reference": "bae8f4a9b666726359d28bfb227d886c12f136a9",
21
  "shasum": ""
22
  },
23
  "require-dev": {
@@ -25,6 +25,9 @@
25
  "phpunit/phpunit": "5.7.27",
26
  "squizlabs/php_codesniffer": "3.*"
27
  },
 
 
 
28
  "type": "library",
29
  "extra": {
30
  "scripts-descriptions": {
@@ -48,8 +51,8 @@
48
  "authors": [
49
  {
50
  "name": "Bjørn Rosell",
51
- "role": "Project Author",
52
- "homepage": "https://www.bitwise-it.dk/contact"
53
  }
54
  ],
55
  "description": "Replace image URLs found in HTML",
@@ -59,7 +62,7 @@
59
  "images",
60
  "replace"
61
  ],
62
- "time": "2019-07-31T14:17:18+00:00"
63
  },
64
  {
65
  "name": "rosell-dk/image-mime-type-guesser",
@@ -118,16 +121,16 @@
118
  },
119
  {
120
  "name": "rosell-dk/webp-convert",
121
- "version": "2.3.0",
122
  "source": {
123
  "type": "git",
124
  "url": "https://github.com/rosell-dk/webp-convert.git",
125
- "reference": "74991497d403c07de269623850722aa0f7d15542"
126
  },
127
  "dist": {
128
  "type": "zip",
129
- "url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/74991497d403c07de269623850722aa0f7d15542",
130
- "reference": "74991497d403c07de269623850722aa0f7d15542",
131
  "shasum": ""
132
  },
133
  "require": {
@@ -190,7 +193,7 @@
190
  "png",
191
  "png2webp"
192
  ],
193
- "time": "2019-10-05T18:32:17+00:00"
194
  },
195
  {
196
  "name": "rosell-dk/webp-convert-cloud-service",
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
+ "content-hash": "42c7c5920bb6adb35d84aa898982342f",
8
  "packages": [
9
  {
10
  "name": "rosell-dk/dom-util-for-webp",
11
+ "version": "0.4.0",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/rosell-dk/dom-util-for-webp.git",
15
+ "reference": "5928aecf64d59124b341dce23ce8ecf48a6eded6"
16
  },
17
  "dist": {
18
  "type": "zip",
19
+ "url": "https://api.github.com/repos/rosell-dk/dom-util-for-webp/zipball/5928aecf64d59124b341dce23ce8ecf48a6eded6",
20
+ "reference": "5928aecf64d59124b341dce23ce8ecf48a6eded6",
21
  "shasum": ""
22
  },
23
  "require-dev": {
25
  "phpunit/phpunit": "5.7.27",
26
  "squizlabs/php_codesniffer": "3.*"
27
  },
28
+ "suggest": {
29
+ "phpstan/phpstan": "Suggested for dev, in order to analyse code before committing"
30
+ },
31
  "type": "library",
32
  "extra": {
33
  "scripts-descriptions": {
51
  "authors": [
52
  {
53
  "name": "Bjørn Rosell",
54
+ "homepage": "https://www.bitwise-it.dk/contact",
55
+ "role": "Project Author"
56
  }
57
  ],
58
  "description": "Replace image URLs found in HTML",
62
  "images",
63
  "replace"
64
  ],
65
+ "time": "2020-02-02T11:16:27+00:00"
66
  },
67
  {
68
  "name": "rosell-dk/image-mime-type-guesser",
121
  },
122
  {
123
  "name": "rosell-dk/webp-convert",
124
+ "version": "2.3.1",
125
  "source": {
126
  "type": "git",
127
  "url": "https://github.com/rosell-dk/webp-convert.git",
128
+ "reference": "47232b3e85d05d933c1da23349ebb03ef8939e0c"
129
  },
130
  "dist": {
131
  "type": "zip",
132
+ "url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/47232b3e85d05d933c1da23349ebb03ef8939e0c",
133
+ "reference": "47232b3e85d05d933c1da23349ebb03ef8939e0c",
134
  "shasum": ""
135
  },
136
  "require": {
193
  "png",
194
  "png2webp"
195
  ],
196
+ "time": "2020-02-02T19:29:01+00:00"
197
  },
198
  {
199
  "name": "rosell-dk/webp-convert-cloud-service",
htaccess-capability-tests/has-mod-header/.htaccess CHANGED
@@ -1,3 +1,5 @@
1
  <IfModule mod_headers.c>
2
- RequestHeader set HEADERFORTEST "test"
 
 
3
  </IfModule>
1
  <IfModule mod_headers.c>
2
+ # Certain hosts seem to strip non-standard request headers,
3
+ # so we use a standard one to avoid a false negative
4
+ RequestHeader set User-Agent "webp-express-test"
5
  </IfModule>
htaccess-capability-tests/has-mod-header/test.php CHANGED
@@ -2,8 +2,8 @@
2
 
3
  //echo '<pre>'. print_r($_SERVER, 1) . '</pre>';
4
 
5
- if (isset($_SERVER['HTTP_HEADERFORTEST'])) {
6
- echo ($_SERVER['HTTP_HEADERFORTEST'] == 'test' ? 1 : 0);
7
- exit;
 
8
  }
9
- echo '0';
2
 
3
  //echo '<pre>'. print_r($_SERVER, 1) . '</pre>';
4
 
5
+ if (isset($_SERVER['HTTP_USER_AGENT'])) {
6
+ echo $_SERVER['HTTP_USER_AGENT'] == 'webp-express-test' ? 1 : 0;
7
+ } else {
8
+ echo 0;
9
  }
 
lib/classes/AdminInit.php CHANGED
@@ -15,8 +15,6 @@ class AdminInit
15
  {
16
  public static function init() {
17
 
18
- self::runMigrationIfNeeded();
19
-
20
  // uncomment next line to debug an error during activation
21
  //include __DIR__ . "/../debug.php";
22
 
@@ -40,7 +38,7 @@ class AdminInit
40
  }
41
 
42
  // uncomment next line to test-run a migration
43
- //include WEBPEXPRESS_PLUGIN_DIR . '/lib/migrate/migrate11.php';
44
  }
45
 
46
  public static function pageNowIs($pageId)
@@ -53,6 +51,7 @@ class AdminInit
53
  return ($pageId == $pagenow);
54
  }
55
 
 
56
  public static function addHooksAfterAdminInit()
57
  {
58
 
@@ -102,6 +101,10 @@ class AdminInit
102
  // Some hooks must be registered AFTER admin_init...
103
  add_action("admin_init", array('\WebPExpress\AdminInit', 'addHooksAfterAdminInit'));
104
 
 
 
 
 
105
  if (Multisite::isNetworkActivated()) {
106
  add_action("network_admin_menu", array('\WebPExpress\AdminUi', 'networAdminMenuHook'));
107
  } else {
15
  {
16
  public static function init() {
17
 
 
 
18
  // uncomment next line to debug an error during activation
19
  //include __DIR__ . "/../debug.php";
20
 
38
  }
39
 
40
  // uncomment next line to test-run a migration
41
+ include WEBPEXPRESS_PLUGIN_DIR . '/lib/migrate/migrate12.php';
42
  }
43
 
44
  public static function pageNowIs($pageId)
51
  return ($pageId == $pagenow);
52
  }
53
 
54
+
55
  public static function addHooksAfterAdminInit()
56
  {
57
 
101
  // Some hooks must be registered AFTER admin_init...
102
  add_action("admin_init", array('\WebPExpress\AdminInit', 'addHooksAfterAdminInit'));
103
 
104
+ // Run migration AFTER admin_init hook (important, as insert_with_markers injection otherwise fails, see #394)
105
+ // PS: Unfortunately Message::addMessage doesnt print until next load now, we should look into that.
106
+ add_action("admin_init", array('\WebPExpress\AdminInit', 'runMigrationIfNeeded'));
107
+
108
  if (Multisite::isNetworkActivated()) {
109
  add_action("network_admin_menu", array('\WebPExpress\AdminUi', 'networAdminMenuHook'));
110
  } else {
lib/classes/AlterHtmlImageUrls.php CHANGED
@@ -23,7 +23,7 @@ class AlterHtmlImageUrls extends ImageUrlReplacer
23
  public function attributeFilter($attrName) {
24
  // Allow "src", "srcset" and data-attributes that smells like they are used for images
25
  // The following rule matches all attributes used for lazy loading images that we know of
26
- return preg_match('#^(src|srcset|(data-[^=]*(lazy|small|slide|img|large|src|thumb|source|set|bg-url)[^=]*))$#i', $attrName);
27
 
28
  // If you want to limit it further, only allowing attributes known to be used for lazy load,
29
  // use the following regex instead:
23
  public function attributeFilter($attrName) {
24
  // Allow "src", "srcset" and data-attributes that smells like they are used for images
25
  // The following rule matches all attributes used for lazy loading images that we know of
26
+ return preg_match('#^(src|srcset|poster|(data-[^=]*(lazy|small|slide|img|large|src|thumb|source|set|bg-url)[^=]*))$#i', $attrName);
27
 
28
  // If you want to limit it further, only allowing attributes known to be used for lazy load,
29
  // use the following regex instead:
lib/classes/ConvertHelperIndependent.php CHANGED
@@ -571,7 +571,7 @@ APACHE
571
  $text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);
572
 
573
  // TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version
574
- $text = 'WebP Express 0.17.2. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;
575
 
576
  $logFile = self::getLogFilename($source, $logDir);
577
 
571
  $text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);
572
 
573
  // TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version
574
+ $text = 'WebP Express 0.17.3. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;
575
 
576
  $logFile = self::getLogFilename($source, $logDir);
577
 
lib/migrate/migrate12.php CHANGED
@@ -2,6 +2,10 @@
2
 
3
  namespace WebPExpress;
4
 
 
 
 
 
5
  function webpexpress_migrate12() {
6
 
7
  $config = Config::loadConfigAndFix(false); // false, because we do not need to test if quality detection is working
2
 
3
  namespace WebPExpress;
4
 
5
+ use \WebPExpress\Config;
6
+ use \WebPExpress\Messenger;
7
+ use \WebPExpress\Option;
8
+
9
  function webpexpress_migrate12() {
10
 
11
  $config = Config::loadConfigAndFix(false); // false, because we do not need to test if quality detection is working
lib/options/enqueue_scripts.php CHANGED
@@ -5,7 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
5
  use \WebPExpress\Paths;
6
  use \WebPExpress\Config;
7
 
8
- $ver = '1'; // note: Minimum 1
9
  $jsDir = 'js/0.16.0'; // We change dir when it is critical that no-one gets the cached version (there is a plugin that strips version strings out there...)
10
 
11
  if (!function_exists('webp_express_add_inline_script')) {
5
  use \WebPExpress\Paths;
6
  use \WebPExpress\Config;
7
 
8
+ $ver = '2'; // note: Minimum 1
9
  $jsDir = 'js/0.16.0'; // We change dir when it is critical that no-one gets the cached version (there is a plugin that strips version strings out there...)
10
 
11
  if (!function_exists('webp_express_add_inline_script')) {
lib/options/js/0.16.0/bulk-convert.js CHANGED
@@ -1,5 +1,6 @@
1
 
2
  function openBulkConvertPopup() {
 
3
  document.getElementById('bulkconvertcontent').innerHTML = '<div>Receiving list of files to convert...</div>';
4
  tb_show('Bulk Convert', '#TB_inline?inlineId=bulkconvertpopup');
5
 
@@ -79,8 +80,9 @@ function startBulkConversion() {
79
  '</style>';
80
  html += '<button id="bulkPauseResumeBtn" onclick="pauseOrResumeBulkConversion()" class="button button-primary" type="button">Pause</button>';
81
  //html += '<div id="conversionlog" class="das-popup">test</div>';
82
- html += '<div id="bulkconvertlog"></div>';
83
  document.getElementById('bulkconvertcontent').innerHTML = html;
 
84
 
85
  convertNextInBulkQueue();
86
  }
1
 
2
  function openBulkConvertPopup() {
3
+ document.getElementById('bulkconvertlog').innerHTML = '';
4
  document.getElementById('bulkconvertcontent').innerHTML = '<div>Receiving list of files to convert...</div>';
5
  tb_show('Bulk Convert', '#TB_inline?inlineId=bulkconvertpopup');
6
 
80
  '</style>';
81
  html += '<button id="bulkPauseResumeBtn" onclick="pauseOrResumeBulkConversion()" class="button button-primary" type="button">Pause</button>';
82
  //html += '<div id="conversionlog" class="das-popup">test</div>';
83
+ //html += '<div id="bulkconvertlog"></div>';
84
  document.getElementById('bulkconvertcontent').innerHTML = html;
85
+ document.getElementById('bulkconvertlog').innerHTML = '';
86
 
87
  convertNextInBulkQueue();
88
  }
lib/options/js/0.16.0/test-convert.js CHANGED
@@ -23,6 +23,7 @@ function webpexpress_createTCOptions(converterId) {
23
  html += '</select></div>'
24
  html += '<div style="display:inline-block;"><label>Test image:</label><select id="test_image" name="image">';
25
  //html += '<option value="dice.png">dice.png</option>';
 
26
  html += '<option value="test-pattern-tv.jpg">test-pattern-tv.jpg</option>';
27
  html += '<option value="dice.png">dice.png</option>';
28
  //html += '<option value="alphatest.png">alphatest.png</option>';
23
  html += '</select></div>'
24
  html += '<div style="display:inline-block;"><label>Test image:</label><select id="test_image" name="image">';
25
  //html += '<option value="dice.png">dice.png</option>';
26
+ html += '<option value="alphatest.png">alphatest.png</option>';
27
  html += '<option value="test-pattern-tv.jpg">test-pattern-tv.jpg</option>';
28
  html += '<option value="dice.png">dice.png</option>';
29
  //html += '<option value="alphatest.png">alphatest.png</option>';
lib/options/options/alter-html/alter-html-options.inc CHANGED
@@ -173,7 +173,7 @@ namespace WebPExpress;
173
  webpexpress_checkbox(
174
  'alter-html-for-webps-that-has-yet-to-exist',
175
  (!$config['alter-html']['only-for-webps-that-exists']),
176
- 'Reference webps that hasn\'t been converted yet',
177
  'If you enable this option, there will be references to webp files that doesnt exist yet. ' .
178
  'And that will be ok! - Just make sure to enable the option to convert missing webp files ' .
179
  'upon request in the "Redirection rules" section.'
173
  webpexpress_checkbox(
174
  'alter-html-for-webps-that-has-yet-to-exist',
175
  (!$config['alter-html']['only-for-webps-that-exists']),
176
+ 'Reference webps that haven\'t been converted yet',
177
  'If you enable this option, there will be references to webp files that doesnt exist yet. ' .
178
  'And that will be ok! - Just make sure to enable the option to convert missing webp files ' .
179
  'upon request in the "Redirection rules" section.'
lib/options/options/conversion-options/bulk-convert.inc CHANGED
@@ -19,6 +19,7 @@
19
  <button onclick="openBulkConvertPopup()" class="button button-secondary" type="button">Bulk Convert</button>
20
  <div id="bulkconvertpopup" style="display:none;">
21
  <div id="bulkconvertcontent"></div>
 
22
  </div>
23
  <button onclick="openDeleteConvertedFilesPopup()" class="button button-secondary" type="button">Delete converted files</button>
24
  <div id="purgecachepopup" style="display:none;">
19
  <button onclick="openBulkConvertPopup()" class="button button-secondary" type="button">Bulk Convert</button>
20
  <div id="bulkconvertpopup" style="display:none;">
21
  <div id="bulkconvertcontent"></div>
22
+ <div id="bulkconvertlog"></div>
23
  </div>
24
  <button onclick="openDeleteConvertedFilesPopup()" class="button button-secondary" type="button">Delete converted files</button>
25
  <div id="purgecachepopup" style="display:none;">
lib/options/options/conversion-options/converter-options/wpc.php CHANGED
@@ -38,7 +38,7 @@
38
  URL
39
  <?php echo helpIcon('The endpoint of the web service. Copy it from the remote setup.'); ?>
40
  </label>
41
- <input type="text" id="wpc_api_url" placeholder="Url to your Remote WebP Express">
42
  </div>
43
 
44
  <div id="wpc_secret_div">
@@ -46,7 +46,7 @@
46
  Secret
47
  <?php echo helpIcon('Must match the one set up in webp-convert-cloud-service v0.1'); ?>
48
  </label>
49
- <input type="text" id="wpc_secret" placeholder="">
50
  </div>
51
 
52
  <div id="wpc_api_key_div">
@@ -58,7 +58,7 @@
58
  Api key
59
  <?php echo helpIcon('The API key is set up on the remote. Copy that.'); ?>
60
  </label>
61
- <input id="wpc_new_api_key" type="password">
62
  <a id="wpc_change_api_key" href="javascript:wpcChangeApiKey()">
63
  Click to change
64
  </a>
38
  URL
39
  <?php echo helpIcon('The endpoint of the web service. Copy it from the remote setup.'); ?>
40
  </label>
41
+ <input type="text" id="wpc_api_url" placeholder="Url to your Remote WebP Express" autocomplete="off">
42
  </div>
43
 
44
  <div id="wpc_secret_div">
46
  Secret
47
  <?php echo helpIcon('Must match the one set up in webp-convert-cloud-service v0.1'); ?>
48
  </label>
49
+ <input type="text" id="wpc_secret" placeholder="" autocomplete="off">
50
  </div>
51
 
52
  <div id="wpc_api_key_div">
58
  Api key
59
  <?php echo helpIcon('The API key is set up on the remote. Copy that.'); ?>
60
  </label>
61
+ <input id="wpc_new_api_key" type="password" autocomplete="off">
62
  <a id="wpc_change_api_key" href="javascript:wpcChangeApiKey()">
63
  Click to change
64
  </a>
vendor/composer/autoload_classmap.php CHANGED
@@ -6,4 +6,90 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
+ 'DOMUtilForWebP\\ImageUrlReplacer' => $vendorDir . '/rosell-dk/dom-util-for-webp/src/ImageUrlReplacer.php',
10
+ 'DOMUtilForWebP\\PictureTags' => $vendorDir . '/rosell-dk/dom-util-for-webp/src/PictureTags.php',
11
+ 'ImageMimeTypeGuesser\\Detectors\\AbstractDetector' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/AbstractDetector.php',
12
+ 'ImageMimeTypeGuesser\\Detectors\\ExifImageType' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/ExifImageType.php',
13
+ 'ImageMimeTypeGuesser\\Detectors\\FInfo' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/FInfo.php',
14
+ 'ImageMimeTypeGuesser\\Detectors\\GetImageSize' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/GetImageSize.php',
15
+ 'ImageMimeTypeGuesser\\Detectors\\MimeContentType' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/MimeContentType.php',
16
+ 'ImageMimeTypeGuesser\\Detectors\\SniffFirstFourBytes' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/SniffFirstFourBytes.php',
17
+ 'ImageMimeTypeGuesser\\Detectors\\Stack' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/Stack.php',
18
+ 'ImageMimeTypeGuesser\\GuessFromExtension' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/GuessFromExtension.php',
19
+ 'ImageMimeTypeGuesser\\ImageMimeTypeGuesser' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/ImageMimeTypeGuesser.php',
20
+ 'WebPConvertCloudService\\AccessCheck' => $vendorDir . '/rosell-dk/webp-convert-cloud-service/src/AccessCheck.php',
21
+ 'WebPConvertCloudService\\Serve' => $vendorDir . '/rosell-dk/webp-convert-cloud-service/src/Serve.php',
22
+ 'WebPConvertCloudService\\WebPConvertCloudService' => $vendorDir . '/rosell-dk/webp-convert-cloud-service/src/WebPConvertCloudService.php',
23
+ 'WebPConvert\\Convert\\ConverterFactory' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/ConverterFactory.php',
24
+ 'WebPConvert\\Convert\\Converters\\AbstractConverter' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php',
25
+ 'WebPConvert\\Convert\\Converters\\BaseTraits\\AutoQualityTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/AutoQualityTrait.php',
26
+ 'WebPConvert\\Convert\\Converters\\BaseTraits\\DestinationPreparationTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/DestinationPreparationTrait.php',
27
+ 'WebPConvert\\Convert\\Converters\\BaseTraits\\LoggerTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/LoggerTrait.php',
28
+ 'WebPConvert\\Convert\\Converters\\BaseTraits\\OptionsTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/OptionsTrait.php',
29
+ 'WebPConvert\\Convert\\Converters\\BaseTraits\\WarningLoggerTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/WarningLoggerTrait.php',
30
+ 'WebPConvert\\Convert\\Converters\\ConverterTraits\\CloudConverterTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/CloudConverterTrait.php',
31
+ 'WebPConvert\\Convert\\Converters\\ConverterTraits\\CurlTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/CurlTrait.php',
32
+ 'WebPConvert\\Convert\\Converters\\ConverterTraits\\EncodingAutoTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/EncodingAutoTrait.php',
33
+ 'WebPConvert\\Convert\\Converters\\ConverterTraits\\ExecTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/ExecTrait.php',
34
+ 'WebPConvert\\Convert\\Converters\\Cwebp' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php',
35
+ 'WebPConvert\\Convert\\Converters\\Ewww' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Ewww.php',
36
+ 'WebPConvert\\Convert\\Converters\\Gd' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Gd.php',
37
+ 'WebPConvert\\Convert\\Converters\\Gmagick' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Gmagick.php',
38
+ 'WebPConvert\\Convert\\Converters\\GmagickBinary' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/GmagickBinary.php',
39
+ 'WebPConvert\\Convert\\Converters\\GraphicsMagick' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/GraphicsMagick.php',
40
+ 'WebPConvert\\Convert\\Converters\\ImageMagick' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ImageMagick.php',
41
+ 'WebPConvert\\Convert\\Converters\\Imagick' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Imagick.php',
42
+ 'WebPConvert\\Convert\\Converters\\ImagickBinary' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ImagickBinary.php',
43
+ 'WebPConvert\\Convert\\Converters\\Stack' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Stack.php',
44
+ 'WebPConvert\\Convert\\Converters\\Vips' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Vips.php',
45
+ 'WebPConvert\\Convert\\Converters\\Wpc' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Wpc.php',
46
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailedException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailedException.php',
47
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConversionSkippedException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConversionSkippedException.php',
48
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperationalException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperationalException.php',
49
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperational\\InvalidApiKeyException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperational/InvalidApiKeyException.php',
50
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperational\\SystemRequirementsNotMetException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperational/SystemRequirementsNotMetException.php',
51
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblemsException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblemsException.php',
52
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblems\\CreateDestinationFileException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblems/CreateDestinationFileException.php',
53
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblems\\CreateDestinationFolderException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblems/CreateDestinationFolderException.php',
54
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInputException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInputException.php',
55
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\ConverterNotFoundException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/ConverterNotFoundException.php',
56
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\InvalidImageTypeException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/InvalidImageTypeException.php',
57
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\TargetNotFoundException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/TargetNotFoundException.php',
58
+ 'WebPConvert\\Convert\\Helpers\\JpegQualityDetector' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Helpers/JpegQualityDetector.php',
59
+ 'WebPConvert\\Convert\\Helpers\\PhpIniSizes' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Helpers/PhpIniSizes.php',
60
+ 'WebPConvert\\Exceptions\\InvalidInputException' => $vendorDir . '/rosell-dk/webp-convert/src/Exceptions/InvalidInputException.php',
61
+ 'WebPConvert\\Exceptions\\InvalidInput\\InvalidImageTypeException' => $vendorDir . '/rosell-dk/webp-convert/src/Exceptions/InvalidInput/InvalidImageTypeException.php',
62
+ 'WebPConvert\\Exceptions\\InvalidInput\\TargetNotFoundException' => $vendorDir . '/rosell-dk/webp-convert/src/Exceptions/InvalidInput/TargetNotFoundException.php',
63
+ 'WebPConvert\\Exceptions\\WebPConvertException' => $vendorDir . '/rosell-dk/webp-convert/src/Exceptions/WebPConvertException.php',
64
+ 'WebPConvert\\Helpers\\BinaryDiscovery' => $vendorDir . '/rosell-dk/webp-convert/src/Helpers/BinaryDiscovery.php',
65
+ 'WebPConvert\\Helpers\\FileExists' => $vendorDir . '/rosell-dk/webp-convert/src/Helpers/FileExists.php',
66
+ 'WebPConvert\\Helpers\\InputValidator' => $vendorDir . '/rosell-dk/webp-convert/src/Helpers/InputValidator.php',
67
+ 'WebPConvert\\Helpers\\MimeType' => $vendorDir . '/rosell-dk/webp-convert/src/Helpers/MimeType.php',
68
+ 'WebPConvert\\Helpers\\PathChecker' => $vendorDir . '/rosell-dk/webp-convert/src/Helpers/PathChecker.php',
69
+ 'WebPConvert\\Helpers\\Sanitize' => $vendorDir . '/rosell-dk/webp-convert/src/Helpers/Sanitize.php',
70
+ 'WebPConvert\\Loggers\\BaseLogger' => $vendorDir . '/rosell-dk/webp-convert/src/Loggers/BaseLogger.php',
71
+ 'WebPConvert\\Loggers\\BufferLogger' => $vendorDir . '/rosell-dk/webp-convert/src/Loggers/BufferLogger.php',
72
+ 'WebPConvert\\Loggers\\EchoLogger' => $vendorDir . '/rosell-dk/webp-convert/src/Loggers/EchoLogger.php',
73
+ 'WebPConvert\\Options\\ArrayOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/ArrayOption.php',
74
+ 'WebPConvert\\Options\\BooleanOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/BooleanOption.php',
75
+ 'WebPConvert\\Options\\Exceptions\\InvalidOptionTypeException' => $vendorDir . '/rosell-dk/webp-convert/src/Options/Exceptions/InvalidOptionTypeException.php',
76
+ 'WebPConvert\\Options\\Exceptions\\InvalidOptionValueException' => $vendorDir . '/rosell-dk/webp-convert/src/Options/Exceptions/InvalidOptionValueException.php',
77
+ 'WebPConvert\\Options\\Exceptions\\OptionNotFoundException' => $vendorDir . '/rosell-dk/webp-convert/src/Options/Exceptions/OptionNotFoundException.php',
78
+ 'WebPConvert\\Options\\GhostOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/GhostOption.php',
79
+ 'WebPConvert\\Options\\IntegerOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/IntegerOption.php',
80
+ 'WebPConvert\\Options\\IntegerOrNullOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/IntegerOrNullOption.php',
81
+ 'WebPConvert\\Options\\MetadataOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/MetadataOption.php',
82
+ 'WebPConvert\\Options\\Option' => $vendorDir . '/rosell-dk/webp-convert/src/Options/Option.php',
83
+ 'WebPConvert\\Options\\Options' => $vendorDir . '/rosell-dk/webp-convert/src/Options/Options.php',
84
+ 'WebPConvert\\Options\\QualityOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/QualityOption.php',
85
+ 'WebPConvert\\Options\\SensitiveArrayOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/SensitiveArrayOption.php',
86
+ 'WebPConvert\\Options\\SensitiveStringOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/SensitiveStringOption.php',
87
+ 'WebPConvert\\Options\\StringOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/StringOption.php',
88
+ 'WebPConvert\\Serve\\Exceptions\\ServeFailedException' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/Exceptions/ServeFailedException.php',
89
+ 'WebPConvert\\Serve\\Header' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/Header.php',
90
+ 'WebPConvert\\Serve\\Report' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/Report.php',
91
+ 'WebPConvert\\Serve\\ServeConvertedWebP' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/ServeConvertedWebP.php',
92
+ 'WebPConvert\\Serve\\ServeConvertedWebPWithErrorHandling' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/ServeConvertedWebPWithErrorHandling.php',
93
+ 'WebPConvert\\Serve\\ServeFile' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/ServeFile.php',
94
+ 'WebPConvert\\WebPConvert' => $vendorDir . '/rosell-dk/webp-convert/src/WebPConvert.php',
95
  );
vendor/composer/autoload_static.php CHANGED
@@ -41,11 +41,101 @@ class ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243
41
  ),
42
  );
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  public static function getInitializer(ClassLoader $loader)
45
  {
46
  return \Closure::bind(function () use ($loader) {
47
  $loader->prefixLengthsPsr4 = ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243::$prefixLengthsPsr4;
48
  $loader->prefixDirsPsr4 = ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243::$prefixDirsPsr4;
 
49
 
50
  }, null, ClassLoader::class);
51
  }
41
  ),
42
  );
43
 
44
+ public static $classMap = array (
45
+ 'DOMUtilForWebP\\ImageUrlReplacer' => __DIR__ . '/..' . '/rosell-dk/dom-util-for-webp/src/ImageUrlReplacer.php',
46
+ 'DOMUtilForWebP\\PictureTags' => __DIR__ . '/..' . '/rosell-dk/dom-util-for-webp/src/PictureTags.php',
47
+ 'ImageMimeTypeGuesser\\Detectors\\AbstractDetector' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/AbstractDetector.php',
48
+ 'ImageMimeTypeGuesser\\Detectors\\ExifImageType' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/ExifImageType.php',
49
+ 'ImageMimeTypeGuesser\\Detectors\\FInfo' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/FInfo.php',
50
+ 'ImageMimeTypeGuesser\\Detectors\\GetImageSize' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/GetImageSize.php',
51
+ 'ImageMimeTypeGuesser\\Detectors\\MimeContentType' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/MimeContentType.php',
52
+ 'ImageMimeTypeGuesser\\Detectors\\SniffFirstFourBytes' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/SniffFirstFourBytes.php',
53
+ 'ImageMimeTypeGuesser\\Detectors\\Stack' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/Stack.php',
54
+ 'ImageMimeTypeGuesser\\GuessFromExtension' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/GuessFromExtension.php',
55
+ 'ImageMimeTypeGuesser\\ImageMimeTypeGuesser' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/ImageMimeTypeGuesser.php',
56
+ 'WebPConvertCloudService\\AccessCheck' => __DIR__ . '/..' . '/rosell-dk/webp-convert-cloud-service/src/AccessCheck.php',
57
+ 'WebPConvertCloudService\\Serve' => __DIR__ . '/..' . '/rosell-dk/webp-convert-cloud-service/src/Serve.php',
58
+ 'WebPConvertCloudService\\WebPConvertCloudService' => __DIR__ . '/..' . '/rosell-dk/webp-convert-cloud-service/src/WebPConvertCloudService.php',
59
+ 'WebPConvert\\Convert\\ConverterFactory' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/ConverterFactory.php',
60
+ 'WebPConvert\\Convert\\Converters\\AbstractConverter' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php',
61
+ 'WebPConvert\\Convert\\Converters\\BaseTraits\\AutoQualityTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/AutoQualityTrait.php',
62
+ 'WebPConvert\\Convert\\Converters\\BaseTraits\\DestinationPreparationTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/DestinationPreparationTrait.php',
63
+ 'WebPConvert\\Convert\\Converters\\BaseTraits\\LoggerTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/LoggerTrait.php',
64
+ 'WebPConvert\\Convert\\Converters\\BaseTraits\\OptionsTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/OptionsTrait.php',
65
+ 'WebPConvert\\Convert\\Converters\\BaseTraits\\WarningLoggerTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/WarningLoggerTrait.php',
66
+ 'WebPConvert\\Convert\\Converters\\ConverterTraits\\CloudConverterTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/CloudConverterTrait.php',
67
+ 'WebPConvert\\Convert\\Converters\\ConverterTraits\\CurlTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/CurlTrait.php',
68
+ 'WebPConvert\\Convert\\Converters\\ConverterTraits\\EncodingAutoTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/EncodingAutoTrait.php',
69
+ 'WebPConvert\\Convert\\Converters\\ConverterTraits\\ExecTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/ExecTrait.php',
70
+ 'WebPConvert\\Convert\\Converters\\Cwebp' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php',
71
+ 'WebPConvert\\Convert\\Converters\\Ewww' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Ewww.php',
72
+ 'WebPConvert\\Convert\\Converters\\Gd' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Gd.php',
73
+ 'WebPConvert\\Convert\\Converters\\Gmagick' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Gmagick.php',
74
+ 'WebPConvert\\Convert\\Converters\\GmagickBinary' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/GmagickBinary.php',
75
+ 'WebPConvert\\Convert\\Converters\\GraphicsMagick' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/GraphicsMagick.php',
76
+ 'WebPConvert\\Convert\\Converters\\ImageMagick' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ImageMagick.php',
77
+ 'WebPConvert\\Convert\\Converters\\Imagick' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Imagick.php',
78
+ 'WebPConvert\\Convert\\Converters\\ImagickBinary' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ImagickBinary.php',
79
+ 'WebPConvert\\Convert\\Converters\\Stack' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Stack.php',
80
+ 'WebPConvert\\Convert\\Converters\\Vips' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Vips.php',
81
+ 'WebPConvert\\Convert\\Converters\\Wpc' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Wpc.php',
82
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailedException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailedException.php',
83
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConversionSkippedException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConversionSkippedException.php',
84
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperationalException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperationalException.php',
85
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperational\\InvalidApiKeyException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperational/InvalidApiKeyException.php',
86
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperational\\SystemRequirementsNotMetException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperational/SystemRequirementsNotMetException.php',
87
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblemsException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblemsException.php',
88
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblems\\CreateDestinationFileException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblems/CreateDestinationFileException.php',
89
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblems\\CreateDestinationFolderException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblems/CreateDestinationFolderException.php',
90
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInputException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInputException.php',
91
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\ConverterNotFoundException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/ConverterNotFoundException.php',
92
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\InvalidImageTypeException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/InvalidImageTypeException.php',
93
+ 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\TargetNotFoundException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/TargetNotFoundException.php',
94
+ 'WebPConvert\\Convert\\Helpers\\JpegQualityDetector' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Helpers/JpegQualityDetector.php',
95
+ 'WebPConvert\\Convert\\Helpers\\PhpIniSizes' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Helpers/PhpIniSizes.php',
96
+ 'WebPConvert\\Exceptions\\InvalidInputException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Exceptions/InvalidInputException.php',
97
+ 'WebPConvert\\Exceptions\\InvalidInput\\InvalidImageTypeException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Exceptions/InvalidInput/InvalidImageTypeException.php',
98
+ 'WebPConvert\\Exceptions\\InvalidInput\\TargetNotFoundException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Exceptions/InvalidInput/TargetNotFoundException.php',
99
+ 'WebPConvert\\Exceptions\\WebPConvertException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Exceptions/WebPConvertException.php',
100
+ 'WebPConvert\\Helpers\\BinaryDiscovery' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Helpers/BinaryDiscovery.php',
101
+ 'WebPConvert\\Helpers\\FileExists' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Helpers/FileExists.php',
102
+ 'WebPConvert\\Helpers\\InputValidator' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Helpers/InputValidator.php',
103
+ 'WebPConvert\\Helpers\\MimeType' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Helpers/MimeType.php',
104
+ 'WebPConvert\\Helpers\\PathChecker' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Helpers/PathChecker.php',
105
+ 'WebPConvert\\Helpers\\Sanitize' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Helpers/Sanitize.php',
106
+ 'WebPConvert\\Loggers\\BaseLogger' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Loggers/BaseLogger.php',
107
+ 'WebPConvert\\Loggers\\BufferLogger' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Loggers/BufferLogger.php',
108
+ 'WebPConvert\\Loggers\\EchoLogger' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Loggers/EchoLogger.php',
109
+ 'WebPConvert\\Options\\ArrayOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/ArrayOption.php',
110
+ 'WebPConvert\\Options\\BooleanOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/BooleanOption.php',
111
+ 'WebPConvert\\Options\\Exceptions\\InvalidOptionTypeException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/Exceptions/InvalidOptionTypeException.php',
112
+ 'WebPConvert\\Options\\Exceptions\\InvalidOptionValueException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/Exceptions/InvalidOptionValueException.php',
113
+ 'WebPConvert\\Options\\Exceptions\\OptionNotFoundException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/Exceptions/OptionNotFoundException.php',
114
+ 'WebPConvert\\Options\\GhostOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/GhostOption.php',
115
+ 'WebPConvert\\Options\\IntegerOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/IntegerOption.php',
116
+ 'WebPConvert\\Options\\IntegerOrNullOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/IntegerOrNullOption.php',
117
+ 'WebPConvert\\Options\\MetadataOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/MetadataOption.php',
118
+ 'WebPConvert\\Options\\Option' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/Option.php',
119
+ 'WebPConvert\\Options\\Options' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/Options.php',
120
+ 'WebPConvert\\Options\\QualityOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/QualityOption.php',
121
+ 'WebPConvert\\Options\\SensitiveArrayOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/SensitiveArrayOption.php',
122
+ 'WebPConvert\\Options\\SensitiveStringOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/SensitiveStringOption.php',
123
+ 'WebPConvert\\Options\\StringOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/StringOption.php',
124
+ 'WebPConvert\\Serve\\Exceptions\\ServeFailedException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/Exceptions/ServeFailedException.php',
125
+ 'WebPConvert\\Serve\\Header' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/Header.php',
126
+ 'WebPConvert\\Serve\\Report' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/Report.php',
127
+ 'WebPConvert\\Serve\\ServeConvertedWebP' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/ServeConvertedWebP.php',
128
+ 'WebPConvert\\Serve\\ServeConvertedWebPWithErrorHandling' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/ServeConvertedWebPWithErrorHandling.php',
129
+ 'WebPConvert\\Serve\\ServeFile' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/ServeFile.php',
130
+ 'WebPConvert\\WebPConvert' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/WebPConvert.php',
131
+ );
132
+
133
  public static function getInitializer(ClassLoader $loader)
134
  {
135
  return \Closure::bind(function () use ($loader) {
136
  $loader->prefixLengthsPsr4 = ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243::$prefixLengthsPsr4;
137
  $loader->prefixDirsPsr4 = ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243::$prefixDirsPsr4;
138
+ $loader->classMap = ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243::$classMap;
139
 
140
  }, null, ClassLoader::class);
141
  }
vendor/composer/installed.json CHANGED
@@ -1,17 +1,17 @@
1
  [
2
  {
3
  "name": "rosell-dk/dom-util-for-webp",
4
- "version": "0.3.1",
5
- "version_normalized": "0.3.1.0",
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/rosell-dk/dom-util-for-webp.git",
9
- "reference": "bae8f4a9b666726359d28bfb227d886c12f136a9"
10
  },
11
  "dist": {
12
  "type": "zip",
13
- "url": "https://api.github.com/repos/rosell-dk/dom-util-for-webp/zipball/bae8f4a9b666726359d28bfb227d886c12f136a9",
14
- "reference": "bae8f4a9b666726359d28bfb227d886c12f136a9",
15
  "shasum": ""
16
  },
17
  "require-dev": {
@@ -19,7 +19,10 @@
19
  "phpunit/phpunit": "5.7.27",
20
  "squizlabs/php_codesniffer": "3.*"
21
  },
22
- "time": "2019-07-31T14:17:18+00:00",
 
 
 
23
  "type": "library",
24
  "extra": {
25
  "scripts-descriptions": {
@@ -44,8 +47,8 @@
44
  "authors": [
45
  {
46
  "name": "Bjørn Rosell",
47
- "role": "Project Author",
48
- "homepage": "https://www.bitwise-it.dk/contact"
49
  }
50
  ],
51
  "description": "Replace image URLs found in HTML",
@@ -115,17 +118,17 @@
115
  },
116
  {
117
  "name": "rosell-dk/webp-convert",
118
- "version": "2.3.0",
119
- "version_normalized": "2.3.0.0",
120
  "source": {
121
  "type": "git",
122
  "url": "https://github.com/rosell-dk/webp-convert.git",
123
- "reference": "74991497d403c07de269623850722aa0f7d15542"
124
  },
125
  "dist": {
126
  "type": "zip",
127
- "url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/74991497d403c07de269623850722aa0f7d15542",
128
- "reference": "74991497d403c07de269623850722aa0f7d15542",
129
  "shasum": ""
130
  },
131
  "require": {
@@ -143,7 +146,7 @@
143
  "ext-vips": "to use Vips extension for converting.",
144
  "php-stan/php-stan": "Suggested for dev, in order to analyse code before committing"
145
  },
146
- "time": "2019-10-05T18:32:17+00:00",
147
  "type": "library",
148
  "extra": {
149
  "scripts-descriptions": {
1
  [
2
  {
3
  "name": "rosell-dk/dom-util-for-webp",
4
+ "version": "0.4.0",
5
+ "version_normalized": "0.4.0.0",
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/rosell-dk/dom-util-for-webp.git",
9
+ "reference": "5928aecf64d59124b341dce23ce8ecf48a6eded6"
10
  },
11
  "dist": {
12
  "type": "zip",
13
+ "url": "https://api.github.com/repos/rosell-dk/dom-util-for-webp/zipball/5928aecf64d59124b341dce23ce8ecf48a6eded6",
14
+ "reference": "5928aecf64d59124b341dce23ce8ecf48a6eded6",
15
  "shasum": ""
16
  },
17
  "require-dev": {
19
  "phpunit/phpunit": "5.7.27",
20
  "squizlabs/php_codesniffer": "3.*"
21
  },
22
+ "suggest": {
23
+ "phpstan/phpstan": "Suggested for dev, in order to analyse code before committing"
24
+ },
25
+ "time": "2020-02-02T11:16:27+00:00",
26
  "type": "library",
27
  "extra": {
28
  "scripts-descriptions": {
47
  "authors": [
48
  {
49
  "name": "Bjørn Rosell",
50
+ "homepage": "https://www.bitwise-it.dk/contact",
51
+ "role": "Project Author"
52
  }
53
  ],
54
  "description": "Replace image URLs found in HTML",
118
  },
119
  {
120
  "name": "rosell-dk/webp-convert",
121
+ "version": "2.3.1",
122
+ "version_normalized": "2.3.1.0",
123
  "source": {
124
  "type": "git",
125
  "url": "https://github.com/rosell-dk/webp-convert.git",
126
+ "reference": "47232b3e85d05d933c1da23349ebb03ef8939e0c"
127
  },
128
  "dist": {
129
  "type": "zip",
130
+ "url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/47232b3e85d05d933c1da23349ebb03ef8939e0c",
131
+ "reference": "47232b3e85d05d933c1da23349ebb03ef8939e0c",
132
  "shasum": ""
133
  },
134
  "require": {
146
  "ext-vips": "to use Vips extension for converting.",
147
  "php-stan/php-stan": "Suggested for dev, in order to analyse code before committing"
148
  },
149
+ "time": "2020-02-02T19:29:01+00:00",
150
  "type": "library",
151
  "extra": {
152
  "scripts-descriptions": {
vendor/rosell-dk/dom-util-for-webp/composer.json CHANGED
@@ -47,6 +47,9 @@
47
  "role": "Project Author"
48
  }
49
  ],
 
 
 
50
  "require-dev": {
51
  "friendsofphp/php-cs-fixer": "^2.11",
52
  "phpunit/phpunit": "5.7.27",
47
  "role": "Project Author"
48
  }
49
  ],
50
+ "suggest": {
51
+ "phpstan/phpstan": "Suggested for dev, in order to analyse code before committing"
52
+ },
53
  "require-dev": {
54
  "friendsofphp/php-cs-fixer": "^2.11",
55
  "phpunit/phpunit": "5.7.27",
vendor/rosell-dk/dom-util-for-webp/src/ImageUrlReplacer.php CHANGED
@@ -40,7 +40,18 @@ class ImageUrlReplacer
40
  // How about preloaded images? - yes, suppose we should replace those
41
  // - <link rel="prefetch" href="[url]">
42
  // - <link rel="preload" as="image" href="[url]">
43
- public static $searchInTags = ['img', 'source', 'input', 'iframe', 'div', 'li', 'link', 'a', 'section'];
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  /**
46
  *
@@ -151,7 +162,7 @@ class ImageUrlReplacer
151
  $part = preg_replace_callback($regex, 'self::processCSSRegExCallback', $part);
152
  //echo 'result:' . $part . "\n";
153
  }
154
- $declarations[$i] = implode($parts, ',');
155
  }
156
  }
157
  return implode(';', $declarations);
40
  // How about preloaded images? - yes, suppose we should replace those
41
  // - <link rel="prefetch" href="[url]">
42
  // - <link rel="preload" as="image" href="[url]">
43
+ public static $searchInTags = ['img', 'source', 'input', 'iframe', 'div', 'li', 'link', 'a', 'section', 'video'];
44
+
45
+ /**
46
+ * Empty constructor for preventing child classes from creating constructors.
47
+ *
48
+ * We do this because otherwise the "new static()" call inside the ::replace() method
49
+ * would be unsafe. See #21
50
+ * @return void
51
+ */
52
+ public final function __construct()
53
+ {
54
+ }
55
 
56
  /**
57
  *
162
  $part = preg_replace_callback($regex, 'self::processCSSRegExCallback', $part);
163
  //echo 'result:' . $part . "\n";
164
  }
165
+ $declarations[$i] = implode(',', $parts);
166
  }
167
  }
168
  return implode(';', $declarations);
vendor/rosell-dk/dom-util-for-webp/src/PictureTags.php CHANGED
@@ -13,6 +13,17 @@ use \WebPExpress\AlterHtmlHelper;
13
  class PictureTags
14
  {
15
 
 
 
 
 
 
 
 
 
 
 
 
16
  public function replaceUrl($url)
17
  {
18
  if (!preg_match('#(png|jpe?g)$#', $url)) {
13
  class PictureTags
14
  {
15
 
16
+ /**
17
+ * Empty constructor for preventing child classes from creating constructors.
18
+ *
19
+ * We do this because otherwise the "new static()" call inside the ::replace() method
20
+ * would be unsafe. See #21
21
+ * @return void
22
+ */
23
+ public final function __construct()
24
+ {
25
+ }
26
+
27
  public function replaceUrl($url)
28
  {
29
  if (!preg_match('#(png|jpe?g)$#', $url)) {
vendor/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php CHANGED
@@ -106,7 +106,7 @@ abstract class AbstractConverter
106
  * @param array $options (optional) options for conversion
107
  * @param BaseLogger $logger (optional)
108
  */
109
- public function __construct($source, $destination, $options = [], $logger = null)
110
  {
111
  InputValidator::checkSourceAndDestination($source, $destination);
112
 
@@ -152,7 +152,7 @@ abstract class AbstractConverter
152
  * Set destination.
153
  *
154
  * @param string $destination path to destination
155
- * @return string The destination.
156
  */
157
  public function setDestination($destination)
158
  {
@@ -199,7 +199,6 @@ abstract class AbstractConverter
199
  */
200
  public static function createInstance($source, $destination, $options = [], $logger = null)
201
  {
202
-
203
  return new static($source, $destination, $options, $logger);
204
  }
205
 
106
  * @param array $options (optional) options for conversion
107
  * @param BaseLogger $logger (optional)
108
  */
109
+ final public function __construct($source, $destination, $options = [], $logger = null)
110
  {
111
  InputValidator::checkSourceAndDestination($source, $destination);
112
 
152
  * Set destination.
153
  *
154
  * @param string $destination path to destination
155
+ * @return void
156
  */
157
  public function setDestination($destination)
158
  {
199
  */
200
  public static function createInstance($source, $destination, $options = [], $logger = null)
201
  {
 
202
  return new static($source, $destination, $options, $logger);
203
  }
204
 
vendor/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/LoggerTrait.php CHANGED
@@ -36,7 +36,7 @@ trait LoggerTrait
36
  * @param string $style (optional) Ie "italic" or "bold"
37
  * @return void
38
  */
39
- protected function logLn($msg, $style = '')
40
  {
41
  if (isset($this->logger)) {
42
  $this->logger->logLn($msg, $style);
@@ -62,7 +62,7 @@ trait LoggerTrait
62
  * @param string $style (optional) Ie "italic" or "bold"
63
  * @return void
64
  */
65
- protected function log($msg, $style = '')
66
  {
67
  if (isset($this->logger)) {
68
  $this->logger->log($msg, $style);
36
  * @param string $style (optional) Ie "italic" or "bold"
37
  * @return void
38
  */
39
+ public function logLn($msg, $style = '')
40
  {
41
  if (isset($this->logger)) {
42
  $this->logger->logLn($msg, $style);
62
  * @param string $style (optional) Ie "italic" or "bold"
63
  * @return void
64
  */
65
+ public function log($msg, $style = '')
66
  {
67
  if (isset($this->logger)) {
68
  $this->logger->log($msg, $style);
vendor/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/WarningLoggerTrait.php CHANGED
@@ -14,7 +14,7 @@ namespace WebPConvert\Convert\Converters\BaseTraits;
14
  */
15
  trait WarningLoggerTrait
16
  {
17
- abstract protected function logLn($msg, $style = '');
18
 
19
  /** @var string|array|null Previous error handler (stored in order to be able pass warnings on) */
20
  private $previousErrorHandler;
14
  */
15
  trait WarningLoggerTrait
16
  {
17
+ abstract public function logLn($msg, $style = '');
18
 
19
  /** @var string|array|null Previous error handler (stored in order to be able pass warnings on) */
20
  private $previousErrorHandler;
vendor/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/ExecTrait.php CHANGED
@@ -37,6 +37,7 @@ trait ExecTrait
37
  }
38
  return false;
39
  }
 
40
  }
41
 
42
  /**
37
  }
38
  return false;
39
  }
40
+ return false; // to satisfy phpstan
41
  }
42
 
43
  /**
vendor/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php CHANGED
@@ -443,6 +443,7 @@ class Cwebp extends AbstractConverter
443
  }
444
  return $returnCode;
445
  }
 
446
  }
447
 
448
  /**
443
  }
444
  return $returnCode;
445
  }
446
+ return ''; // Will not happen. Just so phpstan doesn't complain
447
  }
448
 
449
  /**
vendor/rosell-dk/webp-convert/src/Convert/Converters/Ewww.php CHANGED
@@ -107,10 +107,10 @@ class Ewww extends AbstractConverter
107
  break;
108
  case 'exceeded':
109
  throw new ConverterNotOperationalException('Quota has exceeded');
110
- break;
111
  case 'invalid':
112
  throw new InvalidApiKeyException('Api key is invalid');
113
- break;
114
  }
115
  }
116
  }
107
  break;
108
  case 'exceeded':
109
  throw new ConverterNotOperationalException('Quota has exceeded');
110
+ //break;
111
  case 'invalid':
112
  throw new InvalidApiKeyException('Api key is invalid');
113
+ //break;
114
  }
115
  }
116
  }
vendor/rosell-dk/webp-convert/src/Convert/Converters/Gd.php CHANGED
@@ -189,34 +189,29 @@ class Gd extends AbstractConverter
189
  */
190
  private function createImageResource()
191
  {
192
- // In case of failure, image will be false
193
-
194
  $mimeType = $this->getMimeTypeOfSource();
195
 
196
- if ($mimeType == 'image/png') {
197
- $image = imagecreatefrompng($this->source);
198
- if ($image === false) {
199
- throw new ConversionFailedException(
200
- 'Gd failed when trying to load/create image (imagecreatefrompng() failed)'
201
- );
202
- }
203
- return $image;
204
- }
205
 
206
- if ($mimeType == 'image/jpeg') {
207
- $image = imagecreatefromjpeg($this->source);
208
- if ($image === false) {
209
- throw new ConversionFailedException(
210
- 'Gd failed when trying to load/create image (imagecreatefromjpeg() failed)'
211
- );
212
- }
213
- return $image;
214
  }
215
 
216
- /*
217
- throw new InvalidInputException(
218
- 'Unsupported mime type:' . $mimeType
219
- );*/
220
  }
221
 
222
  /**
@@ -260,6 +255,11 @@ class Gd extends AbstractConverter
260
  protected function trySettingAlphaBlending($image)
261
  {
262
  if (function_exists('imagealphablending')) {
 
 
 
 
 
263
  if (!imagealphablending($image, true)) {
264
  $this->logLn('Warning: imagealphablending() failed');
265
  return false;
@@ -377,7 +377,7 @@ class Gd extends AbstractConverter
377
  'An error was produced during conversion',
378
  $this->errorMessageWhileCreating
379
  );
380
- break;
381
  }
382
  }
383
 
189
  */
190
  private function createImageResource()
191
  {
 
 
192
  $mimeType = $this->getMimeTypeOfSource();
193
 
194
+ switch ($mimeType) {
195
+ case 'image/png':
196
+ $image = imagecreatefrompng($this->source);
197
+ if ($image === false) {
198
+ throw new ConversionFailedException(
199
+ 'Gd failed when trying to load/create image (imagecreatefrompng() failed)'
200
+ );
201
+ }
202
+ return $image;
203
 
204
+ case 'image/jpeg':
205
+ $image = imagecreatefromjpeg($this->source);
206
+ if ($image === false) {
207
+ throw new ConversionFailedException(
208
+ 'Gd failed when trying to load/create image (imagecreatefromjpeg() failed)'
209
+ );
210
+ }
211
+ return $image;
212
  }
213
 
214
+ throw new InvalidInputException('Unsupported mime type');
 
 
 
215
  }
216
 
217
  /**
255
  protected function trySettingAlphaBlending($image)
256
  {
257
  if (function_exists('imagealphablending')) {
258
+ // TODO: Should we set second parameter to false instead?
259
+ // As here: https://www.texelate.co.uk/blog/retaining-png-transparency-with-php-gd
260
+ // (PS: I have backed up some local changes - to Gd.php, which includes changing that param
261
+ // to false. But I didn't finish up back then and now I forgot, so need to retest before
262
+ // changing anything...
263
  if (!imagealphablending($image, true)) {
264
  $this->logLn('Warning: imagealphablending() failed');
265
  return false;
377
  'An error was produced during conversion',
378
  $this->errorMessageWhileCreating
379
  );
380
+ //break;
381
  }
382
  }
383
 
vendor/rosell-dk/webp-convert/src/Convert/Converters/Stack.php CHANGED
@@ -200,6 +200,8 @@ class Stack extends AbstractConverter
200
  return;
201
  } catch (ConverterNotOperationalException $e) {
202
  $this->logLn($e->getMessage());
 
 
203
  } catch (ConversionFailedException $e) {
204
  $this->logLn($e->getMessage(), 'italic');
205
  $prev = $e->getPrevious();
@@ -210,10 +212,7 @@ class Stack extends AbstractConverter
210
  }
211
  //$this->logLn($e->getTraceAsString());
212
  $anyRuntimeErrors = true;
213
- } catch (ConversionSkippedException $e) {
214
- $this->logLn($e->getMessage());
215
  }
216
-
217
  $this->logLn($converterId . ' failed in ' . round((microtime(true) - $beginTime) * 1000) . ' ms');
218
  }
219
 
200
  return;
201
  } catch (ConverterNotOperationalException $e) {
202
  $this->logLn($e->getMessage());
203
+ } catch (ConversionSkippedException $e) {
204
+ $this->logLn($e->getMessage());
205
  } catch (ConversionFailedException $e) {
206
  $this->logLn($e->getMessage(), 'italic');
207
  $prev = $e->getPrevious();
212
  }
213
  //$this->logLn($e->getTraceAsString());
214
  $anyRuntimeErrors = true;
 
 
215
  }
 
216
  $this->logLn($converterId . ' failed in ' . round((microtime(true) - $beginTime) * 1000) . ' ms');
217
  }
218
 
vendor/rosell-dk/webp-convert/src/Helpers/PathChecker.php CHANGED
@@ -29,7 +29,7 @@ class PathChecker
29
  * See https://blog.ripstech.com/2018/new-php-exploitation-technique/
30
  *
31
  * @param string $absFilePath
32
- * @return string sanitized file path
33
  */
34
  public static function checkAbsolutePath($absFilePath, $text = 'file')
35
  {
29
  * See https://blog.ripstech.com/2018/new-php-exploitation-technique/
30
  *
31
  * @param string $absFilePath
32
+ * @return void
33
  */
34
  public static function checkAbsolutePath($absFilePath, $text = 'file')
35
  {
vendor/rosell-dk/webp-convert/src/Serve/ServeConvertedWebP.php CHANGED
@@ -179,6 +179,7 @@ class ServeConvertedWebP
179
  if ($options['serve-original']) {
180
  Header::addLogHeader('Serving original (told to)', $serveLogger);
181
  self::serveOriginal($source, $options['serve-image']);
 
182
  }
183
 
184
  if ($options['redirect-to-self-instead-of-serving']) {
@@ -198,6 +199,7 @@ class ServeConvertedWebP
198
  ($filesizeDestination > $filesizeSource)) {
199
  Header::addLogHeader('Serving original (it is smaller)', $serveLogger);
200
  self::serveOriginal($source, $options['serve-image']);
 
201
  }
202
 
203
  Header::addLogHeader('Serving converted file', $serveLogger);
179
  if ($options['serve-original']) {
180
  Header::addLogHeader('Serving original (told to)', $serveLogger);
181
  self::serveOriginal($source, $options['serve-image']);
182
+ return;
183
  }
184
 
185
  if ($options['redirect-to-self-instead-of-serving']) {
199
  ($filesizeDestination > $filesizeSource)) {
200
  Header::addLogHeader('Serving original (it is smaller)', $serveLogger);
201
  self::serveOriginal($source, $options['serve-image']);
202
+ return;
203
  }
204
 
205
  Header::addLogHeader('Serving converted file', $serveLogger);
vendor/rosell-dk/webp-convert/src/Serve/ServeConvertedWebPWithErrorHandling.php CHANGED
@@ -93,7 +93,7 @@ class ServeConvertedWebPWithErrorHandling
93
 
94
  case 'throw':
95
  throw $e;
96
- break;
97
 
98
  case 'report-as-image':
99
  // TODO: Implement or discard ?
93
 
94
  case 'throw':
95
  throw $e;
96
+ //break; commented out as phpstan complains. But do something else complain now?
97
 
98
  case 'report-as-image':
99
  // TODO: Implement or discard ?
webp-express.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WebP Express
4
  * Plugin URI: https://github.com/rosell-dk/webp-express
5
  * Description: Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP. Works on anything (media library images, galleries, theme images etc).
6
- * Version: 0.17.2
7
  * Author: Bjørn Rosell
8
  * Author URI: https://www.bitwise-it.dk
9
  * License: GPL2
3
  * Plugin Name: WebP Express
4
  * Plugin URI: https://github.com/rosell-dk/webp-express
5
  * Description: Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP. Works on anything (media library images, galleries, theme images etc).
6
+ * Version: 0.17.3
7
  * Author: Bjørn Rosell
8
  * Author URI: https://www.bitwise-it.dk
9
  * License: GPL2