WebP Express - Version 0.6.1

Version Description

= 0.6.0 = Adding caching option, fixed imagick converter, added gmagick converter and more!

Download this release

Release Info

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

Code changes from version 0.6.0 to 0.6.1

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.bitwise-it.dk/contact
4
  Tags: webp, images, performance
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
- Stable tag: 0.6.0
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
4
  Tags: webp, images, performance
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
+ Stable tag: 0.6.1
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
lib/options/enqueue_scripts.php CHANGED
@@ -10,7 +10,7 @@ wp_register_script(
10
  'webp-express-options-page',
11
  plugins_url('js/webp-express-options-page.js', __FILE__),
12
  ['sortable'],
13
- '0.6.0dev9'
14
  );
15
  wp_enqueue_script('webp-express-options-page');
16
 
@@ -25,7 +25,7 @@ wp_register_style(
25
  'webp-express-options-page-css',
26
  plugins_url('css/webp-express-options-page.css', __FILE__),
27
  null,
28
- '0.6.0dev7'
29
  );
30
  wp_enqueue_style('webp-express-options-page-css');
31
 
10
  'webp-express-options-page',
11
  plugins_url('js/webp-express-options-page.js', __FILE__),
12
  ['sortable'],
13
+ '0.6.0-1'
14
  );
15
  wp_enqueue_script('webp-express-options-page');
16
 
25
  'webp-express-options-page-css',
26
  plugins_url('css/webp-express-options-page.css', __FILE__),
27
  null,
28
+ '0.6.0'
29
  );
30
  wp_enqueue_style('webp-express-options-page-css');
31
 
lib/options/js/webp-express-options-page.js CHANGED
@@ -230,9 +230,11 @@ document.addEventListener('DOMContentLoaded', function() {
230
  updateCacheControlCustomVisibility();
231
  });
232
 
233
- document.getElementById('quality_auto_select').addEventListener('change', function() {
234
- updateQualityVisibility();
235
- });
 
 
236
 
237
  //alert(sortable.toArray());
238
  });
@@ -367,7 +369,12 @@ function testConverter(id) {
367
  url += '?source=' + paths['webpExpressRoot'] + '/test/' + filename;
368
  url += '&destination=' + paths['destinationRoot'] + '/test-conversions/' + filename + '.webp';
369
  url += '&converter=' + converter['converter'];
370
- url += '&max-quality=' + document.getElementsByName('max-quality')[0].value;
 
 
 
 
 
371
  //url += '&method=' + document.getElementsByName('webp_express_method')[0].value;
372
 
373
  if (converter.options) {
230
  updateCacheControlCustomVisibility();
231
  });
232
 
233
+ if (document.getElementById('quality_auto_select')) {
234
+ document.getElementById('quality_auto_select').addEventListener('change', function() {
235
+ updateQualityVisibility();
236
+ });
237
+ }
238
 
239
  //alert(sortable.toArray());
240
  });
369
  url += '?source=' + paths['webpExpressRoot'] + '/test/' + filename;
370
  url += '&destination=' + paths['destinationRoot'] + '/test-conversions/' + filename + '.webp';
371
  url += '&converter=' + converter['converter'];
372
+ if (document.getElementById('max_quality')) {
373
+ url += '&max-quality=' + document.getElementById('max_quality').value;
374
+ }
375
+ if (document.getElementById('quality_specific')) {
376
+ url += '&quality=' + document.getElementById('quality_specific').value;
377
+ }
378
  //url += '&method=' + document.getElementsByName('webp_express_method')[0].value;
379
 
380
  if (converter.options) {
lib/options/page.php CHANGED
@@ -233,7 +233,7 @@ if ($canDetectQuality) {
233
  'the quality of the source or max quality. Recommended value: Somewhere between 50-85');
234
  echo '</th><td>';
235
 
236
- echo '<input type="text" size=3 name="max-quality" value="' . $maxQuality . '">';
237
  echo '</td></tr>';
238
  } else {
239
 
@@ -254,7 +254,7 @@ if ($canDetectQuality) {
254
  }
255
  echo '</th><td>';
256
 
257
- echo '<input type="text" size=3 name="quality-specific" value="' . $qualitySpecific . '">';
258
  echo '</td></tr>';
259
 
260
 
233
  'the quality of the source or max quality. Recommended value: Somewhere between 50-85');
234
  echo '</th><td>';
235
 
236
+ echo '<input type="text" size=3 id="max_quality" name="max-quality" value="' . $maxQuality . '">';
237
  echo '</td></tr>';
238
  } else {
239
 
254
  }
255
  echo '</th><td>';
256
 
257
+ echo '<input type="text" size=3 id="quality_specific" name="quality-specific" value="' . $qualitySpecific . '">';
258
  echo '</td></tr>';
259
 
260
 
test/test-run.php CHANGED
@@ -50,6 +50,9 @@ $converter = $_GET['converter'];
50
  if (isset($_GET['max-quality'])) {
51
  $options['max-quality'] = intval($_GET['max-quality']);
52
  }
 
 
 
53
 
54
  /*
55
  if (isset($_GET['method'])) {
50
  if (isset($_GET['max-quality'])) {
51
  $options['max-quality'] = intval($_GET['max-quality']);
52
  }
53
+ if (isset($_GET['quality'])) {
54
+ $options['quality'] = intval($_GET['quality']);
55
+ }
56
 
57
  /*
58
  if (isset($_GET['method'])) {
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.6.0
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.6.1
7
  * Author: Bjørn Rosell
8
  * Author URI: https://www.bitwise-it.dk
9
  * License: GPL2