Version Description
- Better debugging for customers by including WordPress version and Kraken plugin version per request.
Download this release
Release Info
Developer | karim79 |
Plugin | Kraken.io Image Optimizer |
Version | 1.0.5.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.5.7 to 1.0.5.8
- kraken.php +5 -3
- lib/Kraken.php +2 -0
- readme.txt +4 -1
kraken.php
CHANGED
@@ -21,8 +21,8 @@
|
|
21 |
* Plugin URI: http://wordpress.org/plugins/kraken-image-optimizer/
|
22 |
* Description: This plugin allows you to optimize your WordPress images through the Kraken API, the world's most advanced image optimization solution.
|
23 |
* Author: Karim Salman
|
24 |
-
* Version: 1.0.5.
|
25 |
-
* Stable Tag: 1.0.5.
|
26 |
* Author URI: https://kraken.io
|
27 |
* License GPL2
|
28 |
*/
|
@@ -40,6 +40,8 @@ if ( !class_exists( 'Wp_Kraken' ) ) {
|
|
40 |
|
41 |
private $optimization_type = 'lossy';
|
42 |
|
|
|
|
|
43 |
function __construct() {
|
44 |
$plugin_dir_path = dirname( __FILE__ );
|
45 |
require_once( $plugin_dir_path . '/lib/Kraken.php' );
|
@@ -468,7 +470,7 @@ if ( !class_exists( 'Wp_Kraken' ) ) {
|
|
468 |
$ch = curl_init( $kraked_url );
|
469 |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
470 |
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
|
471 |
-
|
472 |
$result = curl_exec( $ch );
|
473 |
$rv = file_put_contents( $image_path, $result );
|
474 |
return $rv !== false;
|
21 |
* Plugin URI: http://wordpress.org/plugins/kraken-image-optimizer/
|
22 |
* Description: This plugin allows you to optimize your WordPress images through the Kraken API, the world's most advanced image optimization solution.
|
23 |
* Author: Karim Salman
|
24 |
+
* Version: 1.0.5.8
|
25 |
+
* Stable Tag: 1.0.5.8
|
26 |
* Author URI: https://kraken.io
|
27 |
* License GPL2
|
28 |
*/
|
40 |
|
41 |
private $optimization_type = 'lossy';
|
42 |
|
43 |
+
public static $kraken_plugin_version = '1.0.5.8';
|
44 |
+
|
45 |
function __construct() {
|
46 |
$plugin_dir_path = dirname( __FILE__ );
|
47 |
require_once( $plugin_dir_path . '/lib/Kraken.php' );
|
470 |
$ch = curl_init( $kraked_url );
|
471 |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
472 |
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
|
473 |
+
curl_setopt( $ch, CURLOPT_USERAGENT, 'WordPress/' . get_bloginfo('version') . ' KrakenPlugin/' . self::$kraken_plugin_version );
|
474 |
$result = curl_exec( $ch );
|
475 |
$rv = file_put_contents( $image_path, $result );
|
476 |
return $rv !== false;
|
lib/Kraken.php
CHANGED
@@ -4,6 +4,7 @@ class Kraken
|
|
4 |
{
|
5 |
|
6 |
protected $auth = array();
|
|
|
7 |
|
8 |
public function __construct($key = '', $secret = '')
|
9 |
{
|
@@ -91,6 +92,7 @@ class Kraken
|
|
91 |
curl_setopt($curl, CURLOPT_TIMEOUT, 400);
|
92 |
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
|
93 |
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
|
|
|
94 |
curl_setopt($curl, CURLOPT_FAILONERROR, 1);
|
95 |
|
96 |
$response = json_decode(curl_exec($curl), true);
|
4 |
{
|
5 |
|
6 |
protected $auth = array();
|
7 |
+
public static $kraken_plugin_version = '1.0.5.8';
|
8 |
|
9 |
public function __construct($key = '', $secret = '')
|
10 |
{
|
92 |
curl_setopt($curl, CURLOPT_TIMEOUT, 400);
|
93 |
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
|
94 |
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
|
95 |
+
curl_setopt($curl, CURLOPT_USERAGENT, 'WordPress/' . get_bloginfo('version') . ' KrakenPlugin/' . self::$kraken_plugin_version);
|
96 |
curl_setopt($curl, CURLOPT_FAILONERROR, 1);
|
97 |
|
98 |
$response = json_decode(curl_exec($curl), true);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: Image Optimizer, Image Optimiser, Optimize, Images, Media, Performance, SE
|
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 4.1
|
6 |
Donate link: https://kraken.io
|
7 |
-
Stable tag: 1.0.5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
10 |
|
@@ -94,6 +94,9 @@ You will need to switch the Media Library from the Thumbnail view to the List vi
|
|
94 |
|
95 |
== Changelog ==
|
96 |
|
|
|
|
|
|
|
97 |
= 1.0.5.7 =
|
98 |
* Added ability to disable automatic optimization of uploads.
|
99 |
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 4.1
|
6 |
Donate link: https://kraken.io
|
7 |
+
Stable tag: 1.0.5.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
10 |
|
94 |
|
95 |
== Changelog ==
|
96 |
|
97 |
+
= 1.0.5.8 =
|
98 |
+
* Better debugging for customers by including WordPress version and Kraken plugin version per request.
|
99 |
+
|
100 |
= 1.0.5.7 =
|
101 |
* Added ability to disable automatic optimization of uploads.
|
102 |
|