Version Description
- Fixed bug which led to kraked file not being retrieved in rare cases.
- Increase ajax timeout for media library inline kraking to be kinder to slower WordPress blogs.
Download this release
Release Info
Developer | karim79 |
Plugin | Kraken.io Image Optimizer |
Version | 1.0.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.2.1
- js/ajax.js +1 -1
- kraken.php +9 -16
- readme.txt +6 -1
js/ajax.js
CHANGED
@@ -147,7 +147,7 @@ jQuery(document).ready(function ($) {
|
|
147 |
data: data,
|
148 |
type: "post",
|
149 |
dataType: "json",
|
150 |
-
timeout:
|
151 |
context: $button
|
152 |
})
|
153 |
|
147 |
data: data,
|
148 |
type: "post",
|
149 |
dataType: "json",
|
150 |
+
timeout: 120000,
|
151 |
context: $button
|
152 |
})
|
153 |
|
kraken.php
CHANGED
@@ -21,8 +21,8 @@
|
|
21 |
* Plugin URI: http://wordpress.org/plugins/kraken-image-optimizer/
|
22 |
* Description: Optimize Wordpress image uploads through Kraken.io's Image Optimization API
|
23 |
* Author: Karim Salman
|
24 |
-
* Version: 1.0.2
|
25 |
-
* Stable Tag: 1.0.2
|
26 |
* Author URI: https://kraken.io
|
27 |
* License GPL2
|
28 |
*/
|
@@ -420,23 +420,16 @@ if ( !class_exists( 'Wp_Kraken' ) ) {
|
|
420 |
}
|
421 |
}
|
422 |
|
423 |
-
function replace_image($image_path, $kraked_url) {
|
424 |
-
|
425 |
$rv = false;
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
} else if ( function_exists('curl_version') ) {
|
431 |
-
|
432 |
-
$ch = curl_init( $kraked_url );
|
433 |
-
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
434 |
-
$result = curl_exec($ch);
|
435 |
-
}
|
436 |
return $rv !== false;
|
437 |
}
|
438 |
|
439 |
-
function optimize_image($url) {
|
440 |
|
441 |
$settings = $this->kraken_settings;
|
442 |
$kraken = new Kraken($settings['api_key'], $settings['api_secret']);
|
@@ -455,7 +448,7 @@ if ( !class_exists( 'Wp_Kraken' ) ) {
|
|
455 |
return $data;
|
456 |
}
|
457 |
|
458 |
-
function optimize_thumbnails($image_data) {
|
459 |
|
460 |
$image_id = $this->id;
|
461 |
$upload_dir = wp_upload_dir();
|
21 |
* Plugin URI: http://wordpress.org/plugins/kraken-image-optimizer/
|
22 |
* Description: Optimize Wordpress image uploads through Kraken.io's Image Optimization API
|
23 |
* Author: Karim Salman
|
24 |
+
* Version: 1.0.2.1
|
25 |
+
* Stable Tag: 1.0.2.1
|
26 |
* Author URI: https://kraken.io
|
27 |
* License GPL2
|
28 |
*/
|
420 |
}
|
421 |
}
|
422 |
|
423 |
+
function replace_image( $image_path, $kraked_url ) {
|
|
|
424 |
$rv = false;
|
425 |
+
$ch = curl_init( $kraked_url );
|
426 |
+
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
427 |
+
$result = curl_exec( $ch );
|
428 |
+
$rv = file_put_contents( $image_path, $result );
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
return $rv !== false;
|
430 |
}
|
431 |
|
432 |
+
function optimize_image( $url ) {
|
433 |
|
434 |
$settings = $this->kraken_settings;
|
435 |
$kraken = new Kraken($settings['api_key'], $settings['api_secret']);
|
448 |
return $data;
|
449 |
}
|
450 |
|
451 |
+
function optimize_thumbnails( $image_data ) {
|
452 |
|
453 |
$image_id = $this->id;
|
454 |
$upload_dir = wp_upload_dir();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: Image Optimizer, Optimize, Images, Media, Performance, SEO, smushit, compr
|
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 3.8.1
|
6 |
Donate link: https://kraken.io
|
7 |
-
Stable tag: 1.0.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
10 |
|
@@ -80,3 +80,8 @@ From our plans page, right [here](https://kraken.io/plans "Kraken.io plans and p
|
|
80 |
* Information about thumbnail optimization is persisted for future fun-stats page/widget.
|
81 |
* Minor CSS tweaks.
|
82 |
|
|
|
|
|
|
|
|
|
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 3.8.1
|
6 |
Donate link: https://kraken.io
|
7 |
+
Stable tag: 1.0.2.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
10 |
|
80 |
* Information about thumbnail optimization is persisted for future fun-stats page/widget.
|
81 |
* Minor CSS tweaks.
|
82 |
|
83 |
+
= 1.0.2.1 =
|
84 |
+
* Fixed bug which led to kraked file not being retrieved in rare cases.
|
85 |
+
* Increase ajax timeout for media library inline kraking to be kinder to slower WordPress blogs.
|
86 |
+
|
87 |
+
|