Version Description
Download this release
Release Info
Developer | alexdunae |
Plugin | Smush Image Compression and Optimization |
Version | 1.3.3 |
Comparing to | |
See all releases |
Code changes from version 1.3.2 to 1.3.3
- readme.txt +5 -2
- wp-smushit.php +8 -7
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
=== WP Smush.it ===
|
2 |
Plugin Name: WP Smush.it
|
3 |
-
Version: 1.3.
|
4 |
Author: Dialect
|
5 |
Author URI: http://dialect.ca/?wp_smush_it
|
6 |
Contributors: alexdunae
|
7 |
Tags: images, image, attachments, attachment
|
8 |
Requires at least: 2.8
|
9 |
Tested up to: 3.0.4
|
10 |
-
Stable tag: 1.3.
|
11 |
|
12 |
Reduce image file sizes and improve performance using the <a href="http://smush.it/">Smush.it</a> API within WordPress.
|
13 |
|
@@ -47,6 +47,9 @@ Plugin updates are announced on [http://www.twitter.com/TheCHANGELOG](http://www
|
|
47 |
|
48 |
== Changelog ==
|
49 |
|
|
|
|
|
|
|
50 |
= 1.3.2
|
51 |
* removed realpath() call
|
52 |
* IPv6 compat
|
1 |
=== WP Smush.it ===
|
2 |
Plugin Name: WP Smush.it
|
3 |
+
Version: 1.3.3
|
4 |
Author: Dialect
|
5 |
Author URI: http://dialect.ca/?wp_smush_it
|
6 |
Contributors: alexdunae
|
7 |
Tags: images, image, attachments, attachment
|
8 |
Requires at least: 2.8
|
9 |
Tested up to: 3.0.4
|
10 |
+
Stable tag: 1.3.3
|
11 |
|
12 |
Reduce image file sizes and improve performance using the <a href="http://smush.it/">Smush.it</a> API within WordPress.
|
13 |
|
47 |
|
48 |
== Changelog ==
|
49 |
|
50 |
+
= 1.3.3
|
51 |
+
* add debugging output on failure
|
52 |
+
|
53 |
= 1.3.2
|
54 |
* removed realpath() call
|
55 |
* IPv6 compat
|
wp-smushit.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Integrate the Smush.it API into WordPress.
|
4 |
-
* @version 1.3.
|
5 |
* @package WP_SmushIt
|
6 |
*/
|
7 |
/*
|
@@ -9,8 +9,8 @@ Plugin Name: WP Smush.it
|
|
9 |
Plugin URI: http://dialect.ca/code/wp-smushit/
|
10 |
Description: Reduce image file sizes and improve performance using the <a href="http://smush.it/">Smush.it</a> API within WordPress.
|
11 |
Author: Dialect
|
12 |
-
Version: 1.3.
|
13 |
-
Author URI: http://dialect.ca
|
14 |
*/
|
15 |
|
16 |
if ( !function_exists('json_encode') ) {
|
@@ -109,9 +109,9 @@ function wp_smushit_manual() {
|
|
109 |
* @returns array
|
110 |
*/
|
111 |
function wp_smushit($file) {
|
112 |
-
//
|
113 |
-
if( in_array($_SERVER['SERVER_ADDR'], array('127.0.0.1', '::1')) )
|
114 |
-
|
115 |
|
116 |
// canonicalize path - disabled 2011-02-1 troubleshooting 'Could not find...' errors.
|
117 |
// From the PHP docs: "The running script must have executable permissions on
|
@@ -167,8 +167,9 @@ function wp_smushit($file) {
|
|
167 |
if ( -1 === intval($data->dest_size) )
|
168 |
return array($file, __('No savings', WP_SMUSHIT_DOMAIN));
|
169 |
|
170 |
-
if ( !$data->dest ) {
|
171 |
$err = ($data->error ? 'Smush.it error: ' . $data->error : 'unknown error');
|
|
|
172 |
return array($file, __($err, WP_SMUSHIT_DOMAIN) );
|
173 |
}
|
174 |
|
1 |
<?php
|
2 |
/**
|
3 |
* Integrate the Smush.it API into WordPress.
|
4 |
+
* @version 1.3.3
|
5 |
* @package WP_SmushIt
|
6 |
*/
|
7 |
/*
|
9 |
Plugin URI: http://dialect.ca/code/wp-smushit/
|
10 |
Description: Reduce image file sizes and improve performance using the <a href="http://smush.it/">Smush.it</a> API within WordPress.
|
11 |
Author: Dialect
|
12 |
+
Version: 1.3.3
|
13 |
+
Author URI: http://dialect.ca/
|
14 |
*/
|
15 |
|
16 |
if ( !function_exists('json_encode') ) {
|
109 |
* @returns array
|
110 |
*/
|
111 |
function wp_smushit($file) {
|
112 |
+
// don't run on localhost, IPv4 and IPv6 checks
|
113 |
+
// if( in_array($_SERVER['SERVER_ADDR'], array('127.0.0.1', '::1')) )
|
114 |
+
// return array($file, __('Not processed (local file)', WP_SMUSHIT_DOMAIN));
|
115 |
|
116 |
// canonicalize path - disabled 2011-02-1 troubleshooting 'Could not find...' errors.
|
117 |
// From the PHP docs: "The running script must have executable permissions on
|
167 |
if ( -1 === intval($data->dest_size) )
|
168 |
return array($file, __('No savings', WP_SMUSHIT_DOMAIN));
|
169 |
|
170 |
+
if ( !$data->dest || true ) {
|
171 |
$err = ($data->error ? 'Smush.it error: ' . $data->error : 'unknown error');
|
172 |
+
$err .= " while processing <span class='code'>$file_url</span> (<span class='code'>$file_path</span>)";
|
173 |
return array($file, __($err, WP_SMUSHIT_DOMAIN) );
|
174 |
}
|
175 |
|